I have obtained a saliency map from an image..... Please can someone help me to segment the object using the saliency map using a simple way.....
The original image is
The saliency map image is
Please do reply.

5 件のコメント

Image Analyst
Image Analyst 2014 年 4 月 11 日
What do you want to segment from it? Leaf? Trellis? Water droplets? Leaf veins?
Elysi Cochin
Elysi Cochin 2014 年 4 月 11 日
編集済み: Image Analyst 2014 年 4 月 12 日
Image Analyst
Image Analyst 2014 年 4 月 11 日
編集済み: Image Analyst 2014 年 4 月 11 日
Star Strider
Star Strider 2014 年 4 月 12 日
FWIW, we do appreciate your fixing them!
Image Analyst
Image Analyst 2014 年 4 月 12 日
I hope she'd taken the hint and fixed it, but I guess not, so I just fixed it now, which you can see if you "show older comments." Sometimes when they post on a web site instead of posting to MATLAB Central, the web link is not correct because it's the whole web page with advertisements and all kinds of stuff, instead of just an image. In cases like that you have to right click on the image and say "View image" to get the true link to the image. Of course it's best to not use third party sites and just upload your image to MATLAB Central instead of someone else's web site.

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

 採用された回答

Image Analyst
Image Analyst 2014 年 4 月 11 日

1 投票

Just threshold:
binaryImage = saliencyImage > 100; % or whatever.
% Fill holes
binaryImage = imfill(binaryImage, 'holes');
imshow(binaryImage);

7 件のコメント

Elysi Cochin
Elysi Cochin 2014 年 4 月 12 日
but i didnt get the object segmented from the above code....
Image Analyst
Image Analyst 2014 年 4 月 12 日
I don't know why not. I did, as shown in the attached m-file (below in blue text). Change the folder and filename in it to run it with your image. You can uncomment bwareaopen if you want to get rid of the small blob below the leaf.
Elysi Cochin
Elysi Cochin 2014 年 4 月 14 日
now its working sir.... thank you so much sir.... thanks a lot sir....
Elysi Cochin
Elysi Cochin 2014 年 4 月 24 日
編集済み: Elysi Cochin 2014 年 4 月 24 日
Sir, based on the above output, please can you tell me how to "Compute accuracy, i.e. the proportion of correctly classified pixels (foreground and background) to the total number of pixels."
Sir or should i ask as a new question?
Image Analyst
Image Analyst 2014 年 4 月 24 日
Well somehow you're going to have to define what is correct and incorrect via a different, more trusted method. Perhaps that's just by manually tracing it with imfreehand to get a mask. See attached demos.
Elysi Cochin
Elysi Cochin 2014 年 4 月 24 日
sir if i have the manual mask... how to compute the background pixel and foreground pixel?
Image Analyst
Image Analyst 2014 年 4 月 24 日
The mask is the foreground and background. There is nothing to compute. To compare you then just do an exclusive OR on the two images - your "true" one that you masked and define as being the absolute truth, and the binary image that you got from thresholding. Personally I'd trust the thresholding one as being the more accurate of the two so maybe to validate all you want is to show good correlation.

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by