Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

Using LUTPalette

costelha1
Beginner
239 Views
Hi,

I have an RGB555 image and want to apply a LUT operation on it, in order to get an image with only a few colors. I.e., I want to get a one plane image where in each (x,y) I get one index in a predefined range.

From what I've read, I can segment an RGB555 image using the LUTPalette function, since this origin image as 16bits. To do this probably I will have to set nBitSize=16 and use the mod=16u8u_C1R. I now that the RGB555 is a 3 channel image, but I don't see why it won't work if I just pretend it is a one channel, 16 bits image.

Well, what I'm asking is for clarification on these assumptions, and I would appreciate much if someone could post a piece of code illustrating the use of this function.

Thanks in advanced for your help.

Bitwise, I'm using IPP 5.0 beta.

Hugo
0 Kudos
2 Replies
Vladimir_Dudnik
Employee
239 Views
Hi,
there is recommendation from our expert:
you can do like this
Code:
pTable = ippsMalloc_8u(1 << 15);
// prepare LUT table
for (i = 0; i < (1 << 15); i ++)
    pTable = something;
// applay LUT
ippiLUTPalette_16u8u_C1R(pSrc, srcStep, pDst, dstStep, roiSize, pTable, 15);
Regards,
Vladimir
costelha1
Beginner
239 Views
Thanks, I think that was exactly what I was looking for. I'll try it as soon as possible.

Hugo Costelha
Reply