Ask Your Question
0

Odroid-U2 + OpenCV = destroyed image

asked 2013-09-19 06:23:43 -0600

Nagilo gravatar image

updated 2013-09-20 02:36:53 -0600

I'm using an ODROID-U2 that I upgraded to Android version 4.2.1.8. Then I installed Google Play store. Afterwards I used Eclipse on my Windows PC and the Odroid ADB driver to install the OpenCV Android examples. But somehow it shows a completely detroyed image (green lines). But if I used the camera app from Android, the camera image is fine. See the attached image ...image description

Has anyone experience the same issue?

Matthias

The code from the Tutorial1Activity.java from OpenCV Tutorial 1 - Camera Preview.

edit retag flag offensive close merge delete

Comments

Maybe post the code you use to get the picture.

Moster gravatar imageMoster ( 2013-09-19 08:56:14 -0600 )edit

Somehow the editor does not support source code formatting. But the code is from OpenCV Tutorial 1 - Camera Preview. As far as I know it seems to be a bug of Android JellyBean :( see this post: http://forum.odroid.com/viewtopic.php?f=14&t=1471

Nagilo gravatar imageNagilo ( 2013-09-20 02:42:38 -0600 )edit

Maybe try a newer opencv version (2.4.6). You still seem to use 2.4.3. The libraries for the camera might have been updated in the meantime.

Also maybe change the android target SDK to api level 17 (not 11) and your ndk api level to 14. The first one can be changed via eclipse and the project settings ( assuming you have this api level downloaded with the sdk manager). The 2nd one you can change in the Application.mk with APP_PLATFORM := android-14

Moster gravatar imageMoster ( 2013-09-20 05:58:41 -0600 )edit

I'm using OpenCV for Android 2.4.5. The camera is a default USB camera which is supported by Ondroid via the UVC feature. In the Android Camera app the cam works fine. The API level is 17 and the Tutorial 1 is not using NDK and has therefore no Application.mk. But I checked three other examples which are using NDK and they are all on APP_PLATFORM := android-9

Nagilo gravatar imageNagilo ( 2013-09-20 08:16:12 -0600 )edit

I just checked the website you provided and the log says: SDK target: android-11 And in your source code you do OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_3, this, mLoaderCallback); and not OPENCV_VERSION_2_4_5

Moster gravatar imageMoster ( 2013-09-20 08:20:58 -0600 )edit

First of all. It's not my source code, but the one from OpenCV. Second, the OpenCV library that I downloaded and which I use in Eclipse is 2.4.5 but you are right, the Tutorial1Activity.java had OPENCV_VERSION_2_4_3 which I then changed to 2_4_5. But no success :( Following this article I tried to play around with the preview image format but also no success: http://forum.odroid.com/viewtopic.php?f=14&t=1471

Nagilo gravatar imageNagilo ( 2013-09-20 10:39:23 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-09-24 03:50:37 -0600

Nagilo gravatar image

It's a problem of Android and the resolution of the camera which is supported by the HAL. See this article for more details.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-09-19 06:23:43 -0600

Seen: 984 times

Last updated: Sep 24 '13