How do I fill in these specific portions in a binary mask?

3 次查看(过去 30 天)
Hello!
These binary masks, which are basically hand patterns, are as follow:
For image one, which represents a pointing hand, I know the center "hole" can be filled by dilating the image, thereby closing the hole, and using the imfill function. The problem is, then, the encircle gaps in the images. Dilating them would mean ruining the outline and shape of the masks.
Image two represents an open hand.
The implementation of the segmentation is also automatic, so it would not be possible to use manually-inputted ROIs.
Is there a way to make it so these gaps can be filled up to at least match the shape of the hands?
Thank you for your replies.

回答(1 个)

Image Analyst
Image Analyst 2014-9-28
  2 个评论
Cosmic Clarity
Cosmic Clarity 2014-9-28
Actually, I already have a program that successfully recognizes gestures. The problem is one of robustness. These gaps in the hand give the system errors.
Is there a way to fix this problem particularly, without having to overhaul the system completely?
Image Analyst
Image Analyst 2014-9-28
And none of the papers ever had to deal with less than perfectly smooth borders? I find that hard to believe. If not, then you can use activecontour() to get a smoothed border. I attach a demo.

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by