img = cv2.imread(pic_path) h, w = img.shape[0] w表示横方向的长度,h表示纵方向的长度,一般我们表示坐标位置都是横轴为x,纵轴为y,所以中心点坐标应该表示为 (w/2, h/2)