How can I accurately segment an image based on pixel intensity and density ?
1 回表示 (過去 30 日間)
古いコメントを表示
The image attached is what im working on. I need to turn this image into a binary one, to highlight the central dark region( batman logo shaped kind of). Im not getting how to segment this .
0 件のコメント
回答 (1 件)
Image Analyst
2017 年 6 月 30 日
Get two masks and AND them. One from thresholding and one from a texture filter. Basically try starting with something like this:
mask1 = stdfilt(grayImage, 9) > threshold1;
mask2 = grayImage < threshold2;
% Then you'll undoubtedly have to do some clean up, like with bwareafilt() or imclose().
% Now create final mask.
mask = mask1 & mask2;
2 件のコメント
Image Analyst
2017 年 6 月 30 日
Yes, use ones(9) or some other number instead of 9.
Like I said, try imclose() to join small nearby particles that you think should be part of the same blob, and use bwareafilt() to extract out blobs only within a certain size range.
See my Image Segmentation Tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862&sort=downloads_desc
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!