Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8688177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:17:37+00:00 2026-06-12T23:17:37+00:00

Hi I am using OpenCV face-detection sample(OpenCV 2.4.2). I have changed the face-detection sample

  • 0

Hi I am using OpenCV face-detection sample(OpenCV 2.4.2). I have changed the face-detection sample to OpenCV static initialization. I changed the below code in my FdActivity.java file. But I am not able to open native camera. when I call the “openCamera()” method it shows “Fatal error: can’t open camera!” alert box. what seems to be the problem?

@Override
    public void onCreate(Bundle savedInstanceState) {
        Log.i(TAG, "onCreate");
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        Log.i(TAG, "Trying to load OpenCV library");
        if (!OpenCVLoader.initDebug()) {
            Log.e(TAG, "Cannot connect to OpenCV Manager");
        } else {
            mOpenCVCallBack.onManagerConnected(LoaderCallbackInterface.SUCCESS);
        }
    }

logcat:

10-12 09:44:01.604: I/Sample::Activity(676): Instantiated new class org.opencv.samples.fd.FdActivity
10-12 09:44:01.654: I/Sample::Activity(676): onCreate
10-12 09:44:01.704: I/Sample::Activity(676): Trying to load OpenCV library
10-12 09:44:01.704: D/OpenCV/StaticHelper(676): Trying to get library list
10-12 09:44:01.895: E/OpenCV/StaticHelper(676): OpenCV error: Cannot load info library for OpenCV
10-12 09:44:01.895: D/OpenCV/StaticHelper(676): Library list: ""
10-12 09:44:01.895: D/OpenCV/StaticHelper(676): First attempt to load libs
10-12 09:44:01.895: D/OpenCV/StaticHelper(676): Trying to init OpenCV libs
10-12 09:44:01.895: D/OpenCV/StaticHelper(676): Trying to load library opencv_java
10-12 09:44:01.895: D/dalvikvm(676): Trying to load lib /data/data/com.face.conf/lib/libopencv_java.so 0x411e3cc0
10-12 09:44:02.134: D/dalvikvm(676): Added shared lib /data/data/com.face.conf/lib/libopencv_java.so 0x411e3cc0
10-12 09:44:02.164: D/OpenCV/StaticHelper(676): OpenCV libs init was ok!
10-12 09:44:02.164: D/OpenCV/StaticHelper(676): First attempt to load libs is OK
10-12 09:44:02.164: I/Sample::Activity(676): OpenCV loaded successfully
10-12 09:44:02.164: I/Sample::Activity(676): OpenCV loaded successfully
10-12 09:44:02.174: D/dalvikvm(676): Trying to load lib /data/data/com.face.conf/lib/libdetection_based_tracker.so 0x411e3cc0
10-12 09:44:02.185: D/dalvikvm(676): Added shared lib /data/data/com.face.conf/lib/libdetection_based_tracker.so 0x411e3cc0
10-12 09:44:02.185: D/dalvikvm(676): No JNI_OnLoad found in /data/data/com.face.conf/lib/libdetection_based_tracker.so 0x411e3cc0, skipping init
10-12 09:44:02.394: I/Sample::SurfaceView(676): Instantiated new class org.opencv.samples.fd.FdView
10-12 09:44:02.654: I/Sample::FdView(676): Loaded cascade classifier from /data/data/com.face.conf/app_cascade/lbpcascade_frontalface.xml
10-12 09:44:02.654: D/dalvikvm(676): Trying to load lib /data/data/com.face.conf/lib/libdetection_based_tracker.so 0x411e3cc0
10-12 09:44:02.654: D/dalvikvm(676): Shared lib '/data/data/com.face.conf/lib/libdetection_based_tracker.so' already loaded in same CL 0x411e3cc0
10-12 09:44:02.924: I/Sample::SurfaceView(676): openCamera
10-12 09:44:02.924: I/Sample::SurfaceView(676): releaseCamera
10-12 09:44:02.934: D/CAMERA_ACTIVITY(676): Library name: libopencv_java.so
10-12 09:44:02.934: D/CAMERA_ACTIVITY(676): Library base address: 0x4ac0c000
10-12 09:44:02.984: D/CAMERA_ACTIVITY(676): Libraries folder found: /data/data/com.face.conf/lib/
10-12 09:44:02.984: D/CAMERA_ACTIVITY(676): CameraWrapperConnector::connectToLib: folderPath=/data/data/com.face.conf/lib/
10-12 09:44:02.984: E/CAMERA_ACTIVITY(676): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library
10-12 09:44:02.984: E/CV_CAP(676): Native_camera returned opening error: 4
10-12 09:44:02.984: E/Sample::SurfaceView(676): Failed to open native camera
10-12 09:44:03.234: D/dalvikvm(676): GC_CONCURRENT freed 210K, 4% free 8461K/8775K, paused 33ms+33ms, total 149ms
10-12 09:44:03.564: I/Sample::Activity(676): onResume
10-12 09:44:03.584: I/Sample::SurfaceView(676): openCamera
10-12 09:44:03.584: I/Sample::SurfaceView(676): releaseCamera
10-12 09:44:03.584: D/CAMERA_ACTIVITY(676): Library name: libopencv_java.so
10-12 09:44:03.584: D/CAMERA_ACTIVITY(676): Library base address: 0x4ac0c000
10-12 09:44:03.634: D/CAMERA_ACTIVITY(676): Libraries folder found: /data/data/com.face.conf/lib/
10-12 09:44:03.634: D/CAMERA_ACTIVITY(676): CameraWrapperConnector::connectToLib: folderPath=/data/data/com.face.conf/lib/
10-12 09:44:03.634: E/CAMERA_ACTIVITY(676): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library
10-12 09:44:03.634: E/CV_CAP(676): Native_camera returned opening error: 4
10-12 09:44:03.634: E/Sample::SurfaceView(676): Failed to open native camera
10-12 09:44:04.254: I/Choreographer(676): Skipped 185 frames!  The application may be doing too much work on its main thread.
10-12 09:44:04.924: I/Sample::SurfaceView(676): surfaceCreated
10-12 09:44:04.945: I/Sample::SurfaceView(676): surfaceChanged
10-12 09:44:04.945: I/Sample::SurfaceView(676): Starting processing thread
10-12 09:44:04.964: I/Sample::SurfaceView(676): setupCamera(800, 442)
10-12 09:44:05.054: I/Sample::SurfaceView(676): Finishing processing thread
10-12 09:44:05.054: E/OBJECT_DETECTOR(676): SimpleHighguiDemoCore::stop is called but the SimpleHighguiDemoCore pthread is not active
10-12 09:44:05.194: I/Choreographer(676): Skipped 231 frames!  The application may be doing too much work on its main thread.
10-12 09:44:05.245: D/gralloc_goldfish(676): Emulator without GPU emulation detected.
10-12 09:44:05.944: I/Choreographer(676): Skipped 40 frames!  The application may be doing too much work on its main thread.
10-12 09:44:06.814: I/Choreographer(676): Skipped 69 frames!  The application may be doing too much work on its main thread.
10-12 09:44:12.354: I/Sample::Activity(676): onPause
10-12 09:44:12.414: I/Sample::SurfaceView(676): releaseCamera
10-12 09:44:14.084: D/dalvikvm(676): GC_CONCURRENT freed 146K, 3% free 8713K/8967K, paused 31ms+26ms, total 156ms
10-12 09:44:14.923: I/Choreographer(676): Skipped 495 frames!  The application may be doing too much work on its main thread.
10-12 09:44:15.083: I/Sample::SurfaceView(676): surfaceDestroyed
10-12 09:44:15.083: I/Sample::SurfaceView(676): releaseCamera
10-12 09:44:16.253: I/Choreographer(676): Skipped 230 frames!  The application may be doing too much work on its main thread.
10-12 09:44:17.313: I/Choreographer(676): Skipped 211 frames!  The application may be doing too much work on its main thread.
10-12 09:44:18.873: I/Choreographer(676): Skipped 85 frames!  The application may be doing too much work on its main thread.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:17:39+00:00Added an answer on June 12, 2026 at 11:17 pm

    Finally I fixed the issue. The problem is the OpenCV native libs are not copied into the project lib folder, when I did ndk build. So I have copied the corresponding OpenCV native libs from “/sdk/native/libs/” to my project “/libs/” manually. Now It works fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying face detection using opencv in android but I unable to load the
I'm using the following code to perform face detection using OpenCV on the iPhone.
I am using the code available in this website: http://nashruddin.com/OpenCV_Face_Detection to do face detection.
I have to code an object detector (in this case, a ball) using OpenCV.
I am using OpenCV's face detection. It works fine when it comes to drawing
I am using opencv sharp, and haar cascaes for profile face, but i wanna
I have been working on a project using OpenCV and have made a face
I am trying to make a face detection software using OpenCV 2.3.0. While OpenCV
I am trying to do some Face Recognition (not detection) stuff using OpenCV. I
I am trying to track a face using OpenCV 's CamShift algorithm but the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.