In the embodiment of the present application, the speed of the object is measured, the line frequency of the image capturing is determined according to the speed of the object, and capturing an image of the object with the determined line frequency. The line frequency of the line scan camera can thus match the speed of the object, which can effectively eliminate deformation of images of the object captured by a line scan camera, which would otherwise occur due to stretch or compression, and thereby improve the utility of these images.
Based on the same inventive concept, an embodiment of the present application further provides an electronic device, as shown in 
measuring the speed of an object;
determining the line frequency for image capturing according to the speed of the object; and
controlling a line scan camera to perform image capturing on the object with the line frequency.