def get_image_stats(img, left=0, top=0, width=0, height=0):
crop_img = img[top:(top + height), left:(left + width)]
(means, stds) = cv2.meanStdDev(crop_img)
stats = np.concatenate([means, stds]).flatten()
return stats
评论列表
文章目录