フィルターのクリア

bwlabel doesn't work as expected and what would be ideal method to segment disconnected regions like this example

2 ビュー (過去 30 日間)
Hi,
This is a segmented image of a brain from thresholding segmentation, Now I want to get A, B, and C regions, which are all brain regions.
when I apply some kind of operation. For now, i am using bwlabel to find the blob areas and correspondingly extract bigger or circular blobs of some kind and get blobs A, B,and C. but the problem is when I do bwlabel I don't get A, B blobs.
Here is the code and attached images before and after bwlabel:
temp = before_dicomFiles{1,15};
%figure, imshow(temp, [LOW1 HIGH1]);
temp = double(temp);
newImg = temp; % this is the actual brain image used for thresholding
newImg(newImg <0 ) = 0; % set all negative pixels to zeros
newImg(newImg >1080) = 0; % remove anything over this range
figure, imshow(newImg, [LOW1 HIGH1]); % thresholded image
BW = bwlabel(newImg,8) ;
figure, imshow(BW, []) % Labelled image missing A, Blob areas
Suggest me some methods to trace back regions A, B and also better segmentation methods to not miss all the brain regions
Thanks, Gopi

採用された回答

Image Analyst
Image Analyst 2017 年 2 月 16 日
Try this:
binaryImage = temp > 1080;
% Fill holes (depends on skull having a hole through it.
binaryImage = imfill(binaryImage, 'holes');
% Extract 3 largest blobs.
binaryImage = bwareafilt(binaryImage, 3);
labeledImage = bwlabel(binaryImage);
props = regionprops(labeledImage, temp);
  4 件のコメント
Image Analyst
Image Analyst 2017 年 2 月 16 日
You might try using bwconvhull to get the convex hull. Then use imerode() to shrink it down. Then use that as a mask to "erase" the outer parts (skull, etc.);
mask = bwconvhull(binaryImage);
mask = imerode(mask, true(15));
binaryImage(~mask) = false;
% Then the previous code I gave.
Omkar Patil
Omkar Patil 2017 年 2 月 16 日
編集済み: Omkar Patil 2017 年 2 月 16 日
Thanks, I will try this and give you an update next time I go to lab, Oops i am commenting from my friends computer

サインインしてコメントする。

その他の回答 (1 件)

Saurabh Gupta
Saurabh Gupta 2017 年 2 月 15 日
You can use the Image Segmenter App to perform the segmentation, then export it as a MATLAB script to observe the methodology used to implement further tasks in an automated manner.
  1 件のコメント
Gopichandh Danala
Gopichandh Danala 2017 年 2 月 16 日
編集済み: Gopichandh Danala 2017 年 2 月 16 日
In real time this kind of apps are pretty useless and thanks for your suggestion

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by