Onto tracking more than one fish! I mean... colour!
![](https://static.wixstatic.com/media/b40f49_0c685d20dc9d459d8c7d0d509ca969a7~mv2.jpg/v1/fill/w_980,h_551,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/b40f49_0c685d20dc9d459d8c7d0d509ca969a7~mv2.jpg)
Since the abstraction is more or less done, putting it together to track several colors just required some windows and gates! No doors though...
Incoming Tracked Colours
![](https://static.wixstatic.com/media/b40f49_8bdc9798bf0b4e8db2f4364132ade7b0~mv2.jpg/v1/fill/w_915,h_724,al_c,q_85,enc_auto/b40f49_8bdc9798bf0b4e8db2f4364132ade7b0~mv2.jpg)
This was almost already all done! We just needed to create some paths so that several colours could be selected and tracked for without replacing each other. Hence... a gate! Here we used 4 gates for 4 different colours for now. (I'm currently thinking of having 6 different colours for CHIMIRA (the 3 primary and 3 secondary colours) but it'll depend on how sensitive to colour it will be. Perhaps more than 6 in the #future!)
Each gate number routes to a different Tracker instance so a gate number must be selected prior to selecting a colour or else it will be overridden. To make it cleaner, we've started using more sends and receives here.
Output of Tracked Colours
![](https://static.wixstatic.com/media/b40f49_7407fd4eca1844439736bab670e8eee9~mv2.jpg/v1/fill/w_545,h_715,al_c,q_85,enc_auto/b40f49_7407fd4eca1844439736bab670e8eee9~mv2.jpg)
Like mentioned previously, our #Tracker outputs a processed video, location, and rgb values of our tracked colour.
To visualize all of our tracked colours, here we've got a [jit.lcd] that paints #ovals in the location of our tracked colours against a black background. And get this: I've gotten them to appear as the same colour as they're being tracked! Isn't that neat?
The huge trigger is sending out #bangs from our metro as well as clearing every oval's previous location to always update the user on the current location of the tracked colour.
Some new [objects] and terms I played with and learned today:
[jit.lcd] - a wrapper that allows for QuickDraw commands (like painting our coloured dots!)
![](https://static.wixstatic.com/media/b40f49_92a9c4bf8fae4e3abef6dd9507efa77d~mv2.png/v1/fill/w_980,h_450,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/b40f49_92a9c4bf8fae4e3abef6dd9507efa77d~mv2.png)
Onto data structures to use this data!
Comments