Setup crop - #705
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors and improves the crop correction workflow in the application, making the handling of crop corners more robust and user-friendly. The main changes include switching from an ordered list of crop points to named corners throughout the codebase, updating configuration formats, and enhancing the GUI to support interactive crop correction. Additionally, the configuration loading and saving logic is improved for better reliability.
Core logic and configuration changes:
crop_assistant.py) now classifies selected points into named corners (top_left,bottom_left,bottom_right,top_right), making the crop process robust to the order in which points are selected. The configuration output now uses these named corners instead of an ordered list. [1] [2] [3] [4] [5] [6] [7]config.json,config_co2.json) and the configuration loader (curvature.py) are updated to use named corners for the crop region. The loader reconstructs the legacypts_srcas needed for backward compatibility. [1] [2] [3] [4]cropmethod in the curvature correction class is removed, as the new approach supersedes it.GUI and workflow enhancements:
Bug fixes and minor improvements:
These changes make crop correction more reliable, improve user experience, and ensure the configuration format is consistent and future-proof.