Finding the area and colours of an object in an image

Viewed 1518

I have an image that looks like this:

tattoo of woman

And I want to figure out a couple of things:

  1. What are the predominant colours of the tattoo?
  2. What is the predominant colour of the skin?
  3. What is the area (in pixels) of the tattoo - in the tattoo above, specifically?

I'm new to image processing but my plan of attack is something like:

  1. Run edge detection
  2. Fill in the contours
  3. Take an alpha of that image to just have an alpha of the tattoo
  4. width * height * % of white in alpha = area of tattoo ink
  5. Apply the alpha to the original image and take the colour distribution, to somehow give an answer like "this tattoo has black and red in it"
  6. Invert the alpha and apply it to the original image to get just the skin colour and find the average hue

Does this seem like a sensible approach to get the end result? Is there something easier / more reliable that I might not know, being a novice to this?

I ran some edge analysis code against it using skimage and got a contour like this:

tattoo of woman contour

But I'm having trouble from here to fill in the contour with a colour to create an alpha. The problem is that I only want to know the area of the ink, not of the entire tattoo, so this seems harder to fill in the contour

2 Answers
Related