Skip to content

Coordinate Conventions

Zhiang Chen edited this page Dec 9, 2020 · 1 revision

Conventions

1. image coordinate systems

image_coord.png

2. bounding box coordinate system

image_coord.png

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]

3. camera coordinate system

pinhole_camera_model.png