def testImgStandardize_3(self): filepath = './data/testimg/testimg_3.png' img = ip.imgReadAndConvert(filepath) imgs, Position = ip.projectionSegmentation(img) standard_imgs = ip.imgStandardize(imgs, Position) self.assertEqual(len(standard_imgs), 6) for i in range(len(standard_imgs)): h, w = standard_imgs[i]['segment_img'].shape[:2] self.assertEqual(h, 32) self.assertEqual(w, 32)
def testProjectionSegmentation_3(self): filepath = './data/testimg/testimg_3.png' img = ip.imgReadAndConvert(filepath) imgs, Position = ip.projectionSegmentation(img) self.assertEqual(len(imgs), 6) self.assertEqual(len(Position), 6)