Esempio n. 1
0
def preprocess(image):
    image = fixImage(image)
    glyphs = [glyph.convert("L") for glyph in segment.segment(image)]
    return map(fixGlyph, glyphs)
Esempio n. 2
0
 def _captchaTest(self, image, solution):
     debordered = tools.deborder(image)
     destriped = destripe.destripe(debordered)
     segments = segment.segment(destriped)
     self.assertEqual(len(segments), 3)
Esempio n. 3
0
 def _captchaTest(self, image, solution):
     debordered = tools.deborder(image)
     simplified = tools.simplify(debordered)
     destriped = destripe.destripe(simplified)
     segments = segment.segment(destriped)
     self.assertEqual(len(segments), 3)
Esempio n. 4
0
 def test_simple(self):
     image, solution = samples.getSample("algorithmTests",
                                         "segmentable.gif")
     segments = segment.segment(image)
     self.assertEqual(len(segments), 2)
Esempio n. 5
0
 def test_simple(self):
     image, solution = samples.getSample("algorithmTests", "segmentable.gif")
     segments = segment.segment(image)
     self.assertEqual(len(segments), 2)