Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

“linear” noise in frames captured from analog camera.

I am trying to capture the frame from analog camera using VS13, OpenCV and AverMedia DVD EZMaker 7.

If i make a simple cycle like

                    while (true){
                    frame = cvQueryFrame(capture);
                    cvShowImage("My window", frame);
                    if (cvWaitKey(33) == 27) { // нажата ESC
                        break;
                    }
                }

i get a frame, but the frame has a noise like this: image description

This lines appears if it has a dynamic object on the frame.

However i was trying to capture a camera using Media Player Classic. And i had two types of output images. First image had the same noise.

image description

But when i changed (in MPC) a format from "RGB24" to "YUVU" i have a better result

image description

My question: How can i fix this trouble? I want to capture a correct frame without lines.

P.s. Also i tryed to use VideoInput library in my program, but it didn't help. The frame was with noise. I used this code to capture:

     VI.setIdealFramerate(dev1, 25); //the framerate change didn't solve the problem
    VI.setupDevice(dev1, 720, 576, 0);

    image_VI = cvCreateImage(cvSize(VI.getWidth(dev1), VI.getHeight(dev1)), IPL_DEPTH_8U, 3);

    while (true){

        VI.getPixels(dev1, (unsigned char *)image_VI->imageDataOrigin, false, true);
        cvShowImage("My window", image_VI);

        if (cvWaitKey(33) == 27) { 
               // ESC
            break;
        }
    }

P.P.s: When i used a cvCvtColor operator (OpenCV or VideoInput):

cvCvtColor(frame, frame2, CV_RGB2YUV); cvShowImage("My window", frame2);

i had an incorrect color reproduction. //and noise

When i created an image using IPL_DEPTH_16U (VideoInput) i had an incorrect color reproduction, i had 2 images in window, but that images shown without noise.

P.p.p.s. Sorry for my bad english. I think, i have a lot of mistaker in my grammar. But i hope that i accessibly explain the problem.

click to hide/show revision 2
retagged

updated 2014-03-20 03:39:18 -0600

berak gravatar image

“linear” noise in frames captured from analog camera.

I am trying to capture the frame from analog camera using VS13, OpenCV and AverMedia DVD EZMaker 7.

If i make a simple cycle like

                    while (true){
                    frame = cvQueryFrame(capture);
                    cvShowImage("My window", frame);
                    if (cvWaitKey(33) == 27) { // нажата ESC
                        break;
                    }
                }

i get a frame, but the frame has a noise like this: image description

This lines appears if it has a dynamic object on the frame.

However i was trying to capture a camera using Media Player Classic. And i had two types of output images. First image had the same noise.

image description

But when i changed (in MPC) a format from "RGB24" to "YUVU" i have a better result

image description

My question: How can i fix this trouble? I want to capture a correct frame without lines.

P.s. Also i tryed to use VideoInput library in my program, but it didn't help. The frame was with noise. I used this code to capture:

     VI.setIdealFramerate(dev1, 25); //the framerate change didn't solve the problem
    VI.setupDevice(dev1, 720, 576, 0);

    image_VI = cvCreateImage(cvSize(VI.getWidth(dev1), VI.getHeight(dev1)), IPL_DEPTH_8U, 3);

    while (true){

        VI.getPixels(dev1, (unsigned char *)image_VI->imageDataOrigin, false, true);
        cvShowImage("My window", image_VI);

        if (cvWaitKey(33) == 27) { 
               // ESC
            break;
        }
    }

P.P.s: When i used a cvCvtColor operator (OpenCV or VideoInput):

cvCvtColor(frame, frame2, CV_RGB2YUV); cvShowImage("My window", frame2);

i had an incorrect color reproduction. //and noise

When i created an image using IPL_DEPTH_16U (VideoInput) i had an incorrect color reproduction, i had 2 images in window, but that images shown without noise.

P.p.p.s. Sorry for my bad english. I think, i have a lot of mistaker in my grammar. But i hope that i accessibly explain the problem.