1
$\begingroup$

I am performing segmentation using opencv, but the segmented image has regions with breaks and also the border isn't smooth. How can I handle this problems?

segmented image of hand

$\endgroup$
1
$\begingroup$

If I understand correctly, you need to use erosion and dilation morphological filter.
To ged rid of inclusion, like below ring finger, blob detection would be helpful, to detect small blob and erase it (meassure its area and decide based on that).
As for continuity, simple blur after errosion helps to get it smoother, if effect is too small, then use contour trace and smooth it via curves (RDP algorithm, convert it to Catmull-Rom or B-spline and smooth it from here). If you take curves approach, take the contour and discard rest, it automatically solves component inclusions.

The inclusion in index finger is too big to be handled by erosion and dilation, as it may change geometry too much. Fast idea is to generate circles of estimated radius (you know from scale or further detection that finger should be say 40px wide), so circles should push contour of finger, standardizing it's size). With curves, it is quite simple to handle checking distance to "parallel" wall.

Another approach is to take skeleton and draw fingers yourself, but this requires separate palm handling.

$\endgroup$
  • $\begingroup$ Thanks a lot,will try to incorporate your suggestion in my code.Will get back to you. $\endgroup$ – SANSKAR SINGH Apr 8 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.