Effacer les filtres
Effacer les filtres

How can i draw a line using only starting point ?

6 vues (au cours des 30 derniers jours)
sufian ahmed
sufian ahmed le 30 Août 2017
Modifié(e) : sufian ahmed le 30 Août 2017
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);

Réponses (0)

Catégories

En savoir plus sur Modify Image Colors dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by