Getting references and comparing images