Given a set of 2d trajectories/paths, where a trajectory is a list of [x,y,time] coordinates, and a new trajectory, how can I recognize which one in the set is "closest" to it? The lists may not be of the same length, the time differences not the same. I've tried using perceptual image hashes of the resulting lines, but this approach seems unreliable. The measure of closeness should be scale and translation, but not rotation invariant. Edit: I finally found a library that contains a few algorithms: https://github.com/bguillouet/traj-dist