フィルターのクリア

To seperate object at foreground from background with boundary

1 回表示 (過去 30 日間)
ali
ali 2016 年 8 月 29 日
回答済み: ali 2016 年 8 月 29 日
Hi all
if true
% code
end
thresh=+(gri>113);
imshow(thresh);
BW2 = imcomplement(thresh);
figure;imshow(BW2);
bw2 = imfill(BW2, 'holes');
figure;imshow(bw2);
labeledImage = bwlabel(bw2);
st=regionprops(labeledImage,'area','Perimeter');
% Get areas and perimeters of all the regions into single arrays.
allperi = [st.Perimeter];
% Find objects that have "preim" values of big perimetiry.
bigObjects = find(allperi > 2500); % Whatever value you want.
% labeledImage1 = bwlabel(bigObjects);
% figure;imshow(labeledImage1);
% Compute new binary image with only the big perim objects in it.
bI = ismember(labeledImage, bigObjects) > 0;
figure;imshow(bI);
img1 = uint8(255.*bsxfun(@times,im2double(gri),bI));
figure;imshow(img1);
The code is above. I want to take only foregorund object to find features from that but boundaries only get How can I get the object with inside features like second image.

採用された回答

ali
ali 2016 年 8 月 29 日
I done it like in figure. NOw how can I only extract features from only wanted object.

その他の回答 (1 件)

ali
ali 2016 年 8 月 29 日
Or just fill the black zones between the white without defect the original binary image borders

カテゴリ

Help Center および File ExchangeFeature Detection and Extraction についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by