필터 지우기
필터 지우기

Compute of local orienation of binary line in image

조회 수: 3 (최근 30일)
Jan Kubicek
Jan Kubicek 2021년 9월 8일
답변: Image Analyst 2021년 9월 8일
Dear colleagues,
I would like to kindly ask you for the help with computing a local orientation of Binary line. I have a Binary line in the following image:
I would need to compute a local orientation in degrees for each point of such line skeleton. Other words speaking I need to compute a local orientation distribution in degrees. I do not know how to do that.
I would like to kindly ask you for the help. Thank you very much.

답변 (1개)

Image Analyst
Image Analyst 2021년 9월 8일
Attach your image here with the frame icon. My corporate security blocked me from visiting your third party site. One way to do it is with find() to get all the coordinates into arrays for x and y and then call
[y, x] = find(skeletonImage);
coefficients = polyfit(x, y, 1);
slope = coefficients(1);
angle = atand(slope);

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by