Mathematical relationship to control camera heading

naser1234
Messages
1
Reaction score
0
Hi everyone, I want to find a mathematical relationship between my head direction and the direction of a camera placed at a distance. The objective is to make the camera heading to same point where my head is looking at. Both my head and the camera are in the horizontal plane and the motion will be Pan (yaw) motion. Some type of reference transformation has to be applied but I don’t know how to find the relation of my heading verses the camera heading.
 
Physics news on Phys.org
If I understand the question, I think the answer is unpleasant: your demands are self-contradictory.

Even if we assume you are always looking "forward" relative to your heads position, that only determines a line -- you could be looking at any particular point along that line, and each one would require a different orientation from the camera.

So, for each orientation, you need some way to decide upon a distance from your head as well. Once you have that, it's straightforward trigonometry.

Alas, whether or not it's feasible to get that distance, or at least a passable approximation, is something that is closely tied to the specifics of your situation. :frown:
 
You can't slave your camera that way. It will just look in a parallel direction to your line of sight.

You need to find the intersection point between your line of sight and the first object encountered/nearest object. You will obtain a point. Let's call this point the 'target'.

http://sonyafterdark.webs.com/Diverse/RayTracing.pdf" you compute the target. Sc is the field of view constant.

The camera must look at the target. This might be the way to do it, if you work with angles to describe orientation. Try and see if it's correct.

\alpha = \arcsin(\frac{target.x - camera.x}{target.z - camera.z})

α is the heading you need.

\beta = \arcsin(\frac{target.y - camera.y}{target.z - camera.z})

β is the elevation you need.
 
Last edited by a moderator:
Hurkyl said:
If I understand the question, I think the answer is unpleasant: your demands are self-contradictory.

Even if we assume you are always looking "forward" relative to your heads position, that only determines a line -- you could be looking at any particular point along that line, and each one would require a different orientation from the camera.

So, for each orientation, you need some way to decide upon a distance from your head as well. Once you have that, it's straightforward trigonometry.

Alas, whether or not it's feasible to get that distance, or at least a passable approximation, is something that is closely tied to the specifics of your situation. :frown:

If you use sensors to track the direction and dilation of your pupils, you might be able to do it since I believe that pupil dilation relates to focus. I know the eye doctor can tell when you've focused on something and determine your prescription just by watching your pupils.

It might be easier to mount a small low resolution camera to your head and then use digital image processing to match the image from the horizontal displaced camera with the image from the head mounted camera.
 
Last edited:
Back
Top