Triangle homography is possible I am a first?

  • A
  • Thread starter mrStrange
  • Start date
  • Tags
    Triangle
In summary, the conversation discusses the process of solving linear equations to determine the rotation and position of a triangle in 3D space using information such as length of sides and a camera. There is a discussion about the loss of information when projecting from 3D to 2D and the need for additional parameters to fix this. The conversation also mentions the use of an equation to find the centroid distance and the presentation of two years of work on this topic. There is also a discussion about the ambiguity in solving for the third point of the triangle in certain cases.
  • #1
mrStrange
11
0
TL;DR Summary
Every triangle in 3d space have just one perspective projection on a plane. And vice versa.
We can get just one real triangle in 3d space by projection on plane.
I solve linear equation for getting rotation and position of triangle without rotation and translation matrix. And try it. Just need a AB, BC, AC lenght.
Somebody do this before?This is demonstration with camera canon eos 600d. But I don't solve lens distortion yet.
 
Physics news on Phys.org
  • #2
Optimized
 
  • #3
Clearly there are many different triangles "in space" that will project to the same thing on a plane. When you project from three dimensions to two, you "lose" information. There is no way to recover that information from the plane.
 
  • Like
Likes nuuskur, fresh_42 and berkeman
  • #4
One projection will have many 3D representations, so the "vice versa" is wrong.
 
  • #5
HallsofIvy said:
Clearly there are many different triangles "in space" that will project to the same thing on a plane. When you project from three dimensions to two, you "lose" information. There is no way to recover that information from the plane.
I got transform and rotate
 
  • #6
Someone2841 said:
One projection will have many 3D representations, so the "vice versa" is wrong.
Yes no yes no. The video atached. And i have the equation. It is absolutely truth. Now i work with distortion, sensor size, aspect and focal lenght
 
  • #7
mrStrange said:
Yes no yes no. The video atached. And i have the equation. It is absolutely truth. Now i work with distortion, sensor size, aspect and focal lenght
Be careful with absolute truth if you might be wrong! "I know better" only proves stubbornness. The video is irrelevant, this is no proof which we could read, and what do you mean by
mrStrange said:
I got transform and rotate
It is very likely that you did not describe your question in an accurate way, such that there are loopholes in which crucial information is hidden.

A projection (in our case here) is a linear transformation ##p\, : \,\mathbb{R}^3 \longrightarrow \mathbb{R}^2## with ##p^2=p##. It is immediately clear that ##\operatorname{def}p=\dim \ker p \geq 1##. This is what @HallsofIvy meant by lost information. We have an entire free parameter in the set of all triangles which produce the same image. Hence "vice versa" is wrong as stated. You may have additional information to fix this free parameter, but you didn't tell us. At least we couldn't understand you.

Can you elaborate what
mrStrange said:
I got transform and rotate
means in terms of ##p##? How are ##v## and ##p(v)## related? Will say: If you know the transformation and the rotation, then you might have a bijection in ##\mathbb{R}^3##. In this case the projection is irrelevant as you already have the entire information without it.
 
Last edited:
  • Like
Likes berkeman
  • #8
Sorry. I don't know what you try to talk me about, but...
For the triangle in a 3d space. ABC. And the centroid M.
The point S is A center of perspective projection. We are know AB,BC,AC lenght. And for the ideal pinhole camera...
I got equation
SM^2 = (AB^2+BC^2+AC^2)*Kabc/(27*Kabm - 9*Kabc + 27*Kacm + 27*Kbcm);
Where Kabc,Kabm,Kacm,Kbcm some factors. I hid this.

So. I can get the Centroid distance. +SM, -SM.
-SM Just mirrored. And SA,SB,SC distances. Actually a got a plane with transform position and rotation with 4 points.
How I can make the presentation of my 2 years work? I don't want show the all equation.
 
Last edited:
  • #9
I think the OP has a known triangle: "Just need a AB, BC, AC lenght". It's clearly impossible with an unknown triangle.

With a known triangle it's certainly impossible in special cases - there's three possible angles of rotation for an equilateral triangle, for example. More generally, if you fix two of the corners in space then the possible locations of the third point form a circle whose axis is the line joining the first two points. If the plane of that circle is perpendicular to the camera then the ray from the camera through the third point generally intersects the circle twice and there are two possible solutions.

You can probably handle those cases if you're using video by insisting that your answer be "near" your previous frame's answer. Care would be needed on initialisation in case of a starting pathological case.

Edit: since you can't actually fix the first two points in space, the locus of possible positions for the third point is rather complicated. I suspect that there are other cases with ambiguities.
 
Last edited:
  • #10
Ibix said:
I think the OP has a known triangle: "Just need a AB, BC, AC lenght". It's clearly impossible with an unknown triangle.

With a known triangle it's certainly impossible in special cases - there's three possible angles of rotation for an equilateral triangle, for example. More generally, if you fix two of the corners in space then the possible locations of the third point form a circle whose axis is the line joining the first two points. If the plane of that circle is perpendicular to the camera then the ray from the camera through the third point generally intersects the circle twice and there are two possible solutions.

You can probably handle those cases if you're using video by insisting that your answer be "near" your previous frame's answer. Care would be needed on initialisation in case of a starting pathological case.

Edit: since you can't actually fix the first two points in space, the locus of possible positions for the third point is rather complicated. I suspect that there are other cases with ambiguities.
Nope. I got it by one frame. Video is a just presentation. Just look to equation what i posted early. Factors is the multiplied Cosines of some angles. Sorry for my English.
 
  • #11
But. Pinhole cameras don't exist in real world. I must get all camera parameters from all cosines from this equation. And it is very hard. Because I don't know equation for angle relations in a tetrahedron. I got little one, but it useless for me.
 
  • #12
mrStrange said:
Nope. I got it by one frame. Video is a just presentation. Just look to equation what i posted early. Factors is the multiplied Cosines of some angles. Sorry for my English.
Here's a concrete example where it will go wrong, if I understand your method.

Place your pinhole (the point where all rays from the triangle vertices cross) at the origin, facing in the +x direction.
Place one triangle vertex at (x,y,z)=(10, 2, 0)
Place the second triangle vertex at (10, -1, 0)
Place the third triangle vertex at (11.717, 0, 1.025)

Repeat, but this time with the third vertex at (8.131, 0, 0.711)

It's easy to show that the triangles are rotated copies of each other, so can be two images of the same triangle. It's also easy to show that they produce the same dot pattern on your screen, so you cannot differentiate these two cases from just the positions of the dots - you need some auxiliary information.

Edit: if you need precise figures, the x coordinates of the two third vertices are $$L\cos^2\theta\left( 1\pm\sqrt{1-\frac{1-r^2/L^2}{\cos^2\theta}}\right)$$and the z coordinates are the x coordinates multiplied by ##tan\theta##. I used ##L=10##, ##r=2## and ##\theta=5^\circ##, but any values should work as long as ##\tan\theta<r/L## and you use ##L## for the x coordinate of the first two triangle vertices.

Edit 2: The above is an implementation of this:

Ibix said:
More generally, if you fix two of the corners in space then the possible locations of the third point form a circle whose axis is the line joining the first two points. If the plane of that circle is perpendicular to the camera then the ray from the camera through the third point generally intersects the circle twice and there are two possible solutions.
 
Last edited:
  • Like
Likes WWGD and berkeman
  • #13
Ibix said:
Place your pinhole (the point where all rays from the triangle vertices cross) at the origin, facing in the +x direction.

My pinhole at the origin, but foward direction (perpendicular sensor direction) is z+. I don't know how to rotate basis.

But you right about infinite triangle variations if the ray from pinhole lies on a triangle plane. And triangle projection looks like the line.
this is just an exception))
 
Last edited:
  • #14
By the way. I got another equation.
For the triangle in the space ABC and point S (center of perspective projection) true equality:
3*SM = SA*CosMSA + SB*CosMSB + SC*CosMSC;
Where M the centroid of ABC
You can check it.
 
  • #15
Ibix said:
Here's a concrete example where it will go wrong, if I understand your method.

Place your pinhole (the point where all rays from the triangle vertices cross) at the origin, facing in the +x direction.
Place one triangle vertex at (x,y,z)=(10, 2, 0)
Place the second triangle vertex at (10, -1, 0)
Place the third triangle vertex at (11.717, 0, 1.025)

Repeat, but this time with the third vertex at (8.131, 0, 0.711)
Please, I want to check it. I don't understand. I work with +z direction. Its give me a real result of any rotation and position.
Checking my equation a serios limitations. Top angles should not be too small, Double type of variable give me the fault.
 
  • #16
Just read my coordinates as (z,y,x) instead of (x,y,z).
 
  • #17
You really think this equation give the error? It is impossible. The equation result is only one...

But when the triangle looks like line. It is give me the NAN
 

FAQ: Triangle homography is possible I am a first?

1. What is triangle homography?

Triangle homography is a mathematical concept that describes the relationship between two triangles in a plane. It involves transforming one triangle into another through a series of rotations, translations, and reflections.

2. Is triangle homography possible?

Yes, triangle homography is possible as long as the two triangles have a similar shape and orientation. However, it may not be possible if the triangles are significantly different in size or shape.

3. How is triangle homography useful?

Triangle homography has many applications in fields such as computer graphics, image processing, and computer vision. It can be used to correct distortions in images, map one image onto another, and create 3D models.

4. What is the difference between triangle homography and affine transformation?

Triangle homography is a special case of affine transformation, which involves preserving parallel lines and ratios of distances. Triangle homography specifically focuses on preserving the shape and orientation of triangles.

5. How can I learn more about triangle homography?

There are many online resources and textbooks available that explain the concept of triangle homography in detail. You can also consult with a mathematician or computer scientist for further understanding and application of this concept.

Back
Top