Ask Your Question

Marian's profile - activity

2019-01-03 07:55:07 -0500 received badge  Famous Question (source)
2018-06-18 07:00:27 -0500 received badge  Popular Question (source)
2016-08-30 06:44:15 -0500 received badge  Student (source)
2015-01-19 04:13:58 -0500 received badge  Notable Question (source)
2014-10-24 04:14:12 -0500 received badge  Popular Question (source)
2013-07-19 10:43:56 -0500 asked a question Open CV on Windows CE 5.0

Does exist an openCV for Windows CE 5.0? I need to use it with web camera.

2013-06-19 08:40:50 -0500 commented answer Memory leaks in IplImage

cvReleaseImage(&testImage) also throws memory exception. I don't understand why, but it is true.

2013-06-19 02:48:01 -0500 asked a question Memory leaks in IplImage

I have the function, which is leaking memory:

void CAsynchronousGrabDlg::ComputeVariables(FramePtr pFrame)
    IplImage *testImage;
    byte *imageData;
    pFrame -> GetImage(imageData);
    VmbUint32_t nWidth, nHeight;
    nWidth = m_pApiController->GetWidth();
    nHeight = m_pApiController->GetHeight();
    testImage = cvCreateImage(cvSize(nWidth, nHeight), IPL_DEPTH_8U, 1);
    cvSetData(testImage, imageData, nWidth);

//  delete imageData;
//  delete testImage;

If I try to use delete function, for example delete imageData or delete testImage, I get memory assertion. Can someone tell me, how to correctly deallocate memory for these functions?

2013-06-04 09:50:18 -0500 asked a question How to read pixels from IplImage*

I need to read pixels' color from IplImage*. Is any function from opencv to use it?

2013-05-31 09:29:28 -0500 asked a question cvReleaseImage throws exception

I created an image by capturing camera simple:

IplImage *img;
CvCapture *capture = cvCreateCameraCapture(0);
CvSize size = cvSize(1920, 1080);
cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH , size.width);
cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT , size.height);
img = cvQueryFrame(capture);
cvNamedWindow("VideoTest", CV_WINDOW_AUTOSIZE);
cvShowImage("VideoTest", img);

The problem is cvReleaseImage throws a memory exception. It cannot deallocate memory for image. How can I fix it?

2013-05-31 05:44:21 -0500 asked a question How does cvCalcHist work?
    IplImage* frame;

Look this example. I have a problem, when I try to calculate histogram, debugger throws me a memory exception. My question is: How does cvCalcHist knows how many images are stored in currentFrameArray?

    frame = cvQueryFrame(capture);

    IplImage* currentFrameArray[2];

    CvHistogram* frameA;
        int hist_size[] = {30, 32};
        float h_ranges[] = {0, 255};
        float s_ranges[] = {0, 180};
        float* ranges[] = {h_ranges, s_ranges};
        frameA = cvCreateHist(2, hist_size, CV_HIST_ARRAY, ranges, 1);
    currentFrameArray[0] = frame;
    currentFrameArray[1] = NULL;
    cvCalcHist(currentFrameArray, frameA);
2013-05-30 10:35:30 -0500 asked a question How to write a text to the picture

I need to write a text to picture captured by camera. How to do it without using Qt? Is any way to do it for windows dialog - based application?

2013-05-30 07:09:55 -0500 received badge  Editor (source)
2013-05-30 07:08:54 -0500 asked a question 4.2.5 instalation and building problem.

I created simple solution in openCV 425 for VS 2010 and I wanted to compile it. However linker returned me 131 errors. Look first one above:

1>opencv_highgui245d.lib(cap_vfw.obj) : error LNK2019: unresolved external symbol _AVIFileRelease@4 referenced in function "public: virtual void __thiscall CvCaptureAVI_VFW::close(void)" (?close@CvCaptureAVI_VFW@@UAEXXZ)

What I did wrong? Do I need to build somehow openCV? Or I miss some directories?

2013-05-30 03:43:32 -0500 asked a question Web camera output in dialog in C++

I need to create system, which will consist of web camera and PC. I need to show pictures from web camera in my dialog-based application in C++. I would like to use openCV libraries. How can I do it? Do you have any example?