Skip to content
Advertisement

How to draw a rectangle around a region of interest in python

I’m having trouble with import cv in my python code.

My issue is I need to draw a rectangle around regions of interest in an image. How can this be done in python? I’m doing object detection and would like to draw a rectangle around the objects I believe I’ve found in the image.

Advertisement

Answer

please don’t try with the old cv module, use cv2:

JavaScript

[edit] to append the follow-up questions below:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement