Reputation:
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!
Upvotes: 0
Views: 1299
Reputation:
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.
Upvotes: 1
Reputation: 1045
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
Upvotes: 1
Reputation: 6159
I think for doing that the phone has to be rooted and you'll have to modify some OS files...
Upvotes: 0