changeset 658:6668f541b915

Added **kwargs passthrough to cvPlot()->cv2.line() for greater drawing flexibility.
author pstaub
date Thu, 14 May 2015 19:48:09 +0200
parents 51269511229b
children 784298512b60
files python/cvutils.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/python/cvutils.py	Wed May 13 17:24:19 2015 +0200
+++ b/python/cvutils.py	Thu May 14 19:48:09 2015 +0200
@@ -99,12 +99,12 @@
                 cvmat[i,j] = a[i,j]
         return cvmat
 
-    def cvPlot(img, positions, color, lastCoordinate = None):
+    def cvPlot(img, positions, color, lastCoordinate = None, **kwargs):
         last = lastCoordinate+1
         if lastCoordinate is not None and lastCoordinate >=0:
             last = min(positions.length()-1, lastCoordinate)
         for i in range(0, last-1):
-            cv2.line(img, positions[i].asint().astuple(), positions[i+1].asint().astuple(), color)
+            cv2.line(img, positions[i].asint().astuple(), positions[i+1].asint().astuple(), color, **kwargs)
 
     def cvImshow(windowName, img, rescale = 1.0):
         'Rescales the image (in particular if too large)'