histogram.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:QScode 作者: PierreHao 项目源码 文件源码
def histogram(self, image, mask=None):
        #Extract a 3D color histogram from the masked region of the image, using
        #the supplied number of bins per channel, then normalize the histogram
        new_im = imcrop(image)
        hist = cv2.calcHist([new_im], [0, 1, 2], mask, self.bins,[0, 256, 0, 256, 0, 256])
        hist = cv2.normalize(hist).flatten()
        return hist
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号