Hi,
I am desperately looking for a solution to make my builtin cam working. No matter which settings I try, it does not put on the green light.
This is my main method for testing purposes:
VideoCapture capture_;
capture_.open(0);
Mat img;
if (capture_.isOpened()) {
printf("Is open!\n");
sleep(2); // I read somewhere that open takes some time
Mat frame;
printf("Codec: %f\n", capture_.get(CV_CAP_PROP_FOURCC)); // this one is 0.0000
capture_.set(CV_CAP_PROP_FOURCC, CV_FOURCC('M','J','P','G'));
printf("Codec: %f\n", capture_.get(CV_CAP_PROP_FOURCC)); // it is still 0.0000
capture_ >> frame;
// capture_.read(img); // they both fail
imshow("Test", frame);
waitKey(0);
} else {
printf("Is not open!\n");
}
The cam seems to open correctly (but no green light indicating that). When I try to read from the cam I get an empty image. I found some sources on the web that claimed that I need QuickTime support for the cam to work. But I did not succeed in compiling with QuickTime on OSX 10.8.
Does anyone have further ideas?
Thanks and best regards,
Sebastian