Opposite coordinate in the image
Mostrar comentarios más antiguos
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 comentarios
DGM
el 24 de Jul. de 2022
What exactly are the known pieces of information, and in what form are they given?
Ariane Moura
el 24 de Jul. de 2022
Ariane Moura
el 24 de Jul. de 2022
Ariane Moura
el 24 de Jul. de 2022
Ariane Moura
el 24 de Jul. de 2022
DGM
el 24 de Jul. de 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
el 24 de Jul. de 2022
Ariane Moura
el 24 de Jul. de 2022
Ariane Moura
el 24 de Jul. de 2022
Respuestas (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 comentarios
Ariane Moura
el 24 de Jul. de 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
el 25 de Jul. de 2022
The image does not have a regular shape as in the schematic figure as shown above.
The image in your schematic is rectangular, which is the only shape an image can have. [xmax,ymax] are the dimensions of the image - they should be fixed.
Categorías
Más información sobre L*a*b* Color Space en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

