Find groups of scenes in an array of phashes using hierarchical clustering