Produce image based on images from two perpendicular view

363 Views Asked by At

I am trying to find the shape of a curve shape rod in its plane, based on two perpendicular views of the rod. I have prepared an image to make my question clearer. enter image description here

I have the projected images of the rod on the planes 1 and 2, and I'd like to produce the image of the rod in plane 3. What I have done is that I found the center line of the rod on views 1 and 2 using Matlab image processing toolbox, then I fitted a curve on those lines. Then I produced 3D data based on those fitted curves, and finally fitted another curve or ellipse to the final 3D curve.

It works, but I am wondering if there is any more appropriate solution, for example by rotating the views 1 and 2.

The angle of the view 3 with respect to view 1 (and view 2) is variable, but views 1 and 2 are perpendicular to each other.

We can find the angle of the plane 3 by finding the end of the rod in the views 1 and 2, as it would be atan(x_end_in_view_1/x_end_in_view_two). Is it possible to produce the image from the view point of a camera angled to a known degree from another camera, based on the image from the second camera?

Any help is highly appreciated.

1

There are 1 best solutions below

4
On

Yes, it is possible to produce the image from the view point of a camera angled to a known degree from another camera. Given the angle, you can compute the affine transformation between the two planes and apply the transformation to the original image to get the projection of the image in another plane.

There are 6 parameters for an affine transformation, and since you know the angle between the two planes, for 4 points (0, 0), (0, 1), (1, 0) and (1, 1), you would know the (x, y) co-ordinates of these points after you tilt your plane (say about the y axis) (forget about the z-coordinate). Now, you will have 8 equations and 6 unknowns, hence you can compute the affine transformation and apply the transformation on the complete image to get the projection.