annotate pycaptcha/Captcha/Visual/Pictures.py @ 138:128507ac4edf

Initial commit for the stacked convolutional denoising autoencoders
author Owner <salahmeister@gmail.com>
date Sun, 21 Feb 2010 17:30:38 -0600
parents 4775b4195b4b
children
rev   line source
87
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
1 """ Captcha.Visual.Pictures
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
2
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
3 Random collections of images
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
4 """
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
5 #
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
6 # PyCAPTCHA Package
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
7 # Copyright (C) 2004 Micah Dowty <micah@navi.cx>
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
8 #
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
9
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
10 from Captcha import File
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
11 import Image
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
12
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
13
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
14 class ImageFactory(File.RandomFileFactory):
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
15 """A factory that generates random images from a list"""
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
16 extensions = [".png", ".jpeg"]
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
17 basePath = "pictures"
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
18
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
19
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
20 abstract = ImageFactory("abstract")
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
21 nature = ImageFactory("nature")
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
22
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
23 ### The End ###