https://github.com/spite/android-lens-blur-depth-extractor
https://github.com/spite/android-lens-blur-depth-extractor
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/spite/android-lens-blur-depth-extractor
- Owner: spite
- License: mit
- Created: 2014-04-17T18:53:47.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2016-07-28T11:18:58.000Z (almost 10 years ago)
- Last Synced: 2025-02-19T02:12:26.250Z (over 1 year ago)
- Language: JavaScript
- Size: 652 KB
- Stars: 294
- Watchers: 18
- Forks: 33
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
LensBlurDepthExtractor.js
=========================
This library parses images created with the new Android camera app mode Lens Blur and extracts the depth map.
Extractor tool is here: https://clicktorelease.com/tools/lens-blur-depth-extractor
Demo is here: https://www.clicktorelease.com/code/depth-player/

How to use
----------
Include the library:
<script src="LensBlurDepthExtractor.js" ></script>
Instantiate an object:
var d = new DepthReader();
Load from a file:
d.loadFile(
'table.jpg',
function( src ) { /* src is base64 png source */ },
function( error ) { /* error is a string */ }
);
Or, load directly from an array buffer
d.parseFile(
arrayBuffer,
function( src ) { /* src is base64 png source */ },
function( error ) { /* error is a string */ }
);
License
-------
MIT licensed
Copyright (C) 2016 Jaume Sanchez Elias http://twitter.com/thespite
Table picture by https://twitter.com/blurspline
http://www.clicktorelease.com