Mercurial Hosting > traffic-intelligence
changeset 410:91954c76d12c
minor changes to error messages when loading libraries
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 14 Aug 2013 14:23:50 -0400 |
parents | 3c271a46b4d4 |
children | 31604ef1cad4 |
files | python/cvutils.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
diff -r 3c271a46b4d4 -r 91954c76d12c python/cvutils.py --- a/python/cvutils.py Tue Aug 13 23:36:58 2013 -0400 +++ b/python/cvutils.py Wed Aug 14 14:23:50 2013 -0400 @@ -1,18 +1,17 @@ #! /usr/bin/env python '''Image/Video utilities''' -import Image, ImageDraw # PIL try: import cv2 opencvAvailable = True except ImportError: - print('OpenCV library could not be loaded') + print('OpenCV library could not be loaded (video replay functions will not be available)') opencvAvailable = False try: import skimage skimageAvailable = True except ImportError: - print('Scikit-image library could not be loaded') + print('Scikit-image library could not be loaded (HoG-based classification methods will not be available)') skimageAvailable = False from sys import stdout @@ -39,6 +38,7 @@ def drawLines(filename, origins, destinations, w = 1, resultFilename='image.png'): '''Draws lines over the image ''' + import Image, ImageDraw # PIL img = Image.open(filename)