Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I may not have a direct solution, but I might be able to point you in the right direction.

I'm also developing an app for Andriod using OpenCV, and I was mainly using my own Galaxy S2. I get the full 30 fps (with appropriate lighting conditions) when using either my own app or the tutorial app (native or java mode). With the Nexus 4 I recently got to help with development, I get only 10 at best, but after a bit of searching I've found a workaround: According to this StackOverflow post a possible workaround is to set the recording hint to true. This obviously only works with the java version, but after this change I get smooth frame rates (as far as the lighting allows it, so usually also around 30 fps).

One of the problems with this is that this works perfectly on the Nexus 4, but the SGS2 apparently can't deliver frames in NV12 format with the recording hint set and (force-) changes format. I can only hope that this will be fixed at some point in the Nexus 4, as this is a temporary workaround at best...