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일)
이전 댓글 표시
I want to know the code. i'm not good at coding sir.Thankyou.
댓글 수: 0
채택된 답변
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
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!