HOG.py 文件源码

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

项目:PaintingToArtists 作者: achintyagopal 项目源码 文件源码
def local_par_hog(images):
    inst = list()
    HOGDESC = cv2.HOGDescriptor()

    for image in images:
        img, label = image
        img = read_color_image(img)
        img = cv2.resize(img, (128, 128), interpolation = cv2.INTER_AREA)
        descriptor = HOGDESC.compute(img)
        if descriptor is None:
            descriptor = []
        else:
            descriptor = descriptor.ravel()
        pairing = Instance(descriptor, label)
        inst.append(pairing)
    return inst
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号