Ask Your Question
0

how to restore front view of inclined plane from 3 vector projections

asked 2016-03-23 09:43:30 -0600

Andyrey gravatar image

I see some plane P in my image I(x,y),which has unknown angle with my image plane. In my image I I can extract 3 projections of vectors a, b ,c, all them are perpendicular to each other in real 3D, so that a and b lie in that plane P, and c is normal to that plane. I do not have that vectors directly, but only their projections to my image plane. How can I get frontal view of that plane P from that vectors projections, if it is possible?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-03-23 20:48:56 -0600

Tetragramm gravatar image

You want to look at the solvePnP function. It is designed to give you the translation and rotation between world points and the camera. You have four points, the end of each axis and the origin. I assume you know how long the vectors are in real space? Or at least that they are all the same length?

Set the four points as (0,0,0), (1,0,0), (0,1,0), (0,0,1) and then the image points are, of course, what you see in the image. I would use the SOLVEPNP_P3P method, since it requires exactly four, and you have exactly four points.

Once you have your rvec and tvec, you have everything you need to transform the image to view it from above.

edit flag offensive delete link more

Comments

Thanks,Tetragramm, I will try. I have no idea about camera matrix members, I will fill them with "1"s or something trivial. Neither I know about where the corresponding "1"s are in my image, so I expect to obtain rectangle with rectangular shape (and it will be a good result itself!), but further stretching along X or Y will do from some other features.

Andyrey gravatar imageAndyrey ( 2016-03-24 07:36:58 -0600 )edit

The default camera matrix should be, I think the identity with the center of the image in the last column, top two elements. Like shown in the documentation for this function: http://docs.opencv.org/3.1.0/d9/d0c/g...

You can find the real values by using the camera with a chessboard and the calibrateCamera function. HERE's a nice tutorial for doing that.

Tetragramm gravatar imageTetragramm ( 2016-03-24 15:44:52 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-03-23 09:43:30 -0600

Seen: 171 times

Last updated: Mar 23 '16