Opposite coordinate in the image
Afficher commentaires plus anciens
Hi!!!
I would like to find the opposite coordinate in the image according to the slope angle of a known vector. How can I achieve this?

9 commentaires
DGM
le 24 Juil 2022
What exactly are the known pieces of information, and in what form are they given?
Ariane Moura
le 24 Juil 2022
Ariane Moura
le 24 Juil 2022
Ariane Moura
le 24 Juil 2022
Ariane Moura
le 24 Juil 2022
DGM
le 24 Juil 2022
"file also has the unknown coordinates represented by ? in the drawing." ???
How would these be the unknown coordinates? They aren't on the edge of the image, nor are they unknown.
Is it safe to assume the coordinates are in pixels?
Which intersection are you trying to find? Since if these are in pixels, none of the points lie on the edge of the image. Each line can have two intersections, so which ones? All of them? Only intersections with the bottom edge? What if a line doesn't intersect the bottom edge?
Ariane Moura
le 24 Juil 2022
Ariane Moura
le 24 Juil 2022
Ariane Moura
le 24 Juil 2022
Réponses (1)
Use linexlines2D, to be downloaded from,
load Vertices
Nv=size(Vg,1);
[ymax,xmax]=size(Image);
Vg(:,3)=1;
V=repmat(v,Nv,1);
E=cross(Vg,V).'; %line equations
points=linexlines2D(E, [0,ymax] , [xmax,ymax]); %the result
4 commentaires
Ariane Moura
le 24 Juil 2022
Here's a more concrete example to demonstrate that it works:
Vg=[0:3;zeros(1,4)]'
v=[3,7,0];
Nv=size(Vg,1);
[ymax,xmax]=deal(7);
Vgh=Vg; Vgh(:,3)=1;
V=repmat(v,Nv,1);
E=cross(Vgh,V).'; %line equations
result=[Vg, linexlines2D(E, [0,ymax] , [xmax,ymax])'] %the result
Ariane Moura
le 25 Juil 2022
Catégories
En savoir plus sur L*a*b* Color Space dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

