- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I made a simple script using the ErodeBorder function in IPP, and I want to use ippiErode_1u_C1R_L. I am having trouble using ippiErode_1u_C1R_L I keep getting an AccessViolation Exception. First script shows a functioning code, second script shows an attempt to use ippiErode_1u_C1R_L.
Working Code:
int width = 1600;
int height = 594;
int binSize = 118800;
int binStep = ceil(width / 8);
IppiSize roi = { width, height };
Ipp8u* workBin = (Ipp8u*)ippsMalloc_8u(binSize);
Ipp8u* defectMask = (Ipp8u*)ippsMalloc_8u(binSize);
Ipp8u* origBin = GetMask(); //Same size as workBin
Ipp8u mask[9] = { 1, 1, 1,
1, 0, 1,
1, 1, 1 };
IppiSize maskSize = { 3, 3 };
int pSpecSize = 0, pBufferSize = 0;
ippiMorphologyBorderGetSize_1u_C1R(roi, maskSize, &pSpecSize, &pBufferSize);
Ipp8u* pBuffer = (Ipp8u*)ippsMalloc_8u(pBufferSize);
IppiMorphState* pSpec = (IppiMorphState*)ippsMalloc_8u(pSpecSize);
ippiMorphologyBorderInit_1u_C1R(roi, mask, maskSize, pSpec, pBuffer);
ippiErodeBorder_1u_C1R(origBin, binStep, 0, workBin, binStep, 0, roi, ippBorderRepl, 0, pSpec, pBuffer);
ippiErodeBorder_1u_C1R(workBin, binStep, 0, defectMask, binStep, 0, roi, ippBorderRepl, 0, pSpec, pBuffer);
ippiErodeBorder_1u_C1R(defectMask, binStep, 0, workBin, binStep, 0, roi, ippBorderRepl, 0, pSpec, pBuffer);
ippiErodeBorder_1u_C1R(workBin, binStep, 0, defectMask, binStep, 0, roi, ippBorderRepl, 0, pSpec, pBuffer);
Throws Exception when calling ippiErode_1u_C1R_L():
int width = 1600;
int height = 594;
int binSize = 118800;
int binStep = ceil(width / 8);
IppiSizeL roi_L = { width, height };
Ipp8u* workBin = (Ipp8u*)ippsMalloc_8u(binSize);
Ipp8u* defectMask = (Ipp8u*)ippsMalloc_8u(binSize);
Ipp8u* origBin = GetMask(); //Same size as workBin
Ipp8u mask[9] = { 1, 1, 1,
1, 0, 1,
1, 1, 1 };
IppiSizeL maskSize = { 3, 3 };
IppSizeL pSpecSize = 0, pBufferSize = 0;
ippiErodeGetBufferSize_L(roi_L, maskSize, ipp1u, 1, &pBufferSize);
ippiErodeGetSpecSize_L(roi_L, maskSize, &pSpecSize);
Ipp8u* pBuffer = (Ipp8u*)ippsMalloc_8u_L(pBufferSize);
IppiMorphStateL* pSpec = (IppiMorphStateL*)ippsMalloc_8u_L(pSpecSize);
IppStatus initSizeStat = ippiErodeInit_L(roi_L, mask, maskSize, pSpec);
ippiErode_1u_C1R_L(origBin, binStep, 0, workBin, binStep, 0, roi_L, ippBorderRepl, 0, pSpec, pBuffer);
- Tags:
- Image Processing
- IPP
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jossue,
Thank you for posting on Intel Communities.
Could you please share with us a complete working reproducer or a project file so that we could analyze/try reproducing your issue further? Besides this, we would like to recommend you use the latest version of IPP available if in case you are using an older version of IPP.
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jossue,
A gentle reminder:
As we haven't heard back from you for a while, could you please let us know if there is any update regarding the issue? Please get back to us if the issue still persists with the necessary details mentioned in my earlier post.
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We assume your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Best Regards,
Shanmukh.SS
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page