How can I draw a circle in this image from the edges that I marked and calculate the angle from the circle like this ?

1 回表示 (過去 30 日間)
ankle.jpg
I want to know the code. i'm not good at coding sir.Thankyou.

採用された回答

Image Analyst
Image Analyst 2020 年 1 月 26 日
編集済み: Image Analyst 2020 年 1 月 26 日
Assuming you have (x1, y1) on the left side and (x2, y2) on the right side, simply use plot
hold on;
xCenter1 = (x1+x2)/2;
yCenter1 = (y1+y2)/2;
plot(xCenter1, yCenter1, 'w.', 'MarkerSize', 30);
xCenter2 = (x3+x4)/2;
yCenter2 = (y3+y4)/2;
plot(xCenter2, yCenter2, 'w.', 'MarkerSize', 30);
To get the angle of the line, you can use atand2d(), something like
dx = xCenter2-xCenter1;
dy = yCenter2-yCenter1;
angle = atand2d(dy, dx);
  2 件のコメント
wongsathorn pinwihok
wongsathorn pinwihok 2020 年 1 月 26 日
編集済み: wongsathorn pinwihok 2020 年 1 月 26 日
how can i define the 2 markers ? if i want to use this markers with every images like this .
Image Analyst
Image Analyst 2020 年 1 月 26 日
編集済み: Image Analyst 2020 年 1 月 26 日
What markers are you talking about? I assume you have the edge, which you can get from thresholding for the top and bottom left red X. The bottom right X shows up in the middle of skin. You should search Vision Bibliography for papers on feet or ankles. It is a list of all image processing articles.
Or you can use drawpoint() to have the user place them manually.

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by