Skip to content

Script that extracts the depth image for a Google Lens Blur image and uses it to create a Wigglegram

License

Notifications You must be signed in to change notification settings

OrganicIrradiation/pyLensBlurWigglegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyLensBlurWigglegram

Script that extracts the depth image for a Google Lens Blur image and uses it to create a Wigglegram

##Introduction This is a simple script that takes a Lens Blur photo produced with Google's Android Camera application, extracts the depth information, and creates a wigglegram. This script was inspired by depthy, a web-app/viewer for Google's Lens Blur images.

The script loads the image produced by the Lens Blur function, extracts the original image and the depth image stored in the metadata, and then creates a series of frames where the original image is displaced by the depth image values. The script then saves the frames to an animated GIF.

##Prerequisites You will need Python 2.7.6 and the following libraries (tested versions in parentheses):

  • images2gif - Compatible version included
  • numpy (1.8.1)
  • PIL (1.1.7)
  • scipy (0.13.3)

##Installation & Usage After you have all the prerequisites installed, you should download the script to your location of choice. You can run the script with the default options using the following CLI command:

python pyLensBlurWigglegram.py INPUTFILE

To get information about the different CLI options, run:

python pyLensBlurWigglegram.py -h

Here are demonstrations to process the included examples:

python pyLensBlurWigglegram.py exampleimages/example1.jpg -ri 0.5

Image

python pyLensBlurWigglegram.py exampleimages/example2.jpg -ri 0.5

Image

python pyLensBlurWigglegram.py exampleimages/example3.jpg -o exampleimages/example3_focusclose.gif -d 0.1 -ri 0.5

Image

python pyLensBlurWigglegram.py exampleimages/example3.jpg -o exampleimages/example3_focusfar.gif -d 0.9 -ri 0.5

Image

##Related Resources

About

Script that extracts the depth image for a Google Lens Blur image and uses it to create a Wigglegram

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages