Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I've found that a very good way to process frames on Android is to open a camera preview (the one used to take photos) and register a delegate for the onPreview() event. You usually have a high framerate.

But you have to offload the processing to another thread. The best way is to immediately make a copy of the frame and send it to another thread, to process. Failing to do so will turn your system upside down, because if another frame comes and you still process the previous one, the callback will mess everything up.

All this is done in Java, and you have to link it to JNI in order to use C++.