how to segment the gray scale image from background

2 件のコメント

Matt J
Matt J 2021 年 5 月 29 日
編集済み: Matt J 2021 年 5 月 29 日
It's a very nice picture, but what is your question? And what grayscale image are you refering to? The image you have posted is RGB.
nadine ahmad
nadine ahmad 2021 年 5 月 29 日
@Matt J first i want to convert the RGB image to gray scale image then segment the gray scale image by region based or boundary based methods to isoleate the hourses from background (I want hourses be white and the background be black)...can you help me with coding?

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

 採用された回答

Matt J
Matt J 2021 年 5 月 29 日
編集済み: Matt J 2021 年 5 月 29 日

0 投票

If you're trying to develop a binary map of the horses, I was able to do so decently using the Image Segmenter app:
load horses
imshow(BW)

10 件のコメント

nadine ahmad
nadine ahmad 2021 年 5 月 29 日
@Matt J sir can you write in details what did you do
nadine ahmad
nadine ahmad 2021 年 5 月 29 日
@Matt J sir can you write the procces how did you do that.. i want to do the steps in my project
nadine ahmad
nadine ahmad 2021 年 5 月 29 日
@Matt J sir are you here?
Matt J
Matt J 2021 年 5 月 29 日
I used the image Segmenter app to do the segmentation interactively.
nadine ahmad
nadine ahmad 2021 年 5 月 29 日
@Matt J yes sir .. but i want to know the details becaues(hourse.mat) dose not work.. i want to creat a segmenter with the same details you used to give me the same resulte you get..
nadine ahmad
nadine ahmad 2021 年 5 月 29 日
@Matt J what did you used Threshold,Graph Cut,Auto Cluster,Find Circles,Local Graph Cut (grabcut),Flood Fill,Draw ROI? what is the method you used ?
Matt J
Matt J 2021 年 5 月 29 日
編集済み: Matt J 2021 年 5 月 29 日
I used combinations of Graph Cut, Flood Fill, and Draw ROI to gradually build up the map. I used them many times in no particular order or pattern that should matter to you, assuming you are segmenting interactively. I'm afraid that none of these tools used by itself will segment the horses in a single stroke, if that's what you were hoping.
nadine ahmad
nadine ahmad 2021 年 5 月 29 日
@Matt J sir can you give me your personal email?
Image Analyst
Image Analyst 2021 年 5 月 29 日
編集済み: Image Analyst 2021 年 5 月 29 日
Matt: If you click the Export code, won't it export code using all the operations you did? I think it would, though it will probably use the coordinates you clicked on, which may not be in the horse or background for a different image where the horse(s) are in different locations. So it might be able to reproduce this segmentation but might not work for segmenting other images properly.
Matt J
Matt J 2021 年 5 月 29 日
Right. Also, since I closed out of the app hours ago, I've no way of Exporting at this point...

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

その他の回答 (1 件)

Matt J
Matt J 2021 年 5 月 29 日
編集済み: Matt J 2021 年 5 月 29 日

0 投票

If the purpose here is to do automatic semantic segmentation of many horse images, you will probably need to train a convolutional neural network to do it. For animal recognition, DeepLab-v3+ seems to have good track record, judging by,
Matlab does have tools for building and training DeepLab-v3+. This might be a good place to start reading,
Obviously, though, the pre-trained version of the network may not work straight out of the box on your specific image database, so you will probably need to retrain it (or use transfer learning) using many manually segmented images. Therefore, it is well worth getting familiar with the Image Segmenter app, even if it doesn't serve your immediate aims.

カテゴリ

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

質問済み:

2021 年 5 月 29 日

編集済み:

2021 年 5 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by