svm.py 文件源码

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

项目:test-automation 作者: openstax 项目源码 文件源码
def rgb_histogram(self):
        self.threshold = 0.999999999999999
        hist_i = cv2.calcHist([self.image_i], [0, 1, 2], None, [8, 8, 8], [0, 256, 0, 256, 0, 256])

        hist_j = cv2.calcHist([self.image_j], [0, 1, 2], None, [8, 8, 8], [0, 256, 0, 256, 0, 256])

        hist_flatten_i = hist_i.flatten()
        hist_flatten_j = hist_j.flatten()

        self.measure = cv2.compareHist(hist_flatten_i, hist_flatten_j, cv.CV_COMP_CORREL)

        self.assertGreater(self.measure, self.threshold)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号