Forums > Jitter

Restrict luma/chroma key to contiguous pixels

November 19, 2012 | 2:09 pm

I’m trying to sort how to make masks that would be restricted to contiguous areas a la photoshop’s magic wand tool. Can’t see a way to do this with standard jitter objects or cv.jit— perhaps there’s a gen solution? Feathering edges would be a bonus! Any pointers appreciated.


November 22, 2012 | 9:29 pm

I’m wondering how this would work:

— define an arbitary submatrix
— find pixels within a luma range in the submatrix
— test to see if any of those pixels touch the border of the submatrix
— if so make the submatrix bigger
— repeat until no pixels touch the border

Seems like there must be an easier way…


Viewing 2 posts - 1 through 2 (of 2 total)