I have a trouble on finding the "coordinates on a curved surface" when I take a picture of it. Imagine a barrel or a curved surface, having n points on its surface and we need to determine their location. When the surface is photographed from '"front" and about 30 degrees rotated, the relative position of the points will look different.
If it was a flat plate, I would think to normalize the lengths and find the relative coordinate of each point. Since it is a flat plate, each of the normalized coordinates would give the same number independent pf the rotation angle. But when it is on a curved surface, that normalization does not help to find the coordinates. Is there a methodology to follow to be able to find the coordinates when the object is rotated?
It looks like you are in the following situation: You have a fixed vertical line called axis
which is the vertical rotation axis around which you rotate the surface. Furthermore, you have a plane S
, representing the screen of your camera. The screen-plane S
is also vertical, which is equivalent to the fact that it is parallel to the rotation axis
. Then, the normal vector N
of the screen-plane S
points towards the axis
.
We introduce a fixed coordinate system (it is called a camera-system, we see the world from the point of view of the camera and it is fixed because your camera is fixed) in the following way: we choose a fixed point O
on the screen-plane S
and draw the O ---> y
axis on S
as the unique line on S
parallel to axis
and passing through O
. The axis O ---> x
is the unique line perpendicular to the O ---> y
axis and is thus horizontal. The normal vector N
is aligned with the O ---> z
-axis, which is also horizontal, starting from the camera and going through the axis
, intersecting the latter orthogonally.
The coordinate system on the screen-plane, call it the screen-system, is simply the system obtained as z = 0
(the orthogonal projection of the 3D points onto the screen S
), i.e. it is the two-dimensional system O x y
where the O--->x
and O--->y
axes of the screen-system are also axes of the camera-system, defined above.
From what I understand, you take photos of the surface twice, once in one position, then the second time after rotating it around the axis
at an angle a
. Take one of the marked points points P
on the surface before rotation. Then it's orthogonal projection p1
on the screen S
has coordinates [x1,y1]
in the screen0system. After rotation at an angle a
of the surface around axis
the point P
now has orthogonal projection p2
on the screen S
with new coordinates [x2,y2]
in the screen system. I assume you can determine the coordinates of any point on the screen with respect to the screen-system. If I am not wrong, the goal is equivalent to determining the coordinates of P
before and after the rotation in three space O x y z
. However, since your projection on the screen S
is orthogonal, you simply need to determine the z
coordinates of point P
before and after the rotation. From there, you can go on to find the curvillinear coordinates of P
on the surface, which could simply be the coordinates of the screen projected onto the surface, so the surface parametrization can be for example:
X = x1
Y = y1
Z = z1(x1, y1)
We are going to assume also that you know the distance l
between the camera screen S
and the rotation axis axis
. I believe all of these assumtions, made up to now, are very reasonable, as you have control over setting up the camera (i.e. the screen plane S
together with its coordinate system, which fairly natural) and the rotation axis axis
.
The situation is as on the picture below:
As you can see, we have chosen the horizontal slice y = y1
and due to the whole arrangement of the screen and camera coordinate systems, we have y = y1 = y2
. Observe that because of the rotaion of the axis
, we have dist(P0, axis) = dist(Pa, axis)
. Therefore the triangle P0 Pa axis
is isosceles with angle a
at the vertex axis
. So if you draw the axis of reflection symmetry of this triangle trough the vertex axis
, you get two copies of the same right-angled triangle, in which you have the equation
dist(P0, Pa)/(2*dist(axis, P0)) = sin(a/2)
Combine this latter equation with the equation
dist(P0, axis) = dist(Pa, axis)
If you square both equations and put them together as one system, you get the system of two equation
dist(P0, Pa)^2 = 4*(dist(axis, P0))^2*(sin(a/2))^2
dist(P0, axis)^2 = dist(Pa, axis)^2
If you look at the three (right-angled) trapezoids O p1 P0 axis
then O p2 Pa axis
and finally P0 p1 p2 Pa
obtain the system of two quadratic equations of whose two unknowns are the z coordinates z1
and z2
. The rest of the parameters are given: x1, x2, l, a
. You have to solve for z1
and z2
. There will be four pairs of solutions, you have to select the ones that correspond to the realistic situation. Solving the system exactly however might be difficult, so you can just use Newton's method to find a very good approximate solution.
I have written the system on the picture, you can see it in formulas. The angle a
is your theta
.