Occurrence of colors

with pipet and with woeis occurrence(color) i tried to count occurrence of colors of an image with size 3072x896 p!xels. thats more than 2.7 million(de) pixels. thats 2.7 x 2.7 million operations.
that’s a lot. it is to much, my v4 crashes :(
are there other ways to count occurrence of colors of high res images?

a dx11 compute shader will allow you to do this pretty quickly

so far i am not into hlsl… any shader examples i could start with? not to far from what i want?

well if you don’t need it realtime you can split your image in to areas or calculate per point, for the pipet example in compute look in to:
in dx11 distro

pipet.rar (781.6 kB)

thanks for the tips. but v4b30 with dx11 pack so far not running on my comp. it freezes with the dark grey v4 quad on start. crack.exe seems o.k. everything green…
installed gimp. it has a function to calculate occurrence of all real colors of an image. very fast.
how does the occurrence calc work? i am not into math but it should not be to difficult, or is it?
g a

witch video card do you have?
you can use dx11 on dx10 card
but compute, you can use only on 11 cards tho…
and for the occurrence of colors, i guess you convert each pixel to a color RGBA, then you check witch values are the same

using a NVIDIA GeForce GTX 285 1024 MB on mac pro 2 x 3 GHz Quad-Core Intel Xeon.
should dx11 work on that card? probably not…

NVIDIA GeForce GTX 285 is a DX10 feature set card afaik.

Hi guys,

I’m currently trying to read in a video source, break it down into a grid and analyse the colours found in each element of that grid.

At the moment I am only using a still image as a placeholder for the video, and I even have a patch that can break down the image into a grid of elements (reading the texture of each element out to a quad in a separate renderer).
But I can’t seem to find a way to analyse each one in terms of colour; my end goal is to be able to display the percentage of red in each element.

Any help would be really appreciated, thank you!