changeset 547:97c5fef5b2d6

corrected bugs
author MohamedGomaa
date Tue, 08 Jul 2014 13:43:56 -0400
parents 6c0923f1ce68
children e6ab4caf359c
files python/cvutils.py python/utils.py
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/python/cvutils.py	Thu Jul 03 14:30:20 2014 -0400
+++ b/python/cvutils.py	Tue Jul 08 13:43:56 2014 -0400
@@ -348,7 +348,7 @@
         prod = dot(homography, augmentedPoints)
         return prod[0:2]/prod[2]
     else:
-        return p
+        return points
 
 def project(homography, p):
     '''Returns the coordinates of the projection of the point p with coordinates p[0], p[1]
--- a/python/utils.py	Thu Jul 03 14:30:20 2014 -0400
+++ b/python/utils.py	Tue Jul 08 13:43:56 2014 -0400
@@ -246,9 +246,10 @@
 def crossProduct(l1, l2):
     return l1[0]*l2[1]-l1[1]*l2[0]
 
-def filterMovingWindow(input, halfWidth):
+def filterMovingWindow(inputSignal, halfWidth):
     '''Returns an array obtained after the smoothing of the input by a moving average
     The first and last points are copied from the original.'''
+    from numpy import ones,convolve,array
     width = float(halfWidth*2+1)
     win = ones(width,'d')
     result = convolve(win/width,array(inputSignal),'same')