mw::mo::mocam::DistanceToParallax Function

Syntax

f32 DistanceToParallax(
     u32 width,
     f32 angleOfView,
     f32 distance
);

Arguments

Name Description
in width The parallax is calculated relatively to this value in pixels.
in angleOfView The diagonal angle of view for the camera in degrees.
in distance The distance to convert in meters.

Return Values

The calculated relative parallax (in pixels relative to width).

Description

Calculate relative parallax at a given distance (in meters).
You will have to add calibration translationX at infinite distance to get the absolute parallax.
You will have to convert translationX to the same width base.

For instance, if you're doing the calibration in 640x480, obtaining translationX value Tx with angleOfView of 66° for the camera, and you want to know the parallax at 25cm in 512x384, you will do:

Revision History

2011/03/15
Initial version.

CONFIDENTIAL