A metric learning approach for endoscopic kidney stone identification