CN117979151B - Lens shading correction data processing method and system - Google Patents

Lens shading correction data processing method and system Download PDF

Info

Publication number
CN117979151B
CN117979151B CN202410391412.6A CN202410391412A CN117979151B CN 117979151 B CN117979151 B CN 117979151B CN 202410391412 A CN202410391412 A CN 202410391412A CN 117979151 B CN117979151 B CN 117979151B
Authority
CN
China
Prior art keywords
data
lsc
corner area
target
modified
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.)
Active
Application number
CN202410391412.6A
Other languages
Chinese (zh)
Other versions
CN117979151A (en
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.)
Nanchang Tongxingda Precision Optoelectronics Co Ltd
Original Assignee
Nanchang Tongxingda Precision Optoelectronics 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 Nanchang Tongxingda Precision Optoelectronics Co Ltd filed Critical Nanchang Tongxingda Precision Optoelectronics Co Ltd
Priority to CN202410391412.6A priority Critical patent/CN117979151B/en
Publication of CN117979151A publication Critical patent/CN117979151A/en
Application granted granted Critical
Publication of CN117979151B publication Critical patent/CN117979151B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Color Television Image Signal Generators (AREA)

Abstract

The invention provides a lens shading correction data processing method and a system, wherein the method comprises the steps of burning initial LSC data, acquiring an metamorphosis module demand, and outputting a target data position and a target data volume according to a first mapping relation between the metamorphosis module demand and target metamorphosis data; according to a third mapping relation between the target data position and the area address, determining a target area address of modified LSC data, writing the target data amount into the target area address to obtain modified LSC data, burning the modified LSC data into a camera, modifying specified position data, quickly generating data meeting the requirements of customers, and writing the data into the camera. In addition, according to the second mapping relation between the target data amount and the corresponding RGB colors, the target RGB colors of the target data position are determined and displayed so as to prompt the user to modify the performance of the LSC data after being burnt into the camera.

Description

Lens shading correction data processing method and system
Technical Field
The invention belongs to the technical field of lens shading correction data processing, and particularly relates to a lens shading correction data processing method and system.
Background
Currently, camera module suppliers all need to burn the Lens Shading Correction (LSC) data into the terminal platform for subsequent image processing.
Along with the increase of development projects, the requirements of each project for manufacturing the metamorphosis module are different, and in order to meet the requirements of the metamorphosis module, the appointed position data in the LSC data are required to be modified, if the appointed position data are modified manually, the workload is high, and errors are easy to occur.
Disclosure of Invention
Based on this, the embodiment of the invention provides a lens shading correction data processing method and system, aiming at accurately and rapidly modifying the appointed position data in the lens shading correction data according to the requirement of an metamorphosis module.
A first aspect of an embodiment of the present invention provides a lens shading correction data processing method, including:
Establishing a first mapping relation between an metamorphosis module demand and target metamorphosis data, wherein the target metamorphosis data comprises a target data position and a target data volume;
Acquiring LSC data, determining the area address and the corresponding data quantity of each frame in the LSC data, endowing corresponding RGB colors according to the data quantity in the LSC data, and establishing a second mapping relation between the data quantity and the corresponding RGB colors;
establishing a third mapping relation between the target data position and the area address;
Burning initial LSC data, acquiring an metamorphosis module demand, and outputting a target data position and a target data volume according to the metamorphosis module demand and a first mapping relation;
Determining a target area address of modified LSC data according to the target data position and the third mapping relation, and writing the target data amount into the target area address to obtain modified LSC data, wherein the modified LSC data is used for being burnt into a camera;
And determining the target RGB color of the target data position according to the target data amount and the second mapping relation, and displaying the target RGB color so as to prompt a user to modify the performance of the LSC data after being burnt into the camera.
Further, before the step of establishing the first mapping relationship between the metamorphosis module requirement and the target metamorphosis data, the method includes:
acquiring an area position requirement in an metamorphosis module requirement, wherein the area position requirement at least comprises a modification requirement of data on an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area in LSC data to be modified;
acquiring the size of the LSC data to be modified, the data quantity extreme value in the LSC data to be modified and the position corresponding to the data quantity extreme value, wherein the size of the LSC data to be modified comprises the number of rows of the LSC data to be modified and the number of columns of the LSC data to be modified;
Judging whether the position corresponding to the data quantity extremum is the middle position of the size of the LSC data to be modified according to the size of the LSC data to be modified and the position corresponding to the data quantity extremum;
if so, determining a row number and a column number of a position corresponding to the data quantity extremum, and dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the row number and the column number of the position corresponding to the data quantity extremum, wherein the four divided areas of the upper left corner area, the upper right corner area, the lower left corner area and the lower right corner area do not contain the position corresponding to the data quantity extremum;
If not, dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the row number and the column number of the position corresponding to the data quantity extremum, wherein the four areas of the divided upper left corner area, upper right corner area, lower left corner area and lower right corner area comprise the position corresponding to the data quantity extremum.
Further, the step of dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the row number and the column number of the position corresponding to the data volume extremum, where the four divided areas of the upper left corner area, the upper right corner area, the lower left corner area and the lower right corner area all include the positions corresponding to the data volume extremum includes:
Judging whether the position corresponding to the data quantity extremum is unique;
if so, dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the row number and the column number of the position corresponding to the unique data quantity extremum, wherein the four areas of the upper left corner area, the upper right corner area, the lower left corner area and the lower right corner area after division all contain the positions corresponding to the data quantity extremum;
If not, determining the boundary position in the position corresponding to each data volume extremum, dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the boundary position, wherein the four areas of the divided upper left corner area, upper right corner area, lower left corner area and lower right corner area all comprise the positions corresponding to the data volume extremum.
Further, the step of assigning corresponding RGB colors according to the size of the data amount in the LSC data, and establishing a second mapping relationship between the data amount and the corresponding RGB colors includes:
acquiring a numerical range of data quantity and a numerical range of RGB color, and judging the sizes of the numerical range of data quantity and the numerical range of RGB color;
If the numerical range of the data quantity is judged to be larger than the numerical range of the RGB color, determining the minimum unit of the numerical range of the RGB color, dividing the numerical range of the data quantity into a plurality of first data sub-ranges, and establishing a second mapping relation between the first data sub-ranges and the minimum unit of the numerical range of the RGB color;
If the numerical range of the data quantity is judged to be smaller than the numerical range of the RGB color, determining the minimum unit of the numerical range of the data quantity, dividing the numerical range of the RGB color into a plurality of second data sub-ranges, and establishing a second mapping relation between the minimum unit of the numerical range of the data quantity and the intermediate value of the second data sub-ranges;
If the numerical range of the data quantity is judged to be equal to the numerical range of the RGB color, a one-to-one correspondence relation between the numerical value of the data quantity and the numerical value of the RGB color is established, and a second mapping relation is obtained.
Further, the step of determining the target area address of the modified LSC data according to the target data position and the third mapping relationship, and writing the target data amount into the target area address, thereby obtaining the modified LSC data includes:
after the modified LSC data is burnt into the camera, checking the modified LSC data at intervals of preset time to ensure the stability of the modified LSC data.
Further, after the modified LSC data is burned into the camera, checking the modified LSC data at intervals of a preset time to ensure stability of the modified LSC data includes:
acquiring first LSC data burnt into a camera and second LSC data of the camera running for a preset time;
Determining a position corresponding to a data quantity extremum in the first LSC data as a first check bit, and randomly generating a plurality of second check bits in four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area after the first LSC data is divided, wherein the positions of the first check bit and the second check bit in the first LSC data and the second LSC data are the same;
Judging whether the difference value of the data quantity on the first check bit of the first LSC data and the second LSC data is within a preset range or not;
If so, sequentially judging whether the difference value of the data quantity on the second check bit of the first LSC data and the second LSC data on the area is in a preset range or not by taking the area as a unit;
If yes, stopping checking if the checking is described to be correct;
if not, determining the corresponding area and prompting.
Further, in the step of sequentially determining whether the difference value of the data amounts on the second check bits of the first LSC data and the second LSC data on the area is within a preset range by taking the area as a unit, firstly determining whether the difference value of the data amounts on the second check bits of the first LSC data and the second LSC data on the required area position is within the preset range according to the area position requirement in the metamorphosis module requirement.
A second aspect of an embodiment of the present invention provides a lens shading correction data processing system, the system comprising:
The first establishing module is used for establishing a first mapping relation between the metamorphosis module demand and target metamorphosis data, wherein the target metamorphosis data comprises a target data position and a target data volume;
the second building module is used for obtaining LSC data, determining the area address and the corresponding data volume of each frame in the LSC data, endowing corresponding RGB colors according to the size of the data volume in the LSC data, and building a second mapping relation between the data volume and the corresponding RGB colors;
the third establishing module is used for establishing a third mapping relation between the target data position and the area address;
The first acquisition module is used for burning initial LSC data, acquiring the requirement of an metamorphosis module, and outputting a target data position and a target data volume according to the requirement of the metamorphosis module and a first mapping relation;
the writing module is used for determining a target area address of modified LSC data according to the target data position and the third mapping relation, writing the target data amount into the target area address to obtain modified LSC data, and the modified LSC data is used for being burnt into a camera;
and the RGB color determining module is used for determining the target RGB color of the target data position according to the target data quantity and the second mapping relation and displaying the target RGB color so as to prompt the user to modify the performance of the LSC data after being burnt into the camera.
A third aspect of an embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the lens shading correction data processing method provided in the first aspect.
A fourth aspect of an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the lens shading correction data processing method provided in the first aspect when executing the program.
The method comprises the steps of burning initial LSC data, acquiring an metamorphosis module demand, and outputting a target data position and a target data volume according to a first mapping relation between the metamorphosis module demand and target metamorphosis data; according to a third mapping relation between the target data position and the area address, determining a target area address of modified LSC data, writing the target data amount into the target area address to obtain modified LSC data, burning the modified LSC data into a camera, modifying specified position data, quickly generating data meeting the requirements of customers, and writing the data into the camera. In addition, according to the second mapping relation between the target data amount and the corresponding RGB colors, the target RGB colors of the target data position are determined and displayed so as to prompt the user to modify the performance of the LSC data after being burnt into the camera.
Drawings
Fig. 1 is a flowchart of an implementation of a lens shading correction data processing method according to a first embodiment of the present invention;
FIG. 2 is a block diagram illustrating a lens shading correction data processing system according to a second embodiment of the present invention;
Fig. 3 is a block diagram of an electronic device according to a third embodiment of the present invention.
Detailed Description
In order that the invention may be readily understood, a more complete description of the invention will be rendered by reference to the appended drawings. Several embodiments of the invention are presented in the figures. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "mounted" on another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," and the like are used herein for illustrative purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
Example 1
Referring to fig. 1, fig. 1 shows a lens shading correction data processing method according to a first embodiment of the present invention, where the lens shading correction data processing method specifically includes steps S01 to S06.
Step S01, a first mapping relation between the metamorphosis module demand and target metamorphosis data is established, wherein the target metamorphosis data comprises a target data position and a target data volume.
For example, the metamorphosis module demand may be that the upper left corner region (which occupies one fourth of the screen) is reddish 1 (the R channel value is abnormally large), the upper right corner region (which occupies one fourth of the screen) is greenish 1 (the BG channel value is abnormally large), the lower right corner region (which occupies one fourth of the screen) is greenish 1 (the RG channel value is abnormally large), the lower left corner region (which occupies one fourth of the screen) is blueish 1 (the RG channel value is abnormally large), etc. The target metamorphosis data comprises a target data position and a target data volume, and it can be understood that the target data position represents an area position which occupies one quarter of the picture, and the target data volume is a data volume corresponding to an abnormal larger channel value.
By knowing the relation between the requirements of each metamorphosis module and the target metamorphosis data in advance, a first mapping relation between the requirements of each metamorphosis module and the target metamorphosis data is established, and the first mapping relation is used for outputting the corresponding target metamorphosis data when the requirements of metamorphosis modules are input.
In this embodiment, before the first mapping relation is established, firstly, obtaining a region position requirement in the metamorphosis module requirement, wherein the region position requirement at least includes a modification requirement of data on an upper left corner region, an upper right corner region, a lower left corner region and a lower right corner region in the LSC data to be modified, and the above mentioned azimuth regions are positions in a general sense;
Acquiring the size of the LSC data to be modified, the data quantity extreme value in the LSC data to be modified and the position corresponding to the data quantity extreme value, wherein the size of the LSC data to be modified comprises the number of rows of the LSC data to be modified and the number of columns of the LSC data to be modified, such as 15 rows and 15 columns, 13 rows and 17 columns, and the like;
Judging whether the position corresponding to the data quantity extremum is the middle position of the size of the LSC data to be modified according to the size of the LSC data to be modified and the position corresponding to the data quantity extremum;
If so, determining a row number and a column number of a position corresponding to the data quantity extremum, dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the row number and the column number of the position corresponding to the data quantity extremum, wherein the four areas after division do not contain the position corresponding to the data quantity extremum, specifically taking 15 rows and 15 columns of LSC data as an example, taking the middle position as a 7 th row and a 9 th column, judging whether the data quantity on a frame of the 7 th row and the 9 th column is a maximum value or a minimum value, if so, completing the LSC data division to be modified according to the 7 rows and the 9 columns, wherein the data on the 7 rows and the 9 columns are not contained in the four areas;
If not, dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the row number and the column number of the position corresponding to the data volume extremum, wherein the four areas after division all contain the positions corresponding to the data volume extremum, and it can be understood that when the situation occurs, the four areas are divided by taking the data on the corresponding row number and column number as boundaries, and when the requirement of a certain specific metamorphosis module needs to be met, the data on the boundaries are included in the corresponding areas.
Further, if it is determined that the position corresponding to the data quantity extremum is not the middle position of the size of the LSC data to be modified, dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the line number and the column number of the position corresponding to the data quantity extremum, wherein the divided four areas of the upper left corner area, the upper right corner area, the lower left corner area and the lower right corner area all include the positions corresponding to the data quantity extremum, and the steps of:
Judging whether the position corresponding to the data quantity extremum is unique;
if so, dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the row number and the column number of the position corresponding to the unique data quantity extremum, wherein the four areas of the upper left corner area, the upper right corner area, the lower left corner area and the lower right corner area after division all contain the positions corresponding to the data quantity extremum;
If not, determining the boundary position in the position corresponding to each data volume extremum, dividing the to-be-modified LSC data into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the boundary position, wherein the four areas of the upper left corner area, the upper right corner area, the lower left corner area and the lower right corner area after division all contain the positions corresponding to the data volume extremum, and for example, the positions corresponding to the data volume extremum are a plurality of positions, such as a7 th row, a 9 th column, a7 th row, a 8 th column and a 6 th row, a 9 th column, and then the upper left corner area is the data of the upper left corner surrounded by the 7 th row, the 9 th column, the data extending upwards by the 7 th row, the 9 th column and the data extending leftwards by the 7 th row, and the lower left corner area is the data of the lower left corner surrounded by the 6 th row, the 9 th column, the data extending downwards by the 6 th row, the 9 th column and the data extending leftwards by the 6 th column.
Step S02, obtaining LSC data, determining the area address and the corresponding data volume of each frame in the LSC data, endowing corresponding RGB colors according to the size of the data volume in the LSC data, and establishing a second mapping relation between the data volume and the corresponding RGB colors.
Specifically, historical LSC data may be obtained, and the historical LSC data may be analyzed to determine the area address and the corresponding data amount of each frame, where it should be noted that the LSC data is presented in a table form, each frame corresponds to a unique area address, and the data amounts in each frame are not continuous, i.e., have no obvious rule. In order to facilitate observation of the modified LSC data, corresponding RGB colors are given according to the size of the data amount in the LSC data, and a second mapping relation between the data amount and the corresponding RGB colors is established.
It should be noted that, in order to establish the second mapping relationship, firstly, a numerical range of the data amount and a numerical range of the RGB color are obtained, and the magnitudes of the numerical range of the data amount and the numerical range of the RGB color are determined;
If the numerical range of the data amount is judged to be larger than the numerical range of the RGB color, determining the minimum unit of the numerical range of the RGB color, dividing the numerical range of the data amount into a plurality of first data sub-ranges, establishing a second mapping relation between the first data sub-ranges and the minimum unit of the numerical range of the RGB color, and exemplarily, assuming that the numerical range of the data amount is 1-1000, the numerical range of the RGB color is 1-100, wherein the numerical range of the RGB color comprises three colors of red, green, yellow and corresponding extension colors thereof, such as light red, light green, light yellow, dark red, dark green, dark yellow, and the like, the closer the numerical value of the RGB color is 1 to represent the redder, the closer the numerical value of the RGB color is 100 to represent the greener, the middle part is yellow, and further, when the numerical range of the data amount is larger than the numerical range of the RGB color, determining the minimum unit of the numerical range of the RGB color is 1, dividing the numerical range of the data amount into 1-1000 according to the minimum unit, namely the RGB color of 1 unit corresponds to 10 data amount, and the data amount 1-10 represents one color is represented as another color, and the data of the data is represented as 11-20;
If the numerical range of the data amount is smaller than the numerical range of the RGB color, determining the minimum unit of the numerical range of the data amount, dividing the numerical range of the RGB color into a plurality of second data sub-ranges, establishing a second mapping relation between the minimum unit of the numerical range of the data amount and the middle value of the second data sub-ranges, and assuming that the numerical range of the data amount is 1-1000, the numerical range of the RGB color is 1-10000, the numerical range of the data amount is smaller than the numerical range of the RGB color, and similarly, the data amount 1 corresponds to the second data sub-ranges 1-10, the middle value of the second data sub-ranges 1-10 can be 5 or 6, and establishing a second mapping relation between the data amount 1 and the RGB color 5 or 6, wherein the data amount 2 corresponds to the second data sub-ranges 11-20, the middle value of the second data sub-ranges 11-20 can be 15 or 16, and establishing a second mapping relation between the data amount 2 and the RGB color 15 or 16, so that each data amount corresponds to the RGB color has representativeness;
If the numerical range of the data quantity is judged to be equal to the numerical range of the RGB color, a one-to-one correspondence relation between the numerical value of the data quantity and the numerical value of the RGB color is established, and a second mapping relation is obtained.
Step S03, a third mapping relation between the target data position and the area address is established.
Here, the target data position, that is, the data of the line and the column in the LSC data, and the area address refers to the address corresponding to the line and the column in the write program.
And S04, burning initial LSC data, acquiring an metamorphosis module demand, and outputting a target data position and a target data volume according to the metamorphosis module demand and the first mapping relation.
Step S05, determining a target area address of modified LSC data according to the target data position and the third mapping relation, and writing the target data amount into the target area address to obtain the modified LSC data, wherein the modified LSC data is used for being burnt into a camera.
Step S06, determining the target RGB color of the target data position according to the target data amount and the second mapping relation, and displaying the target RGB color to prompt the user to modify the performance of the LSC data after being burnt into the camera.
For example, the initial LSC data is modified to obtain modified LSC data with the upper left corner area being the data amount 1, and a data table with the upper left corner area presenting red color is obtained according to the mapping relation between the data amount 1 and the second mapping relation, so as to prompt the user to show the modified LSC data after being burnt into the camera.
Specifically, after the modified LSC data is burnt into the camera, checking the modified LSC data at intervals of preset time to ensure the stability of the modified LSC data, wherein the first LSC data burnt into the camera and the second LSC data running for the preset time are obtained;
Determining the position corresponding to the data quantity extremum in the first LSC data as a first check bit, and randomly generating a plurality of second check bits in the four areas of the upper left corner area, the upper right corner area, the lower left corner area and the lower right corner area after the first LSC data are divided, wherein the positions of the first check bit and the second check bit in the first LSC data are the same as the positions of the second LSC data;
judging whether the difference value of the data quantity on the first check bit of the first LSC data and the second LSC data is within a preset range or not;
If so, sequentially judging whether the difference value of the data quantity on the second check bit of the first LSC data and the second LSC data on the area is within a preset range by taking the area as a unit, wherein the difference value of the data quantity on the second check bit of the first LSC data and the second LSC data on the required area is within the preset range according to the area position requirement in the metamorphosis module requirement, for example, the data of the upper left corner area is modified, and judging the check bit of the upper left corner area;
If yes, stopping checking if the checking is described to be correct;
if not, determining the corresponding area and prompting.
In summary, in the lens shading correction data processing method according to the above embodiment of the present invention, by burning initial LSC data, acquiring an metamorphosis module demand, and outputting a target data position and a target data amount according to a first mapping relationship between the metamorphosis module demand and target metamorphosis data; according to a third mapping relation between the target data position and the area address, determining a target area address of modified LSC data, writing the target data amount into the target area address to obtain modified LSC data, burning the modified LSC data into a camera, modifying specified position data, quickly generating data meeting the requirements of customers, and writing the data into the camera. In addition, according to the second mapping relation between the target data amount and the corresponding RGB colors, the target RGB colors of the target data position are determined and displayed so as to prompt the user to modify the performance of the LSC data after being burnt into the camera.
Example two
Referring to fig. 2, fig. 2 is a block diagram of a lens shading correction data processing system 200 according to a second embodiment of the present invention, where the lens shading correction data processing system 200 includes: a first setup module 21, a second setup module 22, a third setup module 23, a first acquisition module 24, a writing module 25, and an RGB color determination module 26, wherein:
a first establishing module 21, configured to establish a first mapping relationship between an metamorphosis module requirement and target metamorphosis data, where the target metamorphosis data includes a target data location and a target data volume;
a second establishing module 22, configured to obtain LSC data, determine an area address and a corresponding data amount of each frame in the LSC data, and assign corresponding RGB colors according to the size of the data amount in the LSC data, and establish a second mapping relationship between the data amount and the corresponding RGB colors;
a third establishing module 23, configured to establish a third mapping relationship between the target data location and the area address;
a first obtaining module 24, configured to burn the initial LSC data, obtain an metamorphosis module requirement, and output a target data location and a target data volume according to the metamorphosis module requirement and the first mapping relationship;
The writing module 25 is configured to determine a target area address of the modified LSC data according to the target data location and the third mapping relationship, and write a target data amount into the target area address to obtain modified LSC data, where the modified LSC data is used for being burned into the camera;
the RGB color determining module 26 is configured to determine, according to the target data amount and the second mapping relationship, a target RGB color of the target data location, and display the target RGB color to prompt the user to modify the performance of the LSC data after burning into the camera.
Further, in some optional embodiments of the present invention, the lens shading correction data processing system 200 further comprises:
the second acquisition module is used for acquiring the region position requirement in the metamorphosis module requirement, wherein the region position requirement at least comprises the modification requirement of the data on the upper left corner region, the upper right corner region, the lower left corner region and the lower right corner region in the LSC data to be modified;
the third acquisition module is used for acquiring the size of the LSC data to be modified, the data quantity extreme value in the LSC data to be modified and the position corresponding to the data quantity extreme value, wherein the size of the LSC data to be modified comprises the number of rows of the LSC data to be modified and the number of columns of the LSC data to be modified;
The first judging module is used for judging whether the position corresponding to the data quantity extremum is the middle position of the size of the LSC data to be modified according to the size of the LSC data to be modified and the position corresponding to the data quantity extremum;
The first dividing module is used for determining a row number and a column number of the position corresponding to the data quantity extremum when the position corresponding to the data quantity extremum is judged to be the middle position of the size of the LSC data to be modified, and dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the row number and the column number of the position corresponding to the data quantity extremum, wherein the four areas of the divided upper left corner area, upper right corner area, lower left corner area and lower right corner area do not contain the position corresponding to the data quantity extremum;
And the second dividing module is used for dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the line number and the column number of the position corresponding to the data quantity extreme value when the position corresponding to the data quantity extreme value is judged to be the middle position of the size of the LSC data to be modified, wherein the four areas of the divided upper left corner area, upper right corner area, lower left corner area and lower right corner area comprise the position corresponding to the data quantity extreme value.
Further, in some optional embodiments of the present invention, the second dividing module includes:
the first judging unit is used for judging whether the position corresponding to the data quantity extreme value is unique or not;
The first dividing unit is used for dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the row number and the column number of the position corresponding to the unique data quantity extreme value when the position corresponding to the data quantity extreme value is judged to be unique, wherein the four areas of the divided upper left corner area, upper right corner area, lower left corner area and lower right corner area comprise the position corresponding to the data quantity extreme value;
And the second dividing unit is used for determining the boundary position in the position corresponding to each data volume extremum when judging that the position corresponding to the data volume extremum is not the same, dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the boundary position, wherein the four areas of the upper left corner area, the upper right corner area, the lower left corner area and the lower right corner area after division all comprise the positions corresponding to the data volume extremum.
Further, in some optional embodiments of the present invention, the second establishing module includes:
a second judging unit for acquiring the numerical range of the data amount and the numerical range of the RGB color, and judging the magnitude of the numerical range of the data amount and the magnitude of the numerical range of the RGB color;
The first establishing unit is used for determining the minimum unit of the numerical range of the RGB color if the numerical range of the data quantity is judged to be larger than the numerical range of the RGB color, dividing the numerical range of the data quantity into a plurality of first data sub-ranges, and establishing a second mapping relation between the first data sub-ranges and the minimum unit of the numerical range of the RGB color;
the second establishing unit is used for determining the minimum unit of the numerical range of the data quantity if the numerical range of the data quantity is smaller than the numerical range of the RGB color, dividing the numerical range of the RGB color into a plurality of second data sub-ranges and establishing a second mapping relation between the minimum unit of the numerical range of the data quantity and the intermediate value of the second data sub-ranges;
And the third establishing unit is used for establishing a one-to-one correspondence relationship between the numerical value of the data quantity and the numerical value of the RGB color to obtain a second mapping relationship if the numerical value range of the data quantity is judged to be equal to the numerical value range of the RGB color.
Further, in some optional embodiments of the present invention, the lens shading correction data processing system 200 further comprises:
And the verification module is used for verifying the modified LSC data at intervals of preset time after the modified LSC data are burnt into the camera so as to ensure the stability of the modified LSC data.
Further, in some optional embodiments of the present invention, the verification module includes:
the first acquisition unit is used for acquiring first LSC data burnt into the camera and second LSC data of the camera running for a preset time;
The check bit determining unit is used for determining that the position corresponding to the data quantity extreme value in the first LSC data is a first check bit, and randomly generating a plurality of second check bits in the four areas of the upper left corner area, the upper right corner area, the lower left corner area and the lower right corner area after the first LSC data is divided, wherein the positions of the first check bit and the second check bit in the first LSC data and the second LSC data are the same;
A third judging unit, configured to judge whether a difference value of data amounts on the first check bits of the first LSC data and the second LSC data is within a preset range;
A fourth judging unit, configured to, when judging that the difference between the data amounts on the first check bits of the first LSC data and the second LSC data is within a preset range, sequentially judge, in units of areas, whether the difference between the data amounts on the second check bits of the first LSC data and the second LSC data on the areas is within the preset range;
A stopping unit, configured to, when sequentially determining that a difference value between the data amounts on the first LSC data and the second check bits of the second LSC data on the area is within a preset range, indicate that the check is correct, and stop the check;
And the prompting unit is used for determining the corresponding area and prompting when the difference value of the data quantity on the second check bit of the first LSC data and the second LSC data on the area is judged to be not in the preset range.
Example III
In another aspect, referring to fig. 3, an electronic device according to a third embodiment of the present invention includes a memory 20, a processor 10, and a computer program 30 stored in the memory and capable of running on the processor, where the processor 10 implements the lens shading correction data processing method as described above when executing the computer program 30.
The processor 10 may be, among other things, a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor or other data processing chip in some embodiments for running program code or processing data stored in the memory 20, e.g. executing an access restriction program or the like.
The memory 20 includes at least one type of readable storage medium including flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 20 may in some embodiments be an internal storage unit of the electronic device, such as a hard disk of the electronic device. The memory 20 may also be an external storage device of the electronic device in other embodiments, such as a plug-in hard disk provided on the electronic device, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), etc. Further, the memory 20 may also include both internal storage units and external storage devices of the electronic device. The memory 20 may be used not only for storing application software of an electronic device and various types of data, but also for temporarily storing data that has been output or is to be output.
It should be noted that the structure shown in fig. 3 does not constitute a limitation of the electronic device, and in other embodiments the electronic device may comprise fewer or more components than shown, or may combine certain components, or may have a different arrangement of components.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements a lens shading correction data processing method as described above.
Those of skill in the art will appreciate that the logic and/or steps represented in the flow diagrams or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing examples illustrate only a few embodiments of the invention, which are described in detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (10)

1. A lens shading correction data processing method, the method comprising:
Establishing a first mapping relation between an metamorphosis module demand and target metamorphosis data, wherein the target metamorphosis data comprises a target data position and a target data volume;
Acquiring LSC data, determining the area address and the corresponding data quantity of each frame in the LSC data, endowing corresponding RGB colors according to the data quantity in the LSC data, and establishing a second mapping relation between the data quantity and the corresponding RGB colors;
establishing a third mapping relation between the target data position and the area address;
Burning initial LSC data, acquiring an metamorphosis module demand, and outputting a target data position and a target data volume according to the metamorphosis module demand and a first mapping relation;
Determining a target area address of modified LSC data according to the target data position and the third mapping relation, and writing the target data amount into the target area address to obtain modified LSC data, wherein the modified LSC data is used for being burnt into a camera;
And determining the target RGB color of the target data position according to the target data amount and the second mapping relation, and displaying the target RGB color so as to prompt a user to modify the performance of the LSC data after being burnt into the camera.
2. The method of claim 1, wherein the step of establishing a first mapping relationship between the metamorphosis module requirements and the target metamorphosis data comprises:
acquiring an area position requirement in an metamorphosis module requirement, wherein the area position requirement at least comprises a modification requirement of data on an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area in LSC data to be modified;
acquiring the size of the LSC data to be modified, the data quantity extreme value in the LSC data to be modified and the position corresponding to the data quantity extreme value, wherein the size of the LSC data to be modified comprises the number of rows of the LSC data to be modified and the number of columns of the LSC data to be modified;
Judging whether the position corresponding to the data quantity extremum is the middle position of the size of the LSC data to be modified according to the size of the LSC data to be modified and the position corresponding to the data quantity extremum;
if so, determining a row number and a column number of a position corresponding to the data quantity extremum, and dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the row number and the column number of the position corresponding to the data quantity extremum, wherein the four divided areas of the upper left corner area, the upper right corner area, the lower left corner area and the lower right corner area do not contain the position corresponding to the data quantity extremum;
If not, dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the row number and the column number of the position corresponding to the data quantity extremum, wherein the four areas of the divided upper left corner area, upper right corner area, lower left corner area and lower right corner area comprise the position corresponding to the data quantity extremum.
3. The method for processing lens shading correction data according to claim 2, wherein the step of dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the line number and the column number of the position corresponding to the data amount extremum, wherein the divided four areas of the upper left corner area, the upper right corner area, the lower left corner area and the lower right corner area each include the position corresponding to the data amount extremum comprises:
Judging whether the position corresponding to the data quantity extremum is unique;
if so, dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the row number and the column number of the position corresponding to the unique data quantity extremum, wherein the four areas of the upper left corner area, the upper right corner area, the lower left corner area and the lower right corner area after division all contain the positions corresponding to the data quantity extremum;
If not, determining the boundary position in the position corresponding to each data volume extremum, dividing the LSC data to be modified into four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area according to the boundary position, wherein the four areas of the divided upper left corner area, upper right corner area, lower left corner area and lower right corner area all comprise the positions corresponding to the data volume extremum.
4. The lens shading correction data processing method according to claim 1, wherein the step of assigning corresponding RGB colors according to the size of the data amount in the LSC data, and establishing a second mapping relationship between the data amount and the corresponding RGB colors comprises:
acquiring a numerical range of data quantity and a numerical range of RGB color, and judging the sizes of the numerical range of data quantity and the numerical range of RGB color;
If the numerical range of the data quantity is judged to be larger than the numerical range of the RGB color, determining the minimum unit of the numerical range of the RGB color, dividing the numerical range of the data quantity into a plurality of first data sub-ranges, and establishing a second mapping relation between the first data sub-ranges and the minimum unit of the numerical range of the RGB color;
If the numerical range of the data quantity is judged to be smaller than the numerical range of the RGB color, determining the minimum unit of the numerical range of the data quantity, dividing the numerical range of the RGB color into a plurality of second data sub-ranges, and establishing a second mapping relation between the minimum unit of the numerical range of the data quantity and the intermediate value of the second data sub-ranges;
If the numerical range of the data quantity is judged to be equal to the numerical range of the RGB color, a one-to-one correspondence relation between the numerical value of the data quantity and the numerical value of the RGB color is established, and a second mapping relation is obtained.
5. The lens shading correction data processing method according to claim 3, wherein the step of determining a target area address of the modified LSC data according to the target data position and the third mapping relation, and writing a target data amount into the target area address, and obtaining the modified LSC data comprises:
after the modified LSC data is burnt into the camera, checking the modified LSC data at intervals of preset time to ensure the stability of the modified LSC data.
6. The lens shading correction data processing method according to claim 5, wherein the step of checking the modified LSC data at intervals of a preset time after the modified LSC data is burned into the camera to ensure stability of the modified LSC data comprises:
acquiring first LSC data burnt into a camera and second LSC data of the camera running for a preset time;
Determining a position corresponding to a data quantity extremum in the first LSC data as a first check bit, and randomly generating a plurality of second check bits in four areas of an upper left corner area, an upper right corner area, a lower left corner area and a lower right corner area after the first LSC data is divided, wherein the positions of the first check bit and the second check bit in the first LSC data and the second LSC data are the same;
Judging whether the difference value of the data quantity on the first check bit of the first LSC data and the second LSC data is within a preset range or not;
If so, sequentially judging whether the difference value of the data quantity on the second check bit of the first LSC data and the second LSC data on the area is in a preset range or not by taking the area as a unit;
If yes, stopping checking if the checking is described to be correct;
if not, determining the corresponding area and prompting.
7. The method according to claim 6, wherein in the step of sequentially determining whether the difference between the data amounts of the first LSC data and the second LSC data in the second check bit in the area is within a predetermined range in the area unit, it is determined whether the difference between the data amounts of the first LSC data and the second LSC data in the required area position is within a predetermined range according to the area position requirement in the metamorphosis module requirement.
8. A lens shading correction data processing system, the system comprising:
The first establishing module is used for establishing a first mapping relation between the metamorphosis module demand and target metamorphosis data, wherein the target metamorphosis data comprises a target data position and a target data volume;
the second building module is used for obtaining LSC data, determining the area address and the corresponding data volume of each frame in the LSC data, endowing corresponding RGB colors according to the size of the data volume in the LSC data, and building a second mapping relation between the data volume and the corresponding RGB colors;
the third establishing module is used for establishing a third mapping relation between the target data position and the area address;
The first acquisition module is used for burning initial LSC data, acquiring the requirement of an metamorphosis module, and outputting a target data position and a target data volume according to the requirement of the metamorphosis module and a first mapping relation;
the writing module is used for determining a target area address of modified LSC data according to the target data position and the third mapping relation, writing the target data amount into the target area address to obtain modified LSC data, and the modified LSC data is used for being burnt into a camera;
and the RGB color determining module is used for determining the target RGB color of the target data position according to the target data quantity and the second mapping relation and displaying the target RGB color so as to prompt the user to modify the performance of the LSC data after being burnt into the camera.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, implements the lens shading correction data processing method according to any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the lens shading correction data processing method according to any one of claims 1-7 when executing the program.
CN202410391412.6A 2024-04-02 2024-04-02 Lens shading correction data processing method and system Active CN117979151B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410391412.6A CN117979151B (en) 2024-04-02 2024-04-02 Lens shading correction data processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410391412.6A CN117979151B (en) 2024-04-02 2024-04-02 Lens shading correction data processing method and system

Publications (2)

Publication Number Publication Date
CN117979151A CN117979151A (en) 2024-05-03
CN117979151B true CN117979151B (en) 2024-06-04

Family

ID=90864757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410391412.6A Active CN117979151B (en) 2024-04-02 2024-04-02 Lens shading correction data processing method and system

Country Status (1)

Country Link
CN (1) CN117979151B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004297452A (en) * 2003-03-27 2004-10-21 Toray Ind Inc Repair apparatus, and repair method
CN105991986A (en) * 2015-02-17 2016-10-05 百辰光电股份有限公司 Camera module calibration method and camera module calibration system
CN106664351A (en) * 2014-09-26 2017-05-10 英特尔公司 Method and system of lens shading color correction using block matching
CN113628228A (en) * 2021-07-27 2021-11-09 昆山丘钛微电子科技股份有限公司 Lens shadow correction data detection method and device
CN113778471A (en) * 2021-09-10 2021-12-10 昆山丘钛微电子科技股份有限公司 Camera module burning method and device and readable storage medium
CN114051132A (en) * 2021-10-19 2022-02-15 昆山丘钛光电科技有限公司 LSC data detection method, device, terminal equipment and medium
CN114449257A (en) * 2022-01-21 2022-05-06 横店集团东磁有限公司 Method for verifying whether camera white balance and lens shadow correction are effective
CN114449254A (en) * 2021-12-29 2022-05-06 昆山丘钛光电科技有限公司 High-accuracy camera module OTP (one time programmable) burning method and system
CN115002328A (en) * 2022-07-01 2022-09-02 江西盛泰精密光学有限公司 Camera module data burning fool-proof detection method and system
CN117499616A (en) * 2023-10-30 2024-02-02 展讯半导体(南京)有限公司 Control method, system, equipment and medium for camera module lens shading correction

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7676110B2 (en) * 2003-09-30 2010-03-09 Fotonation Vision Limited Determination of need to service a camera based on detection of blemishes in digital images

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004297452A (en) * 2003-03-27 2004-10-21 Toray Ind Inc Repair apparatus, and repair method
CN106664351A (en) * 2014-09-26 2017-05-10 英特尔公司 Method and system of lens shading color correction using block matching
CN105991986A (en) * 2015-02-17 2016-10-05 百辰光电股份有限公司 Camera module calibration method and camera module calibration system
CN113628228A (en) * 2021-07-27 2021-11-09 昆山丘钛微电子科技股份有限公司 Lens shadow correction data detection method and device
CN113778471A (en) * 2021-09-10 2021-12-10 昆山丘钛微电子科技股份有限公司 Camera module burning method and device and readable storage medium
CN114051132A (en) * 2021-10-19 2022-02-15 昆山丘钛光电科技有限公司 LSC data detection method, device, terminal equipment and medium
CN114449254A (en) * 2021-12-29 2022-05-06 昆山丘钛光电科技有限公司 High-accuracy camera module OTP (one time programmable) burning method and system
CN114449257A (en) * 2022-01-21 2022-05-06 横店集团东磁有限公司 Method for verifying whether camera white balance and lens shadow correction are effective
CN115002328A (en) * 2022-07-01 2022-09-02 江西盛泰精密光学有限公司 Camera module data burning fool-proof detection method and system
CN117499616A (en) * 2023-10-30 2024-02-02 展讯半导体(南京)有限公司 Control method, system, equipment and medium for camera module lens shading correction

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Fault Detection of Partial Shading Faults in Solar Photovoltaic Energy Systems;Eslam Shaheen,Et Al.;《2023 3rd International Conference on Electronic Engineering (ICEEM)》;20231121;全文 *
摄像机自动聚焦与白平衡算法研究及实现;张朵朵;《中国优秀硕士学位论文全文库(电子期刊)》;20180415;全文 *
聂晓 ; 邱联奎 ; 方健豪 ; .边缘双轮廓线阴影去除研究.《计算机测量与控制》.2017,全文. *

Also Published As

Publication number Publication date
CN117979151A (en) 2024-05-03

Similar Documents

Publication Publication Date Title
US10460655B2 (en) Gamma tuning method and gamma tuning device
US8194973B2 (en) Decoding information from a captured image
US8390644B2 (en) Methods and apparatus for color uniformity
US20170243562A1 (en) Controller for compensating mura defects, display apparatus having the same, and method for compensating mura defects
US9615071B2 (en) Method and apparatus for tuning camera correction setting for camera module
CN113495709B (en) Color correction method, AP chip, terminal and storage medium
CN108281090B (en) Display substrate, display screen and electronic equipment
US20130169791A1 (en) Computing device and method for measuring widths of measured parts
CN107979750B (en) Image processing apparatus and method, and electronic device
CN117979151B (en) Lens shading correction data processing method and system
CN114495812B (en) Display panel brightness compensation method and device, electronic equipment and readable storage medium
US20230162650A1 (en) Display panel, manufacturing method thereof and related display device
WO2005109312A2 (en) Color characterization using color value clipping
US20030112253A1 (en) Method and apparatus for active graphical controls
CN111915601A (en) Intelligent terminal abnormity testing method, device and system
CN110719382A (en) Color replacement method and device
KR20180037347A (en) Board inspection apparatus and method of compensating board distortion using the same
US7305126B2 (en) Photo dazzle color temperature correction
CN111276092B (en) Optimization parameter determination method and device
CN114460862A (en) Camera equipment ring test simulation method applied to ADAS
CN111458112A (en) Color coordinate measuring method, device, equipment and storage medium based on Gamma correction
CN110691194B (en) Wide color gamut image determination method and device
CN116582628A (en) Method, device and system for configuring display screen and readable storage medium
CN114187455A (en) Picture comparison method and device, electronic equipment and storage medium
CN110114814A (en) Correction system, display panel, display device, bearing calibration and program

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
GR01 Patent grant
GR01 Patent grant