DeFish

to dewarp fisheye images

DeFish is a Macintosh application that can remove fisheye distortion from fisheye images.

Opening a file

First we open an image file captured with a fisheye lens.

1. Open a file

This is the fisheye image we will work with:

2. A fisheye source

Setting the Fisheye Parameters

Next we adjust the fisheye circle. Choosing "Adjust Fisheye Circle" will also enable "Show Fisheye Circle".

3. Enable adjustment of the fisheye circle

Here we show a time series of circles obtained by clicking on the circle perimeter and dragging.

4a. Adjust the fisheye circle radius by clicking and dragging the circle perimeter.
The center remains fixed.

If we click in the middle of the circle and drag, it moves the circle center instead of resizing the circle.

4b. Adjust the fisheye circle center by clicking and dragging the circle interior.
The radius remains fixed.

I prefer to hold the option key while clicking on the circle perimeter. This will cause the opposite point to be fixed while the click point can be moved. The desired result is one where all of the edge aberrations are located outside of the circle. In these images, we want to cut out the bluish tinge around the perimeter.

4c. Adjust the fisheye diameter by option-clicking on the perimeter.
The opposite point remains fixed.

Adjusting the fisheye circle is one way to adjust the fisheye parameters. The other way is to enter values directly into the dialog.

5. Open the fisheye calibration dialog.

The fisheye circle adjustment only affects the radius and center. The field of view, rotation and radial distortion need to be set here. It should be obvious how to set the rotation. The radial distortion can provide correction for barrel or pincushion distortion, but the parameters are not intuitive, and will not be covered here. The field of view is the primary way to change the nature of the fisheye distortion, and will be illustrated in the following sequence of images.

6a. The fisheye calibration dialog. The radius and center were set interactively after activating the Adjust Fisheye Circle menu item. Here we set the FOV of the fisheye circle to 180°.

We first create a perspective view in order to see how good the current fisheye parameters are.

7. Create a perspective view to test the fisheye parameters.

Here we can see that the straight lines are curved. This can be fixed by adjusting the Field of View of the fisheye lens.

7a. Create a perspective view to test the fisheye parameters. Note that the straight lines bulge outward.

Here we lower the field of view to 170°, to see how it affects the straight lines.

6b. Try 170°.

Lowering the fisheye field of view seems to make the distortion worse.

7b. Oops! Lines bulge further outward at 170°!

6c. Try 190°.

7c. Good! Now they're bending the other way at 190°. The true value must be between 180° and 190°.


6d. Try 184°.

7d. Great. The lines are now straight. I checked by putting a piece of paper on the monitor.

Making Perspective Projections

8. Enlarge the vertical field of view to 160°.
9. Enlarge the vertical field of view to 160°.


10. Make a hemicube.
11. A 90° hemicube..


12. A 120°x160° hemicube.

Making Cylindrical Projections

13. The cylindrical dialog
14. A 180°x115° cylindrical image.

Getting the DeFish Application

Click here to download DeFish.

 

Product Rating Downloads  
DeFish add a comment

If you have problems extracting DeFish, you may need to update your version of Stuffit Expander from Allume Systems.


 last updated 1/6/05