Fisheye to equirectangular converter written in RealBasic/XOJO
This is an experimental program (or if you prefer, a pre-alpha release), so use it at your own risk.
This program takes as input 1 or 2 images in fisheye/square/circular format and reproject them into equirectangular projection.
A "fisheye/square/circular" is an image with same width and height, containing the circular image representing the field of fiew of a fisheye lens.
FishconLC relies on an external program called "FFMPEG", and makes use of its V360 filter to perform all calculations, being as a matter of fact just an interface to produce the needed parameters to use FFMPEG to convert from fisheye to equirectangular, using this command:
ffmpeg -i input.jpg -y output.jpg -vf v360=fisheye:equirectangular:ih_fov=235:iv_fov=235:yaw=0:pitch=90:roll=0
- h_fov and i_fov define the horizontal and vertical FOV of thew fisheye image;
- yaw, pitch and roll define the orientation of the camera
For double fisheye input (only horizontal) just change "fisheye" to "dfisheye".
Experiment here:
- Download thw whole repo and unpack the zip file.
- Find the folder Builds\Fisheye2Equi.xml\Windows\Fisheye2Equi
- Copy ffmpeg.exe executable in the folder
- Launch Fisheye2Equi.exe executable
Once you get an equirectangular image, you can view it as a spherical panorama using one of these sites:
- https://renderstuff.com/tools/360-panorama-web-viewer/
- https://akokubo.github.io/ThetaViewer/demo2.html
Commandline for converting horizontal doble fisheye to equirectangular full sphere:
- ffmpeg -i input.jpg -vf v360=dfisheye:e:ih_fov=210:iv_fov=210:pitch=5 -y output.jpg
Above command assumes the FOV of the two images is 210° horizontally and vertically, and that the camera was slightly pointing dowupn (5°) while taking the shot.