Skip to content
Extract the EDOF from photos obtained from Dual Camera smartphones
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Initial commit May 1, 2017 Updated readme May 18, 2017 Add new orientation case Mar 6, 2018


Extract the EDOF from JPEG photos captured with Dual Camera smartphones

The result is a grayscale image depth map where higher depth is represented as higher luminosity values. The original and processed images can also be extracted as separated images for postprocesing.

The resulting image can be used in a image editor to add depth specific effects.

Tested with a Huawei P9 but it may work with smartphones using the same technologies.


Usage: [options] img1 img2 img3...
    -p: Save the originaly processed image to the same directory
    -o: Save the originaly unprocessed image to the same directory
    -e: Save the EDOF as an image to the same directory
    -v: View the EDOF image
    -d: Delete file and only keep extracted (will enforce -o -e)


  • Python3
  • Pillow


  • Simple and not throughly tested. Works in my setup.
You can’t perform that action at this time.