An electronic device includes a measurement unit configured to measure a contour of a body by the electronic device being moved along a surface of the body and a controller configured to generate a three-dimensional image of the body based on the contour. The controller is configured to generate the three-dimensional image by lining up a plurality of first contours measured along a first direction.