Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6709 Discussions

error using Erode: stride value is less than the row length

saevarg123
Beginner
273 Views
Hi,

I am having a hard time using the function erode. It constantly delivers the error stride value is less than the row length. I am using IPP 6.0.1.071 on ubuntu linux.

What can be causing this? This code is almost identical to the example in the documentation. I also tried Erode3x3 and the in-place variant with no success.

Is this a bug or am I doing something wrong here?? Please take a look at the code here below.

best regards,
Saevar

[bash]#include

int main(){

IppiSize roiSize = {7,7};
Ipp8u pMask[3*3] = {1,1,1,
1,1,1, 1,1,1}; IppiSize maskSize = {3,3}; IppiPoint anchor = {1,1}; Ipp8u pSrc[7*7] = {0,0,0,0,0,0,0, 0,0,0,1,0,0,0, 0,0,1,1,1,0,0, 0,1,1,1,1,1,0, 0,0,1,1,1,0,0, 0,0,0,1,0,0,0, 0,0,0,0,0,0,0}; int srcStep = 7; int dstStep = 7; Ipp8u pDst[7*7]; int dstSize = 7;

IppStatus thestatus = ippiErode_8u_C1R(pSrc,srcStep,pDst,dstStep,roiSize,pMask,maskSize,anchor);
printf(ippGetStatusString(thestatus)); return 1; }[/bash]

0 Kudos
2 Replies
saevarg123
Beginner
273 Views
I found out the problem. It was a border-problem, that is, I needed to copy the image to a slightly larger image with borders. That way, I can apply erode, or any other function that uses neighbouring pixels.
0 Kudos
Vladimir_Dudnik
Employee
273 Views
That's right. We're glad you find solution.

Vladimir
0 Kudos
Reply