Skip to content

Fix cropping for non-overlapping rectangles - #303

Open
KiMomota wants to merge 1 commit into
OpenStitching:mainfrom
KiMomota:fix/cropper-non-overlap
Open

Fix cropping for non-overlapping rectangles#303
KiMomota wants to merge 1 commit into
OpenStitching:mainfrom
KiMomota:fix/cropper-non-overlap

Conversation

@KiMomota

Copy link
Copy Markdown

Fixes #39

What changed

  • Track the input rectangles that overlap the largest interior rectangle.
  • Skip non-overlapping images while keeping image, mask, and ROI indices aligned.
  • Treat edge-touching rectangles as non-overlapping.

Tests

  • Added a regression test with a non-overlapping rectangle in the middle of the input list.
  • python -m unittest tests.test_cropper passes.
  • All pre-commit hooks pass for the changed files.
  • The full suite ran locally; repeated runs showed two unrelated environment-sensitive failures in the existing performance timing check and a crop=False output-size tolerance check on Windows/OpenCV 5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cropper.prepare raises an exception when one rectangle does not overlap the ROI

1 participant