Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Burst mode camera in Android which can take multiple pictures

Tags:

android

camera

I was trying to implement a burst mode camera in my app, which can take multiple pictures at the rate of 5-10(or more) snaps per second.

FYI I already saw the previous questions here, here and here - tried and failed with speed. Also the questions are old and there are no comprehensive answers addressing all the concerns like how to manage heap etc.

I would really appreciate if someone can help with useful pointers, best practice or maybe an SSCCE.

Update :

Tried successfully with pulling preview frames @ 15+snaps/sec, but the problem is preview size is limited. On nexus 5 I can get only 1920x1080 which is ~2mp, whereas the full resolution pic possible on n5 is 8mp :-(

like image 992
COD3BOY Avatar asked Apr 18 '14 07:04

COD3BOY


People also ask

How many photos does burst take?

Burst mode works with both the rear- and front-facing cameras. Burst mode captures an impressive 10 photos per second. This nifty functionality means you are more likely to capture the perfect moment of action.

What is it called when a camera takes multiple pictures fast?

Your device supports a photo shooting mode called Burst shot. This mode lets you quickly capture up to 30 photos with just one touch and play them through one-by-one like a video.

How do you split burst photos on Android?

The only way to split the burst photos is to connect your phone to a computer and navigate to the DCIM/Pictures folder and you should see the individual images there.


2 Answers

Short of device-specific APIs offered by their manufacturers, the only way you can get a "burst mode" that has a shot of working across devices will be to use the preview frames as the images. takePicture() has no guarantees of when you will be able to call takePicture() again.

like image 64
CommonsWare Avatar answered Oct 24 '22 11:10

CommonsWare


I think a big part of the problem is the question: How does burst mode work in current phones? A couple of blogs point out that Google has confirmed that they will be adding a burst mode API.

I suspect current implementations work by setting exposure time to minimum and calling takePicture in a loop or using Camera.PreviewCallback

I played around with the latter for some computer vision projects and happened to look into writing a burst mode camera using this API. You could store the buffers you receive from Camera.PreviewCallback in memory and process them on a background thread.

If I remember correctly, the resolution was lower than the actual camera resolution, so this may not ideal.

like image 25
Leon Avatar answered Oct 24 '22 11:10

Leon