Mercurial Hosting > traffic-intelligence
diff python/cvutils.py @ 894:0c1fed9e8862
updated requirements.txt, removed minor PIL dependency
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 01 Jun 2017 10:33:07 -0400 |
parents | ff92801e5c54 |
children | 739acd338cc0 |
line wrap: on
line diff
--- a/python/cvutils.py Tue May 30 16:10:18 2017 -0400 +++ b/python/cvutils.py Thu Jun 01 10:33:07 2017 -0400 @@ -60,23 +60,6 @@ fourcc += unichr((x >> 8*i)&255) return fourcc -def plotLines(filename, origins, destinations, w = 1, resultFilename='image.png'): - '''Draws lines over the image ''' - import Image, ImageDraw # PIL - - img = Image.open(filename) - - draw = ImageDraw.Draw(img) - #draw = aggdraw.Draw(img) - #pen = aggdraw.Pen("red", width) - for p1, p2 in zip(origins, destinations): - draw.line([p1.x, p1.y, p2.x, p2.y], width = w, fill = (256,0,0)) - #draw.line([p1.x, p1.y, p2.x, p2.y], pen) - del draw - - #out = utils.openCheck(resultFilename) - img.save(resultFilename) - def rgb2gray(rgb): return dot(rgb[...,:3], [0.299, 0.587, 0.144])