Thanks for your response. This is the code im using. I would be glad to know if its the problem with code or driver. And deium can you pls tell me how to get corrected image as you did.
int main()
{
cout << "In capture ..." << endl;
CvCapture* capture = 0;
capture = cvCaptureFromCAM(0);
if(!capture)
{
printf("Could not intitialize capturing...\n");
return -1;
}
IplImage* frame = 0;
frame = cvQueryFrame(capture);
if(!frame) break;
// do any processing
cvSaveImage("resultok.bmp", frame);
waitKey(0);
cvReleaseCapture(&capture);
return 0;
}