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;
}