@PM490 - may I shamelessly promote this here for that purpose? I am actually using this code in my Raspberry Pi server. The frame for highlights (which is the darkest frame available) is used to detect the position of the sprocket. The usual number of steps my stepper needs to do for one frame advance is 400 steps. Any deviation of the center of the sprocket from the center of the image is simply subtracted from the standard 400 steps before the next move is triggered. The code is fast enough to do this, at least on my RP4, in real-time.
1 Like