- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to apply ippiFilter32f_8u_C1R() to convolve full image with 7x5 floating point kernel.
Butthis function returns IppStsStepErr result. I checked both step size(src, dst). I think step size is correct.
This problem is caused by border or memory alignment? Why this happens?
Please give me some clue to overcome this problem.
My code is as follows
/* pSrc, pDst are an image (57x512). */
int width = 512;
int height = 57;
float *Kernel = {
0.0000f,0.0000f,0.0000f,0.0000f, 0.0000f,
-0.0001f,0.0001f,0.0003f,0.0001f,-0.0001f,
-0.0338f,0.0338f,0.1353f,0.0338f,-0.0338f,
-0.2500f,0.2500f,1.0000f,0.2500f,-0.2500f,
-0.0338f,0.0338f,0.1353f,0.0338f,-0.0338f,
-0.0001f,0.0001f,0.0003f,0.0001f,-0.0001f,
0.0000f,0.0000f,0.0000f,0.0000f, 0.0000f
};
int srcStep = 512 * sizeof(unsigned char);
int dstStep = 512 * sizeof(unsigned char);
IppiSize KernelSize = {5, 7};
IppiPoint anchor = {2, 3};
IppiSize dstRoi = {width, height};
ippiFilter32f_8u_C1R(pSrc, srcStep,
pDst, dstStep,
dstRoi,
Kernel,
KernelSize,
anchor);
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think the correct code must be such.
/* pSrc, pDst are an image (57x512). */
int width = 512;
int height = 57;
float *Kernel = {
0.0000f,0.0000f,0.0000f,0.0000f, 0.0000f,
-0.0001f,0.0001f,0.0003f,0.0001f,-0.0001f,
-0.0338f,0.0338f,0.1353f,0.0338f,-0.0338f,
-0.2500f,0.2500f,1.0000f,0.2500f,-0.2500f,
-0.0338f,0.0338f,0.1353f,0.0338f,-0.0338f,
-0.0001f,0.0001f,0.0003f,0.0001f,-0.0001f,
0.0000f,0.0000f,0.0000f,0.0000f, 0.0000f
};
int srcStep = 512 * sizeof(unsigned char);
int dstStep = 512 * sizeof(unsigned char);
IppiSize KernelSize = {5, 7};
IppiPoint anchor = {2, 3};IppiSize dstRoi = {width-KernelSize.width+1, height-KernelSize.height+1};Ipp8u *pStartPoint;pStartPoint = pSrc + anchor.y * srcStep + anchor.x;ippiFilter32f_8u_C1R(pStartPoint, srcStep,
pDst, dstStep,
dstRoi,
Kernel,
KernelSize,
anchor);It must besrcStep >= (dstRoi.width+KernelSize.width-1)*sizeof(Ipp8u)elseIppStsStepErr.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page