Distorted images when using GLSurfaceView for camera preview

I am having a problem: when I try to use GLSurfaceView

to display the camera preview, the preview image is completely distorted, but only if I choose a preview size> = 1280x720. At lower resolutions (like 960x720) everything is fine. This is what the preview image looks like:

distorted camera preview image

I noticed this when I was trying to record a video stream from the camera, which works great with distorted images. So I tried to just show the camera preview with this code -> http://maninara.blogspot.co.at/2012/09/render-camera-preview-using-opengl-es.html

I noticed that as soon as the width gets more than 1000px, the image ends up with distortion and also tries to use a different aspect ratio, but that didn't help either. I am running this in the Google Glass API.

Best wishes Wolfram

+3


source to share





All Articles