Last night I made this quick patch to more efficiently track colors in the HLS colorspace (or RGB colorspace with a quick adjustment). The nice thing about it is that I can either use jit.pix or jit.gl.pix, depending on whether I would like it to run on the CPU or the GPU.
Along those same lines, I would now like to attempt to execute (single) blob centroid or bounds tracking within Gen. I hope that this will give me the efficiency and flexibility that I am looking for.
It seems like it should be possible. In the end it is all just a bit of math. As far as my understanding, which is admittedly not comprehensive, I will just need to divide the sum of the y coordinates of the white pixels by the number of total white pixels to get the centroid-y location and then divide the sum of the x coordinates of the white pixels by the number of total white pixels to get the centroid-x location.