用python和mongodb存储大量彩色图像直方图

2024-10-08 20:22:14 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用这个函数。问题是如何存储输出

def makehistogram(img_path1):
    base = cv2.imread(img_path1)
    base = cv2.resize(base,(360,480))
    basehsv = cv2.cvtColor(base,cv2.COLOR_BGR2HSV)
    histbase = cv2.calcHist(basehsv,[0,1],None,[180,256],ranges=None)
    histbase1 = cv2.normalize(histbase,histbase,0,255,cv2.NORM_MINMAX)
    return histbase1

Tags: 函数noneimgbasedefcv2colorimread

热门问题