Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Camera Not working

I am using the OpenCV-2.4.2-android-sdk and have problems with the camera on my target. On the emulator the sample color-blob-detection works for me so I know I have the sdk correctly configured. On target the application crashes and in the logs I get
D/CAMERA_ACTIVITY( 1796): CameraWrapperConnector::connectToLib: folderPath=/data/data/com.NativeCamera/lib/
E/CAMERA_ACTIVITY( 1796): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library
E/CV_CAP ( 1796): Native_camera returned opening error: 4

The path /data/data/com.NativeCamera does not exist on my target, does this mean that the native camera is not supported on my target?

When I start the camera application on target I get the following in the logs:
I/ActivityManager( 312): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.ti.omap4.android.camera/.Camera} from pid 525
I/ActivityManager( 312): Start proc com.ti.omap4.android.camera for activity com.ti.omap4.android.camera/.Camera: pid=2028 uid=10007 gids={1006, 1015}

What steps do I need to follow to add support for my camera - the android source from google contains omap4xxx code so perhaps this is not too difficult?

click to hide/show revision 2
added source to description

Camera Not working

I am using the OpenCV-2.4.2-android-sdk and have problems with the camera on my target. On the emulator the sample color-blob-detection works for me so I know I have the sdk correctly configured. On target the application crashes and in the logs I get
E/CAMERA_ACTIVITY( 1940): Could not read /proc/self/smaps
D/CAMERA_ACTIVITY( 1796): 1940): CameraWrapperConnector::connectToLib: folderPath=/data/data/com.NativeCamera/lib/ folderPath=/data/data/com.NativeCamera/lib/
E/CAMERA_ACTIVITY( 1796): 1940): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library library
E/CV_CAP ( 1796): 1940): Native_camera returned opening error: 4

4
E/Sample-ImageManipulations::SurfaceView( 1940): Failed to open native camera

I see in the code http://fossies.org/dox/OpenCV-2.4.2/camera__activity_8cpp.html that this is used in std::string CameraWrapperConnector::getPathLibFolder() as a default when /proc/self/smaps cant be opened. The path /data/data/com.NativeCamera does not exist on my target, does this mean that the native camera is not supported on my target?target? Or do I have to change the permissions for access to /proc/self/smaps?

When I start the camera application on target I get the following in the logs:
I/ActivityManager( 312): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.ti.omap4.android.camera/.Camera} from pid 525
I/ActivityManager( 312): Start proc com.ti.omap4.android.camera for activity com.ti.omap4.android.camera/.Camera: pid=2028 uid=10007 gids={1006, 1015}

What steps do I need to follow to add support for my camera - the android source from google contains omap4xxx code so perhaps this is not too difficult?

Camera Not working

I am using the OpenCV-2.4.2-android-sdk and have problems with the camera on my target. On the emulator the sample color-blob-detection works for me so I know I have the sdk correctly configured. On target the application crashes and in the logs I get
E/CAMERA_ACTIVITY( 1940): Could not read /proc/self/smaps
D/CAMERA_ACTIVITY( 1940): CameraWrapperConnector::connectToLib: folderPath=/data/data/com.NativeCamera/lib/
E/CAMERA_ACTIVITY( 1940): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library
E/CV_CAP ( 1940): Native_camera returned opening error: 4
E/Sample-ImageManipulations::SurfaceView( 1940): Failed to open native camera

I see in the code http://fossies.org/dox/OpenCV-2.4.2/camera__activity_8cpp.html that this is used in std::string CameraWrapperConnector::getPathLibFolder() as a default when /proc/self/smaps cant be opened. The path /data/data/com.NativeCamera does AND /proc/self/smaps do not exist on my target, does this mean that the native camera is not supported on my target? Or do I have to change the permissions for access to /proc/self/smaps?name of /proc/self/smaps in the OpenCV code to map to a file that does exist on Android 4.0.3?

When I start the camera application on target I get the following in the logs:
I/ActivityManager( 312): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.ti.omap4.android.camera/.Camera} from pid 525
I/ActivityManager( 312): Start proc com.ti.omap4.android.camera for activity com.ti.omap4.android.camera/.Camera: pid=2028 uid=10007 gids={1006, 1015}

What steps do I need to follow to add support for my camera - the android source from google contains omap4xxx code so perhaps this is not too difficult?

click to hide/show revision 4
added dumpsys analysis and bug tag

Camera Not working

I am using the OpenCV-2.4.2-android-sdk and have problems with the camera on my target. On the emulator the sample color-blob-detection works for me so I know I have the sdk correctly configured. On target the application crashes and in the logs I get
E/CAMERA_ACTIVITY( 1940): Could not read /proc/self/smaps
D/CAMERA_ACTIVITY( 1940): CameraWrapperConnector::connectToLib: folderPath=/data/data/com.NativeCamera/lib/
E/CAMERA_ACTIVITY( 1940): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library
E/CV_CAP ( 1940): Native_camera returned opening error: 4
E/Sample-ImageManipulations::SurfaceView( 1940): Failed to open native camera

I see in the code http://fossies.org/dox/OpenCV-2.4.2/camera__activity_8cpp.html that this is used in std::string CameraWrapperConnector::getPathLibFolder() as a default when /proc/self/smaps cant be opened. The path /data/data/com.NativeCamera AND /proc/self/smaps do not exist on my target, does this mean that the native camera is not supported on my target? Or do I have to change the name of /proc/self/smaps in the OpenCV code to map to a file that does exist on Android 4.0.3?

looking at the output from dumpsys run on my target ("adb shell dumpsys") I get the following interesting entry:
nativeLibraryPath=/data/data/com.ti.omap4.android.camera/lib

When I start the camera application on target I get the following in the logs:
I/ActivityManager( 312): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.ti.omap4.android.camera/.Camera} from pid 525
I/ActivityManager( 312): Start proc com.ti.omap4.android.camera for activity com.ti.omap4.android.camera/.Camera: pid=2028 uid=10007 gids={1006, 1015}

What steps do I need to follow to add support for my camera - the android source from google contains omap4xxx So it looks like the OpenCV code is trying to find a way to locate the nativeLibraryPath using smaps.. but smaps now does not exist on Android so perhaps OpenCV must change to find a new way to locate the correct library. Has this is not too difficult?bug already been fixed?

click to hide/show revision 5
added build tag because the fix required building the OpenCV code

Camera Not working

I am using the OpenCV-2.4.2-android-sdk and have problems with the camera on my target. On the emulator the sample color-blob-detection works for me so I know I have the sdk correctly configured. On target the application crashes and in the logs I get
E/CAMERA_ACTIVITY( 1940): Could not read /proc/self/smaps
D/CAMERA_ACTIVITY( 1940): CameraWrapperConnector::connectToLib: folderPath=/data/data/com.NativeCamera/lib/
E/CAMERA_ACTIVITY( 1940): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library
E/CV_CAP ( 1940): Native_camera returned opening error: 4
E/Sample-ImageManipulations::SurfaceView( 1940): Failed to open native camera

I see in the code http://fossies.org/dox/OpenCV-2.4.2/camera__activity_8cpp.html that this is used in std::string CameraWrapperConnector::getPathLibFolder() as a default when /proc/self/smaps cant be opened. The path /data/data/com.NativeCamera AND /proc/self/smaps do not exist on my target, does this mean that the native camera is not supported on my target? Or do I have to change the name of /proc/self/smaps in the OpenCV code to map to a file that does exist on Android 4.0.3?

looking at the output from dumpsys run on my target ("adb shell dumpsys") I get the following interesting entry:
nativeLibraryPath=/data/data/com.ti.omap4.android.camera/lib

When I start the camera application on target I get the following in the logs:
I/ActivityManager( 312): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.ti.omap4.android.camera/.Camera} from pid 525
I/ActivityManager( 312): Start proc com.ti.omap4.android.camera for activity com.ti.omap4.android.camera/.Camera: pid=2028 uid=10007 gids={1006, 1015}

So it looks like the OpenCV code is trying to find a way to locate the nativeLibraryPath using smaps.. but smaps now does not exist on Android so OpenCV must change to find a new way to locate the correct library. Has this bug already been fixed?