본문 바로가기

Multimedia

Real life and 3D camera matching

Real life and 3D camera matching - Realsoft3D Wiki
http://rs3dwiki.the-final.info/index.php?title=Real_life_and_3D_camera_matching

Some remarks on cameras and matching 2D and 3D

What has to be taken into account to get a good match between a real life camera and a camera in Realsoft?

Let's set up a situation where we measure all the variables as good as possible. Don't forget this is not a laboratory situation. The easiest object to check is a box-like shape. The object I used is a cart and has the following sizes: 65 x 70 x 100 cm. The box on top of the wheels is 12 cm. above the floor. Below you can see a plan of the situation. The camera height is 60 cm. and leveled in all directions. I chose such a distance that I did not have to use a wide view angle because in that case the lens distortion will cause too many problems.

Image:Plan.jpg

Next step is to build this situation in Realsoft. According to the exif data in the picture the camera focal length is 48,25 mm. The picture has a 4:3 aspect ratio. Create a floating perspective view with a locked 4:3 size to match the backdrop image. When you put the exif information in the properties of the camera and throw it into the view window, we get the following perspective view:

Image:Perspective1.jpg

The red outline represents the box on wheels. As you can see it's far too small. Which means that the view angle is too big. If you have a look at the image aspect section in the camera properties you see two fields for film width and height. The default setting for width is 3 mm. The combination of film width and focal length together determine the view angle.

Image:Camera.jpg

To get the right view angle we should find the size of the film or CCD of the camera used. I guess that in most manuals you can find the size of your videochip. On the internet you can find several tables containing width and height sizes that belong to certain CCD sizes. I found this neat calculator that gives you the view angle for several film sizes based upon the focal length.

The size of the CCD used in this image is 2/3". When I put the correct width (8,8 mm.) and height (6,6 mm.) into the film width and height fields. The match is much better. As I said this was not a laboratory setup I had to tweak a little bit to find a perfect match. Check the position and aimpoint values to see how far they are off the measured positions. To avoid any confusion: I filled out the film size in the camera properties window and threw the camera in the view window. The final tweaking was done in the camera tab of the view window properties. To store the values in the camera object itself you must first select the camera object. Next right click in the view window and choose the option "camera>view to object".

Image:Perspective2.jpg

One last note: I checked two other viewpoints to see if it works in different situations. One midrange view angle gave no problems. Extreme wide angle was impossible to find a match for.

Image:Perspective3.jpg

This midrange view angle shows that it's possible to find a very good match.