Testing a simple but fast masking technique for isolating the subject in captures made with scAnt
- Convert the source image into HSV and LAB colour spaces
- Detect which areas are in focus using Sobel filters on the L channel and S channel separately for rough and precise (resp.) detection
- Use the H, S, L, A and B channels to isolate "layers" with dark areas, coloured areas, high light areas, etc.
- Clip the upper or lower bounds in each layer to get rid of unwanted noise/ghosting effects
- Merge it all back and binarise