diff trafficintelligence/moving.py @ 1205:3905b393ade0

kitti loading code seems to be working
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 22 Mar 2023 23:29:09 -0400
parents 7b3384a8e409
children 36f0d18e1fad
line wrap: on
line diff
--- a/trafficintelligence/moving.py	Wed Mar 22 22:01:12 2023 -0400
+++ b/trafficintelligence/moving.py	Wed Mar 22 23:29:09 2023 -0400
@@ -357,12 +357,12 @@
         return (p1-p2).norm2()
 
     @staticmethod
-    def plotAll(points, options = '', closePolygon = False, **kwargs):
+    def plotAll(points, closePolygon = False, options = '', **kwargs):
         xCoords = [p.x for p in points]
         yCoords = [p.y for p in points]
         if closePolygon:
-            xCoords.append[0]
-            yCoords.append[0]
+            xCoords.append(xCoords[0])
+            yCoords.append(yCoords[0])
         plot(xCoords, yCoords, options, **kwargs)
 
     def similarOrientation(self, refDirection, cosineThreshold):
@@ -1659,7 +1659,7 @@
     def plotOutlineAtInstant(self, t, options = '', **kwargs):
         if self.hasFeatures():
             points = [f.getPositionAtInstant(t) for f in self.getFeatures()]
-            Point.plotAll(points, options, True, kwargs)
+            Point.plotAll(points, True, options, **kwargs)
 
     def play(self, videoFilename, homography = None, undistort = False, intrinsicCameraMatrix = None, distortionCoefficients = None, undistortedImageMultiplication = 1.):
         cvutils.displayTrajectories(videoFilename, [self], homography = homography, firstFrameNum = self.getFirstInstant(), lastFrameNumArg = self.getLastInstant(), undistort = undistort, intrinsicCameraMatrix = intrinsicCameraMatrix, distortionCoefficients = distortionCoefficients, undistortedImageMultiplication = undistortedImageMultiplication)