Home

Awesome

Fisheye Mesh Generator

This is a fisheye projection mesh generator. It generates mesh files (.obj) and you can use theses files to create a virtual fisheye camera in a Unity virtual environment.

This script is only for 180 degree camera. You can update the code change the FOV.

How to Use

Install dependent packages first.

$ pip install -r requirements.txt

Then run the script.

$ python run.py --model_type equidistance --res 64

Model Types

This generator supports four fisheye projection model types.

Resolution

The higher number generates more fine mesh. Default value is 64. What it actually means is a number of grids that splits a side of a virtual cube.

Output

The script will create two folders for square objects (square_objs) and fisheye objects (fish_objs). What you will use is the fisheye objects. It also creates fisheye.png, which visualizes the created fisheye meshes.

More Resources

Technical Document

If you want to understand more about this code, please check this document.

Unity Example

If you want to create a fisheye camera using the mesh outputs, please check out this repository.

References

Here are some great articles about fisheye camera for Unity.