Help transforming fisheye into equirectangular

kfarr's picture

Hi there, I'm trying to use Quartz Composer to transform a live video feed consisting of dual fisheye views (180 x2 = 360) from the Ricoh Theta S camera into an equirectangular output to then stream for 360 webvr viewing.

Goal is to create a Quartz composition that can be used in camtwist or other live video streaming software to adjust live the output of the theta-s to be suitable for using in a 360' web panorama plugin. The flow will be something like this:

  • Theta S via USB or HDMI > Computer
  • Computer to use this Quartz composition from within Camtwist > Media encoder > HLS (via cloud encoding service) > web front-end
  • Web front-end needs equirectangular image, see this example:

I am having a hard time getting this to work using sample code from Paul Bourke found here:

Has anyone done similar transformation of fisheye > equirectangular? Would love any advice you can provide.

The QTZ file and more info on the project can be found here:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Alexander Mitchell's picture
Re: Help transforming fisheye into equirectangular

@kfarr what issue are you having with Pauls Image Kernel? I know that Image Kernels in general go crazy when you run them at large resolutions. I have ported that Image Kernel to ShaderToy for use in Vuo, so probably wouldn't be that hard to port to GLSL in QC.

Do you need to use QC? Can you work recreate your work in Vuo?

Attached is a production still that I created in Vuo. I used a fisheye image of clouds (a time-lapse movie) and then warped it to spherical with GLSL.

Also attached an image of warping a test pattern in the GLSL code.

Paul also was kind enough to create a Fisheye to Lat-Long (equirectangular) PB Warp File! So you can also go that way if you want. Let me know and I will send it through, (should probably ask Paul first as he worked it all out!)

Cheers, Al