Hi,
I am trying to filter for the colored bars like you can see in this image:

Right now I try with a mean()over the rgb image and crop all under this threshold.
But then it looks like this:

Do you have any idea what I could do better or other methods for getting the color?
Or should I just search for the colors? (There are about 10 colors that can occur)