Repository navigation
Fix line-by-line derotation for non-square images - #71
Merged
lauraporta merged 2 commits intoOct 16, 2026
Merged
Conversation
Signed-off-by: Sarthak <sarthakshreshtha345@gmail.com>
Member
|
Hi @Sarthak-Shreshtha01, see my comment in the issue :) |
- FullPipeline: keep the width as num_pixels_per_line, use the largest circle that fits for mask_diameter and (width // 2, height // 2) as the default center of rotation. - add_circle_mask: crop and pad rows and columns separately, which also keeps the frame size when the size minus the diameter is odd. - fit_ellipse_to_points: bound the center by the width and the height. - IncrementalPipeline: pass both sizes to the ellipse fit and log the offset from the actual image center instead of 128. - Rotator: keep the frame shape and center the rotation on the frame. Signed-off-by: Sarthak <sarthakshreshtha345@gmail.com>
Contributor
Author
|
@lauraporta Done. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #71 +/- ##
==========================================
+ Coverage 43.69% 45.08% +1.38%
==========================================
Files 14 14
Lines 1126 1129 +3
==========================================
+ Hits 492 509 +17
+ Misses 634 620 -14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lauraporta
approved these changes
Oct 16, 2026
lauraporta
left a comment
Member
There was a problem hiding this comment.
Thank you @Sarthak-Shreshtha01, it does look good to me. The queued test will not run as the mac os image has been retired, fixing this in a separate PR #72
lauraporta
merged commit Oct 16, 2026
9204b2b
into
neuroinformatics-unit:main
13 of 14 checks passed
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.
Use the image width for line length and horizontal coordinate bounds in derotate_an_image_array_line_by_line so non-square images can be derotated. The related tests pass, including the new test_derotate_non_square_image, test_derotate_non_square_image_with_center, and test_derotate_non_square_image_with_homography tests.
Fixes #67