|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
OpenCV C++ Bad file descriptor. USB Lifecam
Hello all, I am having an issue with the USB Lifecam and getting an image to an an openCV mat. My code works fine with an axis camera, but because ours broke a couple days ago I am trying to get the USB camera to work with the code. It opens the stream fine, but ends up with a width and height of zero. The error log is:
Code:
IM AM IN PROCESS IMAGE! VIDIOC_QBUF: Bad file descriptor Unable to stop the stream.: Bad file descriptor munmap: Invalid argument munmap: Invalid argument munmap: Invalid argument munmap: Invalid argument Here is our code: Code:
// opens up the camera stream and tries to load it
videoCapture = cv::VideoCapture();
// replaces the ##.## with your team number
videoCapture.open(0);
// Example
// cap.open("http://10.30.19.11/mjpg/video.mjpg");
// wait until it is opened
while(!videoCapture.isOpened()){
printf("videoCapture could not open!\n");
}
// time to actually process the acquired images
processImage();
Code:
videoCapture.read(matOriginal);
if(matOriginal.empty()) {
break;
}
I'm really hoping someone else has had a similar issue because our team cannot afford another axis camera. Thanks, Drew Last edited by jreneew2 : 09-02-2016 at 19:53. Reason: added info |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|