test_colorconv.py 文件源码

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

项目:FCN_train 作者: 315386775 项目源码 文件源码
def test_rgb2hsv_conversion(self):
        rgb = img_as_float(self.img_rgb)[::16, ::16]
        hsv = rgb2hsv(rgb).reshape(-1, 3)
        # ground truth from colorsys
        gt = np.array([colorsys.rgb_to_hsv(pt[0], pt[1], pt[2])
                       for pt in rgb.reshape(-1, 3)]
                      )
        assert_almost_equal(hsv, gt)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号