1. A method for measuring lens distortion, comprising: when an imaging device and a test card are individually located on two sides of a lens, obtaining a distorted image of the test card by using the imaging device, wherein the test card has a plurality of dots; establishing a planar coordinate system for the distorted image; positioning dots of the distorted image by scanning and searching, and determining coordinate values of the dots in the planar coordinate system; and calculating a distortion amount of the distorted image by using the coordinate values of the dots, thereby obtaining a distortion amount of the lens.