<< return to Pixycam.com

How pixy's color tracking removes the effects of lighting changes


I’m trying to figure out how the pixy deal with the effects of lighting changing in a scene. And can I interpret the region grow as segmentation using the thresholds? Thanks!


“interpret the region grow as segmentation using the thresholds”. I’m not sure what you mean by "region grow and which thresholds you are referring to.



Thanks for your reply, Firstly I mainly want to know how pixy’s color tracking eliminates the effects of lighting changes. And secondly, pixy using region grow for color target extraction in tracking, so can I understand the region grow as using the parameters ‘u’ and ‘v’ defined in the program as color thresholds for target extraction?


Pixy focuses on the hue instead of the brightness of the object. It does this by forming a pure hue in 2 dimensions –
U = (R-G)/Y
V = (B-G)/Y

where R=red, G=green, B=Blue, Y=R+G+B

It then determines what bounds of U and V are associated with a given object.

Since it divides by Y, the brightness is mostly ignored and changes in lighting have less of an effect.

Pixy does not use region growing when tracking/detecting objects.

Hope this helps!



In the source code,
U = (((R-G)<<15)/Y)
V = (((B-G)<<15)/Y)
Does this mean to increase the (R-G) and (B-G) by 2^15 times and then divides by Y? And are the variable types of U and V int32 or others?


I believe you are correct about everything.



Thanks for your reply!