0

Task to accomplish: Multiple shots in fractions of a second, at least 2 photos in 1 second.

Tried (for 2 photos): 1) Calling two takePicture(....) method simultaneously/loop, but the app crashes. 2) Calling the first takePicture(..) method and then other takePicture(..) method in onPictureTaken(..). This works but it is too slow. The time difference between these two shot is around 1 second which is not a preferable result for my app.

Question: How is it possible to take multiple shots, with a time difference of just some milliseconds?

(I'm working on android 2.3.3). Thanks in advance!

3 Answers3

1

This only a possibility on newer devices with ZSL (zero shutter lag) cameras. I believe that is only currently the mytouch 4g slide, the galaxy nexus, and the HTC one x, with the upcoming evo 4g lte and samsung galaxy3 phones. It is a relatively new feature for android phones

Drake Clarris
  • 1,047
  • 6
  • 10
  • @Perroloco & Drake: I've installed some camera apps on my HTC Evo 3D (2.3.4) that shots 10-30 shots per second and i needn't do any change in the OS either. For my app, i just need two photos as stated in the question. What could be the idea behind those apps that i installed? Are those just the video frames shown as photos? Thanks for the quick reply! –  May 21 '12 at 14:48
  • more than likely... you could tell by looking at the pixel size of the "photos" – Drake Clarris May 21 '12 at 18:02
1

I used the callback function setOneShotPreviewCallback (Camera.PreviewCallback cb) and solved the problem. This grabs a single preview frame and let you use the frame as an image after converting into some usable format (RGB). Since, android supports 20-30 frames per second depending on the device, you can take several frames in fraction of seconds.

0

I think for doing that the phone has to be rooted and you'll have to modify some OS files...

Sebastian Breit
  • 6,137
  • 1
  • 35
  • 53