I want to manually segment a small object(eg: a feature similar to cell nucleus) which is located within the original image. Can anyone kindly tell me what is the cause to obtain the boundary of the segmented image larger than the real image? (though i drew the boundary along the cell nucleus, segmented image still gives larger segmentation.
Thank you.

 채택된 답변

Image Analyst
Image Analyst 2015년 4월 29일

0 개 추천

댓글 수: 7

Thomas Koelen
Thomas Koelen 2015년 4월 29일
I don't think this is the issue, his problem is that his cut outs include the backround, which is still the case in your tutorial, maybe try to explain him why you can't cut out "just" an object from an image.
Image Analyst
Image Analyst 2015년 4월 29일
Like Thomas said, images must remain rectangular. Attaching your image would be more illustrative than making us work "blind". I'm assuming you used imfreehand() so show us screenshots of what you did and what you ended up with. For what it's worth, I attach 3 of my imfreehand demos.
Chathu
Chathu 2015년 5월 12일
@ Image Analyst: i am really sorry for not replying you quick. Let me have a look at your code and examples and see whether i can figure out from that. Image Analyst and Thomas- thanks a million for your support, so far. Really appreciate your time and effort on this.
From your image in your so called "Answer" below, it looks like you could just take the red channel and threshold it to find dark things:
binaryImage = rgbImage(:,:,1) < someThresholdValue;
labeledImage = bwlabel(binaryImage);
measurements = regionprops(labeledImage, 'Area', 'Centroid');
There are other things you could measure but I don't know what you want to know about that black speck.
Chathu
Chathu 2015년 5월 12일
@ Image Analyst, thank you very much for your response.
Image Analyst
Image Analyst 2015년 5월 12일
Chathu, that's what my Image Segmentation Tutorial does. http://www.mathworks.com/matlabcentral/fileexchange/25157-image-segmentation-tutorial Just tell it to get the dark things instead of the bright things. It will crop them out into separate subimages. Then you can just save the subimages with imwrite().
Chathu
Chathu 2015년 5월 13일
Image Analyst- thank you so much for the tutorial and your responses. Really admire your effort.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Thomas Koelen
Thomas Koelen 2015년 4월 29일

0 개 추천

If I understand you correctly, you want to extract only the nucleus, and not the background, this is impssible because you can't make an image that's not a rectangle. You can however make the backround white.

댓글 수: 1

Chathu
Chathu 2015년 5월 12일
Thomas: please excuse me for replying you late. But yes i understand your point. I am still trying to figure it out.

댓글을 달려면 로그인하십시오.

Chathu
Chathu 2015년 5월 12일

0 개 추천

@ Image Analyst and Thomas- i was trying hard to segment this (pls see the attachment- arrow indicates the portion that i need to segment). Can anyone of you kindly tell me what is the best way/method to segment this?

댓글 수: 2

Since the part you are trying to get is way darker than the other parts I suggest you can do something like this:
(im using a paint image because you didn't supply your own image wihout the arrow)
IM=imread('chathu.png');
figure
IM(IM>30)=255;
bw1=im2bw(IM);
imshow(bw1);
IM2=medfilt2(bw1);
stats = regionprops(IM2,'Centroid');
which give soyu the center of the "blob":
stats =
Centroid: [134.3417 148.9362]
Chathu
Chathu 2015년 5월 12일
@ Image Analyst,
@ Thomas,
Thank you so much for both of your responses. Really appreciate it. Please kindly note that i need to segment(extract) the black speck in a separate window. Since i have huge set of black specs like this, my intention is to segment all black specs, save them in a separate folder, then stack them and finally, model it.

댓글을 달려면 로그인하십시오.

질문:

2015년 4월 29일

댓글:

2015년 5월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by