- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I'm trying to run some initial test with Intel IPP / FilterBox operator (version 2018 3.1), starting from an image opened with OpenCV.
I readed how to use it from https://software.intel.com/en-us/ipp-dev-reference-filterboxborder, basically I do the following:
- Open the image with OpenCV, grayscale
- call ippiFilterBoxBorderGetBufferSize, no errors here
- call ippsMalloc_8u to allocate buffer
- call ippiFilterBoxBorder_8u_C1R, this one returns -8 error (Null Pointer)
I can't underrstand why I receive the -8 error, while there are no Null data around and sizes are ok. Is it something related to OpenCV? I used that method after reding this: https://stackoverflow.com/questions/13465914/using-opencv-mat-images-with-intel-ipp
Any ideas? Here is the code, thank you!
---
cv::Mat a = cv::imread("test.jpg", CV_LOAD_IMAGE_GRAYSCALE); int a_type = a.type(); // CV_8U int a_channels = CV_MAT_CN(a.type()); // 1 cv::Mat res_ipp = a.clone(); // prepare the results starting from a copy of a IppiSize srcSize = { a.cols, a.rows }; IppiSize kernelSize = { 51, 51 }; Ipp8u* pBuffer = NULL; int bufSize = 0; IppStatus s = NULL; std::string ss; s = ippiFilterBoxBorderGetBufferSize(srcSize, kernelSize, IppDataType::ipp8u, a_channels, &bufSize); ss = ippGetStatusString(s); // no error here pBuffer = ippsMalloc_8u(bufSize); bool ac = a.isContinuous(); // returns TRUE bool rc = res_ipp.isContinuous(); // returns TRUE Ipp8u* a_p = a.ptr<Ipp8u>(); // not NULL int a_step = (int)a.step; // equals to width of a Ipp8u* res_p = res_ipp.ptr<Ipp8u>(); // not NULL int res_step = (int)res_ipp.step; // equals to width of res_ipp s = ippiFilterBoxBorder_8u_C1R(a_p, a_step, res_p, res_step, srcSize, kernelSize, IppiBorderType::ippBorderConst, 0, pBuffer); ss = ippGetStatusString(s); // !!!! Null Pointer Error (-8) if (pBuffer) ippsFree(pBuffer);
---
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That was easy! Thank you, solved.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page