Nothing Special   »   [go: up one dir, main page]

CN117499616A - Control method, system, equipment and medium for camera module lens shading correction - Google Patents

Control method, system, equipment and medium for camera module lens shading correction Download PDF

Info

Publication number
CN117499616A
CN117499616A CN202311428052.4A CN202311428052A CN117499616A CN 117499616 A CN117499616 A CN 117499616A CN 202311428052 A CN202311428052 A CN 202311428052A CN 117499616 A CN117499616 A CN 117499616A
Authority
CN
China
Prior art keywords
module
image
shading correction
lens shading
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311428052.4A
Other languages
Chinese (zh)
Inventor
李行
胡继瑶
赵如雪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Semiconductor Nanjing Co Ltd
Original Assignee
Spreadtrum Semiconductor Nanjing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Semiconductor Nanjing Co Ltd filed Critical Spreadtrum Semiconductor Nanjing Co Ltd
Priority to CN202311428052.4A priority Critical patent/CN117499616A/en
Publication of CN117499616A publication Critical patent/CN117499616A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The present disclosure provides a control method, a system, a device and a medium for camera module lens shading correction, wherein the control method comprises the steps of obtaining a module to be detected and a reference module; acquiring initial lens shading correction data corresponding to the module to be detected and reference lens shading correction data corresponding to the reference module; correcting the initial lens shading correction data based on the reference lens shading correction data to obtain target lens shading correction data; and controlling the module to be detected based on the reference lens shading correction data and the target lens shading correction data. The control of consistency of image effects of the same model modules is achieved, unqualified modules can be removed more accurately, accuracy of the qualified module lens after shading correction is guaranteed, and consistency of image effects and image quality of the same model modules are improved.

Description

Control method, system, equipment and medium for camera module lens shading correction
Technical Field
The disclosure relates to the technical field of image processing, and in particular relates to a control method, a system, equipment and a medium for camera module lens shading correction.
Background
The lens Shading includes Luma Shading and Color Shading, and Luma Shading appears as brighter in the center of the image and darker in the periphery, and Color Shading appears as inconsistent Color in the center and periphery of the image. Therefore, a lens shading correction (LSC, lens Shading Correction) algorithm is required to process the image and perform shading compensation to ensure uniformity of brightness and color of the image.
In products with lenses, image effects are very important, including color, brightness, uniformity, etc. In the same batch or model shots, a high degree of consistency is desired in the final image effect. However, in the manufacturing process of the lens, some tiny and difficultly-identified errors exist in the production of the production line, so that the imaging effect of the lens is greatly affected. Specific influencing factors are also more, wherein the factors mainly comprise lens assembly factors, and the production flow difference of each lens cannot be completely consistent on a production line, such as lens mounting difference (lens holder), lens assembly, CRA (micro lens) and sensor difference, and the like, and the lens characteristics have slight differences between each module, so that the factors can influence the consistency of the imaging effect of the same batch of lenses, namely common lenses and lenses with large field angles.
At present, the problem of consistency of imaging effects can be solved at an algorithm end through otp (One Time Programmable, one-time programmable), when camera modules leave the factory, initial lens shading correction data of each module are calculated respectively, and the initial lens shading correction data are burnt into a storage medium of the module, so that when an image is displayed, a client only needs to read the data from otp and calculate final gain, and the final gain is applied to the image, so that the phenomenon of lens shading can not occur. However, the error degree and the control requirement of the module can influence the control effect of lens shading correction.
In the prior art, most of the shading indexes of a single lens are controlled. The method comprises the steps of dividing an image shot by a module into blocks, respectively obtaining the brightness ratio and the color difference ratio of each block, calculating the ratio parameters of a center block and an edge block before and after image correction, and the like, and is used for evaluating whether the shadows of the modules are qualified or not, but can not judge whether the imaging effects of the modules of the same model in the same batch or different batches are different or not.
Disclosure of Invention
The technical problem to be solved by the present disclosure is to provide a method, a system, a device and a medium for controlling camera module lens shading correction, in order to overcome the defect that in the prior art, whether the imaging effects of the same batch of lenses or the same model of lenses cannot be judged.
The technical problems are solved by the following technical scheme:
in a first aspect, a method for controlling lens shading correction of a camera module is provided, where the method includes:
acquiring a module to be detected and a reference module;
the module types of the module to be detected and the reference module are the same;
acquiring initial lens shading correction data corresponding to the module to be detected and reference lens shading correction data corresponding to the reference module;
correcting the initial lens shading correction data based on the reference lens shading correction data to obtain target lens shading correction data;
and controlling the module to be detected based on the reference lens shading correction data and the target lens shading correction data.
Preferably, the step of controlling the module to be detected based on the reference lens shading correction data and the target lens shading correction data includes:
based on the reference lens shading correction data and the target lens shading correction data, performing lens shading correction on the module to be detected, and screening out qualified modules and unqualified modules;
and reserving the qualified modules and eliminating the unqualified modules.
Preferably, the step of performing lens shading correction on the module to be detected based on the reference lens shading correction data and the target lens shading correction data, and screening out the qualified module and the unqualified module includes:
correcting an original image shot by the reference module based on the reference lens shading correction data to obtain a reference image;
correcting the original image shot by the module to be detected based on the reference lens shading correction data and the target lens shading correction data respectively to obtain an image before correction and an image after correction;
and screening out the qualified modules and the unqualified modules based on the reference image, the pre-correction image and the post-correction image.
Preferably, the step of screening the pass module and the fail module based on the reference image, the pre-correction image and the post-correction image includes:
dividing the reference image, the pre-correction image and the post-correction image into a plurality of image blocks respectively, and calculating brightness data and color difference data of each image block;
calculating the difference value between the brightness data and the color difference data of each image block of the pre-correction image and the brightness data and the color difference data of each image block of the reference image to obtain a pre-correction error;
Calculating the difference value between the brightness data and the color difference data of each image block of the corrected image and the brightness data and the color difference data of each image block of the reference image to obtain corrected errors;
and determining that the module to be detected is the qualified module in response to the corrected error being smaller than the error before correction and both the corrected error and the error before correction being smaller than a preset error threshold.
Preferably, the step of calculating the difference between the brightness data and the color difference data of each image block of the corrected image and the brightness data and the color difference data of each image block of the reference image to obtain the corrected error includes:
calculating a brightness ratio corresponding to the corrected image based on brightness data of each image block of the corrected image;
calculating a color difference ratio corresponding to the corrected image based on color difference data of each image block of the corrected image;
and calculating the difference value between the brightness data and the color difference data of each image block of the corrected image and the brightness data and the color difference data of each image block of the reference image to obtain the corrected error in response to the brightness ratio of the corrected image being smaller than a first preset brightness ratio threshold value and the color difference ratio of the corrected image being smaller than a first preset color difference ratio threshold value.
Preferably, the step of retaining the qualified module and rejecting the unqualified module further comprises:
and storing initial lens shading correction data corresponding to the qualified module into the qualified module.
Preferably, the step of obtaining the module to be detected and the reference module includes:
acquiring an initial image shot by an initial module;
and screening out a reference module from the initial modules based on the initial image, and taking the rest modules except the reference module in the initial modules as the modules to be detected.
Preferably, the initial module is a module with a brightness ratio of each image block in the initial image smaller than a second preset brightness ratio threshold;
and/or the initial module is a module with the color difference ratio of each image block in the initial image smaller than a second preset color difference ratio threshold value.
Preferably, the step of screening the reference module from the plurality of initial modules based on the initial image includes:
calculating a brightness average value and a color difference average value of the initial module based on the initial image;
and selecting an initial module closest to the distance value of the brightness average value and/or the color difference average value as the reference module.
In a second aspect, a control system for camera module lens shading correction is further provided, where the control system includes:
the module acquisition module is used for acquiring a module to be detected and a reference module;
the module types of the module to be detected and the reference module are the same;
the first data acquisition module is used for acquiring initial lens shading correction data corresponding to the module to be detected and reference lens shading correction data corresponding to the reference module;
the second data acquisition module is used for correcting the initial lens shading correction data based on the reference lens shading correction data to obtain target lens shading correction data;
and the control module is used for controlling the module to be detected based on the reference lens shading correction data and the target lens shading correction data.
Preferably, the management and control module includes:
the correction unit is used for correcting lens shading of the module to be detected based on the reference lens shading correction data and the target lens shading correction data, and screening out qualified modules and unqualified modules;
and the screening unit is used for reserving the qualified modules and eliminating the unqualified modules.
Preferably, the correction unit is further configured to correct an original image captured by the reference module based on the reference lens shading correction data to obtain a reference image; correcting the original image shot by the module to be detected based on the reference lens shading correction data and the target lens shading correction data respectively to obtain an image before correction and an image after correction; and screening out the qualified modules and the unqualified modules based on the reference image, the pre-correction image and the post-correction image.
Preferably, the correction unit is further configured to divide the reference image, the pre-correction image, and the post-correction image into a plurality of image blocks, and calculate luminance data and color difference data of each image block; calculating the difference value between the brightness data and the color difference data of each image block of the pre-correction image and the brightness data and the color difference data of each image block of the reference image to obtain a pre-correction error; calculating the difference value between the brightness data and the color difference data of each image block of the corrected image and the brightness data and the color difference data of each image block of the reference image to obtain corrected errors; and determining that the module to be detected is the qualified module in response to the corrected error being smaller than the error before correction and both the corrected error and the error before correction being smaller than a preset error threshold.
Preferably, the correction unit is further configured to calculate a luminance ratio corresponding to the corrected image based on luminance data of each image block of the corrected image; calculating a color difference ratio corresponding to the corrected image based on color difference data of each image block of the corrected image; and calculating the difference value between the brightness data and the color difference data of each image block of the corrected image and the brightness data and the color difference data of each image block of the reference image to obtain the corrected error in response to the brightness ratio of the corrected image being smaller than a first preset brightness ratio threshold value and the color difference ratio of the corrected image being smaller than a first preset color difference ratio threshold value.
Preferably, the management and control system further comprises:
and the storage module is used for storing the initial lens shading correction data corresponding to the qualified module into the qualified module.
Preferably, the module obtaining module includes:
the image acquisition unit is used for acquiring an initial image shot by the initial module;
and the module grouping unit is used for screening out a reference module from the initial modules based on the initial image, and taking the rest modules except the reference module in the initial modules as the modules to be detected.
Preferably, the initial module is a module with a brightness ratio of each image block in the initial image smaller than a second preset brightness ratio threshold;
and/or the initial module is a module with the color difference ratio of each image block in the initial image smaller than a second preset color difference ratio threshold value.
Preferably, the module grouping unit is further configured to calculate a brightness average value and a color difference average value of the initial module based on the initial image; and selecting an initial module closest to the distance value of the brightness average value and/or the color difference average value as the reference module.
In a third aspect, a chip is further provided, and the chip is applied to an electronic device, where the chip is configured to execute the method for controlling lens shading correction of a camera module.
In a fourth aspect, a chip module is further provided, and the chip module is applied to an electronic device, and includes a transceiver component and a chip, where the chip is configured to execute the above-mentioned method for controlling lens shading correction of the camera module.
In a fifth aspect, an electronic device is further provided, including a memory, a processor, and a computer program stored in the memory and used for running on the processor, where the processor implements the method for controlling lens shading correction of the camera module when executing the computer program.
In a sixth aspect, a computer readable storage medium is provided, on which a computer program is stored, where the computer program when executed by a processor implements the method for controlling lens shading correction of a camera module described above.
On the basis of conforming to the common knowledge in the art, the preferred conditions can be arbitrarily combined to obtain the preferred examples of the disclosure.
The positive progress effect of the present disclosure is:
according to the control method, system, equipment and medium for camera module lens shading correction, for the to-be-detected modules and the reference modules of the same model, the to-be-detected modules and the reference modules are subjected to lens shading comparison before and after correction, so that control over consistency of image effects of the same model modules is realized, unqualified modules can be removed more accurately, accuracy of the qualified module lens shading correction is guaranteed, and consistency of image effects and image quality of the modules of the same model are improved.
Drawings
Fig. 1 is a first flow chart of a method for controlling camera module lens shading correction according to embodiment 1 of the present disclosure;
fig. 2 is a second flow chart of a method for controlling camera module lens shading correction according to embodiment 1 of the present disclosure;
Fig. 3 is a third flow chart of a method for controlling camera module lens shading correction according to embodiment 1 of the present disclosure;
fig. 4 is a fourth flowchart of a method for controlling camera module lens shading correction according to embodiment 1 of the present disclosure;
fig. 5 is a schematic diagram of image blocks divided by a reference image in the method for controlling camera module lens shading correction according to embodiment 1 of the present disclosure.
Fig. 6 is a fifth flowchart of a method for controlling camera module lens shading correction according to embodiment 1 of the present disclosure;
fig. 7 is a sixth flowchart of a method for controlling camera module lens shading correction according to embodiment 1 of the present disclosure;
fig. 8 is a schematic structural diagram of a control system for camera module lens shading correction according to embodiment 2 of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device provided in embodiment 3 of the present disclosure.
Detailed Description
The present disclosure is further illustrated by way of examples below, but is not thereby limited to the scope of the examples described.
Example 1
The present embodiment provides a control method for camera module lens shading correction, as shown in fig. 1, the control method includes:
s1, acquiring a module to be detected and a reference module.
The to-be-detected module is the to-be-detected camera module, and the reference module is the reference camera module.
The module types of the module to be detected and the reference module are the same. Specifically, the module to be detected and the reference module are modules of the same batch or different batches with the same module model.
S2, obtaining initial lens shading correction data corresponding to the module to be detected and reference lens shading correction data corresponding to the reference module.
The initial lens shading correction data is lens shading correction data corresponding to the to-be-detected module, and the reference lens shading correction data is lens shading correction data corresponding to the reference module.
S3, correcting the initial lens shading correction data based on the reference lens shading correction data to obtain target lens shading correction data.
S4, controlling the module to be detected based on the reference lens shading correction data and the target lens shading correction data.
Specifically, an original image shot by a module to be detected and an original image shot by a reference module are obtained, and corresponding lens shading correction data are calculated according to image information and preset parameters. The preset parameters include BLC (Black Level Correction ), lsc table (lens shading correction table) size, lsc table type (mesh shading correct, grid shading correction; radial shading correct radius shading correction, etc.), which can be modified according to the actual application requirements. The lens shading correction data according to the original image calculation module is known in the art, and the detailed description thereof will not be repeated here.
The reference module may also be referred to as a typical module, and the performance of the reference module may represent the average level of the same model modules.
According to the control method for camera module lens shading correction, initial lens shading correction data of a module to be detected is corrected through reference lens shading correction data of a reference module to obtain target lens shading correction data, and then the module to be detected is controlled through the reference lens shading correction data and the target lens shading correction data, so that the proximity degree between the module to be detected after lens shading correction and the image effect of the reference module can be judged, consistency control of the image effect of the same model module is achieved, unqualified modules can be removed more accurately, accuracy of the module to be detected after lens shading correction is guaranteed, and consistency and image quality of the image effect of the same model module are improved.
In an alternative embodiment, as shown in fig. 2, the step S4 includes:
s41, performing lens shading correction on the module to be detected based on the reference lens shading correction data and the target lens shading correction data, and screening out qualified modules and unqualified modules.
S42, reserving qualified modules and eliminating unqualified modules.
And the qualified module is a module with the approaching degree between the lens shading corrected module and the reference module image effect meeting the preset requirement. The unqualified module is a module with the approach degree between the lens shading corrected and the reference module image effect not meeting the preset requirement.
In an alternative embodiment, as shown in fig. 3, the step S41 includes:
s411, correcting the original image shot by the reference module based on the reference lens shading correction data to obtain a reference image.
S412, correcting the original image shot by the module to be detected based on the reference lens shading correction data and the target lens shading correction data respectively to obtain an image before correction and an image after correction.
S413, screening out qualified modules and unqualified modules based on the reference image, the pre-correction image and the post-correction image.
The reference module is selected as a control reference for lens shading correction, and after the lens shading correction is carried out on the module to be detected, the characteristics of color difference and brightness are better than those before the correction, so that the data before and after the lens shading correction are compared to judge whether the module is qualified or not.
Correcting the original image shot by the module to be detected based on the reference lens shading correction data to obtain a pre-correction image, correcting the original image shot by the module to be detected based on the target lens shading correction data, and correcting the post-correction image.
Specifically, the reference lens shading correction data is cali_gain, the lens shading compensation of the module to be detected is based on cali_gain, and then the cali_gain is corrected by using otp of the reference module and otp of the module to be detected to obtain target lens shading correction data cali_gain_ otp of the module to be detected.
Acting cali_gain on an original image shot by a reference module to serve as a controlled reference image I_ref; and then, respectively using cali_gain and cali_gain_ otp to carry out lens shading correction on the original image I shot by the module to be detected, so as to obtain an image before lens shading correction I_cali and an image after lens shading correction I_cali_ otp.
Based on the reference image i_ref, the pre-correction image i_cali, and the post-correction image i_cali_ otp, pass and fail modules are screened out.
In an alternative embodiment, as shown in fig. 4, the step S413 includes:
s4131, dividing the reference image, the pre-correction image and the post-correction image into a plurality of image blocks, respectively, and calculating brightness data and color difference data of each image block.
S4132, calculating the difference value between the brightness data and the color difference data of each image block of the image before correction and the brightness data and the color difference data of each image block of the reference image, and obtaining the error before correction.
S4133, calculating the difference value between the brightness data and the color difference data of each image block of the corrected image and the brightness data and the color difference data of each image block of the reference image, and obtaining the corrected error.
S4134, determining the module to be detected as a qualified module in response to the fact that the corrected error is smaller than the error before correction and both the corrected error and the error before correction are smaller than a preset error threshold.
The error after correction of the qualified module is smaller than the error before correction, the error after correction and the error before correction are smaller than a preset error threshold, the error after correction of the unqualified module is not smaller than the error before correction, and the error after correction and the error before correction are not smaller than the preset error threshold.
The present embodiment will be further described by taking the calculation of luminance data and color difference data of each image block in the reference image as an example:
1) As shown in fig. 5, the reference image is uniformly divided into m×n blocks (image blocks) according to preset block parameters m and n, where m and n are positive integers.
2) And calculating corresponding brightness data and color difference data for each block, wherein the brightness data comprises a brightness value y, the color difference data comprises red-green color difference R/G and blue-green color difference B/G, R is an R (red) channel value in three RGB (red-green-blue) color channels, G is a G (green) channel value in the three RGB color channels, and B is a B (blue) channel value in the three RGB color channels.
Calculating y and r/g, b/g for each block:
y i =0.299*r i +0.587*g i +0.114*b i
rg i =r i /g i
bg i =b i /g i
where i is the number of the image block, i<=m*n,y i Ith pixel block luminance value, r i R-channel value, g, of the i-th image block i G channel value, b of ith pixel block i B-channel value, rg, of the ith block i Red-green color difference bg of ith image block i Blue-green color difference of the ith image block.
The calculation modes of the brightness data and the color difference data of each image block in the image before correction and the image after correction are the same as those of the brightness data and the color difference data of each image block in the reference image, and are not repeated here.
The similarity data of the reference image, the pre-correction image and the post-correction image can be directly obtained through Euclidean distance and cosine similarity for comparison. The differences of the corresponding image blocks of the reference image, the pre-correction image and the post-correction image can be calculated respectively, and then the differences between the lens shading correction and the reference image can be measured in a mode of maximum/minimum difference, error mean value and the like.
Specifically, the error mean value can be used to measure the proximity of the lens shading correction to the reference image:
wherein rg error 、bg error 、y error To correct for pre-error, rg_ otp error 、bg_otp error 、y_otp error Is the corrected error; i is the number of the image block in the image, rg_i, bg_i, y_i are the difference value of the brightness data and the color difference data of each image block of the image before correction and the brightness data and the color difference data of each image block of the reference image; rg_ otp _i, bg_ otp _i, and y_ otp _i are differences between the luminance data and the color difference data of each image block of the corrected image and the luminance data and the color difference data of each image block of the reference image.
The corrected image after the lens shading correction is closer to the reference image. Therefore, the corrected errors are smaller than the error before correction, and the corrected errors and the error before correction are smaller than the preset error threshold, namely the corrected errors are smaller than the preset corrected error threshold, the corrected errors are smaller than the preset error threshold before correction, and the purpose of setting the threshold is mainly to avoid that the consistency phase difference between the module to be detected and the reference module is larger, and the effect consistency cannot be achieved through the control of lens shading correction.
In an alternative embodiment, the step S4133 includes:
calculating a brightness ratio corresponding to the corrected image based on the brightness data of each image block of the corrected image;
calculating a color difference ratio corresponding to the corrected image based on the color difference data of each image block of the corrected image;
and calculating the difference value between the brightness data and the color difference data of each image block of the corrected image and the brightness data and the color difference data of each image block of the reference image to obtain corrected errors in response to the brightness ratio of the corrected image being smaller than a first preset brightness ratio threshold value and the color difference ratio corresponding to the corrected image being smaller than a first preset color difference ratio threshold value.
In particular, the method comprises the steps of, And->
Wherein y is corner_i Representing the edge brightness, y, of the ith image block of the corrected image center Representing the corrected imageHeart brightness, rg corner_i Representing the edge red-green color difference, rg, of the ith image block of the corrected image center Representing the central red-green color difference, bg, of the corrected image corner_i Representing the edge bluish-green color difference, bg, of the ith image block of the corrected image center Representing the central blue-green color difference of the corrected image; Y_EVEN_AFTER is the first preset color difference ratio threshold, and C_E_AFTER is the first preset color difference ratio threshold.
If the brightness ratio of the corrected image is smaller than a first preset brightness ratio threshold value, the color difference ratio corresponding to the corrected image is smaller than a first preset color difference ratio threshold value, the problem of lens shading of the module to be detected is improved after the correction of the reference module, the brightness uniformity, the attenuation degree and the color uniformity of four corners of the module to be detected meet the control requirement, a part of the module to be detected which does not meet the control requirement can be eliminated in the process, and a foundation is laid for the subsequent calculation of the corrected error.
In an alternative embodiment, as shown in fig. 6, the step S42 further includes:
s5, storing initial lens shading correction data corresponding to the qualified module into the qualified module.
And initial lens shading correction data corresponding to the qualified module, namely lens shading correction data corresponding to the qualified module.
And storing the initial lens shading correction data corresponding to the qualified module into the qualified module, so that when the qualified module is used for shooting images later, the client only needs to read the initial lens shading correction data corresponding to the qualified module from otp and calculate the final gain when displaying the images, and the initial lens shading correction data is applied to the shot images, so that the phenomenon of lens shading can not occur.
In an alternative embodiment, as shown in fig. 7, the step S1 includes:
s11, acquiring an initial image shot by the initial module.
S12, screening out a reference module from the plurality of initial modules based on the initial image, and taking the rest modules except the reference module in the plurality of initial modules as modules to be detected.
The initial module is an initial camera module, and comprises modules of the same type and the same batch or different batches of modules including the module to be detected and the remaining modules.
Specifically:
1) Dividing an initial image into m x n blocks (image blocks) according to preset block parameters m and n, wherein m and n are positive integers. Reference is made in particular to fig. 5.
2) Calculating y and r/g, b/g for each block:
y i =0.299*r i +0.587*g i +0.114*b i
rg i =r i /g i
bg i =b i /g i
where i is block number, i<=m×n, y denotes a luminance value, R/G denotes a red-green color difference, B/G denotes a blue-green color difference, R denotes an R (red) channel value in three color channels of RGB (red-green-blue), G denotes a G (green) channel value in three color channels of RGB, and B denotes a B (blue) channel value in three color channels of RGB; y is i Ith pixel block luminance value, r i R-channel value, g, of the i-th image block i G channel value, b of ith pixel block i B-channel value, rg, of the ith block i Red-green color difference bg of ith image block i Blue-green color difference of the ith image block.
3) Brightness control:
the brightness ratio of the edge area of the initial image compared with the center reflects the attenuation degree of the module, and an attenuation threshold Y_DEC is set;
y corner representing the edge brightness of the initial image, y center Representing the center luminance of the initial image.
Acquiring brightness of a block area at four corners of an initial image, calculating a difference ratio of maximum brightness to minimum brightness, mainly reflecting brightness uniformity of a module, and setting a uniform threshold Y_EVEN;
y corner_max representing the maximum edge brightness, y, of the initial image corner_min Representing the minimum edge brightness, y, of the initial image center_max Representing the maximum center luminance of the initial image.
The brightness control mainly relates to whether the characteristics of uniformity, attenuation degree and the like of brightness at four corners of a module meet the control requirement or not, and similar indexes can be adopted to express the characteristics so as to control the brightness of the module;
4) Color difference control
The color difference control mainly reflects the color uniformity of the module, and a color difference ratio threshold C_E is set;
rg corner representing the edge red-green color difference of the initial image, rg center Representing the central red-green color difference of the initial image, bg corner Representing the edge bluish green color difference of the initial image bg center Representing the central blue-green color difference of the initial image.
The color difference control reflects the uniformity of the module in terms of color, and the imaging quality of the module can be better controlled.
According to an initial image obtained by shooting the initial module under a specific light source, judging whether the initial camera module meets the lens shadow control standard before otp application by performing block division on the initial image and calculating the standard of the brightness ratio and the color difference ratio of each block. The problem that the initial module has defects can be screened out by using the front management and control, and a part of modules which do not meet the management and control requirements can be eliminated in the process, so that the subsequent otp burning efficiency is improved.
In an alternative embodiment, the initial module is a module in which the brightness ratio of each image block in the initial image is smaller than a second preset brightness ratio threshold; the initial module is a module with the color difference ratio of each image block in the initial image smaller than a second preset color difference ratio threshold value.
If the brightness ratio of each image block in the initial image of the initial module is smaller than the second preset brightness ratio threshold value and the color difference ratio of each image block in the initial image is smaller than the second preset color difference ratio threshold value, the index of the lens shadow of the initial module accords with the lens shadow control standard, the brightness uniformity and the color difference uniformity of the initial module accord with the requirements, and the imaging quality of the module is higher.
In an alternative embodiment, the step S12 includes:
calculating a brightness average value and a color difference average value of the initial module based on the initial image;
selecting an initial module with the nearest distance value to the brightness average value and/or the color difference average value as a reference module;
and taking the remaining modules except the reference module in the plurality of initial modules as the modules to be detected.
Selecting a reference module based on a specific rule, wherein the lens shadow indexes of the reference module are all near the average level of the batch of modules and represent the performance level of the batch of modules; the standard module can be selected by a specific rule, and the average value of the brightness and the chromatic aberration of the modules in the batch can be calculated. For example, an initial module closest to the distance value of the luminance average value and/or the color difference average value may be used as the reference module.
The control method for camera module lens shading correction can be used for terminal products such as mobile phones, tablet computers and cameras, and equipment products such as industrial cameras, security cameras and car machine systems which adopt camera modules to shoot and preview. The above-mentioned product all gathers scene image data through the camera module, in the batch product, because the inconsistency of image effect is seriously influenced to the camera lens shadow error of single camera module. Therefore, in the same batch of modules or the same model of modules, a high degree of consistency is desired in the final image effect. The specific influence factors of the lens shading error are also more, wherein the factors are mainly the factors of module assembly and lens on a production line. Aiming at the problem, the burning otp is corrected for lens shading in the module production process, and the algorithm performs consistency correction on the modules in the same batch through otp.
The present disclosure is directed to controlling in a otp burning process of lens shading correction, and selects a camera module meeting otp controlling standard, and in addition, the present disclosure is applicable to controlling of lens shading correction otp burning of single color temperature and multiple color temperatures.
Example 2
The present embodiment provides a control system for camera module lens shading correction, as shown in fig. 8, the control system includes:
The module acquisition module 1 is used for acquiring a module to be detected and a reference module;
the module types of the module to be detected and the reference module are the same;
the first data acquisition module 2 is used for acquiring initial lens shading correction data corresponding to the module to be detected and reference lens shading correction data corresponding to the reference module;
a second data acquisition module 3 that corrects the initial lens shading correction data based on the reference lens shading correction data to obtain target lens shading correction data;
and the control module 4 is used for controlling the module to be detected based on the reference lens shading correction data and the target lens shading correction data.
In an alternative embodiment, the management module 4 comprises:
a correction unit 41, configured to perform lens shading correction on the module to be detected based on the reference lens shading correction data and the target lens shading correction data, and screen out a qualified module and a unqualified module;
and the screening unit 42 is used for reserving qualified modules and eliminating unqualified modules.
In an alternative embodiment, the correction unit 41 is further configured to correct the original image captured by the reference module based on the reference lens shading correction data, so as to obtain a reference image; correcting an original image shot by a module to be detected based on the reference lens shading correction data and the target lens shading correction data respectively to obtain an image before correction and an image after correction; and screening out qualified modules and unqualified modules based on the reference image, the pre-correction image and the post-correction image.
In an alternative embodiment, the correction unit 41 is further configured to divide the reference image, the pre-correction image, and the post-correction image into a plurality of image blocks, respectively, and calculate luminance data and color difference data of each image block; calculating the difference value between the brightness data and the color difference data of each image block of the image before correction and the brightness data and the color difference data of each image block of the reference image to obtain an error before correction; calculating the difference value between the brightness data and the color difference data of each image block of the corrected image and the brightness data and the color difference data of each image block of the reference image to obtain corrected errors; and determining the module to be detected as a qualified module in response to the fact that the corrected error is smaller than the error before correction and both the corrected error and the error before correction are smaller than a preset error threshold.
In an alternative embodiment, the correction unit 41 is further configured to calculate a luminance ratio corresponding to the corrected image based on the luminance data of each image block of the corrected image; calculating a color difference ratio corresponding to the corrected image based on the color difference data of each image block of the corrected image; and calculating the difference value between the brightness data and the color difference data of each image block of the corrected image and the brightness data and the color difference data of each image block of the reference image to obtain corrected errors in response to the brightness ratio of the corrected image being smaller than a first preset brightness ratio threshold value and the color difference ratio corresponding to the corrected image being smaller than a first preset color difference ratio threshold value.
In an alternative embodiment, the management and control system further comprises:
and the storage module 5 is used for storing the initial lens shading correction data corresponding to the qualified module into the qualified module.
In an alternative embodiment, the module acquiring module 1 includes:
an image acquisition unit 11 for acquiring an initial image captured by an initial module;
the module grouping unit 12 is configured to screen out a reference module from a plurality of initial modules based on the initial image, and take the remaining modules except the reference module in the plurality of initial modules as the modules to be detected.
In an alternative embodiment, the initial module is a module in which the brightness ratio of each image block in the initial image is smaller than a second preset brightness ratio threshold;
in an alternative embodiment, the initial module is a module in which the color difference ratio of each image block in the initial image is smaller than a second preset color difference ratio threshold.
In an alternative embodiment, the module grouping unit 12 is further configured to calculate an average value of brightness and an average value of color difference of the initial module based on the initial image; and selecting an initial module with the nearest distance value to the brightness average value and/or the color difference average value as a reference module.
The control system for camera module lens shading correction in this embodiment corresponds to the control method for camera module lens shading correction in embodiment 1, and the working principle of the control system is the same as that of the control method, so that the description thereof will not be repeated.
According to the control system for camera module lens shading correction, initial lens shading correction data of a module to be detected is corrected through reference lens shading correction data of a reference module, target lens shading correction data is obtained, and then the module to be detected is controlled through the reference lens shading correction data and the target lens shading correction data, so that the proximity degree between the module to be detected after lens shading correction and the image effect of the reference module can be judged, the control of consistency of the image effect of the same model module is realized, unqualified modules can be removed more accurately, the accuracy of the qualified module after lens shading correction is guaranteed, and the consistency of the image effect and the image quality of the same model module are improved.
The control system for camera module lens shading correction provided in this embodiment may be a separate chip, a chip module or an electronic device, or may be a chip or a chip module integrated in the electronic device.
The control system for camera module lens shading correction described in this embodiment includes various modules/units, which may be software modules/units, may be hardware modules/units, or may be partly software modules/units, and partly hardware modules/units.
The control system for camera module lens shading correction in this embodiment may operate in an android device, which may further include components such as a key, a display screen, and a housing, in addition to the control system for camera module lens shading correction in this embodiment.
Example 3
Fig. 9 is a schematic structural diagram of an electronic device according to the present embodiment. The electronic device includes a memory, a processor, and a computer program stored on the memory and for execution on the processor, the processor implementing the method of controlling camera module lens shading correction as in embodiment 1 above when executing the program. The electronic device 80 shown in fig. 9 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 9, the electronic device 80 may be embodied in the form of a general purpose computing device, which may be a server device, for example. Components of the electronic device 80 may include, but are not limited to: the at least one processor 81, the at least one memory 82, a bus 83 connecting the various system components, including the memory 82 and the processor 81.
The bus 83 includes a data bus, an address bus, and a control bus.
The memory 82 may include volatile memory such as Random Access Memory (RAM) 821 and/or cache memory 822, and may further include Read Only Memory (ROM) 823.
Memory 82 may also include a program/utility 825 having a set (at least one) of program modules 824, such program modules 824 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The processor 81 executes a computer program stored in the memory 82, thereby executing various functional applications and data processing such as the control method of camera module lens shading correction in embodiment 1 of the present disclosure.
The electronic device 80 may also communicate with one or more external devices 84 (e.g., keyboard, pointing device, etc.). Such communication may occur through an input/output (I/O) interface 85. Also, model-generating device 80 may also communicate with one or more networks, such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet, through network adapter 86. As shown in fig. 9, the network adapter 86 communicates with other modules of the model-generating device 80 via the bus 83. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in connection with the model-generating device 80, including, but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, data backup storage systems, and the like.
It should be noted that although several units/modules or sub-units/modules of an electronic device are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more units/modules described above may be embodied in one unit/module in accordance with embodiments of the present disclosure. Conversely, the features and functions of one unit/module described above may be further divided into ones that are embodied by a plurality of units/modules.
Example 4
The present embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps in the control method for camera module lens shading correction in embodiment 1 above.
More specifically, among others, readable storage media may be employed including, but not limited to: portable disk, hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation, the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps of a management method implementing camera module lens shading correction as in the above embodiment 1, when the program product is executed on the terminal device.
Wherein the program code for carrying out the present disclosure may be written in any combination of one or more programming languages, and the program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device, partly on a remote device or entirely on the remote device.
While specific embodiments of the present disclosure have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and the scope of the disclosure is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the principles and spirit of the disclosure, but such changes and modifications fall within the scope of the disclosure.

Claims (14)

1. A control method for camera module lens shading correction is characterized by comprising the following steps:
acquiring a module to be detected and a reference module;
the module types of the module to be detected and the reference module are the same;
acquiring initial lens shading correction data corresponding to the module to be detected and reference lens shading correction data corresponding to the reference module;
Correcting the initial lens shading correction data based on the reference lens shading correction data to obtain target lens shading correction data;
and controlling the module to be detected based on the reference lens shading correction data and the target lens shading correction data.
2. The method according to claim 1, wherein the step of controlling the module to be detected based on the reference lens shading correction data and the target lens shading correction data includes:
based on the reference lens shading correction data and the target lens shading correction data, performing lens shading correction on the module to be detected, and screening out qualified modules and unqualified modules;
and reserving the qualified modules and eliminating the unqualified modules.
3. The method according to claim 2, wherein the step of screening out the pass modules and the fail modules by performing lens shading correction on the module to be detected based on the reference lens shading correction data and the target lens shading correction data comprises:
correcting an original image shot by the reference module based on the reference lens shading correction data to obtain a reference image;
Correcting the original image shot by the module to be detected based on the reference lens shading correction data and the target lens shading correction data respectively to obtain an image before correction and an image after correction;
and screening out the qualified modules and the unqualified modules based on the reference image, the pre-correction image and the post-correction image.
4. A method of controlling according to claim 3, wherein the step of screening out the pass modules and the fail modules based on the reference image, the pre-correction image, and the post-correction image comprises:
dividing the reference image, the pre-correction image and the post-correction image into a plurality of image blocks respectively, and calculating brightness data and color difference data of each image block;
calculating the difference value between the brightness data and the color difference data of each image block of the pre-correction image and the brightness data and the color difference data of each image block of the reference image to obtain a pre-correction error;
calculating the difference value between the brightness data and the color difference data of each image block of the corrected image and the brightness data and the color difference data of each image block of the reference image to obtain corrected errors;
And determining that the module to be detected is the qualified module in response to the corrected error being smaller than the error before correction and both the corrected error and the error before correction being smaller than a preset error threshold.
5. The method according to claim 4, wherein the step of calculating the difference between the luminance data and the color difference data of each image block of the corrected image and the luminance data and the color difference data of each image block of the reference image, and obtaining the corrected error includes:
calculating a brightness ratio corresponding to the corrected image based on brightness data of each image block of the corrected image;
calculating a color difference ratio corresponding to the corrected image based on color difference data of each image block of the corrected image;
and calculating the difference value between the brightness data and the color difference data of each image block of the corrected image and the brightness data and the color difference data of each image block of the reference image to obtain the corrected error in response to the brightness ratio of the corrected image being smaller than a first preset brightness ratio threshold value and the color difference ratio of the corrected image being smaller than a first preset color difference ratio threshold value.
6. The method of controlling according to claim 2, wherein after the step of retaining the pass module and rejecting the fail module, further comprises:
and storing initial lens shading correction data corresponding to the qualified module into the qualified module.
7. The method according to claim 1, wherein the step of obtaining the module to be detected and the reference module includes:
acquiring an initial image shot by an initial module;
and screening out a reference module from the initial modules based on the initial image, and taking the rest modules except the reference module in the initial modules as the modules to be detected.
8. The method according to claim 7, wherein the initial module is a module in which a luminance ratio of each image block in the initial image is smaller than a second preset luminance ratio threshold;
and/or the initial module is a module with the color difference ratio of each image block in the initial image smaller than a second preset color difference ratio threshold value.
9. The method according to claim 7, wherein the step of screening the reference modules among the plurality of initial modules based on the initial image comprises:
Calculating a brightness average value and a color difference average value of the initial module based on the initial image;
and selecting an initial module closest to the distance value of the brightness average value and/or the color difference average value as the reference module.
10. A control system for camera module lens shading correction is characterized in that the control system comprises:
the module acquisition module is used for acquiring a module to be detected and a reference module;
the module types of the module to be detected and the reference module are the same;
the first data acquisition module is used for acquiring initial lens shading correction data corresponding to the module to be detected and reference lens shading correction data corresponding to the reference module;
the second data acquisition module is used for correcting the initial lens shading correction data based on the reference lens shading correction data to obtain target lens shading correction data;
and the control module is used for controlling the module to be detected based on the reference lens shading correction data and the target lens shading correction data.
11. A chip for use in an electronic device, wherein the chip is configured to perform the method for controlling lens shading correction of a camera module according to any one of claims 1 to 9.
12. A chip module applied to electronic equipment, comprising a transceiver component and a chip, wherein the chip is used for executing the control method for camera module lens shading correction according to any one of claims 1-9.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory for execution on the processor, wherein the processor implements the method for controlling camera module lens shading correction according to any one of claims 1-9 when executing the computer program.
14. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements a method for controlling camera module lens shading correction according to any one of claims 1-9.
CN202311428052.4A 2023-10-30 2023-10-30 Control method, system, equipment and medium for camera module lens shading correction Pending CN117499616A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311428052.4A CN117499616A (en) 2023-10-30 2023-10-30 Control method, system, equipment and medium for camera module lens shading correction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311428052.4A CN117499616A (en) 2023-10-30 2023-10-30 Control method, system, equipment and medium for camera module lens shading correction

Publications (1)

Publication Number Publication Date
CN117499616A true CN117499616A (en) 2024-02-02

Family

ID=89679329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311428052.4A Pending CN117499616A (en) 2023-10-30 2023-10-30 Control method, system, equipment and medium for camera module lens shading correction

Country Status (1)

Country Link
CN (1) CN117499616A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117979151A (en) * 2024-04-02 2024-05-03 南昌同兴达精密光电有限公司 Lens shading correction data processing method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117979151A (en) * 2024-04-02 2024-05-03 南昌同兴达精密光电有限公司 Lens shading correction data processing method and system
CN117979151B (en) * 2024-04-02 2024-06-04 南昌同兴达精密光电有限公司 Lens shading correction data processing method and system

Similar Documents

Publication Publication Date Title
EP3611916B1 (en) Imaging control method and electronic device
US9414052B2 (en) Method of calibrating an image signal processor to overcome lens effects
CN102104709B (en) Method for processing image shot by camera and camera
US9854218B2 (en) Electronic system and image processing method
US20090021526A1 (en) Determination method for white-point and correction method of the white balance
CN117499616A (en) Control method, system, equipment and medium for camera module lens shading correction
CN111242858B (en) Distortion correction method and system for camera lens
WO2023065523A1 (en) Isp-based image processing method and apparatus, storage medium, and camera device
CN114331907A (en) Color shading correction method and device
CN114827565A (en) Color correction matrix determining method, color correction device and storage medium
CN116843566A (en) Tone mapping method, tone mapping device, display device and storage medium
WO2019137396A1 (en) Image processing method and device
CN113516636A (en) Method, device, equipment and medium for evaluating lens shadow and lens module
WO2024001502A1 (en) Screen display method, screen display apparatus, electronic device, program and medium
CN114926364B (en) Image correction method, apparatus, computer device, and storage medium
CN117037652A (en) Point-to-point correction method and device for display screen and computer equipment
CN115914601A (en) Image processing method, system, electronic device, readable storage medium and chip
US10198797B2 (en) Apparatus correcting shading without taking optical characteristics into consideration and method thereof
US11122188B1 (en) Image noise reduction device and method thereof
KR20150054452A (en) compensation device for compensating a non uniformity of a display device and method thereof
CN111556228A (en) Method and system for correcting lens shadow
JP2015201715A (en) Display control device, control method of display control device, and program
CN114866755B (en) Automatic white balance method and device, computer storage medium and electronic equipment
CN111800626B (en) Photographing consistency evaluation method and device, mobile terminal and storage medium
CN114615482B (en) White balance debugging method, storage medium and intelligent television

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination