Mercurial Hosting > traffic-intelligence
comparison python/cvutils.py @ 665:15e244d2a1b5
corrected bug with circular import for VideoFilenameAddable, moved to base module
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 20 May 2015 13:57:47 +0200 |
parents | dc70d9e711f5 |
children | 5473b7460375 |
comparison
equal
deleted
inserted
replaced
664:455f9b93819c | 665:15e244d2a1b5 |
---|---|
1 #! /usr/bin/env python | 1 #! /usr/bin/env python |
2 '''Image/Video utilities''' | 2 '''Image/Video utilities''' |
3 | |
4 import utils | |
3 | 5 |
4 try: | 6 try: |
5 import cv2 | 7 import cv2 |
6 opencvAvailable = True | 8 opencvAvailable = True |
7 except ImportError: | 9 except ImportError: |
14 print('Scikit-image library could not be loaded (HoG-based classification methods will not be available)') | 16 print('Scikit-image library could not be loaded (HoG-based classification methods will not be available)') |
15 skimageAvailable = False | 17 skimageAvailable = False |
16 | 18 |
17 from sys import stdout | 19 from sys import stdout |
18 | 20 |
19 import utils | |
20 | |
21 #import aggdraw # agg on top of PIL (antialiased drawing) | 21 #import aggdraw # agg on top of PIL (antialiased drawing) |
22 #import utils | 22 |
23 | |
24 __metaclass__ = type | |
25 | 23 |
26 cvRed = (0,0,255) | 24 cvRed = (0,0,255) |
27 cvGreen = (0,255,0) | 25 cvGreen = (0,255,0) |
28 cvBlue = (255,0,0) | 26 cvBlue = (255,0,0) |
29 cvColors = utils.PlottingPropertyValues([cvRed, | 27 cvColors = utils.PlottingPropertyValues([cvRed, |