Skip to content

Recent changes

Juan edited this page Dec 7, 2025 · 83 revisions
  • 7th December 2025: Work in Progress - AfterScan Refactoring
    • Development on the "Cleanup" branch encountered significant architectural roadblocks and has been officially sunsetted. All active development efforts are now focused on the "Refactoring" branch, which is dedicated to successfully converting AfterScan into a robust, object-oriented codebase. This process is inherently challenging, but I am hopeful that this attempt will succeed in establishing a stable foundation for the project.
  • 26th November 2025: Cleanup branch
    • Something I wanted to do since a while, but never found the moment to get started: Perform a cleanup of AfterScan code. Let's see what it gives. This will take a while, so I'll commit code not necessary tested, so use at your own risk (it might trash configuration or other files used by AfterScan)
  • 22nd November 2025: AfterScan 1.30.25
    • Add button to video generated popup to allow start video playback automatically after generation. Also a button in the main UI for the same purpose.
  • 22nd November 2025: AfterScan 1.30.24
    • Fix issues when no files exist in source folder, or source folder does not exist
  • 21st November 2025: AfterScan 1.30.23: Improve stabilization in extreme cases
    • Reduce threshold step from 20 to 5 while finding best template match while encoding
    • In match_template, stop trying more threshold values only if best_match_level is >= 0.99 (vs 0.85 before)
    • Add protection to prevent stabilize_image to be perform operations when not enabled
    • Allow discarding too big stabilizations also when navigating in AfterScan (conversion loop not running)
    • If calculate_frame_displacement_with_templates returns match_level=0, do not fall back to calculate_frame_displacement_simple
    • Reduce ratio to consider 'too big' a vertical shift from 15 to 10% of the total height
    • Change color of detected template boxes in FrameSync Editor to green, yellow and red
    • Factorize code to detect when calculated frame displacement is too much (sanitize_displacement)
  • 16th November 2025: AfterScan 1.30.22: Fix some mem leaks when updating canvases
    • Destroy canvases when closing FrameView Editor
    • Delete images before updating them in FrameView and other canvases
  • 16th November 2025: AfterScan 1.30.21 - Bug fixes and template handling improvements
    • Rename some variables and functions:
      • LeftStripeWidth to UserDefinedLeftStripeWidthProportion
      • set_hole_search_area to define_template_search_area
      • load_image to load_image_for_rectangle_definition
    • Factorize dimension adjustments code in adjust_dimensions_based_on_frame (so that it is performed after both frames and template have been loaded)
    • Fix exception in delete_current_bad_frame_info due to unused parameter
    • Add parameter (calculated) to get_image_left_stripe so that left stripe is returned based on user defined proportion, or calculated width based on template
    • Call define_template_search_area after defining custom template
    • Properly update framesync editor when loading a project with a different resolution
    • Make FrameSync viewer size homogeneous independently of frame resolution
  • 14th November 2025: AfterScan 1.30.20
    • Set hourglass cursor on startup while display is arranged
    • Source folder entry was not refreshed when running in batch mode (although it was correctly taken as source)
  • 12th November 2025: AfterScan 1.30.19
    • Bugfix: Displayed frame was not updated when loading a new source folder
  • 11th November 2025: AfterScan 1.30.18 - Bug fix
    • Fix match_template function: When High-accuracy alignment was not selected, match was too loose, causing misalignments in some cases."
  • 11th November 2025: AfterScan 1.30.17 - Bug fixes
    • Display hourglass cursor when loading project (not perfect, but better than nothing)
    • Avoid UI updates while it is not fully initialized
    • Fix bug in get_target_position: Gap of 30 pixels was not proportional to image width
    • Prevent multiple updates when moving the slider (only refresh when mouse button released, or key pressed)
    • Rename 'Compensation' label to 'Offset X/Y'. Also correct tool tips in associated spin boxes.
    • Fix bug in FrameSync Editor: When High sensitivity detection enabled, frames with Quality threshold >= 0.9 were wrongly categorized as misaligned, due to operator priority (parenthesis added)
    • For misaligned frame detection, only the match index was used (when match was too bad). Now we add also frames for which the calculated displacement differs too much from the average one.
  • 10th November 2025: AfterScan 1.30.16 - Fix several bugs affecting resolutions other than 2028 × 1520
    • Fix bugs affecting resolutions other than 2028 × 1520 (custom templates not working properly)
    • Add new option in settings to allow set a specific template area (to search templates, and define custom templates), as a percentage of total frame width).
  • 1st November 2025 - AfterScan 1.30.14 merged to master
  • 16th March 2025 - AfterScan 1.30
    • Fix cropped canvas position, after fixing tkinter create_image vs itemconfig issue
    • Fixed treeview font not set when loading lob list on startup
    • Add more fields to job description
    • Fix wrong double preview image displayed when switching to a different job
    • Fix incorrect usage of create_image, replace by itemconfig. Fix issues derived from this change.
    • Correct canvas size
    • Harmonize fonts for small mode (-1)
    • Change name of 'stabilization shift' to 'compensation'
    • Update preview with filters (denoise, sharpen, gamma correction) when changing values
    • Stabilize compensation, added to compensate for films not vertically symmetrically aligned
    • Add some items to job description
  • 7th March 2025 - AfterScan 1.20.14
    • Set frame slider below the preview image (to have more precision when trying to find a section)
    • Fix template scale bug when starting AfterScan with a resolution different from 2028x1520
    • Replace R8 template by another with less height, otherwise frames shifted too much to the bottom are not stabilized
    • Delete project bad frame files when clicking on FrameSync button
    • Convert bad frame list file elements to dictionaries
    • Add AfterScan logo
    • Bugfix: Error when deleting bad aligned frames file
    • Fix bug when encoding with FrameSyncEditor opened
    • Fix several bug when loading/saving job lists (mainly when switching between different source folders)
    • Added some code to help debugging FrameSync editor
    • Fixed some bugs in FrameView editor (still some work to be done)
    • Fixed bug in job list: Jobs with name (=video filename) longer that 25 characters were accepted, but failed to be managed. Length is extended to 50, and limited at the source (same for the Video Title)
    • Double click on fields 'Frame Range' from and to were updated to current frame if they were empty. Now they ar ealso updated in they contain '0'
    • Create dedicated extension for job lists ('.joblist.json')
    • Create dedicated extension for bad frame lists ('.badframes.json')
    • Fix issue with Gamma Correction set to zero or negative values
    • Convert job listbox to treeview (to allow job list with columns)
    • Fix bug in job list mode: Current settings not refreshed when adding new job
  • 4th March 2025 - AfterScan 1.20.08
    • Save json file formatted
    • Add last check date to configuration
    • Add Menu bar (with help links, plus joblist load/save)
    • Adjust template code to properly handle different resolutions
    • Modify S8 template so that it only takes lower part of hole, otherwise it will not match different zoom levels from ALT-Scann8
    • Maintain consistent size of template samples in FrameSync Editor independently of the image resolution (and keep the reduction ratio in a global var)
    • Fix bug in TemplateList that was causing erratic display of templat ein FrameSync Editor. Also, fix two unused functions, just in case
    • Remove condition when calling FrameSync_Viewer_popup_update_widgets (condition is already checked inside)
    • Draw template rectangle after reducing images in FrameSycn Editor (to avoid artifacts)
    • Throttle frames displayed while encoding to avoid too much queuing
  • 3rd March 2025 - AfterScan version 1.20.05
    • Fix several bugs in stabilization code
    • Add template detected rectangle in BW image in FrameSync Editor popup
    • Scale default templates to image resolution
    • Update scales in template list when loading new source folder
    • Bugfix: Perform fake fill also when saving corrected frames
    • Prevent negative gamma correction values
    • OpenCV temporalDenoising added (but does not work in Ubuntu). Default to fastNlMeansDenoisingColored otherwise
    • Add denoise filter hqdn3d in FFmpeg (when denoise selected)
    • In FrameSync Editor, select previous/next frame with deviation bigger than 5 pixels when pressing Ctrl-PgUp/PgDn
    • Adjust left stripe depending on usage (20% for display, 30% for search)
    • Add new R8 template (bottom hole only)
    • Add validation of template files to make sure they are the expected ones
  • 1st March 2025 - AfterScan version 1.20.02
    • All recent changes merged to master branch
    • Add anonymous usage counter (only anonymous hash + version sent to server).
  • 24rd February 2025 - AfterScan version 1.20.01
    • Move up threshold controls in FrameSync Viewer to show thy should be used in preference.
    • Some minor bug fixes
  • 23rd February 2025 - AfterScan version 1.20 (Only in develop branch for now. Please open issues if any problems)
    • Improved stabilization algorithm, with dynamic thresholding. It brings two stabilization modes:
      • Default: Already better than in previous versions
      • High-accuracy alignment: Even better stabilization, at the cost of slower processing
    • FrameSync Viewer: Misaligned Frame monitor/editor
      • Allows to monitor in real time the stabilization done by AfterScan
      • Detects and adds to an internal list frames that are not perfectly aligned (again, two levels, either those that are clearly nos aligned, or include also those which are only slightly misaligned (quite often not visible to the eye)
      • Also, for the perfectionists, once encoding is over it allows to manually adjust misaligned frames to exactly match the template being used
    • New dedicated folders:
      • Resources: To store:
        • Custom templates defined by the user (existing custom templates created with previous version will be copied over from the 'tmp' folder)
        • Lists of misaligned frames (per source folder), to allow postponing the manual edition
      • Logs: For log files (old logs will NOT be copied over from 'tmp')
    • Bugs fixed:
    • Video generation stuck at the end: This bug was found almost a year ago, now it has been fixed (via tunning of ffmpeg command line)
    • Normalize job names: Before, Job name (as shown in the Job list) was made up of all the elements displayed in the listbox, which was causing problems when handling the list. Now only the video filename is used (and enforced i fnot entered), so that handling is more consistent
    • Plenty of minor other bugs fixed everywhere, details in the commits details
  • 3rd February 2025 AfterScan 1.11.12
    • Fix bug in Mac OS: Main window size too small to contain all widgets
    • Fix issue with custom template filenames: Default filename and specific filename (based on video filename) where mixed up at project load time, which was a problem specially when processing job lists.
    • Allow pasting current frame in from/to edit boxes by clicking the mouse middle button, even if the edit box is not empty (but content must not be selected, otherwise it will be added on top)
  • 25th November 2024: AfterScan 1.11.9 (delivered only in develop branch)
    • Bug fixed: Error when defining custom template with frames using resolutions lower than 2028x1520
  • 06th Aug 2024: AfterScan 1.11.8
    • Bug fixed: When encoding using PNG files as input, JPG files were generated on the output folder. Caused by a regression durign HDR implementation.
  • 05th Aug 2024: AfterScan 1.11.7
    • Disable low contrast checkbox while running
  • 02nd Aug 2024: AfterScan 1.11.6
    • Fix problems with low contrast films
      • Add new checkbox 'Low contrast helper'
      • Only when new checkbox selected, use OTSU algorythm for thresholding (both when defining custom template, and when stabilizing image)
    • Reorganize stabilization/cropping controls to allow placing new checkbox
  • 20th Jul 2024: AfterScan 1.11.5
    • Revert disabling custom template to original code
    • Display smaller custom template and crop windows when using -1 command line parameter
  • 20th Jul 2024: AfterScan 1.11.4
    • Rename 'aux' folder to 'temp'
    • Retrieve film type detection templates from main folder, not from aux/temp folder
    • Allow defining custom template when expert mode disabled
    • Allow disabling custom template by clicking on the button while enabled
  • 25th Feb 2024: AfterScan 1.11.3
    • Updated AfterScan to use Class Tooltips (same as ALT-Scann8). No functional changes
    • If you get this version, remember to update as well tooltip.py
  • 7th Feb 2024: AfterScan 1.11.2
    • Few UI fixes
    • Set 1600x1200 as default video resolution (closest one to generated frames)
    • Set 'VeryFast' as default video encoding speed
    • Recover stabilization extended search. Makes sprocket hole search area 50 pixels wider
  • 5th Feb 2024: AfterScan 1.11.0
    • Added Gamma correction feature. Good alternative to multi-exposure (faster and, I would say, better)
    • Fixed issue where application was hanging on exit due to crashed threads
    • Display template debug rectangles only in popup window: It means template match can now be monitored while encoding, without affecting the resulting image
    • After frame encoding has concluded, leave the average match quality visible in the widget, while generating video (it will also be added to the csv filename, if enabled)
    • Default templates for S8 and R8 are now at 1:1 scale with the default image size (2028x1520), and resized for other dimensions
    • Code cleanup - Template handling factorized in two classes, code is now clearer. Due to this change backwards compatibility is dropped, as conversion would add too much complexity to the code.
      • As a result of this change, default templates for S8/R8 now work better, you might want to give them a try ✅
    • Disable job list while encoding, to prevent problems if clicked
    • Prevent mix of jpg and png in source folder. Even if it looked as a good idea, it is not. Jpg takes priority in case of mix
    • Several miscellaneous bugfixes everywhere (details in the commits)
  • 1st Feb 2024: AfterScan 1.10.6 (in develop branch)
    • Main change in this version is technical (code cleanup in template handling area)
    • Also included some small (but relevant) changes that I have the sensation have made some noticeable improvement in stabilization area, in case you want to try (and provide feedback). If you do, remember to refresh the templates (Pattern*.jpg files) as well. Also to note, format of config files (*.json) has changed, and backward compatibility is not maintained.
  • 26th Jan 2024: AfterScan 1.9.31
    • Bugfix: Batch mode sometimes not starting
    • Bugfix: Prevent error if template is wider than search area
    • Bugfix: When generating video sometimes an error was raised due to missing frames, when none was missing
    • During stabilization, ignore vertical shift if bigger then 350 pixels (too bad to be corrected)
    • Add 'video time' counter in current frame box
  • 23rd Jan 2024: AfterScan 1.9.22
    • Bring back 'Custom template button'. Automatic templates stay as default option, but since they were not working fine in all cases custom template button is reinstated as a regular option.
    • Fix random error happening when stopping threads
    • Various fixes and enhancements related to this change
    • New option available in 'Extra options' (-x in command line): 'Display template troubleshooting info'. Useful to determine the quality of a custom template. Displays the template itself as well and the match in the target image, together with some technical info used during the development. Can be used with and without stabilization enabled, which can be used to have some visual feedback about how good (or bad) a custom template is.
  • 19th Jan 2024: AfterScan 1.9.8 - No functional changes, just splitting the tooltip code to dedicated module to allow sharing it with ALT-Scann8
  • 18th Jan 2023: AfterScan 1.9.6 - Tooltips added for each widget. Also some fixes released just after in version 1.9.7:
    • Allow disabling fixes globally using command line option '-n'
    • Do not display tooltip if widget is disabled
  • 17th Jan 2024: AfterScan 1.9.5 - Several changes to make the Automatic stabilization feature implemented in 1.9.0 more stable (pun intended)
    • Automatic stabilization: settings are now stored per project (to allow correct processing in batch mode)
    • In the 'stabilize_image' function, removed THRESH_TRIANGLE option when thresholding image since it was not only not helping, but making things worse in some cases.
    • Small screen mode (when using less that full HD resolutions). Enables with '-1' command line option
    • Removed 'precise/fast' stabilization options as they were not making any difference (and 'precise' mode was making encoding much slower, for nothing)
    • Few adjustments everywhere in the UI to have correc display in both modes (small and big screen)
    • Bugfix: Corrected issue in film type detection: Checking horizontal instead of vertical position of the hole matching template
    • Bugfix: When editing a job in the joblist and adding it back, it was not keeping the same position (even if it appeared to be in the UI)
  • 13th Jan 2024: AfterScan 1.9.0
    • Stabilization is now automatic: 'Custom template' button has been removed (can be activates using -e command line option)
    • Big reels compiling different films, specially if they have been created from films shot with different cameras, should be encoded film by film, as different cameras might produce film with sprocket holes at slightly different positions, so the resulting stabilized position will be different if mixed
    • Required initialization might take a bit when loading new frames: A message and hourglass cursor will appear during initialization
    • DO NOT FORGET to update the 5 included templates, they have been changed and the new versions are critical for the new automated stabilization process to work correctly:
      • Pattern.R8.jpg
      • Pattern.S8.jpg
      • Pattern_BW.jpg
      • Pattern_WB.jpg
      • Pattern_Corner_TR.jpg
    • Please report any bugs you might find, there are quite a lot of changes and I'm sure I have not run through all the possible paths
  • 5th Jan 2024: AfterScan 1.8.22: Improvement sin the rectangle selection for cropping and custom template definition
    • Default area proposed when first defining custom template (in a future version this should become the default)
    • Persist rectangle selection (for both cropping and custom template) to allow modifying existing one
    • Added extra key codes to modify the selected rectangle (OS specific behavior might happen, use alphabetic keys to avoid it). Recodnized keys: 'U' (up), 'D' (down), 'L' (Left), 'R' (right), 'W' (wider), 'N' (narrower), 'T' (taller), 'S' (shorter)
  • 3rd Jan 2024: Added a FAQ page in the wiki
  • 31st Dec 2023: AfterScan 1.8.18. Improved stabilization when working in multi-exposure mode by using first exposure when second exposure (the default one used for stabilization) does not produce good results. Being darker, sprocket hole pattern detection in the first frame can give better results, specially with fil which is transparent around the hole zone

Frame #1

HDR Frame #1, better contrast to allow OpenCV to find the hole pattern

Frame #2

HDR Frame #2, hole pattern not visible

  • 29th Dec 2023: When handling multi-exposure captures, AfterScan should be able now to handle anything between 2 and 5 exposures. By default ALT-Scan8 now generates 3 exposures, instead of 4. Pending to be tested
  • 19th Dec 2023: AfterScan 1.8.12 released. Fixes known windows-specific issues. Tested on Ubuntu and Windows, but not on Mac (feedback on this platform is welcome)
    • One new dependency added: MatPlotLib (due to change to allow titles to work in Windows, hopefully on Mac as well)
  • 17th Dec 2023: AfterScan 1.8.5 and later do not work in Windows. This issue tracks the problem. You can use version 1.8.4 while problem is fixed.
  • 12th Dec 2023: AfterScan 1.8.7 - Allow moving job list entries
    • Entries in job list can now be ordered using 'U' and 'D' keys to move them up an down
  • 11th Dec 2023: AfterScan 1.8.6 - Bugfixes and minor changes
    • Fixed a couple of bugs where AfterScan would hang when cancelling encoding before the end. Also some minor changes (details in commit comment)
  • 10th Dec 2023: AfterScan 1.8.5 - Multi-threaded encoding
    • Due to the features added in the last weeks (especially multi-exposure encoding) AfterScan became slower than it used to be. In order to mitigate that slowdown a bit I have added multi-threaded processing when encoding frames. The gain is a bit over 2X for standard encoding, and a bit below 2X for multi-exposure encoding. Not a revolution but still cutting the encoding time in half. Let me know if you experience any abnormal behavior (multi-threaded code is tricky, there might be still some bugs apart from the ones I already found during the development)
  • 9th Dec 2023: Added new option to sharpen output. Also corrected denoise option since the parameters were wrong, and a lot of details was lost in the resulting image, now it looks better
  • 5th Dec 2023: Expert mode and CSV generation enabled by default
  • 4th Dec 2023: Recover original stabilization algorithm
    • Since the new algorithm, more precise, was quite slow, the original one is reinstated as the default option. The new algorithm is kept (optimized) as an option (by selecting the 'precise' radio button) in case it is useful in some specific case
    • Rearranged widgets i order to accommodate the new stabilization radio buttons for previous option
    • Added two new options in the FPS list: 8 and 9. Apparently some cameras could be set to film at half speed in order to get double duration for the same film length (or at least I came across one such film)
    • Some other bug fixes and minor changes (details in the commits comments)
  • 2nd Dec 2023: Hybrid encoding. It is now possible to alternate capture modes in ALT-Scann8 (changing from standard capture to multi-exposure and viceversa) within the same film scan session. Afterscan will recognize the mode change while running, and encode each fragment accordingly (with or without Mertens merge).
  • 28th Nov 2023: Bug fixed, previous version was always using multi-exposure encoding flow, causing standard capture encoding to fail.
  • 21 st Nov 2023: Integration of OpenCV Mertens merge in AfterScan
    • AfterScan can now process directly frames scanned in ALT-Scann8 in HDR mode, using OpenCV Mertens merge algorithm. Bash script no longer needed
    • Some other changes associated to this, details in commit comment
  • 20th Nov 2023: Added denoise option (using OpenCV fastNlMeansDenoisingColored). Do not like it much, I think it removes details from the images.
  • 18th Nov 2023: Added dynamic threshold. When detecting sprocket hole template, if the match level returned by OpenCV is less than 0.9, additional retries will be done, decreasing the threshold level by 10 each retry, until a match level of 0.9 or higher is reached. If a threshold level of 50 is reached, then the best match level found so far is retained. With this change, I have been able to reduce the percentage of misaligned frames from 4.2% to 1.4%. The drawback is that it takes a bit longer (due to additional retries for badly matched frames) but the end result is worth the wait.
  • 7th Nov 2023: Visual feedback on hole template match quality. Displayed to the right of the threshold value, it varies from 0 (worst) to 1 (best), which background color from red to green. If match quality if not good, you can try to improve by selecting a different template area, or changing the threshold value (most of the time increasing it). Please note the threshold value also applies when defining a custom template.

image

  • 11th Oct 2023: In AfterScanAnalysis, fixed an issue that was causing the bar chart display to be too slow. Now it is really usable in order to examine the quality of the stabilization done by AfterScan and, if required, repeat specific sections with different settings.
  • 9th Oct 2023: Added field 'Video title' to allow inserting a title sequence in the video being generated. The title sequence duration will be between 5 and 10 seconds depending on the title length. Title can contain real newlines (not escaped), pasted from an external source (like notepad). The background while title is displayed is randomly extracted from the video, visualized at half speed.
  • 8th Oct 2023: UI Cleanup done: Some minor changes to have the UI more organized. Also a couple of bugs fixed (cropping aspect ratio not honored it checkbox not selected just before editing, still some popup appearing during batch mode)
  • 30th Sep 2023:
    • Improved frame alignement algorithm. Sometimes, when captured frames are quite misaligned, it can happen that part of the hole template is out of the captured frame. To help with these cases the hole template match algorithm is extended so that it will try as well to match separately the upper and lower halves of the template. Once all the matches have been attempted, the one given the highest score will be used for frame repositioning (however, with the latest changes done in ALT-Scann8, this should not bee needed often now).
    • Created 3 alternatives to handle frames not captured in full:
      • No frame fill: Leave non-captured area empty (back)
      • Fake fill: Use part of the next/previous frame contained in the same capture to fill-in the missing part (not perfect, but better than blank). Please note this option required the cropping to encompass the full height of the film frame, otherwise it wont work.
      • Dumb fill: Just extend till the upper/lower edge the last row of pixels before the empty space
  • 29th Sep 2023: Some improvements to batch job handling:
    • Items in batch job can now be loaded in the main UI (using return key, or mouse double click)
    • If saving an item with the same name, you are given the choice to overwrite the existing one (so with the previous point, you can now edit items in batch job list).
    • It is now possible to use the keyboard to delete ('D' key') or rerun ('R' key) jobs in the list

Clone this wiki locally