Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

ippReduceBits not working properly? (IPP v3.0)

Deleted_U_Intel
Employee
376 Views
Hi,

I am using IPP 3.0 in a video processing application. I want to reduce the number of levels in a grayscale image to 4. I tried:

ippiReduceBits_8u_C1R(piA8u, Step8uC1, piB8u, Step8uC1, roiAll, 0, ippDitherNone, 4);

but it didn't do anything (and there was no error returned).

Any other dither type, ie.

ippiReduceBits_8u_C1R(piA8u, Step8uC1, piB8u, Step8uC1, roiAll, 0, ippDitherBayer, 4);

works however (but i don't want dithering!).

Is my code wrong, or is it the IPP library?

Thanks
Ross
0 Kudos
5 Replies
Vladimir_Dudnik
Employee
376 Views
Hi Ross,
By the way, way did not you use the latest IPP version?We already released IPP v4.1!
Regards,
Vladimir
0 Kudos
Vladimir_Dudnik
Employee
376 Views
If you do not need in dithering, you can use ippiLUT functions, like this

IppStatus ippiLUT_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize, const Ipp32s* pValues, const Ipp32s* pLevels, int nLevels);

Ipp32s pLevels[] = { 0, 64, 128, 192, 256 };
Ipp32s pValues[] = { 32, 96, 160, 224 };

Int nLevels = 5;

All values from pSrc in range {0,64} will be replaced in pDst with 32, {64,128} - with 96, (128,192) - with 160 and so far

Vladimir

0 Kudos
Vladimir_Dudnik
Employee
376 Views
Hi,
I'm glad if you solved your previous question.
I'm not certain I understand your new question, do you mean some kind of filtering? Can you express this operation in pseudo-code?
BTW, could you also share your feeling about IPP v4.1 after you learn it a bit?
Regards,
Vladimir
0 Kudos
borix
Beginner
376 Views
Ross, in the current version you can reduce bits only with dithering. this will be corrected in ipp50. you can just shift pixel values. but i don't see how to help to maximize with the thresholding
0 Kudos
tjkelman
Beginner
376 Views
So now that we have IPP5.1, is there a convenient way to perform majority filtering as described two messages above? (setting the center pixel of a kernel to the most common value in the kernel)

I'm not seeing any appropriate functions, so any help is greatly appreciated.

Many thanks,

-todd

Todd Kelman, Engineering Consultant
Volcano Corporation
2870 Kilgore Rd. Rancho Cordova, CA 95670
tkelman@volcanocorp.com

Message Edited by tjkelman on 06-06-200610:55 AM

0 Kudos
Reply