1. An electronic device comprising: a distance measurement unit; an image capturing unit; and a processing unit, comprising: a distance measuring module for controlling the distance measurement unit to measure a vertical distance between the electronic device and a to-be-measured object in response to a measurement operation; an image capturing module for controlling the image capturing unit to capture an image in front of the electronic device which comprises an image of the to-be -measured object in response to the measurement operation; an actual size computing module for computing an actual size of the captured area according to the distance measured by the distance measurement unit and an angle of view of the image capturing unit; a proportion obtaining module for obtaining the image of the to-be-measured object from the captured image, and further computing the proportion of the image of the to-be-measured object in the captured image; an object size computing module for computing the size of the to-be-measured object according to the proportion and the actual size of the captured area; and a display module for displaying the measured size of the to-be-measured object; wherein the size of the to-be-measured object is computed by formula: X=2*D*tgθ*K, X represents the size of the to-be-measured object, D represents the vertical distance between the electronic device and the to-be-measured object, θ represents the angle of view of the image capturing unit, K represents the proportion of the image of the to-be-measured object in the captured image.