How to perform image segmentation
3 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
Image Analyst
2015-4-29
See my Image Segmentation Tutorial : http://www.mathworks.com/matlabcentral/fileexchange/25157-image-segmentation-tutorial
7 个评论
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().
更多回答(2 个)
Thomas Koelen
2015-4-29
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.
Chathu
2015-5-12
2 个评论
Thomas Koelen
2015-5-12
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]
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!