Recent Changes - jareff-g/ALT-Scann8 GitHub Wiki

  • 2nd Mar 2024 - ALT-Scann8 1.10.14

    • Command line option (-b) to force scrollable main window (in case UI does not fit in smaller screens)
    • New command line parameter (-f) to define UI font size (default 11). Alternative option when UI does not fit on screen
      • Adjust UI widgets (preview canvas, plot window, hole markers) according to font size
    • Make 'Enter last captured frame' popup modal, and displayed always on top (cannot be hidden by main window). Also:
      • Default to the highest frame number in selected folder
      • Display error message if existing frames would be overwritten
    • Convert steps/frame and PT Level auto buttons to buttons, instead of checkboxes
    • Adjust sprocket hole markers for better match
    • Convert AE+AWB back to buttons (from checkboxes)
    • Disable all functional widgets while scanning
      • Control widgets can be left enabled as before if command line parameter -w is used
  • 24th Feb 2024 - ALT-Scann8 1.10.0

    • Merged in Master all the changes from Develop 1.9.37 (listed below) plus a couple additional changes:
      • Undo two recent changes, done with the idea of optimizing captures, but that finally had the opposite effect:
        • Except for DNG and PNG captures, which require (DNG) or benefit from (PNG) capturing using a request, capture the image from PiCamera2 and save it using PIL library
        • Use the preview display thread to display preview images instead of displaying them in the capture loop, as it is more efficient
  • 22nd Feb 2024 - ALT-Scann8 1.9.37 (in develop branch only)

    • New version committed to develop branch, in anyone can test it before I merge with Master. Main changes:
      • Mapped 9 new camera controls from LibCamera
      • AeConstraintMode: Sets the constraint mode of the AEC/AGC algorithm
        • Normal - normal metering
        • Highlight - meter for highlights
        • Shadows - meter for shadows
      • AeMeteringMode: Sets the metering mode of the AEC/AGC algorithm
        • CentreWeighted - centre weighted metering
        • Spot - spot metering
        • Matrix - matrix metering
      • AeExposureMode: Sets the exposure mode of the AEC/AGC algorithm
        • Normal - normal exposures
        • Short - use shorter exposures
        • Long - use longer exposures
      • Brightness: Adjusts the image brightness where -1.0 is very dark, 1.0 is very bright, and 0.0 is the default "normal" brightness.
      • Contrast: Sets the contrast of the image, where zero means "no contrast", 1.0 is the default "normal" contrast, and larger values increase the contrast proportionately.
      • Saturation: Amount of colour saturation, where zero produces greyscale images, 1.0 represents default "normal" saturation, and higher values produce more saturated colours.
      • AnalogueGain: Analogue gain applied by the sensor.
      • ExposureValue: Exposure compensation value in "stops", which adjusts the target of the AEC/AGC algorithm. Positive values increase the target brightness, and negative values decrease it. Zero represents the base or "normal" exposure level.
      • AwbMode: Sets the mode of the AWB algorithm
        • Auto - any illumant
        • Tungsten - tungsten lighting
        • Fluorescent - fluorescent lighting
        • Indoor - indoor illumination
        • Daylight - daylight illumination
        • Cloudy - cloudy illumination
    • Fix errors when exiting application
    • Capture resolutions taken from camera (those flagged with * are cropped, require adjusting lens)
      • Two non-native resolutions (1024x769, 640x480) added for convenience (smaller file size) - Use cropped resolution, require lens adjustment
    • Some code converted to classes in external files. It is important to copy all python files together with ALT-Scann8.py
    • Exposure range limited from 0 to 1 second
    • Persist main window position
    • Correct auto exposure/WB update in UI
    • Adapt ranges accepted by camera-related widgets to values accepted by PiCamera2
    • Added frame with average times used by differetn scannign tasks (preview, save, exp/wb adaptation)
    • Cleanup of UI and several bugfixes a bit everywhere
  • 15th Feb 2024 - ALT-Scann8 1.9.23

    • Fix problem and inconsistencies in folder creation/selection buttons.
    • Prevent spinboxes from being modified with arrow keys when they are in automatic mode (can still be modified using widget controls)
    • Frames to go: Add a 5 sec delay before count down starts (allow user time to type in the number)
    • Replace toggle buttons for spinboxes with automatic mode by real checkboxes.
    • Unique auto checkboxes for both white balance channels
    • Background color of spinboxes set to 'pale green' when in automatic mode
    • Align labels of spinboxes
  • 14th Feb 2024 - ALT-Scann8 1.9.22

    • Added support to capture raw images to DNG files
      • Note: DNG files are not supported by AfterScan (and probably will never be). This is provided for people doing post-processing elsewhere
    • Fixed bug in Arduino resulting in broken automatic steps/frame
  • 13th Feb 2024 - ALT-Scann8 1.9.21

    • As already anticipated, there was a bug in 1.9.20 (maybe more?). When scanner started, everything freezed. This version corrects the issue.
  • 13th Feb 2024 - ALT-Scann8 1.9.20. Warning: This version has quite a lot of changes (not only in the affected areas), so bugs are expected. It you want to stay safe, I have created a stable branch (1.9.12 for now) that you can use. That branch will be updated less frequently.

    • Improved field validation. Now values entered via keyboard are validated, and highlighted in red if not inside the correct range. they will become back once the value is correct. When scanning is active, value input via keyboard is disabled, to avoid disrupting the scan process (but some values can still be modified using arrow keys as before).
    • Bugfixes
      • Sharpness value was handled by the UI but never set at camera level, except at init time (so always 1)
      • Set exposure at camera after configuration read
  • 12th Feb 2024: ALT-Scann 1..12

    • UI harmonization (spinbox handling, buttons appearance, value validation)
    • Display exposure in ms instead of arbitrary conversion
    • Add button to toggle UI between full and minimal modes
    • Allow preview window to be manually closed without application crashing
    • Expert mode, experimental mode and plotter are enabled by default now
    • Several bugfixes (details in commits)
  • 10th Feb 2023: ALTScann8 1.9.5 - Changes since last update

    • Improved frame detection for cases where film is clear or even transparent around sprocket holes
    • Display minimum value in integrated plotter
    • Auto PT level mode: Calculate threshold only when minimum steps per frame are reached (cleaner plotter graph)
    • Prevent unrecognized Arduino command 86 when not using expert mode
    • Rename 'Focus control' frame to 'Zoom control'
    • Convert S8/R8 buttons to Radio Buttons
    • Scanner Auto-stop
      • Disabled by default: Added checkbox to enable/disable it
      • Two auto-stop trigger modes (film detection, frames-to-go counter reaches zero)
      • New algorithm for film detection. Should work better now
    • Display warning popup if files might be overwritten in target folder
    • Few bug fixes in Arduino code to prevent potential issues (parameter validation for 3 commands lacking it)
    • Regression fixed: ALT-Scann8 was crashing when 'Negative'Film' button was selected
    • Few UI bug fixes
    • Logs added to try to identify origin of random bug (plotter stops plotting data)
  • 5th Feb 2024: ALT-Scann8 1.9.0

    • Replace 'HQ' button with drop down with different resolutions (although minimum captor in HQ camera is always "2028x1520" at the minimum, so no speed gain
    • Replace file type (jpg/png) radio buttons with drop down
    • Add line with threshold level to integrated plotter
    • Extra steps can now be set to negative values (-30 to +30). When negative, they are subtracted from the minimum number of steps where Arduino will start considering the photo-transistor, if positive is still the same, unconditional number os steps are done after frame is detected, before snapshot is taken. Normally, if extra steps needs to be used, it means there is something wrong elsewhere.
    • Display popup warning when running out of disk space
    • Move Multi-exposure frame to experimental area (as final results are not as good as expected, mainly due to lack ho homogenity in the brightness of the video (lot of flickering)
    • Include raw mode 1332x990 (120.05 fps) in experimental mode (-x) only. This allows faster scanning (350FPM with no stabilization delay), but requires to physically open the zoom in the lens since HQ camera appears to use only the center of the sensor. Not very useful, just 'experimental'
    • Fixed bug where scan process would become progressively slower
  • 28th Jan 2023: ALT-Scann8 1.8.40 - Merge in place (working)

    • Mertens merge done while scanning, by the Raspberry Pi, is working now but, as anticipated, it comes at a cost: 12 frames per minute vs 35 FPM with the 'standard' HDR capture (3 frames to be merged at post-production by AfteScan).
  • 27th Jan 2024: ALT-Scann8 1.8.35 - Merge in place

    • Committed by mistake, untested
    • Attempt at performing the Mertens merge at the Raspberry Pi, right after capture, ir order to make better use of the delays while the HQ camera adapts the exposure for the different captures. The two theoretical advantages are that the merge time os overlapped with the capture (so that it does not need to be done at post-processing) and that only one file per frame is saved (less disk space required). However, still to be seen if this is operational with the RPi4 (even the RPi5), since Mertens merge is heavy.
  • 26th Jan 2024: ALT-Scann8 1.8.33 - This version bring a couple of important fixes on Arduino side that should allow the scanner to operate at higher speeds without stability problems

    • Add 'video time' in current frame box
    • Prevent drawing in the top 15 pixels of plotter area
    • Better adjust of R8 hole markers
    • Bugfix: Scan process terminated when delay due to skipped Arduino command was too long
    • in Arduino (1.0.2)
      • Auto-stop at end of reel when doing film forward (not yet working)
      • Bugfix: While scanning, sometimes an extra snapshot was taken while the film was moving. This is now corrected
      • Bugfix: Enforce a minimum margin when detection PT level
  • 23rd Jan 2023: ALT-Scann 1.8.31

    • 'HQ On' Button: Activate capture in full-res (4056, 3040) when selecting this one
    • Remove (hide) 'Turbo On' button as it doesn't seem to have any effect on the capture speed
    • Better tooltip positioning to minimize conflicts with mouse cursor
    • Make sure tooltips are not off-screen (when window is on the extreme right of the screen)
  • 20th Jan 2024: ALT-Scann8 1.8.30: Added tooltips

  • 20th Jan 2023: ALT-Scann8 1.8.25: Implemented small-screen mode

    • Added 'small window' mode to allow usage with lower resolutions (use -1 command line parameter)
    • Also rearranged widgets to make them better fit in a smaller space
    • Blocked update of some widgets when not in expert mode: Default (simple UI) mode works again, expert mode is no longer the default (use -e command line parameter to enable it)
    • Allow HDR bracket up to 400ms (vs 200 before)
  • 13th Jan 2024: ALT-Scann8 1.8.21

    • Increased top limit of HDR bracket from 200 to 400 ms
    • Again, take-up algorithm reviewed to make it work as intended. This time a major flaw has been identified that was causing take-up reel to act erratically, especially when changing scan speed. Now it should be more consistent, making the take-up action independent is scan process. Still, tension is kept to a minimum intentionally, so pinch roller is still strongly recommended (i.e. mandatory) with ALT-Scann8
  • 5th Jan 2024: Fixed bug (caused by recent UI rearrangement) preventing scan process to start

  • 3rd Jan 2024: Added a link to the ALT-Scann8 Discord server in the project Readme

  • 3rd Jan 2024: Added a FAQ page in the Wiki

  • 2nd Dec 2024: ALT-Scann8 1.8.16

    • Disk space is now monitored during scan. If less than 500MB remain, scan process stops, to allow doing some cleanup, and prevent app crashing, and losing progress. This brings an additional dependency ('psutil'), that needs to be installed in your PC
    • Couple of changes in Arduino
      • Reels are now unlocked by default, they are engage only when needed. 'Unlock reels' is retained for now, but the idea is to remove it since it should not be useful any more
      • New button to perform 'slow backward'. This is only available in experimental mode since it requires manual operation (reel A needs to be moved manually to collect outgoing film). Can be useful in some situations, as I found myself manually moving the capstan back to go back to a frame already passed by
  • 2nd Dec 2024: ALT-Scann8 1.8.15

    • Removed code supporting PiCamera legacy
    • Real-Time display now shows the same image that the one being captured. Plus. When zooming in, the view can be moved right to the edges of the image
  • 30th Dec 2023: ALT-Scann8 1.8.11. HDR exposure bracket reformulated so that the automatic exposure reported by the HD camera is always in the middle of the bracket (as long as possible, if AE reported is too low it might not be). Only tested with 3 exposures, if you use 5 and detect any problem, please open an issue.

  • 29th Dec 2023: Please skip version 1.8.9, which is generating wrong filenames, use ALT-Scann8 1.8.10 instead. In Multi-exposure mode, use 3 exposures instead of 4. Can be easily changed to 5 by modifying the variable hdr_num_steps. Current version of AfterScan (commit of today) should be able to handle anything between 2 and 5 exposures.

  • 29th Dec 2023: New widget in UI to estimate remaining scanning time. You have to enter the remaining number of frames to be scanned (can be done at the start, or at any time during the scan) and the remaining time will be calculated according to the current scan speed. Below you have an average of the number of frames in a reel, depending on the reel diameter and film type:

    Reel diam. #Frames 8mm #Frames S8
    7,6 cm 4150 3500
    10,2 cm 8300 7000
    13 cm 16600 14000
    15 cm 24900 21000
    18 cm 33200 28000
  • 9th Dec 2023: Added automatic multi-exposure bracket calculation. Every 8 frames the exposure bracket is recalculated based on the user defined bracket width, and the automatic exposure reported by the camera. Also rearranged widgets for the new ones to fit, plus some other changes (more details in commit comment)

  • 5th Dec 2023: Fixed bug causing error on startup

  • 30th Nov 2023: Optimization of HDR capture + logging change (v1.8.2)

    • Changed the multi-exposure capture algorithm to avoid 25% of exposure catch-up dry run captures. This should speed up a bit multi-exposure captures (in my case, using a 60 ms exposure bracket, moved from 30 fpm to 35 fpm)
    • Most of logging.info statements should be logging debug. Changes them.
  • 23rd Nov 2023: Added changes to the way multi-exposure scan is managed

    • Move focus control buttons to the right of 'Focus Zoom' button, to make space for new widgets

    • Redistribute elements in expert area to allow inclusion of new widgets

    • Added dynamic maximum photo-transistor value to integrated plotter

    • Create new area with widgets to adjust multi-exposure parameters. All these parameters can be changed at any time during the scan (except the 'Activate' checkbox)

      • Active: Enables multi-exposure capture (replaces the 'HDR On' button)
      • View x 4: Display preview with all 4 exposures (to facilitate adjustment of exposure bracket with the controls below), instead of second frame of each set as it does by default when working in this mode
      • Min exp: Lower exposure in the bracket
      • Man exp: Higher exposure in the bracket
      • Adjust bracket: Arrange exposure range relative to camera detected auto-exposure
    • Below there is are two snapshots showing how the new controls allow for better exposure adjustment in multi-exposure capture mode (default multi-exposure bracket on the left, adjusted on the right):

  • 20th Nov 2023: Some minor (but relevant) updates to yesterday's changes

    • Uploaded video with a side by side comparison of a normal capture against a multi-exposure one. You can find it here.
    • Change frame bracket from 10-150 ms to 0.9-56 ms (resulting merged image looks better)
    • Change number of dry run shots from 9 to 4 (same results, tried with 3 but did not work). Not ALT-Scann8 can do 30 frames per minute in pseudo-HDR mode, instead of 10 with previous version.
    • Added 'win.update()' calls to have more reactivity in the UI while processing HDR
  • 19th Nov 2023:

    • Completed the 'HDR' (not really HDR) implementation started one year ago.

    • When enabling HDR (via 'HDR On' button) ALT-Scann8 will capture 4 snapshots for each frame, with different exposures, that can later be merged (using the bash script I just commited) in a more detailed image. A sample of the resulting video, compared to a standard scan, is copied below. Captura desde 2023-11-19 20-00-42 The problem with this new capture type is that it is terribly slow, increasing by a factor of 20 the standard scan time of ALT-Scann8, so for the moment I'll not integrate any dedicated processing in AfterScan. If you decide to use it, you can merge the frames using the 'MergeImage' bash script (windows conversion welcome) and then process the resulting frames with AfterScan as usual.

      So, for the moment, this capture mode will not evolve much (maybe will try to optimize the exposures a bit), but I might give it a second look when I'll get my hands in a Raspberry Pi 5: In the presentation video from the RPi foundation they mentioned there could be a way to handle HDR with the RPi HD camera; If it does (nothing concrete yet), this could be a more reasonable alternative for this kind of capture.

  • 16th Nov 2023:

    • Auto-stop at the end of the reel. When there is no more film passing through the film gate, the scan process automatically stops.
    • Would like to do the same for Rewind/FF, but without additional hardware seems not feasible.
  • 15th Nov 2023:

    • Yet another take-up algorithm. This time it is simpler and like I have said before, should work properly in all conditions (small/big reels, scan at any speed, advance film forward). I'm not using the latest traction switch from Torulf, but I think it should work fine also, otherwise let me know.
  • 14th Nov 2023:

    • Added widget with integrated plotter displaying the level reported by photo-transistor. It can help to make a quick adjustment of the height of the photo-transistor without the need to fire up Arduino IDE. It is enabled with the -p command line switch. Due to the extra I2C traffic it generates, I recommend to use it only when required, as it slows down the whole processing.

  • 10th Nov 2023:

    • Split 'Fine tune' into two new values:
      • 'Fine Tune': Set automatic PT Threshold to a value between 5% to 95% of the difference between the minimum and maximum Phototransistor reported values
      • 'Extra steps': Perform between 0 and 20 additional steps after frame has been detected
    • Remove 'Boosted threshold' in experimental area (same can be achieved by setting 'Auto PT Threshold' to 90%)
  • 6th Nov 2023:

    • Reintroduced the progressive speed slowdown when frame is about to be detected. It was removed a few weeks back, due to concerns about its effectiveness, however after additional tests I can confirm it helps to have a better frame positioning. To give users choice, it is linked to the 'Scan speed' parameter, so that at the highest speed there will be no slowdown at all (so, less position accuracy). As the scan speed is reduced, the slowdown will increase, providing more accuracy in the frame position, at the cost of a (slightly) lower speed.
  • 4th Nov 2023:

    • Changes 'Manual scan' to 'Damaged film'
      • Added one more button for 'Manual scan' feature, to allow advancing frame by 5 or 20 steps
      • Added 'Boosted threshold' checkbox to allow 'degraded mode' auto scan of films with damaged holes; Frames alignment will not be perfect (too high) but can be masked to a certain extent using the 'fake fill' feature of AfterScan. Below you can see how th e'boosted threshold can help to handle damaged films (line in red is the PT Threshold, line in blue the actual PT level):

Normal film:

Damaged film:

  • 2nd Nov 2023:

    • Added 'manual scan' feature in experimental area. Can be useful as last resort in case you have a film fragment with damaged sprocket holes, as shown in the image below. Only for short fragments, as this is a heavy manual operation. The two buttons provided are:
      • Advance: Makes the capstan move forward by 5 steps (to allow visual frame align)

      • Snap: Takes a snapshot of the current image and moves to the next frame (more precisely, advances the capstan by the number of steps in the 'Steps/frame' value).

  • 26th Oct 2023:

    • Rearranged code in Arduino and RPi Pico controllers to make them closer and facilitate future changes. Not tested yet!
  • 17th Oct 2023:

    • UI Homogenisation. Changed widgets used in earlier versions (inspired by T-Scann 8) to spinboxes, as it is more in line with newer widgets that have to be modified in the same way.
  • 14th Oct 2023:

    • Started one thread in 'Discussions' to see if there's anyone out there using this software
    • Delivered a few bug fixes for the 'Scan speed' feature
    • Changed the frame detection algorithm to be less strict; unexpectedly, seems to work better like this, captured frames are now more stable.
      • As part of this change, the default number of steps required to advance one frame (overridden by the automatic calculation, but still required) is not hardcoded anymore, instead it is calculated from the capstan diameter (hardcoded for mine, at 14.3 mm, but soon to be customizable from the UI). This is important as it is used to correct the runtime value in case the automatic calculation goes wrong.
  • 12th Oct 2023:

    • In the same lines as the automatic PT level control, I have added automatic calculation of steps per frame. Calculation is based on the average number of steps per frame for the last 32 frames (less than 2 sec). For the moment is seems to work fine, but still under observation, as physical factor (dust in capstan and pinch roller) might cause high variations in the number of steps required to advance one frame.
    • Also added control of the speed of the scanning process, via a spinbox in the UI (Scan Speed) that can be adjusted from 1 (slowest) to 10 (fastest). This was the user has more control on the process, being able to select a slower speed to have a better precision in frame positioning.
  • 8th Oct 2023:

    • New field 'Fine tune' added to the 'Frame align' section. It allows so slightly adjust up or down the position of the captured frame. To move it up, set a positive integer (1 to 20) in this field, and that number of extra steps will be performed after frame detection. To move it down, set it to a negative number (-1 to -20), and the photo-transistor threshold level used to decide a frame has been detected will be lowered accordingly. The 'move up' option has been well tested, the 'move down' alternative still has to undergo additional tests (feedback is welcome).
    • After a few days test, it seems automatic PT level algorithm is quite trustable: I can leave the scanner unattended for the full session, and have no surprises later. However, please take care that the 'Steps/Frame' value is well adjusted (10-20 steps below the real number of steps required to advance a frame) otherwise it wont work.
  • 2dn Oct 2023:

    • Made automatic PT level optional: Can be enabled/disabled by double-clicking in the 'PT Level' spinbox
    • Some improvement done in the PT Level auto calculation in order to have a quicker reaction when changes in the film condition arrive
  • 1st Oct 2023: Automatic PT Level: This feature allows the scanner to handle different types of films (commercial with transparent edge, overexposed film...) automatically. Arduino code is keeping track of recent min/max values of detected photo-transistor signal level, and sets the threshold to 70% of the difference. In the coming days I'll see if keeping the option of enforcing a manual level is worth it, for the moment the automatic mode seems to work fine (let me know otherwise).