Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@yxlao
Copy link
Owner

@yxlao yxlao commented Dec 3, 2025

Summary

This PR significantly enhances the bounding box drawing tool by introducing interactive controls, improved visualization modes, and better user feedback. The changes modernize the UI/UX while maintaining backward compatibility.

Changes Made

  • Replaced matplotlib-based rectangle rendering with OpenCV-powered image overlay techniques for more accurate and performant bbox drawing
  • Added interactive button controls for line width adjustment (+/-), square mode toggle, and enlarged view toggle
  • Implemented square mode (s key or button) to constrain bounding boxes to 1:1 aspect ratio during drawing and editing
  • Added enlarged view mode (e key or button) that displays a zoomed inset of the selected region in the opposite corner
  • Introduced dashed bounding box visualization during interaction, switching to solid lines for final output
  • Refactored internal state management to track current_bbox as a simple tuple rather than managing multiple rectangle objects
  • Improved figure sizing logic to dynamically scale based on number of images while capping maximum width
  • Enhanced keypress and button press logging with consistent formatting
  • Centralized image rendering logic in _generate_current_images() to ensure WYSIWYG behavior between preview and saved output
  • Updated help messaging to reflect new controls and behaviors
  • Removed legacy rectangle copying and matplotlib patch management code

@yxlao yxlao changed the title refactor(crop_borders): rename crop_boarders to crop_borders for consistency feat(draw_bboxes): add interactive bbox drawing with enhanced controls Dec 3, 2025
@yxlao yxlao changed the title feat(draw_bboxes): add interactive bbox drawing with enhanced controls feat(draw_bboxes): interactive bbox with enlarged area Dec 3, 2025
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.

2 participants