Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get depth from dual camera Android smartphone [closed]

Tags:

android

camera

There are many dual camera Android phones in the market which can take image with bokeh effect. Is it possible to create an Android app to make use of dual camera and get the depth of each pixel in image? Or accessing two camera at the same time to produce stereo image?

like image 903
SamTew Avatar asked Sep 26 '17 08:09

SamTew


People also ask

Can phone cameras detect depth?

A phone with a normal wide-angle lens and a depth camera can only take photos at a regular distance, with or without a depth effect, but a phone with a wide-angle and telephoto can do the same thing with the addition of enhanced zoom.

How do dual cameras work on phones?

A dual camera offers two photo sensors instead of the standard one photosensor. The main camera takes high-quality colored images, as you'd expect. The second camera works to add more elements that the main sensor can't do on its own.


2 Answers

Android P will be supporting multicamera mode so that developers/users can access both physical cameras. Depth calculation from monochrome is not a problem because most algorithms use the stereo pictures after converting them to gtay scale. In current versions the difficulty is only getting access to both physical cameras. I am too waiting for this Android release.

This one is written in OpenCV python using grayscale image as input. https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_calib3d/py_depthmap/py_depthmap.html

like image 76
Asim Kumar Mahakul Avatar answered Sep 26 '22 00:09

Asim Kumar Mahakul


In certain Xiaomi phones, I have tested in Poco F1, it is possible to access the second depth sensing camera.

By tapping on the Kernel version multiple times, we can get to phone testing. There, we can access the second rear camera. The zoom level seems to be around 2X in my model and surprisingly it is a colour sensor. No autofocus though, but the depth is set at infinity so the photos aren't very bad.

The only way to save the pic seems to be taking a screenshot, unfortunately.

like image 20
Bgos Avatar answered Sep 26 '22 00:09

Bgos