yaynahyay
yaynahyay

Reputation: 1

Get normal vector of floor by camera calibration

Normal vector on an image:

normal vector on an image

Distorted normal vector of floor on an image:

Distorted normal vector of floor on an image

As depicted in the image I posted, I need to get the normal vector of the floor from the room image. I want to take advantage of the fact that distortions in the image will also distort the orientation of the floor normal vector at different locations in the image.

The only information I have available to me is the camera calibration information and the RGB pixel values of the image.

Here's the method I came up with:

  1. find the 3D world coordinates of the 2D coordinates of the floor in the image.

When I do the calibration, I will set the world z-coordinate of the floor to 0, so the floor world coordinate I find will be A(X, Y, 0).

  1. Find a world coordinate that differs only in height from the world coordinate you found, such as B(X, Y, 10). And caculate a vector connecting the two points A and B.

That vector will be the same as the normal vector of the floor, given that the z world coordinate of the floor is 0, and the floor is flat (I think).

  1. Again, convert the two points A and B in the world coordinate system to coordinates in the pixel coordinate system.

  2. draw a line connecting the two points in the pixel coordinate system, and you'll get a picture of a normal vector that looks skewed in direction at each location, like the image I posted.

Do you think this will work?

I'm using a translator, and I don't speak English very well, so I don't know if I've explained it well, but if you find my method strange, or if there's something that needs to be improved, or if there's another easier way to do it, please let me know.

I haven't gotten an image dataset with calibration information, so I haven't run the actual code yet.

Upvotes: 0

Views: 83

Answers (0)

Related Questions