How can i draw a line using only starting point ?
조회 수: 1 (최근 30일)
이전 댓글 표시
I want to draw a line on an image. But i only know the [x1 y1] or starting co-ordinates. I already attached an image. Here, a red line which co-ordinates i know. so i calculate the midpoint [marked as blue]. I want to draw a line from this point to last top of the image [marked as yellow star] , considering the same angle as the red line have. so that, my another end point of line will need to calculate & line must need to pass in middle of stair region. But i dont understand how can i calculate the other endpoint using only one endpoint. It will be really appreciated if give elaborate explanation.
angle = -(max_ang-90)*pi/180; % max_ang i calculate using region_props
x_target =xx+cos(angle);% xx & yy center of red line.
y_target =yy+sin(angle);
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!