- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
I am new to IPP.
Ineed to loop600 floating images to do some calculations. The image size is 1024x768 and the kernel size is 3x3. Each image needs to be convolved. Should I use ippiConvFull_32f_C1R or some other functions to speed up the processing? If using ippiConvFull_32f_C1R, can anybody tell me how to choose srcStep and DstStep?
Thanks in advance.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By the way, I created a testing fucntion to do convolution:
IppStatus imageConv_by_ConvFull()
{
//src1
Ipp32f src1[5 * 4] = {
{ 1},{ 2},{ 3},{ 4},{ 5},
{ 6},{ 7},{ 8},{ 9},{10},
{11},{12},{13},{14},{15},
{16},{17},{18},{19},{20},
};
IppiSize src1Size = {5, 4};
//int src1Step = 5;
int src1Step = 5*sizeof
(Ipp32f);
//src2
Ipp32f src2[3*3] = {
{1.0},{1.0},{1.0},
{1.0},{1.0},{1.0},
{1.0},{1.0},{1.0},
};
IppiSize src2Size = {3, 3};
//int src2Step=3;
int src2Step=3*sizeof
(Ipp32f);
//Dst: result
Ipp32f Dst[7 * 6];
//int dstStep = 7;
int dstStep = 7*sizeof
(Ipp32f);
IppStatus Status;
Status=ippiConvFull_32f_C1R(src1,src1Step,src1Size,src2,src2Step,src2Size,Dst,dstStep);
return Status;
}
But it seems the result is not right. Can someone tell me what's wrong?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is output for the test code?When I run the code here, it gives the following result for Dst:
1.0 3.0 6.0 9.0 12.0 9.0 5.0
7.0 16.0 27.0 33.0 39.0 28.0 15.0
18.0 39.0 63.0 72.0 81.0 57.0 30.0
33.0 69.0 108.0 117.0 126.0 87.0 45.0
27.0 56.0 87.0 93.0 99.0 68.0 35.0
16.0 33.0 51.0 54.0 57.0 39.0 20.0
That looks correct result. You can check the IPP manual on how the function computes the full convolution of the two images.
Thanks,
Chao
![](/skins/images/D3C0B914909A6564BBB97F4AD1ED1973/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page