Hi
Ihave a hard time using ippiFilter, no matter what I do, I either get a segmentation fault or ippStsStepErr (some error with my images steps).
Would someone have a working example showing how to use this function and similar functions ?
For example, the following example works (status = 0). However, if I try to use a 4x3 output image (instead of a 3x3) with corresponding dstRoiSize, I get the step error (keeping all the rest identical). I dont see why I could not get a 4x3 output image from that example.
~~~~~~~~~~~~~~~~~~~~~~~~
char pSrc[8*5] = {0,1,2,3,4,5,6,7,
0,1,2,3,4,5,6,7,
0,1,2,3,4,5,6,7,
7,6,5,4,3,2,1,0,
7,6,5,4,3,2,1,0};
int srcStep = 8;
char pDst[3*3];
int dstStep = 3;
IppiSize dstRoiSize = {3,3};
int pKernel[3*3] = {1,1,1,1,1,1,1,1,1};
IppiSize kernelSize = {3,3};
IppiPoint anchor = {1,1};
int divisor = 9;
IppStatus status = ippiFilter_8u_C1R(pSrc, srcStep, pDst, dstStep, dstRoiSize, pKernel,kernelSize , anchor, divisor);
printf("ippiFilter status = %d\n",status);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From the documentation, it is not very clear how to determine the steps so that they are accepted by the routine:
ippStsStepErr Indicates an error condition if the srcStep is less than
(roiSize.width + kernelSize.width)*sizeof(Ipp64f);
or dstStep is less than roiSize.width*sizeof(Ipp64f).
Why this multiplication by sizeof(Ipp64f)if I am using 8 bit unsigned integers?
Do I need or not a border around my source image? If yes, what is the size of that border?
I guess it shows that I am quite lost. Any help on that topic would be welcome.
Thank you!
Gilbert