📜 ⬆️ ⬇️

Parallax Effect (3D) with Lens Blur in Google Camera

While Lytro and others release lightfield cameras, Google does magic in software. For example, in Lens Blur mode, Google Camera uses Z-buffering and saves a depth map (i.e., distance information to objects).


Depth map in Lens Blur mode

A few days ago on Github published LensBlurDepthExtractor.js , which extracts the depth map from photos taken in Google Camera.

You can use this metadata to change the depth of field and blur the separated objects.
')

Change sharpness using depth map

A beautiful parallax effect is created with emulation of a 3D scene. The first Depthy web service, which processes photos using the above code, has already opened.



Depthy source code .

Source: https://habr.com/ru/post/220557/


All Articles