Pywiggle

A script to perform view interpolation on stereo views


Introduction

The program interpolates several views between a left and right image to create a smooth animation between those two views. When the animations are played back the user gets the impression of the scene depth without using glasses or other means of 3D technology.

See Wiggle stereoscopy (Wikipedia) for more details.

The quality of the animation depends heavily on the input data. Some scenes may work very well and others may fail completely. Images taken with a stereo rig should work best. Images taken by manually moving the camera will often not produce good results.


Download

You will need a recent version of the OpenCV library and Python.

The code can be found on github

Examples

Please note: The animations are rather big and take a while to load.

Sun (Nasa)
Commandline:
python stereointerpolate.py -r images/nasa.png  -a -m 20,10 -b 11,11 -s 5,5 -p 3,0 -S 8 -C 1 -P 1 -F test2_subpix.png -B 1
Beach
Commandline:
python stereointerpolate.py -r images/DSCF0640.LR.jpg  -a -m 20,10 -b 11,11 -s 5,5 -f 12 -p 12,0 -S 8 -C 1 -P 1 -F test2_subpix.png -B 1
Stone plate
Commandline:
python stereointerpolate.py -l images/stone1.bmp -r images/stone2.bmp  -m 20,10 -b 11,11 -s 5,5 -f 12 -p 12,0 -S 8 -C 1 -P 1 -F test2_subpix.png -B 1 --crop 15,15,436,353