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.
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user