test_pad_image.py 文件源码

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

项目:Robo-Plot 作者: JackBuck 项目源码 文件源码
def test_centre(self):
        # Request new centre below current centre
        new_centre = (100, 100)

        # Load image for testing.
        image = cv2.imread(os.path.join(self.path_to_test_data, 'pad_test_input.png'))
        image = cv2.resize(image, (200, 200))

        # Check image was loaded correctly
        if image is None:
            raise TypeError

        # Pad Image.
        modified_image = camera_utils.pad_image(image, new_centre)

        # Compare images
        self.assertTrue(not (np.bitwise_xor(modified_image, image).any()))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号