I have set the left side of red line vertically as the region of interest. Trained a model to detect licence plate where boxes contains the detected object coordinates within ROI. The bounding box appears even before the entire object is within the region of interest. I want the bounding box to appear only after the entire object is within the ROI. This is my code for the bounding box.
x, y, w, h = boxes1[i]
label = ""
color = (0, 0, 255)
cv2.rectangle(frame, (x, y), (x + w, y + h), color, 2)
boxes1[i]- Guang