-
September 26th, 2011, 10:46 PM
#1
Webcam show a grey screen in OpenCV !
Hi
I'm using opencv to grab images from webcam .but all images are grey !
I tested opencv 2.2 & 2.3 with my A4tech webcam and Microsoft Lifecam but the screen is still grey !
I'm using VIsual Studio 2010 Express
My code is very simple :
int main(int argc, _TCHAR* argv[])
{
VideoCapture cap;
Mat frame,image,hsv;
cap.open(0);
if (! cap.isOpened())
{
cout << "Not Open" << endl;
waitKey(10000);
return 1;
}
namedWindow("Camera");
for (;
{
cap >> frame;
waitKey(1000);
cout << "r";
imshow("Camera",frame);
waitKey(1000);
}
return 0;
}
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|