Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
6629 Discussions

how to count the number of colors in an image

crao
Beginner
152 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
152 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?
Mikael_Grev
Beginner
152 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
Cen_Rao
Beginner
152 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.
Reply