# HG changeset patch # User Nicolas Saunier # Date 1728416480 14400 # Node ID 3deeb42dffddfcd3e9be9b1f7e1cd55ae0224616 # Parent 4dd446835e7d32aa8edf5c8c04a4d28a4e691082 corrected bug with multiply in undistort-videos diff -r 4dd446835e7d -r 3deeb42dffdd scripts/undistort-video.py --- a/scripts/undistort-video.py Wed Oct 02 12:19:12 2024 -0400 +++ b/scripts/undistort-video.py Tue Oct 08 15:41:20 2024 -0400 @@ -57,7 +57,7 @@ img = cv2.remap(img, map1, map2, interpolation=cv2.INTER_LINEAR) cv2.imwrite(str(destinationPath/Path('undistorted-{{:0{}}}.png'.format(nZerosFilename).format(frameNum))), img) if args.maskFilename is not None: - cv2.imwrite(str(destinationPath/Path('undistorted+mask-{{:0{}}}.png'.format(nZerosFilename).format(frameNum))), cv2.multiply(img, undistortedMask, dtype = 16)) + cv2.imwrite(str(destinationPath/Path('undistorted+mask-{{:0{}}}.png'.format(nZerosFilename).format(frameNum))), cv2.multiply(img, cv2.merge([undistortedMask]*3), dtype = 16)) frameNum += 1 if args.encodeVideo: