Segmenting bitmap micro CT images using MATLAB's image processing capabilities.

Hello, I am interested in getting some input about using MATLAB's image processing app. I want to obtain a binary image of my area of interest so I can perform some basic analysis (calculate area, path length, etc.).
I want to know if what I describe below is possible in MATLAB or not. I will show the process that I have gone through so far and any input would be greatly appreciated.
Progress Thus Far:
% This will be used for image segmentation of cranial sutures.
% Reading raw images
Raw = imread('3351_Coronal_CRotated0964.bmp');
figure
imshow(Raw)
title('Raw Image')
% Adjusting raw images so they can be turned into binary
Raw_Adjusted = imadjust(Raw);
figure
imshow(Raw_Adjusted)
title('Adjusted Image')
% Converting to black and white images
BW_Original = imbinarize(Raw_Adjusted,'adaptive','Sensitivity',0.6);
figure
imshow(BW_Original)
title('Binary Image')
% Inverting the black and white image
BW_Inverse = imcomplement(BW_Original);
figure
imshow(BW_Inverse)
title('Inverted Binary Image')
% Cropping the image
BW_Cropped = imcrop(BW_Inverse,[900,1000,825,500]);
figure
imshow(BW_Cropped)
title('Cropped Image')
% Segmenting
Segmented = bwpropfilt(BW_Cropped,'Area',1);
figure
imshow(Segmented)
title('Semi-Isolated Cropped Image')
Next Steps/Moving Forward
I want the final product to include only the squiggly line running horizontal, outlines below in red, and get rid of the sections that are outline in blue. (i.e. turn them black)
Any guidance would be greatly appreciated, thank you for reading my question.

 採用された回答

Image Analyst
Image Analyst 2020 年 7 月 10 日
If Segmented is your binary image, obtain the largest blob, which will be the one you outlined in red, using bwareafilt():
largestBlob = bwareafilt(Segmented, 1);

3 件のコメント

I appreciate the response, but I believe that will accomplish the same thing as the way I used bwpropfilt (as there are pixels connecting blobs in blue and the main area of interest outlined in red.
Segmented = bwpropfilt(BW_Cropped,'Area',1);
I have double checked and the output of bw area filt is the same, result below:
largestBlob = bwareafilt(Segmented, 1);
figure
imshow(largestBlob)
title('largestBlob')
I was fooling around with using drawassisted() to outline the areas I want to exclude, but I am not sure what to do with the area after I have the points.
Image Analyst
Image Analyst 2020 年 7 月 10 日
If you have a connection that you can't get rid of with better segmentation, then you can basically burn a black line across the image to separate blobs. See attached demo that does that.
Ross Remesz
Ross Remesz 2020 年 7 月 11 日
Perfect, this is exactly what I was looking for.
I just implemented it into my script and it works like a dream, thank you very much for your time.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeImage Processing and Computer Vision についてさらに検索

製品

リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by