[particles] added merging using segment shape similarity.