An investigation into automatic people counting and person re-identification