From 8c1efb1b05a65817dd7afd96f5c65e477b8047f3 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Fri, 26 Sep 2025 14:27:40 +0200 Subject: [PATCH] Add template selection rectangle visualization in VideoEditor This commit introduces a new feature in the VideoEditor that allows users to visualize the template selection rectangle on the canvas. The rectangle is drawn in magenta, enhancing the user interface and providing clearer feedback during template selection. This update complements the existing functionality for selective feature deletion and improves overall usability. --- croppa/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/croppa/main.py b/croppa/main.py index 885be61..0112873 100644 --- a/croppa/main.py +++ b/croppa/main.py @@ -2886,6 +2886,11 @@ class VideoEditor: x, y, w, h = self.selective_feature_deletion_rect cv2.rectangle(canvas, (x, y), (x + w, y + h), (0, 0, 255), 2) # Red for deletion + # Draw template selection rectangle + if self.template_selection_rect: + x, y, w, h = self.template_selection_rect + cv2.rectangle(canvas, (x, y), (x + w, y + h), (255, 0, 255), 2) # Magenta for template selection + # Draw previous and next tracking points with motion path visualization if not self.is_image_mode and self.tracking_points: prev_result = self._get_previous_tracking_point()