Frame Align ‐ How does it work? - jareff-g/ALT-Scann8 GitHub Wiki

Frame Align - How does it work?

This page explains all the parameters in the 'Frame Align' section of ALT-Scann8, how do they work, and to to best tune them in order to get the best results. However, do not forget the usual recommendations on the physical side regarding frame alignment, available here.

Steps/Frame

This is one of the two basic parameters regarding frame detection. It represents the number of steps the motor needs to advance in order to move the film by one frame. Since frame height is different in 8mm and Super 8 films, and the diameter of the capstan in each scanner (which moves the film by friction) might be slightly different, a formula can be used to calculate this number:

Film_Frame_height / ((π * Capstan_Diameter) / (360 / (NEMA_Step_Degrees / NEMA_Micro-steps_in_Step)))

Knowing the frame heights are either 4.01mm (S8) or 3.3mm (R8), and that a step of the NEMA motor used in T-Scann8 moves its axis by 1.8 degrees, and that each step is divided in 16 micro-steps, it results in 236 micro-steps for R8, and 286 micro-steps for S8 (for an average capstan with a diameter of 14.3 mm).

With this number, ALT-Scann8 can instruct the capstan to move the film until the next frame is (almost) there, and then use the photo-transistor detection to actually decide when the frame is well positioned.

And in case you are wondering, counting steps alone is not enough. The method used to move the film relying in friction, and the small length discrepancies accumulating overtime will make that impossible. If you are still interested, you might want to try an experimental feature integrated in ALT-Scann8 (VisualDetect) that does not use the photo-transistor to detect the frame, and instead uses OpenCV to determine then the sprocket hole is in the correct position. Interesting as an experiment but no more precise that the default photo-transistor detection, and much, much slower.

However, to simplify things up, clicking on this button you can activate automatic mode, where ALT-Scann8 will calculate dynamically the number of steps required, based on recent history.

PT Level

This settings determine the threshold of the value provided by the photo-transistor in order to determine a frame is ready to be captured. This value has an influence in the position of the captured frame: If it is too high, the frame might be captured a bit too late (so that part of the top is missing) or, if it is too low, the opposite may happen, losing part of the bottom of the image. Another problem with this parameter is that in some conditions (fragments of the film which are overexposed, or somehow have transparent film around the sprocket holes) the value reported by the photo-transistor might stay over the PT level threshold even between sprocket holes, meaning frames will be lost.

To avoid these problems, it is recommended to use automatic mode for this parameter (again, by pressing the button) so that ALT-Scann8 will dynamically calculate the best value based on the current conditions, so that no frames will be lost because of this reason (except in very extreme conditions).

Fine Tune

  • This setting is only available with PT Level in automatic mode.

Automatic PT Level sets the threshold dynamically based on recent minimum/maximum values reported by the Photo transistor. By default, it is set slightly over the minimum value, so that the frame is detected, but the position might not be optimal. If the frame is too low, increasing the Fine Tune value will move the PT level to a higher level, while still adapting automatically to the conditions. As a result, when increasing this value, the position of the captured frame can be moved up.

But then again, since the conditions of the film might change, it can happen that a fine tune value that works fine at one point, might not be appropriate for another film fragment. Because of this, there is also an automatic mode for this parameter. Using OpenCV, ALT-Scann8 will try to determine is the average position of recent frames is too high or too low, and will modify dynamically the FineTune value to try to keep them vertically centered. However, there is a catch, explained in next point.

Frame VCenter

  • This setting is only available with Fine Tune in automatic mode.

In an perfect world, ALT-Scann8 should be able to determine if a frame is vertically centered by using OpenCV to check if the vertical center of the sprocket hole (for Super 8), or the inter-hole space (for R8) is at the vertical center of the image. And while this seems to be mostly the case for Super 8 films, it is not the case for R8, at least not for the R8 films I have (I guess this is probably camera-dependent). So, in order to compensate for this asymmetry in some films, using this button it is possible for the user to visually center one of the frames of the film, so that ALT-Scann8 can calculate and keep the difference with the vertical center of the image, so that the dynamic compensation is done properly.