Slides for spherical mirror full dome projection
Slides to fisheyeWritten by Paul BourkeAn alternative, April 2006
This utility converts slides or perspective images for fulldome display using one of the many possible mappings. The particular mapping used attempt to optimise the trade off between maximising resolution, create a reasonable field of view, and minimising distortion. The geometric model is to imagine the image on a plane that extends from the pole of the fisheye to the horizon, inclined at 45 degrees. The width of the plane will be chosen such that the aspect ratio is preserved. This implementation will transform both TGA (default) and JPG images. The format of the input image and the output image is determined from the file name extension, namely ".tga" or ".jpg". In the later case the compression quality may be chosen, the highest quality is 100 (the default). Supersampling antialising is employed, typically values of 2 (the default) or 3 are appropriate. A single image will be converted by default but if the file name contains a "C" style string substitution string "%d" then a sequence of sequentially numbered files will be converted. In both cases the output files will have the same name as the input files but with the string "_fish" added. Command line usageUsage: slide2fish [options] imagefilename Options: -d enable verbose debug mode (default: quiet mode) -a n set antialias level, 1 upwards, 2 or 3 typical (default: 2) -w n width of the fisheye image, height = width (default: 500) -q n set the output quality (jpeg only), 0 to 100 (default: 100) -n n set the start frame number if convering a sequence (default: 1) If the imagefilename contains a C style %d then an entire sequence of files will be converted. For example if the slides are called slide00.tga slide01.tga slide02.tga .... Then the command line might be something like this slide2fish -a 2 -n 0 -w 2200 slide%02d.tgaExample 1
Example 2
Mapping images into fisheye space so they appear to be on an upright cylinder in a planetariumWritten by Paul BourkeApril 2007 Aim is to map rectangular images onto a fisheye image such that when viewed in a planetarium the images appear to be wrapped onto cylindrical sections. Choose the width and position in longitude for the image, this is theta1 and theta2. Also choose the latitude of the base of the image, for example, it might be 0 if the image is to start at the horizon. The image width and height are dx and dy in pixels. We need to determine phi2 such that the image appears in proprotion and upright in the dome.
The images are imagined to be wrapped around a cylinder.
Define "r" as the radius of the hemisphere in pixels = dx / (thet2 - theta1)
For the final fisheye image the goal is to find r1 and r2, once they are
known the x,y normalised coordinates of the four corners of the image
rectangle in the fisheye can be determined, namely
r1 = 2 (pi/2 - phi1) / pi Notes
|