Community
cancel
Showing results for 
Search instead for 
Did you mean: 
saevarg123
Beginner
66 Views

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

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
66 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.
Vladimir_Dudnik
Employee
66 Views

That's right. We're glad you find solution.

Vladimir
Reply