cvCreateCameraCapture(0) crashes system

asked 2015-05-12 16:56:33 -0600

bear35645 gravatar image

I had this program working and all of a sudden now when my program gets to cvCreateCameraCapture(0) it crashes the whole system. I have tried changing the 0 to -1 with the same result.

I did build the libraries on the system I am with the issue. The system is a 32 bit system runningWindows 7 Embedded. I am using Qt as my IDE and Mingw32 compiler. The libraries were compiled with MingW as well.

In debug mode I can see that it loads a lot of DLLs, the starts some threads before crashing. I believe 3 threads get started and maybe is attempting to start a 4th.

This same code does run fine on another system but the camera is different.

Anyone have an idea?

Thanks in advance, Kevin

edit retag flag offensive close merge delete

Comments

Your description is very vague.. there is no useful information (code, stack trace, crash details etc..). Swap the cameras?

boaz001 gravatar imageboaz001 ( 2015-05-13 07:59:25 -0600 )edit

The reason for the vagueness is simple. As soon as cvCreateCameraCapture(0) is executed, the screen turns black and the only way out is a hard boot.

This much I have been able to track down. The camera is actually similar to a Camcorder, and the feed is composite video. Maybe I need to rebuild the OpenCV libraries with some other modules? I don't know.

We did install a piece of software on the device that took the composite video and someone made it look like a Webcam feed. However, now cvCreateCameraCapture returns a NULL. I tried a for loop and looping from 0 to 4, but that didn't work either. Even if this worked, it would be less than a perfect solution.

Swapping cameras is not an option. The code needs to work with the camera on the system that work.

bear35645 gravatar imagebear35645 ( 2015-05-15 11:33:13 -0600 )edit