필터 지우기
필터 지우기

How can i draw a line using only starting point ?

조회 수: 6 (최근 30일)
sufian ahmed
sufian ahmed 2017년 8월 30일
편집: sufian ahmed 2017년 8월 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개)

카테고리

Help CenterFile Exchange에서 Modify Image Colors에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by