-
Notifications
You must be signed in to change notification settings - Fork 0
Coordinate Conventions
Zhiang Chen edited this page Dec 9, 2020
·
1 revision
Bounding box uses the drawing coordinate system. The following is an example
bbox = np.array([[[291,187],[405,187],[291,267],[405,267]]])
If we want to crop an image with a bounding box,
(xmin, ymin, boxw, boxh) = cv2.boundingRect(bbox[0,:,:].astype(int))
roi = img[ymin:ymin+boxh,xmin:xmin+boxw]