ymj_bim_test/test.py

19 lines
315 B
Python
Raw Normal View History

2025-03-02 16:25:35 +08:00
import cv2
from utils import get_hd_cam_rect
def _darw_rect(im):
x, y, w, h = get_hd_cam_rect(0)
print(w)
print(h)
cv2.rectangle(im, (x, y), (x + w, y + h), (0, 255, 0), 5)
sub_im = cv2.imread("data_sub/test_1/wide_image.png")
_darw_rect(sub_im)
cv2.imshow("sub_zero", sub_im)
cv2.waitKey(0)