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

how to count the number of colors in an image

crao
Beginner
392 Views
Hi,
Is there any IPP function that can count the number of unique colors in a image ROI? Moreover, can it provide the RGB value of those colors? Thanks a lot.

crao
0 Kudos
3 Replies
shyaki
Beginner
392 Views
Quoting - crao
Hi,
Is there any IPP function that can count the number of unique colors in a image ROI? Moreover, can it provide the RGB value of those colors? Thanks a lot.

crao

Why need IPP function for this simple work?
0 Kudos
Mikael_Grev
Beginner
392 Views
Quoting - shyaki

Why need IPP function for this simple work?

If you think this is simple I'm affraid you don't fully understand the problem, the possible per-CPU performance gains or that IPP is actually a set of low level optimized functions solving exactly these kinds of problems.

Cheers,
Mikael
0 Kudos
Cen_Rao
Beginner
392 Views
Quoting - shyaki

Why need IPP function for this simple work?

it requires to loop through each pixel and record the pixel value. when you work on HD resolution images and 256*256*256 size color space, simple loop become too slow.

I think OpenMP and SSE can speed up the process significantly, which are the IPP specialty. I could do it with my own manu coding, but it takes too much time.

Current IPP histogram functions only work on 1-channel images, there is no real 3-D histogram IPP functions for RGB images. I can not think of another way to get the result.
0 Kudos
Reply