Ask Your Question

GP's profile - activity

2020-01-26 09:27:34 -0500 received badge  Popular Question (source)
2017-07-05 08:21:26 -0500 received badge  Famous Question (source)
2015-11-11 07:02:50 -0500 received badge  Notable Question (source)
2014-09-03 13:29:15 -0500 received badge  Popular Question (source)
2012-11-09 16:49:45 -0500 commented question VideoWriter VideoCapture and uncompressed AVI

It seems no one has an easy solution. It's an annoying problem. At least I would like to understand if it's a common problem or if it depends on the specific OpenCV configuration.

2012-10-30 18:34:56 -0500 asked a question VideoWriter VideoCapture and uncompressed AVI

Hi everyone,

I think a similar issue is reported in a previous unanswered discussion. But I prefer to report my issue with more details. Anyway, I have a problem with cv::VideoCapture when grabbing frames from an uncompressed AVI file created using cv::VideoWriter. Basically the video seems ok when it's played with WMP for instance, but the frames are corrupted when grabbed using cv::VideoCapture (a snapshot here).

I'm using OpenCV 2.4.1, built in Windows 7 using Visual Studio 2010, x86, WITH_VIDEOINPUT=ON and WITH_FFMPEG=OFF. Here's a quick code sample:

int main()
{
    VideoCapture camera(0);
    VideoWriter writer("test.avi", 0, 30.0, Size(640, 480), true);

    int count = 0;
    while (count++ < 90)
    {
        Mat frm;
        camera >> frm;
        writer << frm;
        imshow("Frame recorded", frm);
        waitKey(1);
    }

    camera.release();
    writer.release();

    VideoCapture video("test.avi");
    Mat frm;
    while (video.read(frm))
    {
        imshow("Frame grabbed", frm);
        waitKey();
    }
    return 0;
}

I checked the issue tracker, and the change-log of the latest version, but this problems seems not to be mentioned. So, I suppose I'm missing something. Any help is appreciated! Thanks in advance,

Giuliano

2012-09-07 08:38:57 -0500 commented question Memory leak with morphological operators

It seems the line of code fixes the issue! What's the explanation? I've never used TBB before.

2012-09-06 06:44:41 -0500 commented question Memory leak with morphological operators

If I run erode in a loop, the allocated memory does not increase. There's still only one memory leak. Checking where that memory is allocated, I can see some references to TBB code (starting from morph.cpp:1183).

2012-09-06 03:06:05 -0500 received badge  Student (source)
2012-09-06 02:27:53 -0500 commented question Memory leak with morphological operators

Commenting the erode, the leak disappears. Same stuff using "dilate".

2012-09-04 16:51:29 -0500 received badge  Editor (source)
2012-09-04 16:43:32 -0500 asked a question Memory leak with morphological operators

Hi everyone,

It might be a stupid question but..why Visual Studio (2010) says there's a memory leak here? I'm using OpenCV 2.4.1 with TBB support.

int main()
{
    Mat mask(480, 640, CV_8U, Scalar(255));
    cv::erode(mask, mask, cv::Mat());

    // Turn on memory leaks detection.
    _CrtSetDbgFlag((_CRTDBG_LEAK_CHECK_DF) | _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG));

    return 0;
}

Regards,

Giuliano