bluthen / fish2pano

Convert fisheye image to panoramic
Creative Commons Zero v1.0 Universal
7 stars 1 forks source link

DEPRECATED

You should just use OpenCV wrapPolar directly.

See issue #4

Install

pip install fish2pano

Inplace

If you are running in place from source from the repository, make sure to compile optimized version of fish2pano.fast, it will probably be over 200 times faster. If you installed with pip then yous hould be good.

python setup.py build --inplace

Usage

> import fish2pano
> myimg = ... # Load numpy of shape (W, H, 3) representing the image
> radius = 481 # How big a circle your fisheye image is in pixels
> center = [618, 538] # Center of your fisheye image
> scale = 0.5 # How big the resulting pano is compared to the original
> mypano = fish2pano.fish2pano(myimg, radius, center, scale) # numpy array of your new pano image

Command Line and Graphical tools

See fish2panoui repo for command line and graphical tools to turn fisheye image to panoramic.

It also has a tool "findcircle.py" that helps you find the radius and center of the fisheye in your image.

Example

Image of sky from a fisheye lens

python fish2panoui.py large2.jpg 481 618,538 0.5 large2_pano.jpg

Image of sky in panoramic form