Method and device for correcting lateral chromatic aberration, storage medium, and computer equipment
Provided is a method and a device for correcting lateral chromatic aberration, a storage medium and a computer equipment. The method includes acquiring system parameters and pre-stored calibration data, obtaining the lateral chromatic aberration of a camera to be corrected by calculating the system parameters, and correcting the LCA by the calibration data. The lateral chromatic aberration of the camera lens may be corrected in terms of hardware and costs are saved.
1. A method for correcting lateral chromatic aberration (LCA), comprising:
capturing a target image from a test chart;
calculating amount of LCA of a camera module based on the target image, comprising:
upscaling the target image to obtain an upscaled target image;
detecting pattern elements and calculating mass centers of the pattern elements based on the upscaled target image;
compensating for shift of the mass centers by Bayer shift compensation;
removing the pattern elements with wrong parameters by an outlier removal algorithm;
extrapolating the mass centers of the pattern elements at borders of the upscaled target image; and
converting scattered data into 2D regularly sampled grid to obtaining the amount of LCA;
storing the amount of LCA as the calibration data;
acquiring system parameters and pre-stored calibration data;
obtaining the LCA of a camera to be corrected by calculating the system parameters; and
correcting the LCA by the calibration data.
2. The method for correcting LCA as described in claim 1 , wherein the storing the amount of LCA as the calibration data comprises storing the amount of LCA as the calibration data into a memory of the camera to be corrected.
3. The method for correcting LCA as described in claim 1 , wherein the calibration data comprises data in the format of a grid, a parametric model, or a symmetric model.
4. A computer equipment, comprising a memory configured to store information including program instructions and a processor configured to control execution of the program instructions, wherein the program instructions, when loaded and executed by the processor, performing the steps in the method for correcting LCA as described in claim 1 .