Community
cancel
Showing results for 
Search instead for 
Did you mean: 
crao
Beginner
82 Views

how to count the number of colors in an image

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
82 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
82 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
82 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