How to remove unwanted areas from binary image ?

I want to remove unwanted portion from the binary image to get a clear hand image .

回答 (2 件)

Image Analyst
Image Analyst 2021 年 1 月 2 日

1 投票

Rather than cleaning up a horrible segmented image, you're best off trying to improve the segmentation process. How did you do that lousy job? Was it though color segmentation? Thresholding? Background subtraction? What was it???

9 件のコメント

Zara Khan
Zara Khan 2021 年 1 月 3 日
It's gray image.
Zara Khan
Zara Khan 2021 年 1 月 3 日
I have followed thresholding method for segmenting the gray image.
Image Analyst
Image Analyst 2021 年 1 月 3 日
Yeah, and that does not look like a very good method. Maybe you should try something else, like color segmentation (see my file Exchange or use the Color thresholder app on the Apps tab of the tool ribbon). Or maybe try the foreground detector in the Computer Vision Toolbox.
Zara Khan
Zara Khan 2021 年 1 月 3 日
See the actual image which has been attached as image 3. I am converting it to a gray scale image then applying thtresholding which not giving a clear hand segments.
Image Analyst
Image Analyst 2021 年 1 月 3 日
Why is that an actual image? It looks like a screenshot. And it's been ruined by a pseudocolor look up table (colormap), and has axes and tick labels and marks. Don't you have the original image before you called imagesc() and colormap()?
Zara Khan
Zara Khan 2021 年 1 月 3 日
It's a .bin file . I am visualizing this using imagesc
Image Analyst
Image Analyst 2021 年 1 月 5 日
OK, if you called imagesc() then you did something like this:
imagesc(grayImage);
So you have a gray scale image. That's what was needed. You just need to attach it. Just do this right before or after you call imagesc:
imwrite(grayImage, 'answers.png');
then attach answers.png with either the frame icon or the paper clip icon.
Zara Khan
Zara Khan 2021 年 1 月 5 日
I have attached a gray image here.
Zara Khan
Zara Khan 2021 年 1 月 8 日
The gray image has been attached.

サインインしてコメントする。

Ritankar Sahu
Ritankar Sahu 2021 年 1 月 2 日

0 投票

Hi Zara,
You can try to apply 'bwmorph' function to remove the distant areas. 'dilate', 'bridge', 'clean' these options may be helpful!! If you be unsuccessful, write me back, I will try to find other options.
Have a nice day!

4 件のコメント

Zara Khan
Zara Khan 2021 年 1 月 3 日
any demo please !
Ritankar Sahu
Ritankar Sahu 2021 年 1 月 5 日
There can be many!
  • 'clean' - Removes isolated pixels (individual 1s that are surrounded by 0s).
  • 'fill' - Fills isolated interior pixels (individual 0s that are surrounded by 1s).
It will be better to follow the undermentioned page.
Good Luck!
Ritankar Sahu
Ritankar Sahu 2021 年 1 月 5 日
Please check the image and tell me which looks better for you to go for binarization. Which one you want? The hand or the dude?
Good Luck!!
Zara Khan
Zara Khan 2021 年 1 月 5 日
the hand ofcourse

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeImage Processing Toolbox についてさらに検索

質問済み:

2021 年 1 月 2 日

コメント済み:

2021 年 1 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by