Distance from image center to the surface of an object in the image

조회 수: 1 (최근 30일)
AUWAL ABUBAKAR
AUWAL ABUBAKAR 2019년 10월 14일
답변: Sid Singh 2019년 10월 22일
Hello everyone.
Could please someone help me on how to measure perpendicular distance from the center of the image to surface of the object?
Attched is the sample of my image. i would like to measure the distacne from the image center at the level of the sternum (a) to the chest surface (b)
I worked out the image center as follows:
I = imread('CTimage.jpg');
[row,col,numberOfChannels] = size(I) ;
[X,Y] = meshgrid(1:col,1:row) ;
center = [mean(X(:)) mean(Y(:))] ;
the pixel coodinate at image center is = [295 288.5]
so i want to measure from the same horizontal level but at the level of the sternum above, point a with pixel coordinate [174 288.5] to the chest surface, point b corrsponding to coodiante [174 'unknown'].
Thanks for your kind assistance
  댓글 수: 4
darova
darova 2019년 10월 14일
Wich distance you want to measure?
11Untitled.png
AUWAL ABUBAKAR
AUWAL ABUBAKAR 2019년 10월 14일
Thanks for your response. I have edited the question and lebelled the image. hope it clarifies.
thnks

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

답변 (1개)

Sid Singh
Sid Singh 2019년 10월 22일
Hi, you can use the Data Cursor tool in imshow window to pinpoint the unknown coordinate and use L2 norm for the distance between the points.
If you want to automatically find the point, you can binarize the image and look for an edge along the red line shown in the image.

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by