I have this image:
eyeshadows
I want to outline all eyeshadows within the palette, like this:
outlined eyeshadows
What I did was to convert the image to LAB color space, split the channels, apply CLAHE to l-channel and merge them in order to better delimit the eyeshadow edges. After that, I blurred the image, trying to remove the eyeshadow fallout. The last 2 steps were applying Canny edge detection and dilating edges to close the gaps. After all these steps, the image was ready to outline the eyeshadows.
What I achieved is something like this:
result
My results are pretty good when the eyeshadow palette is clean, doesn’t have any printed patterns or too large names under them, when the eyeshadows are not too crowded and so on.
The biggest problems I encountered are not detecting an eyeshadow because the contour is dashed in the pre-processing stage, or if the artefacts around the eyeshadows become too bold in the pre-processing stage and join multiple eyeshadows into a single one.
In this image you can see that in the Canny step the eyeshadow fallout and the light reflection are pretty noticeable and will impact further processing:
joined eyeshadows
Do you have any advice to improve my logic?
I haven’t worked too much with these pre-processing image functions until now, so any feedback is welcome, even if you think what I want to achieve is not easy or if you think I haven’t chosen the best approach to achieve it.
omega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.