I need to convert Vimba FramePtr to opencv IplImage. How to do it?
1 | initial version |
I need to convert Vimba FramePtr to opencv IplImage. How to do it?
2 | No.2 Revision |
I need 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 convert Vimba FramePtr use delete function, for example delete imageData or delete testImage, I get memory assertion. Can someone tell me, how to opencv IplImage. How to do it?correctly deallocate memory for these functions?
3 | No.3 Revision |
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,