We plan to upgrade to IPP 8.1. We understand that ippiFilterBox_8u_C1R function is deprecated and we should use ippifilterboxborder_8u_C1R.
I noted that there are two new parameter in ippifilterboxborder_8u_C1R function that do not exist in old function.
1. Border type
2. Border value
What values should be given to those two parameters before calling the new IPP function? Can I just randomly choose some type and some value?
Anyway, since the old one does not have those 2, I have no idea how to translate that in a new IPP function. Please help!
Thanks in advance!
Thanks for the post. I copy my answer here.
As you know, the filter will use the pixel in neighborhood, when you handle the edge pixel of image, you need to add border to the image. There are several type of border, for example,
1. ippBorderConst, it uses constant border
2. ippBorderRepl, it repeats the edge pixel.
You can see the details in IPP manual => Borders in Neighborhood Operations & User-defined Border Type
3. ippBorderInMem, it use the value in memory.
If you use ippBorderInMem, which means the ROI is smaller than the whole image, so the border can use the value in the memory of src image. The figure in manual shows the case.
The parameter : Border can be any value, because it is the Constant value to assign to pixels of the constant border. This parameter is applicable only to the ippBorderConstborder type.
So your code is right. But you may take care about the pSrc and roiSize. It may not the whole image when you use the type of ippBorderInMem . For example, the filter is 3x3, anchor is (1, 1), the roisize may (1 , 1, Width-WidthFilter/2+1, Height –HeightFilter/2+1) .
Please let me know if you get any problem here.