Find midline in binarized brain image using symmetry or otherwise

조회 수: 4 (최근 30일)
Rishi Raj
Rishi Raj 2022년 8월 27일
댓글: Rishi Raj 2022년 8월 29일
I have processed CT brain images to create a binarized image in which vessels are visible (PFA).
The next step is to find the midline of the brain so that the left and right brain hemispheres can be compared in terms of area of vessels(white pixels in the image).
PS: The following methods I have tried and were not working for me.
  1. Find midline between two lines (but the image in my problem is not a two line problem).
  2. Then i came across a method to find symmetry in my image: Novel Method for Determining Symmetry of Skin Lesions using the Jaccard Index, However, this method could not find any symmetry for my image.
  3. I also tried on the proposed solution for finding line of symmetry. This also failed to generate any line of symmetry for the images in question.
The attached images are of the same patient, so we can find midline in any of these images, it can be applied to all images.

채택된 답변

Image Analyst
Image Analyst 2022년 8월 27일
First of all get the convex hull then use regionprops to get the centroid and angle, from which you can get the midline. Here's a start (untested)
% Get mask of the whole group
mask = bwconvhull(mask, 'union');
% Find centroid and angle.
props = regionprops(mask, 'Orientation', 'Centroid');
[rows, columns] = size(mask);
% Fit a line through the centroid.
% (y - yctr) = slope * (x - xctr)
slope = atand(props.Orientation);
xCentroid = props.Centroid(1);
yCentroid = props.Centroid(2);
x = 1 : columns;
y = slope * (x - xCentroid) + yCentroid;
% Remove points outside the image.
outside = (y < 1) | (y > rows);
x(outside) = [];
y(outside) = [];
% Plot line over image.
hold on;
plot(x, y, 'r-', 'LineWidth', 2);
  댓글 수: 3
Image Analyst
Image Analyst 2022년 8월 28일
Attached is a full demo.
It looks like it's that your binarization is not that good. I think the centroid and midline should be computed on the original, pre-binarization image thresholded to take the whole thing, not just little parts of it.
An alternative is you could use radon to compute the angle of the convex hull image. I'm also attaching a demo of that.
Rishi Raj
Rishi Raj 2022년 8월 29일
Yes, you are right. Finidng midline on binarized image is not a good aproach.
Current approach:
  1. Radon transformation on the original brain image.
  2. Binarize the image.
  3. Find midline by convexhull-centroid approach. Final result

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by