Sign in to follow this  

Cameras - Real and Virtual - Need Advice

This topic is 3302 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am working on a project to align real world cameras with their virtual counterparts rendered in DirectX. This has gone fairly well and we currently have a test application with a real video camera looking at a flat wall and the same environment in a virtual environment. The real world environment was measured (height of camera, distance to wall, height of wall, width of wall, FOV of camera) and these measurements were applied to the virtual (DirectX) environment. It lines up nicely and putting tape on the wall to mark certain measurements lines up almost perfectly within virtual counterpart. This was our intial test, as we actually need to use the floor as our "mapped space". We have a 16 foot square area of the floor taped out into 8x8 cells that are 2 feet square each. At each corner of this grid will be one real camera. These real cameras need to have virtual counterparts so that we can map clicks in the virtual "floor grid" to actual locations in the real world "floor grid". The locations don't have to be exact, but at least able to know which cell was clicked on. Translating our test from the flat wall to the floor, we measured everything again but realized that there is a problem when looking at the floor in the real camera view. Mainly, the view of the floor is distorted compared to that of the wall. (By "looking at the floor" I am not referring to tilting the camera down, merely having the camera look straight ahead and observing the floor in the image the camera is displaying) This, I believe, is due to the focal length of the camera. I have a very limited understanding of photography and lenses so I am seeking any advice on how to compensate or correct this distortion so that our virtual and real environments can line up. I imagine that this correction would be done by adjusting the DirectX code, but perhaps it is a fundamental issue that I am not aware of with my limited understanding of cameras and lenses. Any help and guidance with this issue would be most appreciated.

Share this post


Link to post
Share on other sites
It sounds like you are talking about "perspective correct" maybe?

or maybe your Fovs are not correct. I would start with a camera that could do 90 degree first.


Integrating Graphics Into Video:
http://www.fit.fraunhofer.de/~kansy/Publications/monaco96.pdf

Share this post


Link to post
Share on other sites
Thanks for your reply and the link to the PDF. I will read the PDF you provided in more detail in the next few days.

Perhaps it is perspective correct and some interpolation is required. Do you have any input on how to best measure the difference and "solve" for the necessary adjustments required?

I'm not sure I understand what you mean about the FOV not being correct. We didn't try to match the virtual FOV to that of the real camera's FOV because doing so did not help in lining up the two. Perhaps I misunderstand why using a camera with 90 degree FOV would be beneficial.

Share this post


Link to post
Share on other sites
I think your FOV is not correct. Do you know the actual FOV of your camera? Did you try to make the directx camera to have similar fov?

If not the directx version will be distorted. Most game fovs are 90degrees, but most video cameras have <60 deg fov.

Share this post


Link to post
Share on other sites

This topic is 3302 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this