RegionProps
显示 更早的评论
I want to select the pieces of an image that have these caracteristics: area > 10 and Eccentricity > 0,4.
How can i combine those in one fuction?
Thank you for the attention.
Daniel Carvalho
1 个评论
John Wick
2023-7-6
I = imread('cell.tif'); [~,threshold] = edge(I,'sobel'); fudgeFactor = 0.5; BWs = edge(I,'sobel',threshold * fudgeFactor); se90 = strel('line',3,90); se0 = strel('line',3,0); BWsdil = imdilate(BWs,[se90 se0]); BWdfill = imfill(BWsdil,'holes'); BWnobord = imclearborder(BWdfill,4); seD = strel('diamond',1); BWfinal = imerode(BWnobord,seD); BWfinal = imerode(BWfinal,seD); subplot(3, 3, 1), imshow(I),title('Orginal image'); subplot(3, 3, 2), imshow(BWs),title('Binary Gradient Mask'); subplot(3, 3, 3), imshow(BWsdil),title('Dilated Gradient Mask'); subplot(3, 3, 4), imshow(BWdfill),title('BI with Filled Holes'); subplot(3, 3, 5), imshow(BWnobord),title('Cleared Border Image'); subplot(3, 3, 6), imshow(BWfinal),title('Segmented Image'); subplot(3, 3, 7), imshow(labeloverlay(I,BWfinal)),title('Mask Over Image');
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Image Arithmetic 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!