Error Reading Yuv Buffer
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to set camera resolution in Android with OpenCV? up vote 9 down vote favorite 7 I'm trying to develop an app for Android, and I would need to get uncompressed pictures with a resolution as high as possible from the camera. I tried takePicture's rawCallback and postviewCallback, but they are not working. Right now I'm trying with OpenCV (version 2.4) using VideoCapture, but I'm stuck in the default 960x720, which is poor for what I need; and my phone, a Samsung Galaxy S3, is able to provide, theoretically, up to 8Mpx (3,264×2,448 for pictures, and 1,920×1,080 for video, according to Wikipedia). VideoCapture.set(Highgui.CV_CAP_PROP_FRAME_WIDTH/HEIGHT, some number) makes the camera return a black image as far as I've found. Is there any way to obtain a higher resolution, either through OpenCV or with the Android API, without compressing? I'm really sorry if this has been asked before; I have been looking for days and I have found nothing. Thank you for your time! EDIT: Although it is not exactly what I was asking, I found that there is a way to do something very similar: if you set an OnPreviewCallback for the Camera, using setPreviewCallback, you do get the raw picture data from the camera (at least in the S3 I'm working with). I leave it here in case somebody finds it useful in the future. EDIT: A partial solution is explained in an
från GoogleLogga inDolda fältSök efter grupper eller meddelanden
is a few months old, but thought I would post apotential work-around anyway.I ran into this issue and http://grokbase.com/p/gg/android-opencv/1263q9kkrj/opencv4android-re-sample-face-detection-does-not-work resolved it by targeting Android 4.0.3 (SDK 15).May not work for all, but should for some.Regards,JoelOn Friday, September 9, 2011 2:33:55 PM UTC-5, Tand wrote:Hi,I try to run the sample face detection, but it does not work. I seet:he next error in the log:09-09 19:20:55.050: ERROR/CV_CAP(313): ERROR reading YUV buffer:width=320, height=240, error reading size=115200, receivedSize=153600I have also tried my Android phone (Samsung Galaxy S), but it doesneither work. The screen remains black.Any suggestions?On Friday, September 9, 2011 2:33:55 PM UTC-5, Tand wrote:Hi,I try to run the sample face detection, but it does not work. I seet:he next error in the log:09-09 19:20:55.050: ERROR/CV_CAP(313): ERROR reading error reading yuv YUV buffer:width=320, height=240, size=115200, receivedSize=153600I have also tried my Android phone (Samsung Galaxy S), but it doesneither work. The screen remains black.Any suggestions? reply Tweet Search Discussions Search All Groups Android android-opencv Related Discussions Re: Sample face detection does not work Android, Hand, Blob, Contour detection and Tracking. [OpenCV4Android] Is anyone find a way to solve opencv samples cannot work on Motorola Defy device? Having trouble understanding java parameters vs C++ parameters opencv sample crash - tutorial2 Advanced opencv sample programs don't work on device [OpenCV4Android] Application OpenCV works in AVD, but does not work in VM [OpenCV4Android] Reference error for Opencv method [OpenCV4Android] video manipulation in android [OpenCV4Android] Re: Large APK file Discussion Navigation viewthread | post posts ‹ prev | 1 of 1 | next › Discussion Overview groupandroid-opencv @ Notice: Undefined variable: pl_domain_short in /home/whirl/sites/grokbase/root/www/public_html__www/cc/flow/tpc.php on line 1605 categoriesandroid postedJun 3, '12 at 2:23a activeJun 3, '12 at 2