python opencv 获取图像的区域

python opencv 提取图像的区域

 

start_x = index_box[0]
start_y = index_box[1]
end_x = index_box[2]
end_y = index_box[3]
index_person_img = camera1_img[start_y:end_y,start_x:end_x]
index_person_img = cv2.cvtColor(index_person_img,cv2.COLOR_RGB2BGR)

 

 

#########################

posted @ 2022-11-06 20:05  西北逍遥  阅读(70)  评论(0编辑  收藏  举报