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

2 ビュー (過去 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.

Community Treasure Hunt

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

Start Hunting!

Translated by