Mobile vision 2: Working with camera in openCV and Android Studio

dtdzung · 104K views · 2016 · 25:24

Open on YouTube

Computer vision, speech & NLPSoftware (other)tutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as the tutorial they followed when their OpenCV camera app crashed with errors like UnsatisfiedLinkError or ClassCastException.

Recommended by 0 people across 0 different months, 2017 to 2018.

What it is

A 25-minute screen-recorded tutorial by dtdzung on setting up OpenCV in Android Studio and getting live camera frames working. It is the second part of a series on mobile computer vision.

What people said

Cites Ayush Chauhan · 2017-01 · Stack Overflow · on “UnsatisfiedLinkError with OpenCV and Android”

I was trying to build a new app using openCV but my app is crashing with not even a single log statement. Then I integrated Crashlytics into my application and it shows the following issue Fatal Exception: java.lang.UnsatisfiedLinkError: No implementation found for void org.opencv.imgproc.Imgproc.Canny_3(long, long, double, double) (tried Java_org_opencv_imgproc_Imgproc_Canny_13 and Java_org_opencv_imgproc_Imgproc_Canny_13__JJDD) at org.opencv.imgproc.Imgproc.Canny_3(Imgproc.java) at org.opencv.imgproc.Imgproc.Canny(Imgproc.java:1038) at aac.scanner.MainActivity.onCameraFrame(MainActivity.java:72) at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:392) a

Cites rawan taban · 2017-09 · Stack Overflow · on “FATAL EXCEPTION: main java.lang.RuntimeException”

I am new to Android programming. I need to open the camera with OpenCV library and I have followed this [this video] video tutorial. However, the app has been stopped on the emulator at runtime and only view a message that says "app_name has stoped try to open again". There are lots of errors, I have fixed many of them but I can't fix the others. This is my logcat: 09-02 04:00:52.628 9058-9058/samaa.example.com.opencv249 E/AndroidRuntime: FATAL EXCEPTION: main Process: samaa.example.com.opencv249, PID: 9058 java.lang.RuntimeException: Unable to start activity ComponentInfo{samaa.example.com.opencv249/samaa.example.com.opencv249.MainActivity}: java.lang.NullPointerException: Attempt to invoke virt

Cites Carla Al Najjar · 2018-02 · Stack Overflow · on “Using OpenCV with Android Studio 3.0.1”

I'm using opencv 2.4.9 libary in my application with android studio3.0.1 using Nexus 4 API 27(Android 8.1.0 API 27) virtual device to runn my application and im following this tutorial: [this video] After i link the path Android.mk in my project and run the app i got an error E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.carla.carla, PID: 20817 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.carla.carla/com.example.carla.carla.MainActivity}: java.lang.ClassCastException: com.example.carla.carla.MainActivity cannot be cast to org.opencv.android.CameraBridgeViewBase$CvCameraViewListener at android.app.ActivityThread.performLaunchActivity(ActivityThread.