Draw rectangles on images in Matlab and store their locations.