“linear” noise in frames captured from analog camera.

asked 2014-03-20 03:12:35 -0600

kamaz gravatar image

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

berak gravatar image

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.

edit retag flag offensive close merge delete

Comments

NTSC scans odd and then even lines. You could take two frames and average them.

GrumbleLion gravatar imageGrumbleLion ( 2014-03-22 11:18:08 -0600 )edit

Thanks. I made a deinterlace (cvDeInterlace) and it solves a problem.

kamaz gravatar imagekamaz ( 2014-03-24 06:37:32 -0600 )edit

Hi @kamaz I am happening the same problem like yours for 1 month. I also research a lot about de-interlace and thought if I change camera will solve this problem. Since you can solve, please guide me. Thanks

San gravatar imageSan ( 2016-02-22 23:48:20 -0600 )edit