title: Using the raw camera byte[] array for augmented reality
body: <p>I'm developing an Augmented Reality app, so I need to capture the camera preview, add visual effects to it, and display it on screen. I would like to do this using the <code>onPreviewFrame</code> method of <code>PreviewCallback</code>. This gives me a <code>byte[]</code> variable containing raw image data (YUV420 encoded) to work with.</p>
  
  <p>Even though I searched for a solution for many hours, I cannot find a way to convert this <code>byte[]</code> variable to any image format I can work with or even draw on the screen.</p>
  
  <p>Preferably, I would convert the <code>byte[]</code> data to some RGB format that can be used both for computations and drawing.</p>
  
  <p>Is there a proper way to do this?</p>