Device and method for acquisition of medical images for the analysis of ulcers