def run(name): images = get_images(name) try: os.mkdir(os.path.join(IMG_OUT_FOLDER, name)) except: print "dir exists" n = npr.Npr(images, name=name) results = n.run() for k, v in results.items(): file = k + '.jpg' cv2.imwrite(os.path.join(IMG_OUT_FOLDER, name, file), v)
def test_colorize(self): n = 'wine' npr = NPR.Npr(self.images[n], n) cam = npr.colorize() self.assertTrue(cam)
def test_create_attenuation_map(self): n = 'bone' npr = NPR.Npr(self.images[n], n) cam = npr.create_attentuation_map() self.assertTrue(cam)
def test_render_edges(self): n = 'flower' npr = NPR.Npr(self.images[n], n) re = npr.render_edges() self.assertTrue(re)
def test_depth_edge_detection(self): n = 'flower' npr = NPR.Npr(self.images[n], n) dde = npr.detect_depth_edges() self.assertTrue(dde)