# HG changeset patch # User Nicolas Saunier # Date 1498190597 14400 # Node ID a57e6fbcd8e3a65527ba5c8a3944a09779ed412f # Parent 0e017178f7abf1dc10dfdf3c795eb1313a222501 minor diff -r 0e017178f7ab -r a57e6fbcd8e3 scripts/extract-appearance-images.py --- a/scripts/extract-appearance-images.py Thu Jun 22 23:40:16 2017 -0400 +++ b/scripts/extract-appearance-images.py Fri Jun 23 00:03:17 2017 -0400 @@ -55,7 +55,6 @@ [map1, map2] = cvutils.computeUndistortMaps(width, height, undistortedImageMultiplication, intrinsicCameraMatrix, distortionCoefficients) height, width = map1.shape -print(timeInterval) if capture.isOpened(): ret = True frameNum = timeInterval.first @@ -70,7 +69,9 @@ img = cv2.remap(img, map1, map2, interpolation=cv2.INTER_LINEAR) for obj in objects: if obj.existsAtInstant(frameNum): - if (10+frameNum-obj.getFirstInstant())%args.nFramesStep == 0: # todo find next non zero image if none + if (10+frameNum-obj.getFirstInstant())%args.nFramesStep == 0: + # todo find next non zero image if none + # todo get several images if different features (measure of similarity) croppedImg = cvutils.imageBox(img, obj, frameNum, invHomography, width, height, classifierParams.percentIncreaseCrop, classifierParams.percentIncreaseCrop, classifierParams.minNPixels) if croppedImg is not None: imsave(args.directoryName+os.sep+moving.userTypeNames[obj.getUserType()]+os.sep+args.imagePrefix+'-{}-{}.png'.format(obj.getNum(), frameNum), croppedImg)