Conversation
- Updated CMake configuration to append architecture suffix to .NET assembly outputs. - Enhanced GitHub Actions workflow with matrix builds for x64 and x86 architectures. - Updated README with revised build instructions and output details.
…image processing - Added `constexpr` variables for better clarity and reduced runtime computations. - Updated functions with `const` correctness and reduced memory allocations. - Replaced redundant logic with optimized implementations in contour and coordinate processing. - Enhanced debug logging for key functions.
…in contour processing
…tion over `coordinates`
# Conflicts: # .github/workflows/build-subvision-core.yml # CMakeLists.txt
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 focuses on improving code clarity, performance, and safety in the image processing and impact detection modules. The main changes include better use of
constandconstexprfor variables, more efficient memory management, and safer mathematical operations. Additionally, there are refactorings to simplify logic and enhance code readability, especially in contour and ellipse processing.Image and contour processing improvements:
image_processing.cppto useconstexprfor constants, avoid unnecessary allocations, and improve angle and area checks for contour validation. Mathematical operations now use squared magnitudes for efficiency and safety, and memory reuse is implemented for temporary vectors. [1] [2]std::max_elementfor finding the largest contour and introducing anemptyEllipsevariable for clearer fallback logic. All timing variables are nowconst, and the code is more robust against empty input.Impact detection and drawing optimizations:
const, and replaced manual string construction with more efficient approaches. Drawing logic is now clearer and uses precomputed values for better maintainability.constfor results and intermediate variables, ensuring immutability and safer code.General codebase improvements:
sheet_detection.cppand standardized variable initialization and memory management practices throughout the file.constfor timing and mask variables. The function now throws more informative errors and logs processing time in a standardized way.