0

Since I could not find any useful documentation that shows how to get just single frames/images from camera I'm asking it here, may be somebody has a hint where to start.

I want to use single images from camera in a fast way. Means I want to retrieve a single image, then do some internal processing on it (which may need some time) and retrieve the next image as soon as this processing has beend one.

I found some examples/documents that describe retrieving of single images via an Intent that makes use of external applications - but that seems to be too slow for me. Beside of that some of these examples stored the image on disk where one would have to load it - which is way to slow too.

So how can I capture a single frame out of my own application so that the image is returned in memory using a format that can be used for further image processing? Examples I found here at stackoverflow.com and on other pages make use of camera App - that's not what I want.

Elmi
  • 5,899
  • 15
  • 72
  • 143
  • @Siddharth Lele thanks for your heplful, friendly and exact answer - now I know how to implement it! Oh, sorry, it was the other guy who was able to give an answer, you just wasted my time. – Elmi Mar 11 '13 at 08:13
  • And thanks for all the downvotes. Clearly you do not my purpose of being here on SO. You have 253 more questions for that. Don't forget them ;-) – Siddharth Lele Mar 11 '13 at 08:21

1 Answers1

1

You should use the Camera class and call takePicture. Then you simply register a handler for PictureCallback.onPictureTaken.

crazylpfan
  • 1,038
  • 7
  • 9