feat: selecting single bounding box

This commit is contained in:
Hazel 2025-04-24 10:43:48 +02:00
parent 208f818e18
commit 3d9ecea560
2 changed files with 18 additions and 3 deletions

View File

@ -1,7 +1,7 @@
from .detect_humans import detect_humans
from .get_bounding_boxes import select_bounding_boxes
def cli():
print(f"Running secure_pixelation")
detect_humans("assets/human_detection/humans.png")
select_bounding_boxes("assets/human_detection/test.png")

View File

@ -1 +1,16 @@
# https://learnopencv.com/how-to-select-a-bounding-box-roi-in-opencv-cpp-python/
from __future__ import annotations
import cv2
import numpy as np
from .data_classes import RawImage
# https://learnopencv.com/how-to-select-a-bounding-box-roi-in-opencv-cpp-python/
def select_bounding_boxes(to_detect: str):
raw_image = RawImage(to_detect)
r = cv2.selectROI(raw_image.image)
print(r)