What is the command or script that you are using to capture the images? This is because it seems to be an error in the frames that you are obtaining. Can you verify if you are skipping frames?
Also, make sure that you are using the correct resolution.
CMata_Intel, it looks like most of he picture is there, a possible not ordering of the data after it has arrived out of order?
holY_Ghost, The image has to be coming in with a sequence indicator and your program is not copying _that_ data to the
correct positioning of the final picture. This is variable window sizes and data sizes in your original, so the
sequences are not complete blocks. -- possibly not the correct driver for the webcam.
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.
cout << "In capture ..." << endl;
CvCapture* capture = 0;
capture = cvCaptureFromCAM(0);
printf("Could not intitialize capturing...\n");
IplImage* frame = 0;
frame = cvQueryFrame(capture);
// do any processing
well, the way you'll need to do it is different. I simply took your image above and shuffled blocks and lines in the picture around using paint by hand.
For you, It is somewhere in the block area // do any processing and the stucture of your cvCapture in your driver.
What I notice though is that you image is outputting the data in lines and blocks.
I assume there is a sequence # that is coming back from the cam with a block(seq, width, height) and then the data with the lines having a height of 1.
Ignoring that extra non-image data is what gives you your green background as the image is larger than picture pixels.
The above has to be a result of the driver you are using, either a non-initialization of some part of the capture, or you not "processing" something in your
// do any processing block of your code.