Well, I have hit a wall with my project. My problem was parsing the colours to a jit.findbounds object so instead I created four of them with a min and max bounds for each colour - red, green, blue and yellow. The objects picked up the various colours and sent an x and y variable to a drawing subpatch which would draw the paths of a tracked object and play a sound accordingly - which works lovely but only with a movie or animation.

screenshot of patch working with an animation
When I then used a webcam - the tracking subpatch couldn’t find anything. I tried ramping up the colour and brightness with a jit.brcosa object but this became messy and only really found red colours. Even after adding a suckah and then recalibrating each jit.findbounds to match the colour tracking still didn’t work.
I thought it must be down to the variance in ambient light - so I attempted to build a lightbox to ensure a consistent level of light under all conditions. The design was to have a light and webcam inside a box with a glass top - the objects to be tracked would be lit and seen from beneath and so would be easy to calibrate.

wooden box

box interior painted white

light and webcam installed

lightbox completed
It looked great, unfortunately the outcome was awful. The light reflected into the webcam and bleached out most of the image, causing the tracking patch to miss the objects. I tried to diffuse the light with cloth but the light problem persisted. After a few tense hours, I then tried a new tack. I used an anglepoise lamp and webcam set up above the lightbox with the jit.brcosa to raise the brightness and contrast which made the colours closer to pure RGB.

Webcam and lamp above diffused lightbox.
However - I still cannot get the tracking to work properly - only a stuttering bit of red and blue. Which is infuriating. I will speak to Dan Livingstone once more tomorrow and hopefully he can help me - or put me out of my misery!