I have a line of code here that uses the python binding for opencv:
cv2.rectangle(img, (box[1], box[0]), (box[3], box[2]), (255,0,0), 4)
This draws a red rectangle on image img
of thickness 4
.
But is there a way the lines of the rectangles can be stylized? Not too much. Just dotted, or dashed, that's it really.
Try something like this:
you can use LineIterator and get any style you want in a few lines of code
OpenCV does not (currently) support line properties beyond thickness and anti-aliasing.