Opposite coordinate in the image
Ältere Kommentare anzeigen
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 Kommentare
DGM
am 24 Jul. 2022
What exactly are the known pieces of information, and in what form are they given?
Ariane Moura
am 24 Jul. 2022
Ariane Moura
am 24 Jul. 2022
Ariane Moura
am 24 Jul. 2022
Ariane Moura
am 24 Jul. 2022
DGM
am 24 Jul. 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
am 24 Jul. 2022
Ariane Moura
am 24 Jul. 2022
Ariane Moura
am 24 Jul. 2022
Antworten (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 Kommentare
Ariane Moura
am 24 Jul. 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
am 25 Jul. 2022
Kategorien
Mehr zu L*a*b* Color Space finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

