Example #1
0
File: main.py Project: ralucas/npr
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)
Example #2
0
 def test_colorize(self):
     n = 'wine'
     npr = NPR.Npr(self.images[n], n)
     cam = npr.colorize()
     self.assertTrue(cam)
Example #3
0
 def test_create_attenuation_map(self):
     n = 'bone'
     npr = NPR.Npr(self.images[n], n)
     cam = npr.create_attentuation_map()
     self.assertTrue(cam)
Example #4
0
 def test_render_edges(self):
     n = 'flower'
     npr = NPR.Npr(self.images[n], n)
     re = npr.render_edges()
     self.assertTrue(re)
Example #5
0
 def test_depth_edge_detection(self):
     n = 'flower'
     npr = NPR.Npr(self.images[n], n)
     dde = npr.detect_depth_edges()
     self.assertTrue(dde)