- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ross,
By the way, way did not you use the latest IPP version?We already released IPP v4.1!
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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

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