Patent Document ID: 10151664
Application ID: 15728214
Patent Status: 1

Claim One:
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; wherein, the establishing a planar coordinate system for the distorted image comprises: establishing a planar coordinate system for the distorted image by using a dot at an upper left corner of the distorted image as a coordinate origin, a rightward direction from the origin as a positive direction of axis x, and a downward direction from the origin as a positive direction of axis y; wherein, the positioning dots of the distorted image by scanning and searching, and determining coordinate values of the dots in the planar coordinate system comprises: on the basis of the unchanged relation of relative physical positions of a center dot and all non-center dots, by coordinate positioning, positioning the center dot and all the non-center dots of the distorted image by scanning and searching, and determining coordinate values of the center dot and all the non-center dots in the planar coordinate system; the method further comprising: defining in a cache a two-dimensional array with a length at least containing all the dots, and storing coordinate information of the center dot into a center array of the two-dimensional array; and sequentially storing all the positioned dots into the two-dimensional array according to relative physical positions on the distorted image, to establish index relationships of the center dot and all the non-center dots with the two-dimensional array; wherein, the calculating a distortion amount of the distorted image by using the coordinate values of the dots comprises: finding a plurality of key dots that meet a preset rule in the distorted image according to the index relationships of the center dot and all the non-center dots with the two-dimensional array; and calculating the distortion amount of the distorted image according to distances between the plurality of key dots, wherein the distortion amount of the distorted image comprises a distortion amount in a vertical direction and/or a distortion amount in a horizontal direction.