Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Okay fixed an image set bug

  • Loading branch information...
commit 91fbb94d01905b2a037f48f191049705bcb37f1d 2 parents f50a2a0 + af29e04
Katherine Scott authored September 13, 2012

Showing 48 changed files with 737 additions and 829 deletions. Show diff stats Hide diff stats

  1. 26  .travis.yml
  2. 60  CHANGELOG.txt
  3. 107  README.markdown
  4. 9  SimpleCV/Camera.py
  5. 3  SimpleCV/Color.py
  6. 2  SimpleCV/ColorModel.py
  7. 5  SimpleCV/DrawingLayer.py
  8. 1  SimpleCV/Features/Blob.py
  9. 3  SimpleCV/Features/Detection.py
  10. 2  SimpleCV/Features/Features.py
  11. 2  SimpleCV/Features/Tracking.py
  12. 266  SimpleCV/ImageClass.py
  13. 37  SimpleCV/Shell/Shell.py
  14. 2  SimpleCV/__init__.py
  15. 32  SimpleCV/base.py
  16. BIN  SimpleCV/sampleimages/FSTest.png
  17. BIN  SimpleCV/sampleimages/FSTest2.png
  18. BIN  SimpleCV/sampleimages/FSTest3.png
  19. BIN  SimpleCV/sampleimages/FSTest4.png
  20. BIN  SimpleCV/sampleimages/FSTest5.png
  21. BIN  SimpleCV/sampleimages/greenscreen.jpg
  22. BIN  SimpleCV/sampleimages/logo.png
  23. 22  SimpleCV/tests/BOFTester.py
  24. 98  SimpleCV/tests/DisplayTester.py
  25. 292  SimpleCV/tests/MLTestSuite.py
  26. 3  SimpleCV/tests/README
  27. 45  SimpleCV/tests/TestFlann.py
  28. 8  SimpleCV/tests/cbdata.txt
  29. BIN  SimpleCV/tests/standard/test_hough_circle1.jpg
  30. BIN  SimpleCV/tests/standard/test_hough_circle2.jpg
  31. BIN  SimpleCV/tests/standard/test_image_new_crop0.jpg
  32. BIN  SimpleCV/tests/standard/test_image_new_crop1.jpg
  33. BIN  SimpleCV/tests/standard/test_image_new_crop2.jpg
  34. BIN  SimpleCV/tests/standard/test_image_new_crop3.jpg
  35. 2  SimpleCV/tests/testSystem.py
  36. 44  SimpleCV/tests/tests.py
  37. 1  SimpleCV/utils/cloud9
  38. 3  doc/HOWTO-RELEASE.txt
  39. 58  doc/conf.py
  40. 11  requirements.txt
  41. 154  scripts/install/ubuntu/simplecv-install.sh
  42. 4  scripts/install/ubuntu/stdeb.cfg
  43. 66  scripts/install/win/Building_The_Installer.rst
  44. 44  scripts/install/win/install.bat
  45. 47  scripts/mkvirt.py
  46. 53  scripts/virtualenv-bootstrap.sh
  47. 16  setup.py
  48. 38  simplecv.rb
26  .travis.yml
... ...
@@ -1,26 +0,0 @@
1  
-language: python
2  
-python:
3  
-  - 2.7
4  
-notifications:
5  
-  email: false
6  
-# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
7  
-before_install:
8  
-  - sudo apt-get update
9  
-  - sudo apt-get upgrade
10  
-  - sudo apt-get install libavformat-dev 
11  
-  - sudo apt-get install ffmpeg 
12  
-  - sudo apt-get install libcv2.1 
13  
-  - sudo apt-get install libcvaux2.1 
14  
-  - sudo apt-get install libhighgui2.1 
15  
-  - sudo apt-get install libcv-dev 
16  
-  #~ - sudo apt-get install libcvaux-dev 
17  
-  #~ - sudo apt-get install libhighgui-dev
18  
-  - sudo apt-get install python-opencv
19  
-# command to run tests, e.g. python setup.py test
20  
-install:
21  
-  - find /usr/ | grep 'cv2.so'
22  
-  - ln -s /usr/local/lib/python2.7/dist-packages/cv2.so ~/virtualenv/usr/lib/python2.7/dist-packages/cv2.so
23  
-  - python setup.py install
24  
-script:
25  
-- cd SimpleCV/tests/
26  
-- nosetests tests.py
60  CHANGELOG.txt
... ...
@@ -1,3 +1,63 @@
  1
+Changes in 1.3
  2
+-------------------------------
  3
+* These are by no order of importance:
  4
+
  5
+Webp image format support added
  6
+Read image EXIF data
  7
+YCrCb color space added
  8
+Image Equalize Added
  9
+IPython notebook support added (i.e. 'simplecv notebook' from command line)
  10
+Resize added
  11
+Merge Color Channels Added
  12
+Barcode library switched to zbar
  13
+drawRectangle added
  14
+findCircle added
  15
+Whitebalance
  16
+Keypoint detection and matching added (SURF, SIFT, and many others, see findKeypoints() docs)
  17
+Optical Flow added (see findMotion() docs)
  18
+Color Pallette generator added (see getColorPalette() docs)
  19
+Skeletonize added
  20
+Smart Threshold (a.k.a. Grab Cut) added, see smartThreshold() docs
  21
+Smart Find Blobs, findBlobs using Grab Cut, see smartFindBlobs() docs
  22
+Rewrote own Threshold function (a.k.a. Binarize), see threshold() docs
  23
+FloodFill added
  24
+FloodFill to mask added
  25
+DFTFilter added
  26
+HighPass filter added
  27
+LowPass Filter added
  28
+BandPass Filter added
  29
+Butterworth Filter added
  30
+Gaussian Filter added
  31
+Unsharpen Filter added
  32
+edgeIntersections added
  33
+Contour Fitting added
  34
+Line Fitting added
  35
+Sobel Edge Detection Added
  36
+CAMShift Tracking added (see track() docs)
  37
+Image area function added
  38
+ImageSet's added
  39
+Camera.live() function added
  40
+External Scanner Support added (see Scanner class docs)
  41
+Digital Camera Support added (i.e. point & shoot and SLR cameras)
  42
+Stereo Camera Support added
  43
+Logging Support added
  44
+Feature Overlap (inside, outside, above, below, etc) comparison functions added
  45
+Feature.show() added
  46
+Feature aspect ratio added
  47
+Feature distance functions added
  48
+Feature bounding box added
  49
+TONS and TONS of documentation added to everything!
  50
+
  51
+A special thanks in this release to anyone externally who has submitted
  52
+code.  A thanks to all those that made contributions for Google Summer of Code,
  53
+or those that help on the support forums.  A special thanks to the
  54
+Google Summer of Code students of 2012 for all their help in making
  55
+SimpleCV more awesome. Sorry this release took so long, as you can see
  56
+we have added tons of features, a lot probably not even listed above. (-xamox)
  57
+
  58
+
  59
+
  60
+
1 61
 Changes in 1.2
2 62
 -------------------------------
3 63
 scale - updated so it can be a value (eg Image.scale(0.5))
107  README.markdown
Source Rendered
@@ -29,11 +29,41 @@ For more code snippets, we recommend the [SimpleCV examples website](http://exam
29 29
 The easiest way to install SimpleCV is with the packages for your distribution (Windows, Mac, Linux) included on the website (http://www.simplecv.org).  Although it is tested on many platforms there maybe scenarios where it just won't work with the package installer. Below is instructions on how to install, if you have problems please see the troubleshooting section at the end of this README file.
30 30
 
31 31
 ### Ubuntu 12.04
32  
-	sudo apt-get install ipython python-opencv python-scipy python-numpy python-pygame python-setuptools python-pip
  32
+	sudo apt-get install ipython python-opencv python-scipy python-numpy python-pygame python-setuptools python-pip 
33 33
 	sudo pip install https://github.com/ingenuitas/SimpleCV/zipball/master
34 34
 
35 35
 then just run 'simplecv' from the shell.
36 36
 
  37
+### Virtualenv
  38
+
  39
+This is how to install SimpleCV under a python virtual environment [virtualenv] (http://www.virtualenv.org).  This maybe useful in cases where you want to keep your system libraries clean and not install extra libraries.  This method has only been tested on Ubuntu 12.04, it maybe possible to port to other operating systems.
  40
+
  41
+Run the following commands:
  42
+
  43
+    sudo apt-get install python-opencv python-setuptools python-pip gfortran g++ liblapack-dev libsdl1.2-dev libsmpeg-dev mercurial
  44
+    sudo pip install virtualenv
  45
+    virtualenv venv
  46
+    cd venv
  47
+    mkdir src
  48
+    ln -s /usr/local/lib/python2.7/dist-packages/cv2.so lib/python2.7/site-packages/cv2.so
  49
+    ln -s /usr/local/lib/python2.7/dist-packages/cv.py lib/python2.7/site-packages/cv.py
  50
+    ./bin/pip install https://github.com/numpy/numpy/zipball/master
  51
+    ./bin/pip install https://github.com/scipy/scipy/zipball/master
  52
+    ./bin/pip install PIL
  53
+    ./bin/pip install ipython
  54
+    mkdir src
  55
+    wget -O src/pygame.tar.gz https://bitbucket.org/pygame/pygame/get/6625feb3fc7f.tar.gz
  56
+    cd src
  57
+    tar zxvf pygame.tar.gz
  58
+    cd ..
  59
+    ./bin/python src/pygame-pygame-6625feb3fc7f/setup.py -setuptools install
  60
+    ./bin/pip install https://github.com/ingenuitas/SimpleCV/zipball/master
  61
+  
  62
+
  63
+
  64
+
  65
+
  66
+
37 67
 ### Arch Linux
38 68
     pacman -S python2-numpy opencv2.3.1_a-4 python-pygame python2-setuptools ipython2 python2-pip
39 69
     pip install https://github.com/ingenuitas/SimpleCV/zipball/master
@@ -76,7 +106,7 @@ Commands (for Snow Leopard)::
76 106
 
77 107
     mkdir ~/Code
78 108
     cd ~/Code
79  
-    /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
  109
+    ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
80 110
     brew install opencv
81 111
     brew install git
82 112
     brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi 
@@ -86,7 +116,7 @@ Commands (for Snow Leopard)::
86 116
     sudo ln -s /usr/local/lib/python2.6/site-packages/cv2.so /Library/Python/2.6/site-packages/cv2.so
87 117
     sudo ln -s /usr/local/lib/python2.6/site-packages/cv.py /Library/Python/2.6/site-packages/cv.py
88 118
     sudo easy_install pip
89  
-    sudo pip install hg+http://bitbucket.org/pygame/pygame
  119
+    sudo pip install https://bitbucket.org/pygame/pygame/get/6625feb3fc7f.zip
90 120
     curl -sO https://raw.github.com/fonnesbeck/ScipySuperpack/master/install_superpack.sh | source install_superpack.sh
91 121
     pip install https://github.com/ingenuitas/SimpleCV/zipball/master 
92 122
 
@@ -99,15 +129,38 @@ recommend using the Windows Superpack, available at <http://www.simplecv.org/dow
99 129
 If you already have Python, OpenCV or SciPy installed and want to keep things the way you like them, follow the directions below
100 130
 
101 131
 
102  
-Steps:
  132
+#### Install Prerequisties if they aren't already installed on your system:
  133
+
  134
+* Install Python 2.7: http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi
  135
+* Install Python Setup Tools for Windows: http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe
  136
+* Install the SciPy superpack: http://sourceforge.net/projects/scipy/files/scipy/0.9.0rc5/scipy-0.9.0rc5-win32-superpack-python2.7.exe/download
  137
+* Install the NumPy superpack: http://sourceforge.net/projects/numpy/files/NumPy/1.6.2/numpy-1.6.2-win32-superpack-python2.7.exe/download
  138
+* Install Pygame for windows: http://pygame.org/ftp/pygame-1.9.1.win32-py2.7.msi
  139
+
  140
+
103 141
 
104  
-* (OPTIONAL) Install MinGW for optional files and building openCV from source.  Make sure to include C/C++ Compiler and msys package.  http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/ 
105  
-* Install Python 2.7 http://www.python.org/getit/releases/2.7.1/
106  
-* Install Python Setup Tools for Windows http://pypi.python.org/packages/2.7/s/setuptools/ (See: http://stackoverflow.com/questions/309412/how-to-setup-setuptools-for-python-2-6-on-windows) 
107  
-* Install the SciPy superpack: http://sourceforge.net/projects/scipy/files/scipy/0.9.0rc5/scipy-0.9.0rc5-win32-superpack-python2.7.exe/download 
108  
-* Install OpenCV: http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.2/ (See: http://luugiathuy.com/2011/02/setup-opencv-for-python/)
109  
-* easy_install.exe simplecv (See: http://blog.sadphaeton.com/2009/01/20/python-development-windows-part-2-installing-easyinstallcould-be-easier.html)
  142
+#### Install OpenCV:
  143
+* Download OpenCV 2.3 Superpack: http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.3.1/OpenCV-2.3.1-win-superpack.exe/download
  144
+* Run the executable file and when it ask where to extract to use::
110 145
 
  146
+    C:\OpenCV2.3\
  147
+
  148
+
  149
+* (OPTIONAL) Install MinGW for optional files and building openCV from source.  Make sure to include C/C++ Compiler and msys package.  (http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/)
  150
+
  151
+Once these are installed you need to add Python to your Path, open a command line (start->run->cmd)::
  152
+
  153
+    SETX PATH C:/Python27/;C:/Python27/Scripts/;C:/OpenCV2.3/opencv/build/x86/vc10/bin/;%PATH%
  154
+    SETX PYTHONPATH C:/OpenCV2.3/opencv/build/python/2.7/;%PYTHONPATH%
  155
+
  156
+Exit the command line and reopen so it loads the updated python paths, then run::
  157
+
  158
+    easy_install pyreadline
  159
+    easy_install PIL
  160
+    easy_install cython
  161
+    easy_install pip
  162
+    pip install ipython
  163
+    pip install https://github.com/ingenuitas/SimpleCV/zipball/1.3
111 164
 
112 165
 ---------------------------
113 166
 ## SimpleCV Interactive Shell, or how to run SimpleCV
@@ -126,19 +179,24 @@ If for some reason the shell doesn't start, you can always do so manually by run
126 179
 	python -c "import SimpleCV.Shell;SimpleCV.Shell.main()"
127 180
 
128 181
 
129  
-To run SimpleCV within an ipython notebook:
  182
+To run SimpleCV within an ipython notebook (ipython-notebooks are required to be installed):
130 183
 
131  
-	from SimpleCV import Display, Image
132  
-	display = Display(displaytype='notebook')
133  
-	image = Image('simplecv')
134  
-	image.save(display)
  184
+	simplecv notebook
  185
+
  186
+
  187
+to install ipython notebooks run the following:
  188
+
  189
+	sudo pip install tornado
  190
+  sudo pip install pyzmq
  191
+  
  192
+  
135 193
   
136 194
 
137 195
 ---------------------------    
138 196
 ## Videos - Tutorials and Demos
139 197
 
140 198
 Video tutorials and demos can be found at:
141  
-<http://www.simplecv.org/demos/>
  199
+<http://www.simplecv.org/learn/>
142 200
 
143 201
 -------------------------------
144 202
 ## Getting Help
@@ -154,13 +212,13 @@ If for some reason the standard installation methods do not work you may have to
154 212
 ### Required Libraries
155 213
 The installation instructions below should explain more on how to install.  They can also be installed manually.
156 214
 
157  
-* Python 2.6+
158  
-* SciPy
159  
-* NumPy
160  
-* Pygame
161  
-* OpenCV 2.3+
162  
-* IPython 10+
163  
-* PIL 1.1.7+
  215
+* Python 2.6+ (<http://www.python.org>)
  216
+* SciPy (<http://www.scipy.org>)
  217
+* NumPy (<http://numpy.scipy.org>)
  218
+* Pygame (<http://www.pygame.org>)
  219
+* OpenCV 2.3+ (<http://opencv.org>)
  220
+* IPython 10+ (<http://ipython.org>)
  221
+* PIL 1.1.7+ (<http://www.pythonware.com/products/pil/>)
164 222
 
165 223
 
166 224
 ### Optional Libraries
@@ -178,8 +236,7 @@ These libraries are NOT required to run or use SimpleCV but are needed for some
178 236
 * werkzeug
179 237
 * webkit
180 238
 * gtk
181  
-* zxing (<http://code.google.com/p/zxing/>)
182  
-* python-zxing (<https://github.com/oostendo/python-zxing>)
  239
+* zbar (<http://zbar.sourceforge.net/>)
183 240
 * Tesseract (<http://code.google.com/p/tesseract-ocr/>)
184 241
 * python-tesseract (<http://code.google.com/p/python-tesseract/>)
185 242
 * Orange (<http://orange.biolab.si>)
9  SimpleCV/Camera.py
@@ -5,9 +5,6 @@
5 5
 from SimpleCV.ImageClass import Image, ImageSet, ColorSpace
6 6
 from SimpleCV.Display import Display
7 7
 from SimpleCV.Color import Color
8  
-from SimpleCV.Features import Line
9  
-import platform
10  
-from warnings import warn
11 8
 
12 9
 #Globals
13 10
 _cameras = [] 
@@ -188,7 +185,7 @@ def undistort(self, image_or_2darray):
188 185
         """
189 186
         **SUMMARY**
190 187
 
191  
-        If given an image, apply the undistortion given my the camera's matrix and return the result.
  188
+        If given an image, apply the undistortion given by the camera's matrix and return the result.
192 189
         
193 190
         If given a 1xN 2D cvmat or a 2xN numpy array, it will un-distort points of
194 191
         measurement and return them in the original coordinate system.
@@ -387,7 +384,7 @@ class Camera(FrameSource):
387 384
 
388 385
     The Camera class is the class for managing input from a basic camera.  Note
389 386
     that once the camera is initialized, it will be locked from being used 
390  
-    by other processes.  You can check manually if you have compatable devices
  387
+    by other processes.  You can check manually if you have compatible devices
391 388
     on linux by looking for /dev/video* devices.
392 389
 
393 390
     This class wrappers OpenCV's cvCapture class and associated methods.  
@@ -416,7 +413,7 @@ def __init__(self, camera_index = -1, prop_set = {}, threaded = True, calibratio
416 413
         """
417 414
         **SUMMARY**
418 415
 
419  
-        In the camera onstructor, camera_index indicates which camera to connect to
  416
+        In the camera constructor, camera_index indicates which camera to connect to
420 417
         and props is a dictionary which can be used to set any camera attributes
421 418
         Supported props are currently: height, width, brightness, contrast,
422 419
         saturation, hue, gain, and exposure.
3  SimpleCV/Color.py
@@ -6,8 +6,7 @@
6 6
 import random
7 7
 from SimpleCV.base import *
8 8
 from SimpleCV.ImageClass import * 
9  
-from pickle import *
10  
-from math import cos, radians, ceil
  9
+
11 10
   
12 11
 class Color:
13 12
     """
2  SimpleCV/ColorModel.py
@@ -2,7 +2,7 @@
2 2
 #load required libraries
3 3
 from SimpleCV.base import *
4 4
 from SimpleCV.ImageClass import * 
5  
-from pickle import *
  5
+
6 6
 
7 7
 class ColorModel:
8 8
     """
5  SimpleCV/DrawingLayer.py
@@ -4,10 +4,7 @@
4 4
 import os
5 5
 #from SimpleCV.base import *
6 6
 from SimpleCV.Color import *
7  
-#from SimpleCV import *
8  
-from numpy import int32
9  
-from numpy import uint8
10  
-from pygame import gfxdraw
  7
+
11 8
 
12 9
     
13 10
 #DOCS
1  SimpleCV/Features/Blob.py
@@ -2,7 +2,6 @@
2 2
 from SimpleCV.Features.Features import Feature, FeatureSet
3 3
 from SimpleCV.Color import Color
4 4
 from SimpleCV.ImageClass import Image
5  
-from math import sin, cos, pi
6 5
 
7 6
 class Blob(Feature):
8 7
     """
3  SimpleCV/Features/Detection.py
@@ -13,8 +13,7 @@
13 13
 from SimpleCV.ImageClass import *
14 14
 from SimpleCV.Color import * 
15 15
 from SimpleCV.Features.Features import Feature, FeatureSet
16  
-from math import *
17  
-from math import pi
  16
+
18 17
 
19 18
 
20 19
 ######################################################################
2  SimpleCV/Features/Features.py
@@ -17,7 +17,7 @@
17 17
 from SimpleCV.base import *
18 18
 from SimpleCV.Color import *
19 19
 import copy
20  
-import types
  20
+
21 21
 
22 22
 class FeatureSet(list):
23 23
     """
2  SimpleCV/Features/Tracking.py
... ...
@@ -1,7 +1,7 @@
1 1
 from SimpleCV.base import *
2 2
 from SimpleCV.ImageClass import *
3 3
 from SimpleCV.Features.Features import Feature, FeatureSet
4  
-import time
  4
+
5 5
 
6 6
 class Tracking(Feature):
7 7
     """
266  SimpleCV/ImageClass.py
... ...
@@ -1,6 +1,7 @@
1 1
 # Load required libraries
2 2
 from SimpleCV.base import *
3 3
 from SimpleCV.Color import *
  4
+
4 5
 from numpy import int32
5 6
 from numpy import uint8
6 7
 
@@ -226,6 +227,58 @@ def download(self, tag=None, number=10, size='thumb'):
226 227
       self.extend(add_set)
227 228
 
228 229
 
  230
+    def upload(self,dest,api_key=None,api_secret=None, verbose = True):
  231
+      """
  232
+      **SUMMARY**
  233
+      Uploads all the images to imgur or flickr or dropbox. In verbose mode URL values are printed.
  234
+          
  235
+      **PARAMETERS**
  236
+      * *api_key* - a string of the API key.
  237
+      * *api_secret* (required only for flickr and dropbox ) - a string of the API secret.
  238
+      * *verbose* - If verbose is true all values are printed to the
  239
+        screen
  240
+          
  241
+      **RETURNS**
  242
+      if uploading is successful, 
  243
+        - Imgur return the original image URL on success and None if it fails.
  244
+        - Flick returns True on success, else returns False.
  245
+        - dropbox returns True on success.
  246
+          
  247
+      **EXAMPLE**
  248
+      TO upload image to imgur
  249
+        >>> imgset = ImageSet("/home/user/Desktop")
  250
+        >>> result = imgset.upload( 'imgur',"MY_API_KEY1234567890" )
  251
+        >>> print "Uploaded To: " + result[0] 
  252
+           
  253
+      To upload image to flickr
  254
+        >>> imgset.upload('flickr','api_key','api_secret')
  255
+        >>> imgset.upload('flickr') #Once the api keys and secret keys are cached.
  256
+           
  257
+      To upload image to dropbox
  258
+        >>> imgset.upload('dropbox','api_key','api_secret')
  259
+        >>> imgset.upload('dropbox') #Once the api keys and secret keys are cached.
  260
+              
  261
+      **NOTES**
  262
+      .. Warning::
  263
+        This method requires two packages to be installed 
  264
+        -PyCurl 
  265
+        -flickr api.
  266
+        -dropbox
  267
+           
  268
+      .. Warning::
  269
+        You must supply your own API key. See here: 
  270
+        - http://imgur.com/register/api_anon
  271
+        - http://www.flickr.com/services/api/misc.api_keys.html
  272
+        - https://www.dropbox.com/developers/start/setup#python
  273
+      """
  274
+      try :
  275
+          for i in self:
  276
+              i.upload(dest,api_key,api_secret, verbose)
  277
+          return True
  278
+          
  279
+      except :
  280
+          return False
  281
+             
229 282
     def show(self, showtime = 0.25):
230 283
       """
231 284
       **SUMMARY**
@@ -463,71 +516,69 @@ def _read_gif(self, filename):
463 516
             loaded += 1
464 517
 
465 518
         return loaded
466  
-
467 519
     def load(self, directory = None, extension = None):
468  
-      """
469  
-      **SUMMARY**
470  
-
471  
-      This function loads up files automatically from the directory you pass
472  
-      it.  If you give it an extension it will only load that extension
473  
-      otherwise it will try to load all know file types in that directory.
474  
-
475  
-      extension should be in the format:
476  
-      extension = 'png'
477  
-
478  
-      **PARAMETERS**
479  
-      
480  
-      * *directory* - The path or directory from which to load images. If this
481  
-      * ends with .gif, it'll read from the gif file accordingly.
482  
-      * *extension* - The extension to use. If none is given png is the default.
483  
-
484  
-      **RETURNS**
485  
-
486  
-      The number of images in the image set.
487  
-
488  
-      **EXAMPLE**
489  
-
490  
-      >>> imgs = ImageSet()
491  
-      >>> imgs.load("images/faces")
492  
-      >>> imgs.load("images/eyes", "png")
493  
-
494  
-      """
  520
+        """
  521
+        **SUMMARY**
  522
+        
  523
+        This function loads up files automatically from the directory you pass
  524
+        it.  If you give it an extension it will only load that extension
  525
+        otherwise it will try to load all know file types in that directory.
  526
+        
  527
+        extension should be in the format:
  528
+        extension = 'png'
  529
+    
  530
+        **PARAMETERS**
  531
+    
  532
+        * *directory* - The path or directory from which to load images. 
  533
+        * *extension* - The extension to use. If none is given png is the default.
495 534
 
496  
-      if not directory:
497  
-        print "You need to give a directory to load from"
498  
-        return
499  
-      elif directory.endswith(".gif"):
500  
-        return self._read_gif(directory)
  535
+        **RETURNS**
501 536
         
  537
+        The number of images in the image set.
502 538
         
503  
-      if not os.path.exists(directory):
504  
-        print "Invalid image path given"
505  
-        return
506  
-      
  539
+        **EXAMPLE**
  540
+    
  541
+        >>> imgs = ImageSet()
  542
+        >>> imgs.load("images/faces")
  543
+        >>> imgs.load("images/eyes", "png")
  544
+    
  545
+        """
  546
+        if not directory:
  547
+            print "You need to give a directory to load from"
  548
+            return
  549
+
  550
+        if not os.path.exists(directory):
  551
+            print "Invalied image path given"
  552
+            return
  553
+            
507 554
       
508  
-      if extension:
509  
-        extension = "*." + extension
510  
-        formats = [os.path.join(directory, extension)]
  555
+        if extension:
  556
+            extension = "*." + extension
  557
+            formats = [os.path.join(directory, extension)]
511 558
         
512  
-      else:
513  
-        formats = [os.path.join(directory, x) for x in IMAGE_FORMATS]
  559
+        else:
  560
+            formats = [os.path.join(directory, x) for x in IMAGE_FORMATS]
514 561
 
515 562
       
516  
-      file_set = [glob.glob(p) for p in formats]
  563
+        file_set = [glob.glob(p) for p in formats]
517 564
 
518  
-      self.filelist = dict()
  565
+        self.filelist = dict()
  566
+
  567
+        for f in file_set:
  568
+            for i in f:
  569
+                tmp = None
  570
+                try:
  571
+                    tmp = Image(i)
  572
+                    if( tmp is not None and tmp.width > 0 and tmp.height > 0):
  573
+                        if sys.platform.lower() == 'win32' or sys.platform.lower() == 'win64':
  574
+                            self.filelist[tmp.filename.split('\\')[-1]] = tmp
  575
+                        else:
  576
+                            self.filelist[tmp.filename.split('/')[-1]] = tmp
  577
+                        self.append(tmp)
  578
+                except:
  579
+                    continue
  580
+        return len(self)
519 581
 
520  
-      for f in file_set:
521  
-        for i in f:
522  
-          tmp = Image(i)
523  
-          if sys.platform.lower() == 'win32' or sys.platform.lower() == 'win64':
524  
-            self.filelist[tmp.filename.split('\\')[-1]] = tmp
525  
-          else:
526  
-            self.filelist[tmp.filename.split('/')[-1]] = tmp
527  
-          self.append(tmp)
528  
-          
529  
-      return len(self)
530  
-    
531 582
     def standardize(self,width,height):
532 583
         """
533 584
         **SUMMARY**
@@ -986,11 +1037,11 @@ def __del__(self):
986 1037
         """
987 1038
         try :
988 1039
            for i in self._tempFiles:
989  
-               if (isinstance(i,str)):
990  
-                   os.remove(i)
  1040
+               if (i[1]):
  1041
+                   os.remove(i[0])
991 1042
         except :
992 1043
            pass
993  
-           
  1044
+                      
994 1045
     def getEXIFData(self):
995 1046
         """
996 1047
         **SUMMARY**
@@ -2029,7 +2080,7 @@ def toString(self):
2029 2080
         return self.toRGB().getBitmap().tostring()
2030 2081
     
2031 2082
     
2032  
-    def save(self, filehandle_or_filename="", mode="", verbose=False, temp=False, path=None, fname=None, **params):
  2083
+    def save(self, filehandle_or_filename="", mode="", verbose=False, temp=False, path=None, filename=None, cleanTemp=False ,**params):
2033 2084
         """
2034 2085
         **SUMMARY**
2035 2086
 
@@ -2056,8 +2107,10 @@ def save(self, filehandle_or_filename="", mode="", verbose=False, temp=False, pa
2056 2107
         
2057 2108
         * *path* - path where temporary files needed to be stored
2058 2109
         
2059  
-        * *fname* - name(Prefix) of the temporary file.
  2110
+        * *filename* - name(Prefix) of the temporary file.
2060 2111
 
  2112
+        * *cleanTemp* - This flag is made True if tempfiles are tobe deleted once the object is to be destroyed.
  2113
+          
2061 2114
         * *params* - This object is used for overloading the PIL save methods. In particular 
2062 2115
           this method is useful for setting the jpeg compression level. For JPG see this documentation:
2063 2116
           http://www.pythonware.com/library/pil/handbook/format-jpeg.htm          
@@ -2082,7 +2135,7 @@ def save(self, filehandle_or_filename="", mode="", verbose=False, temp=False, pa
2082 2135
         .. Note::
2083 2136
           You must have IPython notebooks installed for this to work
2084 2137
           
2085  
-          path and fname are valid if and only if temp is set to True.
  2138
+          path and filename are valid if and only if temp is set to True.
2086 2139
           
2087 2140
         .. attention:: 
2088 2141
           We need examples for all save methods as they are unintuitve. 
@@ -2090,37 +2143,36 @@ def save(self, filehandle_or_filename="", mode="", verbose=False, temp=False, pa
2090 2143
         #TODO, we use the term mode here when we mean format
2091 2144
         #TODO, if any params are passed, use PIL
2092 2145
         
2093  
-        if temp and path!=None :
  2146
+        if temp :
2094 2147
             import glob
2095  
-            if fname==None :
2096  
-                fname = 'Image'                
  2148
+            if filename == None :
  2149
+                filename = 'Image'         
  2150
+            if path == None :          
  2151
+                path=tempfile.gettempdir()
2097 2152
             if glob.os.path.exists(path):
2098 2153
                 path = glob.os.path.abspath(path) 
2099  
-                imagefiles = glob.glob(glob.os.path.join(path,fname+"*.png"))
  2154
+                imagefiles = glob.glob(glob.os.path.join(path,filename+"*.png"))
2100 2155
                 num = [0]
2101 2156
                 for img in imagefiles :
2102 2157
                     num.append(int(glob.re.findall('[0-9]+$',img[:-4])[-1]))
2103 2158
                 num.sort()
2104 2159
                 fnum = num[-1]+1
2105  
-                fname = glob.os.path.join(path,fname+str(fnum)+".png") 
2106  
-                self._tempFiles.append(fname)
2107  
-                self.save(self._tempFiles[-1])
2108  
-                return self._tempFiles[-1]
  2160
+                filename = glob.os.path.join(path,filename+str(fnum)+".png") 
  2161
+                self._tempFiles.append((filename,cleanTemp))
  2162
+                self.save(self._tempFiles[-1][0])
  2163
+                return self._tempFiles[-1][0]
2109 2164
             else :
2110 2165
                 print "Path does not exist!"
2111  
-                        
2112  
-        #if it's a temporary file
2113  
-        elif temp :
2114  
-            self._tempFiles.append(tempfile.NamedTemporaryFile(suffix=".png"))
2115  
-            self.save(self._tempFiles[-1].name)
2116  
-            return self._tempFiles[-1].name
2117  
-       
  2166
+        
  2167
+        else :
  2168
+            if (filename) :
  2169
+                filehandle_or_filename = filename + ".png" 
  2170
+                                      
2118 2171
         if (not filehandle_or_filename):
2119 2172
             if (self.filename):
2120 2173
                 filehandle_or_filename = self.filename
2121 2174
             else:
2122 2175
                 filehandle_or_filename = self.filehandle
2123  
-
2124 2176
             
2125 2177
         if (len(self._mLayers)):
2126 2178
             saveimg = self.applyLayers()
@@ -2271,11 +2323,11 @@ def copy(self):
2271 2323
     def upload(self,dest,api_key=None,api_secret=None, verbose = True):
2272 2324
         """
2273 2325
         **SUMMARY**
2274  
-        Uploads image to imgur or flickr. In verbose mode URL values are printed.
  2326
+        Uploads image to imgur or flickr or dropbox. In verbose mode URL values are printed.
2275 2327
           
2276 2328
         **PARAMETERS**
2277 2329
         * *api_key* - a string of the API key.
2278  
-        * *api_secret* (required only for flickr) - a string of the API secret.
  2330
+        * *api_secret* (required only for flickr and dropbox ) - a string of the API secret.
2279 2331
         * *verbose* - If verbose is true all values are printed to the
2280 2332
           screen
2281 2333
           
@@ -2283,6 +2335,7 @@ def upload(self,dest,api_key=None,api_secret=None, verbose = True):
2283 2335
         if uploading is successful, 
2284 2336
          - Imgur return the original image URL on success and None if it fails.
2285 2337
          - Flick returns True on success, else returns False.
  2338
+         - dropbox returns True on success.
2286 2339
           
2287 2340
         **EXAMPLE**
2288 2341
         TO upload image to imgur
@@ -2294,16 +2347,22 @@ def upload(self,dest,api_key=None,api_secret=None, verbose = True):
2294 2347
            >>> img.upload('flickr','api_key','api_secret')
2295 2348
            >>> img.invert().upload('flickr') #Once the api keys and secret keys are cached.
2296 2349
            
  2350
+        To upload image to dropbox
  2351
+           >>> img.upload('dropbox','api_key','api_secret')
  2352
+           >>> img.invert().upload('dropbox') #Once the api keys and secret keys are cached.
  2353
+              
2297 2354
         **NOTES**
2298 2355
         .. Warning::
2299 2356
            This method requires two packages to be installed 
2300 2357
            -PyCurl 
2301 2358
            -flickr api.
  2359
+           -dropbox
2302 2360
            
2303 2361
         .. Warning::
2304 2362
            You must supply your own API key. See here: 
2305 2363
            - http://imgur.com/register/api_anon
2306 2364
            - http://www.flickr.com/services/api/misc.api_keys.html
  2365
+           - https://www.dropbox.com/developers/start/setup#python
2307 2366
         """
2308 2367
         if ( dest=='imgur' ) :
2309 2368
             try:
@@ -2365,13 +2424,50 @@ def upload(self,dest,api_key=None,api_secret=None, verbose = True):
2365 2424
             	    print "Uploading Failed !"
2366 2425
             	    return False
2367 2426
             else :
2368  
-            	 import tempfile
2369  
-                 tf=tempfile.NamedTemporaryFile(suffix='.jpg')
2370  
-                 self.save(tf.name)
2371  
-	    	 temp = Image(tf.name)
2372  
-	    	 self.flickr.upload(tf.name,temp.filehandle)
  2427
+	    	 tf = self.save(temp=True)
  2428
+	    	 self.flickr.upload(tf,"Image")
2373 2429
             return True
2374  
-
  2430
+            
  2431
+        elif (dest=='dropbox'):
  2432
+            global dropbox_token
  2433
+            access_type = 'dropbox'
  2434
+            try :
  2435
+                from dropbox import client, rest, session
  2436
+                import webbrowser
  2437
+            except ImportError:
  2438
+            	print "Dropbox API is not installed. For more info refer : https://www.dropbox.com/developers/start/setup#python "
  2439
+                return False
  2440
+            try :
  2441
+                if ( 'dropbox_token' not in globals() and api_key!=None and api_secret!=None ):
  2442
+            	    sess = session.DropboxSession(api_key, api_secret, access_type)
  2443
+            	    request_token = sess.obtain_request_token()
  2444
+            	    url = sess.build_authorize_url(request_token)
  2445
+            	    webbrowser.open(url)
  2446
+            	    print "Please visit this website and press the 'Allow' button, then hit 'Enter' here."
  2447
+            	    raw_input()
  2448
+            	    access_token = sess.obtain_access_token(request_token)
  2449
+            	    dropbox_token = client.DropboxClient(sess)
  2450
+            	else :
  2451
+            	    if (dropbox_token) :
  2452
+            	        pass
  2453
+            	    else :
  2454
+            	        return None
  2455
+            except :
  2456
+            	print "The API Key and Secret Key are not valid"
  2457
+            	return False
  2458
+            if (self.filename) :	
  2459
+                try :
  2460
+                    f = open(self.filename)
  2461
+            	    dropbox_token.put_file('/SimpleCVImages/'+os.path.split(self.filename)[-1], f)
  2462
+                except :
  2463
+            	    print "Uploading Failed !"
  2464
+            	    return False
  2465
+            else :
  2466
+            	 tf = self.save(temp=True)
  2467
+                 f = open(tf)
  2468
+            	 dropbox_token.put_file('/SimpleCVImages/'+'Image', f)
  2469
+                 return True
  2470
+                 
2375 2471
     def scale(self, width, height = -1):
2376 2472
         """
2377 2473
         **SUMMARY**
37  SimpleCV/Shell/Shell.py
@@ -25,6 +25,7 @@
25 25
 import subprocess
26 26
 import time
27 27
 import webbrowser
  28
+import sys
28 29
 
29 30
 #Load simpleCV libraries
30 31
 from SimpleCV.Shell.Tutorial import *
@@ -190,21 +191,29 @@ def self_update():
190 191
 
191 192
 
192 193
 def main(*args):
193  
-
194 194
     log_level = logging.WARNING
195  
-    if len(args) and len(args[0]) > 1:
196  
-        if "notebook" in args[0] and IPVER > 10:
197  
-            run_notebook()
198  
-        elif "update" in args[0]:
199  
-            self_update()
200  
-
201  
-        for flag in args[0]:
202  
-            if flag in ["--headless","headless"]:
203  
-                init_options_handler.set_headless()
204  
-            elif flag in ['--nowarnings','nowarnings']:
205  
-                log_level = logging.INFO
206  
-            elif flag in ['--debug','debug']:
207  
-                log_level = logging.DEBUG
  195
+    if len(sys.argv) > 1 and len(sys.argv[1]) > 1:
  196
+      flag = sys.argv[1]
  197
+      if flag == "notebook" and IPVER > 10:
  198
+          run_notebook()
  199
+          sys.exit()
  200
+
  201
+      elif flag == 'update':
  202
+        print "Updating SimpleCV....."
  203
+        self_update()
  204
+        
  205
+
  206
+      if flag in ["--headless","headless"]:
  207
+        # set SDL to use the dummy NULL video driver,
  208
+        #   so it doesn't need a windowing system.
  209
+        os.environ["SDL_VIDEODRIVER"] = "dummy"
  210
+
  211
+      elif flag in ['--nowarnings','nowarnings']:
  212
+        log_level = logging.INFO
  213
+
  214
+      elif flag in ['--debug','debug']:
  215
+        log_level = logging.DEBUG
  216
+
208 217
 
209 218
     init_logging(log_level)
210 219
     shellclear()
2  SimpleCV/__init__.py
... ...
@@ -1,4 +1,4 @@
1  
-__version__ = '1.2.0'
  1
+__version__ = '1.3.0'
2 2
 
3 3
 from SimpleCV.base import *
4 4
 from SimpleCV.Camera import *
32  SimpleCV/base.py
@@ -18,14 +18,36 @@
18 18
 import abc #abstract base class
19 19
 import colorsys
20 20
 import logging
  21
+import pygame as pg
  22
+import scipy.ndimage as ndimage
  23
+import scipy.stats.stats as sss  #for auto white balance
  24
+import scipy.cluster.vq as scv    
  25
+import scipy.linalg as nla  # for linear algebra / least squares
  26
+import math # math... who does that 
  27
+import copy # for deep copy
  28
+import numpy as np
  29
+import scipy.spatial.distance as spsd
  30
+import scipy.cluster.vq as cluster #for kmeans
  31
+import pygame as pg
  32
+import platform
  33
+import copy
  34
+import types
  35
+import time
21 36
 
  37
+from numpy import linspace
  38
+from scipy.interpolate import UnivariateSpline
  39
+from warnings import warn
22 40
 from copy import copy
23  
-from math import sqrt, atan2
  41
+from math import *
24 42
 from pkg_resources import load_entry_point
25 43
 from SimpleHTTPServer import SimpleHTTPRequestHandler
26 44
 from types import IntType, LongType, FloatType, InstanceType
27 45
 from cStringIO import StringIO
28  
-
  46
+from numpy import int32
  47
+from numpy import uint8
  48
+from EXIF import *
  49
+from pygame import gfxdraw
  50
+from pickle import *
29 51
 
30 52
 # SimpleCV library includes
31 53
 try:
@@ -36,12 +58,6 @@
36 58
     except ImportError:
37 59
         raise ImportError("Cannot load OpenCV library which is required by SimpleCV")
38 60
 
39  
-import numpy as np
40  
-import scipy.spatial.distance as spsd
41  
-import scipy.cluster.vq as cluster #for kmeans
42  
-from numpy import linspace
43  
-from scipy.interpolate import UnivariateSpline
44  
-
45 61
 
46 62
 #optional libraries
47 63
 PIL_ENABLED = True
BIN  SimpleCV/sampleimages/FSTest.png
BIN  SimpleCV/sampleimages/FSTest2.png
BIN  SimpleCV/sampleimages/FSTest3.png
BIN  SimpleCV/sampleimages/FSTest4.png
BIN  SimpleCV/sampleimages/FSTest5.png
BIN  SimpleCV/sampleimages/greenscreen.jpg
BIN  SimpleCV/sampleimages/logo.png
22  SimpleCV/tests/BOFTester.py
... ...
@@ -1,22 +0,0 @@
1  
-from SimpleCV import *
2  
-from numpy import *
3  
-from SimpleCV.Features import BOFFeatureExtractor
4  
-import os
5  
-import glob
6  
-import time
7  
-cat_path = "./data/cat/truth/"
8  
-cheeseburger_path = "./data/cheeseburger/truth/"
9  
-paths = [cat_path,cheeseburger_path]
10  
-bof = BOFFeatureExtractor()
11  
-#bof.load('cbdata.txt')
12  
-bof.generate(paths,imgs_per_dir=200,numcodes=256,sz=(11,11),img_layout=(16,16),padding=4 )
13  
-bof.save("codebook.png","cbdata.txt")
14  
-#count = 0
15  
-#test = bof.reconstruct(Image("codebook.png"))
16  
-#test.save("anticodebook.jpg")
17  
-#for infile in glob.glob( os.path.join(cat_path, '*.jpg') ):
18  
-#    print "opening file: " + infile
19  
-#    img = Image(infile)
20  
-#    oimg = bof.reconstruct(img)
21  
-#    fname = infile[0:-4]+"_reconstruction.png"
22  
-#    oimg.save(fname)
98  SimpleCV/tests/DisplayTester.py
... ...
@@ -1,98 +0,0 @@
1  
-import time
2  
-from SimpleCV import *
3  
-from SimpleCV.Display import Display, pg
4  
-w = 400
5  
-h = 300
6  
-t=1
7  
-display = Display(resolution = (w,h)) #create a new display to draw images on
8  
-img = Image('../sampleimages/aerospace.jpg')
9  
-img = img.scale(800,600)
10  
-img2 = img.scale(w,h)
11  
-smallWbigH = img.scale(100,400)
12  
-smallHbigW = img2.scale(500,100)
13  
-smallW = img2.scale(100,h)
14  
-smallH = img2.scale(w,100)
15  
-small = img2.scale(99,23)
16  
-big = img2.scale(555,432)
17  
-
18  
-foo = "Image:"+str((img.width,img.height))
19  
-print(foo)
20  
-print('Image should scale clean')
21  
-display.writeFrame(img)
22  
-time.sleep(t)
23  
-
24  
-foo = "Image:"+str((img2.width,img2.height))
25  
-print(foo)
26  
-print('Image should scale clean')
27  
-display.writeFrame(img2)
28  
-time.sleep(t)
29  
-
30  
-foo = "Image:"+str((smallWbigH.width,smallWbigH.height))
31  
-print(foo)
32  
-display.writeFrame(smallWbigH)
33  
-time.sleep(t)
34  
-
35  
-foo = "Image:"+str((smallHbigW.width,smallHbigW.height))
36  
-print(foo)
37  
-display.writeFrame(smallHbigW)
38  
-time.sleep(t)
39  
-
40  
-foo = "Image:"+str((smallW.width,smallW.height))
41  
-print(foo)
42  
-display.writeFrame(smallW)
43  
-time.sleep(t)
44  
-
45  
-foo = "Image:"+str((smallH.width,smallH.height))
46  
-print(foo)
47  
-display.writeFrame(smallH)
48  
-time.sleep(t)
49  
-
50  
-foo = "Image:"+str((small.width,small.height))
51  
-print(foo)
52  
-display.writeFrame(small)
53  
-time.sleep(t)
54  
-
55  
-foo = "Image:"+str((big.width,big.height))
56  
-print(foo)
57  
-display.writeFrame(big)
58  
-time.sleep(t)
59  
-
60  
-foo = "Crop Image:"+str((img.width,img.height))
61  
-print(foo)
62  
-display.writeFrame(img, fit=False)
63  
-time.sleep(t)
64  
-
65  
-foo = "Crop Image:"+str((img2.width,img2.height))
66  
-print(foo)
67  
-display.writeFrame(img2, fit=False)
68  
-time.sleep(t)
69  
-
70  
-foo = "Crop Image:"+str((smallWbigH.width,smallWbigH.height))
71  
-print(foo)
72  
-display.writeFrame(smallWbigH, fit=False)
73  
-time.sleep(t)
74  
-
75  
-foo = "Crop Image:"+str((smallHbigW.width,smallHbigW.height))
76  
-print(foo)
77  
-display.writeFrame(smallHbigW, fit=False)
78  
-time.sleep(t)
79  
-
80  
-foo = "Crop Image:"+str((smallW.width,smallW.height))
81  
-print(foo)
82  
-display.writeFrame(smallW, fit=False)
83  
-time.sleep(t)
84  
-
85  
-foo = "Crop Image:"+str((smallH.width,smallH.height))
86  
-print(foo)
87  
-display.writeFrame(smallH, fit=False)
88  
-time.sleep(t)
89  
-
90  
-foo = "Crop Image:"+str((small.width,small.height))
91  
-print(foo)
92  
-display.writeFrame(small, fit=False)
93  
-time.sleep(t)
94  
-
95  
-foo = "Crop Image:"+str((big.width,big.height))
96  
-print(foo)
97  
-display.writeFrame(big, fit=False)
98  
-time.sleep(t)
292  SimpleCV/tests/MLTestSuite.py
... ...
@@ -1,292 +0,0 @@
1  
-from SimpleCV import *
2  
-
3  
-print ""
4  
-print "This program runs a list of test for machine learning on"
5  
-print "the SimpleCV library. Not all scores will be high, this"
6  
-print "is just to ensure that the libraries are functioning correctly"
7  
-print "on your system"
8  
-print ""
9  
-print "***** WARNING *****"
10  
-print "This program is about to download a large data set to run it's test"
11  
-
12  
-
13  
-inp = raw_input("Do you want to continue [Y/n]")
14  
-if not (inp == "" or inp.lower() == "y"):
15  
-    print "Exiting the program"
16  
-    sys.exit()
17  
-
18  
-
19  
-machine_learning_data_set = "https://github.com/downloads/ingenuitas/SimpleCV/machine_learning_dataset.zip"
20  
-data_path = download_and_extract(machine_learning_data_set)
21  
-print data_path
22  
-w = 800
23  
-h = 600
24  
-n=50
25  
-
26  
-display = Display(resolution = (w,h))
27  
-
28  
-hue = HueHistogramFeatureExtractor(mNBins=16)
29  
-edge = EdgeHistogramFeatureExtractor()
30  
-bof = BOFFeatureExtractor()
31  
-bof.load('../Features/cbdata.txt')
32  
-haar = HaarLikeFeatureExtractor(fname="../Features/haar.txt")
33  
-morph = MorphologyFeatureExtractor()
34  
-
35  
-spath = data_path + "/data/structured/"
36  
-upath = data_path + "/data/unstructured/"
37  
-ball_path = spath+"ball/"
38  
-basket_path = spath+"basket/"
39  
-boat_path = spath+"boat/"
40  
-cactus_path = spath +"cactus/"
41  
-cup_path = spath+"cup/"
42  
-duck_path = spath+"duck/"
43  
-gb_path = spath+"greenblock/"
44  
-match_path = spath+"matches/"
45  
-rb_path = spath+"redblock/"
46  
-s1_path = spath+"stuffed/"
47  
-s2_path = spath+"stuffed2/"
48  
-s3_path = spath+"stuffed3/"
49  
-
50  
-arbor_path = upath+"arborgreens/"
51  
-football_path = upath+"football/"
52  
-sanjuan_path = upath+"sanjuans/"
53  
-
54  
-
55  
-
56  
-print('SVMPoly')
57  
-#Set up am SVM with a poly kernel
58  
-extractors = [hue]
59  
-path = [cactus_path,cup_path,basket_path]