I'm trying to figure out how i can detect parts of an image based on color and/or shape.
Ideally what i want to achieve is that:
- given a lot of pictures which are similar in some way
- they always contain several identical but a non-trivial shape (e.g. variations of finger nails, not just simple squares or circles)
- figure out these interesting areas somehow, so i can detect the color of these areas
Example:
Assume that i have a lot of these images of fingers, i would like to detect which color the nails have. This is a nice example of how finger nails are "quite the same shape" and are "quite similar in color". In the end i should be able to figure out these interesting areas such that i only get the blue nails (== shape) in a picture and nothing else.
What would be the best way to do this?
I thought of the following things which might help me, however i'm unsure on how to do this properly.
- edge detection
- detect colors in a given image using color quantization
- cut out some nail shapes and match them to the picture (but too intensive and too many variations to collect?!)
imagemagick is a tool i can use which supports everything i need for this (i think) Preferrably i would like to do this using node.js