Search code examples
pythonopencvcomputer-visionyoloyolov4

How to fill/blur the inside of bounding box in YOLO object detection?


I have used YOLOv4 to detect objects in an image now I want to blur those objects or superimpose black color inside the bounding box. How can I do that using OpenCV or some other library?


Solution

  • cv2.rectangle(frame, (x, y), (x + w, y + h), color, -1)

    I just changed the width of the bounding box and it worked.

    Thank you @micka