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

2 views (last 30 days)
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.

Answers (1)

Image Analyst
Image Analyst on 28 Sep 2014
  2 Comments
Cosmic Clarity
Cosmic Clarity on 28 Sep 2014
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 on 28 Sep 2014
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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!