title: Maximum camera grab and display performance
body: <p>I've researched about this topic a lot, but it seems I'm doing something wrong or my understanding is somehow off.</p>
  
  <p>I <em>simply</em> want to achieve the best performance (e.g. measured in FPS) for grabbing a high quality image from my Android driven SmartPhone and showing it directly to the user without any modifications.</p>
  
  <p>Since I have a pretty capable SmartPhone (Nexus 4), I assumed it should be a trivial task. But all my efforts didn't pay off. E.g. I only achieved about 10 FPS for a 800x480 stream using the latest OpenCV framework.</p>
  
  <p>So, is it possible to achieve >25FPS for just grabbing and displaying high quality video from my phone's camera? If so, what is the best strategy to do so? Device specific considerations are welcome as well.</p>
  
  <p>Resources I used:</p>
  
  <ul>
  <li><a href="http://obviam.net/index.php/texture-mapping-opengl-android-displaying-images-using-opengl-and-squares/" rel="nofollow">http://obviam.net/index.php/texture-mapping-opengl-android-displaying-images-using-opengl-and-squares/</a></li>
  <li><a href="http://mesai0.blogspot.de/2013/01/android-native-camera-with-opencv-and.html" rel="nofollow">http://mesai0.blogspot.de/2013/01/android-native-camera-with-opencv-and.html</a></li>
  <li><a href="http://opencv.org/" rel="nofollow">http://opencv.org/</a></li>
  </ul>
  
  <p><strong>Update:</strong>
  I've been able to increase the grabbing performance to nearly constant ~25FPS@1280x720 by simply setting the <a href="http://developer.android.com/reference/android/hardware/Camera.Parameters.html#setRecordingHint%28boolean%29" rel="nofollow">recording hint</a> while using the <a href="http://developer.android.com/reference/android/graphics/SurfaceTexture.html" rel="nofollow">SurfaceTexture</a> and <a href="http://developer.android.com/reference/android/view/TextureView.html" rel="nofollow">TextureView</a> as Camera sink.</p>
  
  <p>Yet I'm wondering if it possible to increase the performance even further. I tried to use different preview formats, but without luck. Maybe there is implicit upper limit enforced on the grabbing performance I'm unaware of.</p>
  
  <p>Nevertheless I'll continue to research and keep you informed. All sorts of information are still welcome!</p>