Mailinglist Archives:
Infrared
Panorama
Photo-3D
Tech-3D
Sell-3D
MF3D
|
|
Notice |
This mailinglist archive is frozen since May 2001, i.e. it will stay online but will not be updated.
|
|
Re: Digital De-twisting?
- From: P3D John Ohrt <johrt@xxxxxxx>
- Subject: Re: Digital De-twisting?
- Date: Thu, 02 Oct 1997 08:46:18 -0600
P3D Bill Davis wrote:
> Will one of these new whiz-bang Stereo Software packages we've heard of
> lately allow one to easily remove rotational errors from single-camera
> stereo pairs?
>
IF rotation (vs general skewing) is the only significant problem, then you can
calculate the required rotation easily if you can identify two widely
separated references at infinity (to avoid parallax).
Once the discrepancy from rotation is removed, then cropping can be used to
setup the "window".
The general procedure is:
1. calculate the reference angle in one frame.
2. calculate the reference angle in the other frame.
3. logically rotate one frame by the difference in reference angles.
Calculating the reference angle.
theta = the reference angle
x1, y1 = the row, column co-ordinates of the first point
x2, y2 = the row, column co-ordinates of the second point
theta = arctan((y2-y1)/(x2-x1))
notes:
-1
arctan is the same as tan and is the notation for the expression "the
angle whose tangent is". In this case, the -1 notation does NOT mean
"inverse".
Make sure you have set the unit angle measurement (ie degrees/radians select)
to the same unit as your graphics software.
Trial data:
x1 = 3
y1 = 3
x2 = 5
y2= 4
theta = arctan (( 4-3)/(5-3))
= arctan (1/2)
= arctan 0.5
if theta is specified in degrees, then
theta = 30 degrees.
Depending on how you selected points and the co-ordinate system origin
location, you may end up with a negative answer. No big deal. Just be
consistant and apply the rotation "logically".
BTW, you may want to rotate both frames in order to line up the horizon or
some other reference to facilitate viewing or for artistic purposes.
You still may have to play around a bit, usually because you have not
specified the reference points with sufficient accuracy. Subpixel accuracy is
a big subject!!!!!
Does this help any???
BTW, I did not use "theta" to please Dr. T. It happens to be the conventional
notation for the angle when you transform cartesian to polar co-ordinates.
The above formula is one part of the transformation process.
Regards,
--
John Ohrt * Toronto * ON * Canada
------------------------------
|