- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I am working on project to blur RGB image (3 channels) with Gaussian Blur or Median Blur. I tested with openCV function GaussianBlur() and MedianBlur() and got Blur effect on Image.
However, when I am trying to use with Intel IPP functions such as Gaussian Filter and Median Filter to blur my original Image. So far, the blur effect is not showing at all even though I did not get any error or fault from using them.
I used ippiFilterMedianColor_8u_C3R() for MedianFilter and ippiFilterGaussianBorder_8u_C3R() for GaussianFilter. I saw no effect on both result image. My questions are
IPP Gaussian Border Filter and Median Filter are the same as OpenCV Gaussain Blur and Medain Blur? Are they the correct tools for using to blur entire image?
Also I saw few thing about Adding Border on Image. Is that necessary? If so, I would appreciate the guidance about how to do that?
Thank you.
- Si Thu.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Si Thu.
We provide special example how to use FilterGaussian function "FilterGaussianBorder.c". Also the blur effect depends on mask size. Try to increase it. Also I recommend to use ippiFilterBoxBorder_8u_C3R as pure blur effect (averaging of all pixels inside square mask).
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Andrey,
Yes but I want to use Median Filter or Gaussian Filter effect for bluring. I did use mask size of 5. I tested with FilterMedianBorder_8u_C1R() for one channel and it is working. However, when I tried to use for color Image like RGB or HSV. FilterMedianBorder_8u_C3R() gives me 3 - 5 overlapping subset of image. I have also added the border around the Source Image with ippReplicateBorder_8u_C3R(). I read the documentation for 3 channels and also follow the FilterMedianBorder.c sample code. It seems like I am missing some information for 3 channels either not setting the correct border or giving wrong value in step size. I played around those parameter does not give me any conclusion. Can I have an sample code like FilterMeidanBorder.c but for 3 channel?
Andrey Bakshaev (Intel) wrote:
Hi Si Thu.
We provide special example how to use FilterGaussian function "FilterGaussianBorder.c". Also the blur effect depends on mask size. Try to increase it. Also I recommend to use ippiFilterBoxBorder_8u_C3R as pure blur effect (averaging of all pixels inside square mask).
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Andrey,
So, I changed my maskSize height to be 1 and it fixed the overlapping image issue. The value of maksSize's height is equal to the overlaying/overlapping number of images in result image. Can you please explain me why maskSize's height to be 1 in ippiFilterMedianBorder_8u_C3R() but it does not have to be in ippiFilterMedianBorder_8u_C1R()?
Thank you.
Best,
Si Thu.
Andrey Bakshaev (Intel) wrote:
Hi Si Thu.
We provide special example how to use FilterGaussian function "FilterGaussianBorder.c". Also the blur effect depends on mask size. Try to increase it. Also I recommend to use ippiFilterBoxBorder_8u_C3R as pure blur effect (averaging of all pixels inside square mask).
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Si Thu.
It is not easy to understand your problem without reproducer. But it is necessary to provide correct pointer to function;
For example, image roi= 16x16, mask = 3x3, 3 channels.
srcStep = (16+(3-1)) * 3 ; 3 channels and additional pixel left and right
src = malloc(16+(3-1) * srcStep) ; additional line top and bottom
pSrc = src + srcStep + 3; // calculate offset for function, skip top line and one pixel left
ippiFilterMedianBorder_8u_C3R(pSrc,srcStep, roi, ...)
Also for information ippiFilterMedianBorder_8u_C3R uses median sorting by channels.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Andrey,
Thank you it works. and also found my issue with using width and height reverse (my ROI is not squared so it was giving me the issue also when i using them in reverse.)
Andrey Bakshaev (Intel) wrote:
Hi Si Thu.
It is not easy to understand your problem without reproducer. But it is necessary to provide correct pointer to function;
For example, image roi= 16x16, mask = 3x3, 3 channels.
srcStep = (16+(3-1)) * 3 ; 3 channels and additional pixel left and right
src = malloc(16+(3-1) * srcStep) ; additional line top and bottom
pSrc = src + srcStep + 3; // calculate offset for function, skip top line and one pixel left
ippiFilterMedianBorder_8u_C3R(pSrc,srcStep, roi, ...)
Also for information ippiFilterMedianBorder_8u_C3R uses median sorting by channels.
Thanks.

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