Some thoughts on the patterns:
- In a video, it should be easy to find the start of the pattern and the moments in time when the led patterns change.
- Also, since there might be some slight movement in the video, the sequence should be as short as possible
- For the same reason, it would be nice if LEDS are on as much as possible in order to track them across frames.
Below, you can see version 1 (well, version 3 actually) of the pattern. It's a simple binary sequence where 0 is encoded as red and 1 is encoded as blue (or the other way around, doesn't really matter)
Using two colors at the same time (vs just switching half of the LEDs on at each step) should help a lot in disambiguation, where two LEDs are so close together that they are registered as one.
I'm still not sure whether this is over-engineered. Maybe just switching the LEDs on one-by-one would be enough and surely this would also solve ambiguity. Of course this would take a lot longer. Currently I'm aiming at 2 video frames per step in the sequence (about 12 steps per second). The one-by-one approach would take 8 seconds for 100 LEDs, or 3 seconds if red, green and blue are used at the same time.
Another thought: to improve tracking, instead of switching off the leds in between, I could use the third color (green) in between the red/blue patterns. But all of that is better explored when implementing the actual tracking. First I need to detect the LEDs in the video to start with. More about that in the next log...