diff --git a/secure_pixelation/__main__.py b/secure_pixelation/__main__.py index cc4b6cd..4fea3ce 100644 --- a/secure_pixelation/__main__.py +++ b/secure_pixelation/__main__.py @@ -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") diff --git a/secure_pixelation/get_bounding_boxes.py b/secure_pixelation/get_bounding_boxes.py index 0ca13e3..5924972 100644 --- a/secure_pixelation/get_bounding_boxes.py +++ b/secure_pixelation/get_bounding_boxes.py @@ -1 +1,16 @@ -# https://learnopencv.com/how-to-select-a-bounding-box-roi-in-opencv-cpp-python/ \ No newline at end of file +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)