M Tauqeer
M Tauqeer

Reputation: 408

Determine width of an object(hand) from binary image with reference image

I want to find the width of human hand but stucked at holes in the hand.

I've picture of a hand and found the binary of it. The hand has a cirlce on it whose radius and center is known(reference object). I want to find the widht of the hand but it has some patches(holes) on it and which hinders the finding best width of the hand.

Here is what I could do so far

Hand Image

enter image description here

Binary Image

I've tried selecting roi of hand to find the width, but holes in the image won't let me find the width

Hand Roi (Rectangles)

I've tried chaging them to line too, but couldn't help myself

Hand Roi (Lines)

Upvotes: 2

Views: 184

Answers (1)

I.Newton
I.Newton

Reputation: 1783

If there was a color image, it would have been lot easier to segment the hand and coin. Anyway here's the output and method:

enter image description here enter image description here

  1. Segment out the parts you need to find the comparison of
  2. Find contours and draw bounding rectangles or best fit circle. You can use this length, width or radius as the measures to find compare actual sizes. In this case one was 53 and other 172 (i guess)
  3. Divide the lengths and multiply with your known dimension value.

Note: Don't rely on this method if you need accurate values as, there might be lot of factors like parallax etc to be considered while measuring.

In this case using the width would be a better approximation

For segmenting i had to high boost filter the image, erode and dilate multiple times to ultimately get rid of the background to an extent and then threshold. For the coin, sharpen, dilate and threshold. Shiny corners helped things out. How you segment image depends on what you make use of in it. If you want to automate the process with similar images, then we should see better methods

Upvotes: 1

Related Questions