int num = 0, width = 1600, height = 1200; // Set Default values
FCGIValue val[] = {
{"num", &num, FCGI_INT_T},
int num = 0, width = 1600, height = 1200; // Set Default values
FCGIValue val[] = {
{"num", &num, FCGI_INT_T},
- cvSetCaptureProperty(g_capture, CV_CAP_PROP_FRAME_WIDTH, width);
- cvSetCaptureProperty(g_capture, CV_CAP_PROP_FRAME_HEIGHT, height);
+ if (g_capture != NULL)
+ {
+
+ cvSetCaptureProperty(g_capture, CV_CAP_PROP_FRAME_WIDTH, width);
+ cvSetCaptureProperty(g_capture, CV_CAP_PROP_FRAME_HEIGHT, height);
//cvShowImage("display", *image);
//cvWaitKey(0);
//cvSaveImage("test.jpg",*image,0);
//cvShowImage("display", *image);
//cvWaitKey(0);
//cvSaveImage("test.jpg",*image,0);
pthread_mutex_unlock(&mutex); //Close the mutex
//NOTE: Never have a "return" statement before the mutex is unlocked; it causes deadlocks!
pthread_mutex_unlock(&mutex); //Close the mutex
//NOTE: Never have a "return" statement before the mutex is unlocked; it causes deadlocks!