json_photo.py
import json
import numpy as np
import json
import cv2
import matplotlib.pyplot as plt
import json
path = 'img/3.json' #json文件路径
with open(path,'r') as f:
data = json.load(f)
#print(data)
# print(data['bbox'])
# print(data['bbox'][0][0])
#data中每个元素都是嵌套的字典
img = cv2.imread('img/3.jpg') #读入图像
copyimg=img.copy()#拷贝一份,不拷贝容易出错
res = []
res = res + data['bbox']
for i in range