Commits

Nicolas Saunier committed 5585ebd

corrected bugs for trajectory display for new code versions

  • Participants
  • Parent commits 37830a8

Comments (0)

Files changed (2)

File python/cvutils.py

                             if frameNum in boundingBoxes.keys():
                                 for rect in boundingBoxes[frameNum]:
                                     cv2.rectangle(img, rect[0].asint().astuple(), rect[1].asint().astuple(), cvRed)
-                            elif obj.features != None:
+                            elif len(obj.features) != 0:
                                 imgcrop, yCropMin, yCropMax, xCropMin, xCropMax = imageBox(img, obj, frameNum, homography, width, height)
                                 cv2.rectangle(img, (xCropMin, yCropMin), (xCropMax, yCropMax), cvBlue, 1)
                             objDescription = '{} '.format(obj.num)

File scripts/display-trajectories.py

     params = storage.TrackingParameters(args.configFilename)
     videoFilename = params.videoFilename
     databaseFilename = params.databaseFilename
-    homography = inv(params.homography)
+    if params.homography != None:
+        homography = inv(params.homography)
+    else:
+        homography = None
     intrinsicCameraMatrix = params.intrinsicCameraMatrix
     distortionCoefficients = params.distortionCoefficients
     undistortedImageMultiplication = params.undistortedImageMultiplication