can you help us for area segmentation method on temporal bone object to segment the region marked with arrows

1 view (last 30 days)
can you help us for area segmentation method on temporal bone object to segment the region marked with arrows
Thank you

Answers (2)

Image Analyst
Image Analyst on 28 Sep 2021
Did you try thresholding? See attached demo. Adapt as needed.

yanqi liu
yanqi liu on 28 Sep 2021
sir,please check the follow code to get some information
clc; clear all; close all;
im = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/751599/image.jpeg');
im = rgb2gray(im);
% make bw
bw = imbinarize(im,'adaptive','ForegroundPolarity','dark','Sensitivity',0.85);
% choose target
bw2 = imfill(bw, 'holes'); bt = imclose(bw2, strel('disk', 2));
bw2 = imfill(bt, 'holes');
bw2 = imopen(bw2, strel('disk', 10));
bw2(:,round(size(bw2,2)/2):end)=0;
bw2 = bwareafilt(logical(bw2),1);
bt = logical(bw.*bw2);
bt2 = ~bt; bt2 = imclearborder(bt2);
bt(bt2) = 0;
bt = logical(bt);
bt = bwareaopen(bt, 80);
bt = imclose(bt, strel('disk', 20));
bt(bt2) = 0;
bt = logical(bt);
% make result
im1 = im; im2 = im; im3 = im;
im1(bt) = 255; im2(bt) = 0; im3(bt) = 0;
imr = cat(3,im1,im2,im3);
% display
figure; imshow(imr, []);
  13 Comments
yanqi liu
yanqi liu on 5 Jan 2022
clc; clear all; close all;
img = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/853405/image.png');
im = imcrop(img, [24 88 379 219]);
im = rgb2gray(im);
bw = im2bw(im);
bw = imclose(bw, strel('disk', 19));
[L,num] = bwlabel(bw);
stats = regionprops(L);
rects = cat(1, stats.BoundingBox);
[~,ind] = sort(rects, 1);
im1 = im; im2 = im;
im1(L~=ind(1)) = 0; im2(L~=ind(2)) = 0;
figure;
subplot(1,3,1); imshow(im, []);
subplot(1,3,2); imshow(im1, []); title('left');
subplot(1,3,3); imshow(im2, []); title('right');

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!