I have a small busybox system for which I compiled the kernel and added support for USB cameras. When when I connect the camera to the device it gives me some output and I get a /dev/video0 device:
usb 1-1: new high-speed USB device number 3 using orion-ehci
uvcvideo: Found UVC 1.00 device Webcam C170 (046d:082b)
input: Webcam C170 as /devices/platform/orion-ehci.0/usb1/1-1/1-1:1.0/input/input1
/ # ls -l /dev/video0
crw-rw---- 1 0 0 81, 0 Mar 8 08:08 /dev/video0
/ #
I have statically compiled opencv2.4 for arm with all needed libs and get no error compiling the code:
Mat frame;
VideoCapture capture(0);
if(!capture.isOpened()){
printf("Cannot open camera\r\n");
printf("%s\r\n", cvErrorStr(cvGetErrStatus()));
}
which gives me as output:
Cannot open camera
No Error
/ #
The camera works fine on my laptop and I have tried multiple camera's all with the same result. I have also tried many different ways of opening the camera trough opencv which also gave me the same results.
How can I get my busybox system and opencv to read from the camera?