Camera pointing perpendicular at a plane

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Camera pointing perpendicular at a plane

jaketack
This post has NOT been accepted by the mailing list yet.
Hello everyone,

in my current project, I segmented an object that is vertical to the floor, let's say one side of a box, with a RANSAC Plane.  Now I want to visualize the object so that the camera is pointing perfectly perpendicular to the plane. And the middle point of the screen is the middle point of the bounding box (like with default parameters). Then the camera should have a certain distance to the plane (for example 1m from the plane).

My idea is to use the coefficients (normal vector) from the plane, that you get with RANSAC, and set the Camera Position and Parameters with them. But since I am pretty new to Computer Vision I don't know, how to do that exactly.

I will appreciate any help!

Thanks

Yang
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Camera pointing perpendicular at a plane

Frederik
Hi

First you need to define your middle point e.g. P. Then taking your normal vector N, you would get a new camera position at P + N, were the camera should point at P. Determining your up-vector is then another question.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Camera pointing perpendicular at a plane

tlou
In reply to this post by jaketack
in addition

suppose the normal vectors of plane and floor are Np and Nf, the up vector should be Nf or -Nf. I remember the default normal vector tend to point to -Z, then it could be -Nf

if the plane and floor are not perfectly perpendicular, try +/-normalize(cross(Np, cross(Np, Nf)))
Loading...