Graphics Programs Reference
In-Depth Information
Figure 4.10: Two Angular Fisheye Examples. (The one on the left is courtesy of Joseph Bly
[joebly 06]. The one on the right is courtesy of Dick Termes.)
titled Food for Thought, 2004 and features the La Plazula restaurant at the La Fonda
Hotel in Santa Fe, New Mexico.
Exercise 4.5: Show why most straight lines are mapped to curves under the angular
fisheye projection.
Another point worth mentioning is that the sphere is larger than the circle. Even
if u and w are varied in large steps, there may be more directions to scan than there
are pixels in the radius- k circle. This suggests another approach to the angular fisheye
projection. Instead of scanning the 360 sphere in many directions, scan the radius- k
circle pixel by pixel, compute the polar coordinates ( r, u ) of each pixel, and use them to
determine the corresponding direction ( u, w ) in space. If a point of the scene is found
in that direction, it is projected to the pixel without any additional calculations.
Here is a summary of this derivation. (Actual C code can be found in [Bourke 05].)
We assume that the circle is embedded in a rectangular bitmap of height H pixels and
width W pixels. We scan this rectangle row by row. If the current pixel has coordinates
( a, b ), we first convert them to normalized coordinates ( x, y )intheinterval[
k, + k ]by
H 1 k.
The distance of the pixel from the center of the rectangular image is r = x 2 + y 2 .If
r is greater than k , the pixel is outside the radius- k circle and is ignored. Otherwise,
angle u is computed by
x = 2 a
W 1 k and y = 2 b
u = 0 ,
r =0,
π
arcsin( y/r ) ,x< 0,
arcsin( y/r ) ,
x
0.
Search WWH ::




Custom Search