CN114051132A - LSC data detection method, device, terminal equipment and medium - Google Patents

LSC data detection method, device, terminal equipment and medium Download PDF

Info

Publication number
CN114051132A
CN114051132A CN202111217855.6A CN202111217855A CN114051132A CN 114051132 A CN114051132 A CN 114051132A CN 202111217855 A CN202111217855 A CN 202111217855A CN 114051132 A CN114051132 A CN 114051132A
Authority
CN
China
Prior art keywords
data
channel data
lsc
image
difference
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
CN202111217855.6A
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.)
Kunshanqiu Titanium Photoelectric Technology Co Ltd
Original Assignee
Kunshanqiu Titanium Photoelectric Technology 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 Kunshanqiu Titanium Photoelectric Technology Co Ltd filed Critical Kunshanqiu Titanium Photoelectric Technology Co Ltd
Priority to CN202111217855.6A priority Critical patent/CN114051132A/en
Publication of CN114051132A publication Critical patent/CN114051132A/en
Pending legal-status Critical Current

Links

Images

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/81Camera processing pipelines; Components thereof for suppressing or minimising disturbance in the image signal generation

Abstract

The invention discloses a detection method, a device, terminal equipment and a medium for Lens Shading Correction (LSC) data, wherein the method comprises the following steps: obtaining LSC data; analyzing the LSC data to obtain image channel data; and carrying out validity detection on the image channel data, and determining whether the LSC data is valid data. By adopting the method and the device, the technical problems of computing resource waste, reduction of service processing efficiency and the like caused by incapability of judging the validity of the LSC data in the prior art can be solved.

Description

LSC data detection method, device, terminal equipment and medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for detecting lens shading correction LSC data, a terminal device, and a medium.
Background
At present, a camera module provider needs to record Lens Shading Correction (LSC) data into a terminal platform, such as a taiwan co-launch technology multimedia chip provider (MediaTek, MTK) tool platform, for subsequent image processing.
However, during the writing or transmission process of the LSC data, the content of a part of the image is lost due to transmission stability or other special conditions. Because the image processing algorithm is limited, the image processing is supported to the effective data of the large-scale business at present, and whether the effective data is invalid data cannot be judged.
However, if the valid data and the invalid data are not distinguished, the invalid data and the valid data are calculated with the same high complexity, which results in the waste of calculation resources and reduces the service processing efficiency.
Therefore, it is necessary to provide a scheme for detecting the validity of LSC data.
Disclosure of Invention
The embodiment of the application provides a method for detecting Lens Shading Correction (LSC) data, and solves the technical problems that computing resources are wasted and service processing efficiency is reduced due to the fact that the validity of the LSC data cannot be judged in the prior art.
In one aspect, the present application provides a method for detecting lens shading correction LSC data, according to an embodiment of the present application, where the method includes:
obtaining LSC data;
analyzing the LSC data to obtain image channel data, wherein the image channel data comprises R channel data, Gr channel data, Gb channel data and B channel data;
and carrying out validity detection on the image channel data, and determining whether the LSC data is valid data.
Optionally, the performing validity check on the image channel data and determining whether the LSC data is valid data includes:
judging whether the image channel data meet a preset effective detection condition;
if so, determining the LSC data as valid data;
if not, determining the LSC data as failure data;
wherein the valid detection conditions at least comprise: the edge processing data is smaller than a first threshold value, and the internal processing data is smaller than a second threshold value; the edge processing data is obtained by processing data located in a preset edge area in the image channel data, and the internal processing data is obtained by processing data in other areas except the preset edge area in the image channel data.
Optionally, the edge processing data is a maximum value of data located in a preset edge region in the image channel data, and the internal processing data is a maximum value of data located in other regions except the preset edge region in the image channel data.
Optionally, before determining whether the image channel data meets a preset valid detection condition, the method further includes:
carrying out average value calculation on the image channel data to obtain average channel data, wherein the image channel data and the average channel data have the same data dimension;
calculating difference values of the average channel data to obtain difference channel data, wherein the difference channel data and the average channel data have the same data dimension;
performing maximum value calculation on data located in a preset edge area in the difference channel data to obtain edge processing data;
and carrying out maximum value calculation on data of other regions except the preset edge region in the difference channel data to obtain the internal processing data.
Optionally, the valid detection condition further includes: and the difference value between the Gr channel data and the Gb channel data is smaller than a third threshold value.
Optionally, before determining whether the image channel data meets a preset valid detection condition, the method further includes:
calculating difference values of the Gr channel data and the Gb channel data to obtain difference image data;
and determining the maximum value in the difference image data as the difference value between the Gr channel data and the Gb channel data.
Optionally, the valid detection condition further includes: and the image channel data takes a preset central pixel point as a reference point, and the pixel values of the diffused pixel points along the periphery are sequentially increased.
In another aspect, the present application provides an apparatus for detecting lens shading correction LSC data, the apparatus comprising: the device comprises an acquisition module, an analysis module and a detection module, wherein:
the acquisition module is used for acquiring LSC data;
the analysis module is used for analyzing the LSC data to obtain image channel data, wherein the image channel data comprises R channel data, Gr channel data, Gb channel data and B channel data;
the detection module is used for carrying out validity detection on the image channel data and determining whether the LSC data is valid data.
For the content that is not introduced or not described in the embodiment of the present application, reference may be made to the related descriptions in the foregoing method embodiments, and details are not described here again.
On the other hand, the present application provides a terminal device according to an embodiment of the present application, where the terminal device includes: a processor, a memory, a communication interface, and a bus; the processor, the memory and the communication interface are connected through the bus and complete mutual communication; the memory stores executable program code; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory for executing the lens shading correction LSC data detection method as described above.
On the other hand, the present application provides, by an embodiment of the present application, a computer-readable storage medium storing a program that executes the lens shading correction LSC data detection method as described above when the program is run on a terminal device.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: according to the method and the device, the LSC data are acquired, then the LSC data are analyzed to obtain the image channel data, finally the image channel data are subjected to effectiveness detection to determine whether the LSC data are effective data, so that the effectiveness detection of the LSC data can be conveniently and rapidly realized, the efficiency and the convenience of the LSC data effectiveness detection are improved, and the technical problems that in the prior art, due to the fact that the effectiveness of the LSC data cannot be judged, calculation resources are wasted, the service processing efficiency is reduced and the like are solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for detecting lens shading correction LSC data according to an embodiment of the present disclosure.
Fig. 2 is a schematic flowchart of another lens shading correction LSC data detection method according to an embodiment of the present disclosure.
Fig. 3 is a schematic structural diagram of a detection apparatus for lens shading correction LSC data according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a method for detecting Lens Shading Correction (LSC) data, and solves the technical problems that in the prior art, computing resources are wasted, service processing efficiency is reduced and the like due to the fact that the validity of the LSC data cannot be judged.
In order to solve the technical problems, the general idea of the embodiment of the application is as follows: obtaining LSC data; analyzing the LSC data to obtain image channel data, wherein the image channel data comprises R channel data, Gr channel data, Gb channel data and B channel data; and carrying out validity detection on the image channel data, and determining whether the LSC data is valid data.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
First, it is stated that the term "and/or" appearing herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Fig. 1 is a schematic flow chart illustrating a method for detecting lens shading correction LSC data according to an embodiment of the present disclosure. The method as shown in fig. 1 comprises the following implementation steps:
and S101, obtaining LSC data.
The LSC data described herein is data that is burned into a terminal platform, such as an MTK tool platform, by a camera module supplier, and may include, but is not limited to, image channel data and image platform data. The image channel data includes, but is not limited to, Red (Red) channel data, also referred to as R channel data, Green-Red (Green-Red) Green channel data, also referred to as Green channel data, Green-Blue (Green-Blue) channel data, also referred to as Gb channel data, and Blue (Blue) channel data, also referred to as B channel data. The image platform data includes, but is not limited to, version information of the terminal platform, chip information included in the terminal platform, for example, a version of the MTK platform, chip information in the MTK platform, such as a power management chip, a radio frequency chip, and a baseband chip, and the like.
S102, analyzing the LSC data to obtain image channel data, wherein the image channel data comprises R channel data, Gr channel data, Gb channel data and B channel data.
The LSC data can be analyzed to obtain image channel data and image platform data. The respective data lengths of the image channel data and the image platform data are not limited, and may be set according to actual requirements, for example, the image channel data and the image platform data occupy 1868 data lengths, and the image platform data may also be referred to as header information, which includes 68 data, such as a version of an MTK platform, and the like. The image channel data includes 450R channel data, 450 Gr channel data, 450 Gb channel data, 450B channel data, and the like.
In writing the LSC data, the image screen is divided into areas of a fixed size axb, for example, 15 × 15 areas, and the writing test is performed. Correspondingly, the size/data dimension of the image channel data obtained by analysis in the application is A multiplied by B. Taking 15 × 15 area division as an example, the present application may analyze LSC data, and perform analysis and arrangement according to header information, R channel data, Gr channel data, Gb channel data, and the number of B channels, where the R channel data, the Gr channel data, the Gb channel data, and the B channel data are arranged in a single channel matrix of 15 × 15 in a capacity-expanded corresponding manner.
S103, carrying out validity detection on the image channel data, and determining whether the LSC data is valid data.
The LSC data can be judged/determined to be valid data by judging whether the image channel data meets a preset valid detection condition. Specifically, if the image channel data satisfies the valid detection condition, the LSC data may be determined to be valid data, and image processing, such as rendering, and the like, may be performed on the image channel data in the LSC data subsequently. Otherwise, if the image channel data does not satisfy the valid detection condition, the LSC data may be determined to be invalid data, and the process may be ended.
The effective detection condition is set by a system in a self-defining way, for example, the effective detection condition at least comprises that edge processing data is smaller than a first threshold value, and internal processing data is smaller than a second threshold value; optionally it may also include, but is not limited to, any one or combination of more of the following: the difference value between the Gr channel data and the Gb channel data is smaller than a third threshold value, and the image channel data meets the change rule of large periphery and small periphery (namely the pixel values of the diffusion pixel points along the periphery are sequentially increased by taking a preset central pixel point in the image channel data as a reference point).
The edge processing data is obtained by processing data located in a preset edge area in the image channel data, that is, data obtained by processing the edge channel data in the image channel data in a maximum value, average value, and other manners. The internal processing data is obtained by processing data of other regions except the preset edge region in the image channel data, that is, data obtained by processing the internal channel data except the edge channel data in the image channel data in a maximum value, average value and other modes.
Optionally, the edge processing data may be a maximum value of data located in a preset edge region in the image channel data, that is, the maximum value of the edge channel data; the internal processing data may be a maximum value of data located in other regions except the preset edge region in the image channel data, that is, a maximum value of internal channel data, and the like. The preset edge area is an area set by a system in a self-defined mode. The first threshold, the second threshold and the third threshold are set by a system or a user in a self-defined manner, for example, an experience value set according to experience of the user or a threshold set according to actual requirements of the system.
Through implementing the method and the device, the LSC data are acquired, then the LSC data are analyzed to obtain the image channel data, finally the image channel data are subjected to effectiveness detection to determine whether the LSC data are effective data, so that the effectiveness detection of the LSC data can be conveniently and rapidly realized, the efficiency and the convenience of the effectiveness detection of the LSC data are improved, and the technical problems that the calculation resources are wasted and the service processing efficiency is reduced due to the fact that the effectiveness of the LSC data cannot be judged in the prior art are solved.
Please refer to fig. 2, which is a flowchart illustrating another lens shading correction LSC data detection method according to an embodiment of the present application. The method as shown in fig. 2 comprises the following implementation steps:
s201, LSC data is obtained.
S202, analyzing the LSC data to obtain image channel data, wherein the image channel data comprises R channel data, Gr channel data, Gb channel data and B channel data.
In the present application, validity detection can be performed on each image channel data, specifically on R channel data, Gr channel data, Gb channel data, and B channel data, and the specific implementation thereof is described in steps S203 to S213 below.
S203, carrying out average value calculation on the image channel data to obtain average channel data, wherein the image channel data and the average channel data have the same data dimension.
The image channel data and the average channel data have the same data dimension, for example, a matrix with dimensions of A × B. The size of the preset frame can be set according to the actual requirement of the system, and the method is not limited in the application.
For example, taking the image channel data as R channel data as an example, it can be represented as a 15 × 15 single channel matrix as shown in table 1 below.
TABLE 1
Figure BDA0003311365490000081
As shown in table 1 above, in the present application, a preset frame with a suitable size may be selected according to different positions of image channel data to perform average calculation on corresponding image channel data, for example, in the illustration, the average calculation is performed on R channel data in the 8 th column according to a preset frame of 2 × 1, the average calculation is performed on R channel data in the 8 th row according to a preset frame of 1 × 2, and the average calculation is performed on R channel data in the remaining rows/columns according to a preset frame of 2 × 2. Specifically, as shown by the black boxes in table 1 above, average channel data of 15 × 15 size can be obtained by sequentially calculating average values of 14587 and 13123 as result data of row 1, column 8, 19644 and 16591 as result data of row 8, column 1, R channel data of the remaining rows/columns, and 31081, 24684, 27259 and 22144 as result data of row 1, column 1.
S204, calculating difference values of the average channel data to obtain difference channel data, wherein the difference channel data and the average channel data have the same data dimension.
The average channel data can be subjected to difference value calculation by using the following formula (1) to obtain difference channel data having the same data dimension as the average channel data, for example, a matrix with dimensions of a × B.
Figure BDA0003311365490000091
Wherein, CmnFor the data in the mth row and nth column in the difference channel data, imnThe dimension of the average channel data is A multiplied by B, i(A+1-m)nIs the data of the nth column of the (A +1-m) th row in the average channel data, im(B+1-n)Is the data of the m row and the (B +1-n) column in the average channel data, i(A+1-m)(B+1-n)The average channel data is data of (A +1-m) th row and (B +1-n) th column in the average channel data, m is a positive integer smaller than or equal to A, n is a positive integer smaller than or equal to B, and | l is absolute value ABS operation.
For example, taking the R channel matrix with the average channel data of 15 × 15 as an example, it can be specifically expressed as shown in the following table 2.
TABLE 2
Figure BDA0003311365490000092
When calculating difference channel data, use C11For example, the present application can calculate C by using the following formula (2)11
Figure BDA0003311365490000101
As can be seen from Table 2 above, i11Is 26292, i15,1Is 26731, i1,15Is 26537, i15,15Is 27157, specifically as indicated by the black box in table 2 above. In turn, the present application can calculate the difference channel data as shown in table 3 below.
TABLE 3
Figure BDA0003311365490000102
S205, carrying out maximum value calculation on data located in a preset edge area in the difference channel data to obtain the edge processing data.
The preset edge area is an edge area set by a system or a user, for example, data in the difference channel data shown in table 3 above, which is located in the 1 st row, the 1 st column, the 15 th row and the 15 th column, is set as data located in the preset edge area, and so on.
The data in the difference channel data located in the preset edge area can be processed, for example, maximum value processing, average value processing, mode selection processing, and the like are performed to obtain the edge processing data. Preferably, the edge processing data is obtained by performing maximum value calculation/selection on data of an edge region. For example, referring to the difference channel data shown in table 3 above as an example, the preset edge area is an area where the data in row 1, column 1, row 15 and column 15 of the difference channel data are located, and the edge processing data can be obtained by the following formula (3) in the present application.
Edge processing data max (C)Line 1,C1 column (1),C15 lines,C15 rows of) Formula (3)
The above equation (3) indicates that the maximum value of the data located in the 1 st row, the 1 st column, the 15 th row and the 15 th column in the difference channel data is selected and determined as the edge processing data.
S206, carrying out maximum value calculation on the data of other areas except the preset edge area in the difference channel data to obtain the internal processing data.
In the present application, the other regions except the preset edge region in the difference channel data may be referred to as inner regions, and the data of the inner regions may be referred to as inner region data. Further, the present application may perform maximum value calculation/selection on the internal region data to obtain the internal processing data.
For example, referring to the example of step S205, the present application may obtain the internal processing data by calculating according to the following formula (4):
max { divide (C)Line 1,C1 column (1),C15 lines,C15 rows of) External row and column data equation (4)
S207, judging whether the edge processing data is smaller than a first threshold value or not, and whether the internal processing data is smaller than a second threshold value or not.
After the edge processing data and the internal processing data are obtained through calculation, whether the edge processing data are smaller than a first threshold value or not can be further judged, and whether the internal processing data are smaller than a second threshold value or not can be further judged. If the edge processing data is smaller than the first threshold and the internal processing data is smaller than the second threshold, continuing to execute step S208 or executing step S212; otherwise, step S213 is executed to end the flow.
The first threshold and the second threshold are thresholds set by a system in a self-defined manner, which may be the same or different, and this application is not limited thereto, for example, the first threshold is 10% of a preset maximum threshold, the second threshold is 5% of the preset maximum threshold, and so on.
And S208, calculating difference values of the Gr channel data and the Gb channel data to obtain difference image data.
The difference between the Gr channel data and the Gb channel data, i.e., the difference image data, can be calculated using the following formula (5). The difference image data has the same data dimension as the Gr channel data and the Gb channel data, for example, the data dimension is a × B.
Figure BDA0003311365490000121
Wherein HmnThe data of the mth row and the nth column in the difference image data. GrmnIs the data of the m-th row and n columns in the Gr channel data. Gb ismnFor Gb channel dataData of mth row and nth column. m is a positive integer less than or equal to A, and n is a positive integer less than or equal to B. Min () is a minimum value operation. And | | is absolute value ABS operation.
S209, determining the maximum value in the difference image data as the difference value between the Gr channel data and the Gb channel data.
According to the difference image data, the difference value between the Gr channel data and the Gb channel data can be determined, for example, the maximum value, the average value or the mode in the difference image data is selected as the difference value between the Gr channel data and the Gb channel data. Preferably, the present application may determine a maximum value in the difference image data as a difference value between the Gr channel data and the Gb channel data.
S210, judging whether the difference value between the Gr channel data and the Gb channel data is smaller than a third threshold value.
After the difference value is obtained through calculation, whether the difference value between the Gr channel data and the Gb channel data is smaller than a third threshold value may be further determined. If the threshold value is smaller than the third threshold value, the step S211 or the step S212 is continuously executed, otherwise, the step S213 is executed, and the process ends.
The third threshold is a threshold set by the system in a self-defined manner, for example, an empirical value set according to experience of a user, or a threshold set according to actual requirements of the system, and the like. For example, the third threshold may be set to 5% of the preset maximum difference value, and so on.
S211, judging whether the image channel data meet the rule that pixel values of diffused pixel points are sequentially increased along the periphery by taking a preset central pixel point as a reference point.
The method and the device can further judge the change regularity of the image data channel, such as whether the change regularity of 'big all around and small center' is met. Specifically, the method and the device can judge whether the image channel data meet the condition that the pixel values of the pixel points diffused along the periphery are sequentially increased by taking a preset central pixel point as a reference point. If yes, go on to step S212, otherwise go to step S213, and end the process. For example, the following formula (6) may be adopted to determine whether the image data channel satisfies a rule that pixel values of pixels spreading from the preset central pixel to the periphery are sequentially increased.
Figure BDA0003311365490000131
Wherein, XmnThe data is the data of the mth row and the nth column in the image channel data. Xm(n-1)The data of the (n-1) th column of the mth row in the image channel data. Xm(n+1)The data is the data of the (n +1) th column of the mth row in the image channel data. X(m-1)nThe data is the data of the (m-1) th row and the nth column in the image channel data. X(m+1)nIs the data of the (m +1) th row and the nth column in the image channel data, m is less than or equal to
Figure BDA0003311365490000132
N is less than or equal to
Figure BDA0003311365490000133
A positive integer of (1), wherein
Figure BDA0003311365490000134
Is a ceiling operation.
For example, taking the image channel data shown in table 1 as R channel data as an example, the preset central pixel point is a pixel point located at a preset central position in the image channel data, for example, the preset central pixel point in table 1 is a pixel point in the 8 th row and 8 th column. From table 1 above, it can be determined that: the rule that the R channel data is full of preset central pixel points as datum points and the pixel values of the pixel points diffused along the periphery are sequentially increased is X88<X87<X86<X85<X84<X83<X82<X81,X88<X89<X8,10<X8,11<X8,12< X8,13<X8,14<X8,15(transverse); x88<X78<X68<X58<X48<X38<X28<X18,X88<X98< X10,8<X11,8<X12,8<X13,8<X14,8<X15,8(longitudinal direction). Wherein, XijFor the data in the ith row and the jth column in the R channel data, i and j are both positive integers not exceeding 9, such as X88The data of 8 th row and 8 th column in the R channel data, and the like.
S212, determining the LSC data as valid data.
And S213, determining the LSC data as failure data.
It should be noted that, in the present application, the image channel data, the average channel data, and the difference channel data may also be visually displayed in a form of a graph, for example, a table corresponding to the image channel data is shown in table 1 above, a table corresponding to the average channel data is shown in table 2 above, and a table corresponding to the difference channel data is shown in table 3 above.
Through implementing the method and the device, the LSC data are acquired, then the LSC data are analyzed to obtain the image channel data, finally the image channel data are subjected to effectiveness detection to determine whether the LSC data are effective data, so that the effectiveness detection of the LSC data can be conveniently and rapidly realized, the efficiency and the convenience of the effectiveness detection of the LSC data are improved, and the technical problems that the calculation resources are wasted and the service processing efficiency is reduced due to the fact that the effectiveness of the LSC data cannot be judged in the prior art are solved.
Based on the same inventive concept, another embodiment of the present application provides a device and a terminal device corresponding to the method for detecting lens shading correction LSC data in the embodiment of the present application.
Fig. 3 is a schematic structural diagram of a detection apparatus for lens shading correction LSC data according to an embodiment of the present application. The apparatus 30 shown in fig. 3 comprises: an obtaining module 301, an analyzing module 302, and a detecting module 303, wherein:
the obtaining module 301 is configured to obtain LSC data;
the analysis module 302 is configured to analyze the LSC data to obtain image channel data, where the image channel data includes R channel data, Gr channel data, Gb channel data, and B channel data;
the detecting module 303 is configured to perform validity detection on the image channel data, and determine whether the LSC data is valid data.
Optionally, the detecting module 303 is specifically configured to:
judging whether the image channel data meet a preset effective detection condition;
if so, determining the LSC data as valid data;
if not, determining the LSC data as failure data;
wherein the valid detection conditions at least comprise: the edge processing data is smaller than a first threshold value, and the internal processing data is smaller than a second threshold value; the edge processing data is obtained by processing data located in a preset edge area in the image channel data, and the internal processing data is obtained by processing data in other areas except the preset edge area in the image channel data.
Optionally, the edge processing data is a maximum value of data located in a preset edge region in the image channel data, and the internal processing data is a maximum value of data located in other regions except the preset edge region in the image channel data.
Optionally, the apparatus further comprises a calculation module 304, the calculation module 304 is configured to:
carrying out average value calculation on the image channel data to obtain average channel data, wherein the image channel data and the average channel data have the same data dimension;
calculating difference values of the average channel data to obtain difference channel data, wherein the difference channel data and the average channel data have the same data dimension;
performing maximum value calculation on data located in a preset edge area in the difference channel data to obtain edge processing data;
and carrying out maximum value calculation on data of other regions except the preset edge region in the difference channel data to obtain the internal processing data.
Optionally, the valid detection condition further includes: and the difference value between the Gr channel data and the Gb channel data is smaller than a third threshold value.
Optionally, the calculation module 304 is further configured to:
calculating difference values of the Gr channel data and the Gb channel data to obtain difference image data;
and determining the maximum value in the difference image data as the difference value between the Gr channel data and the Gb channel data.
Optionally, the valid detection condition further includes: and the image channel data takes a preset central pixel point as a reference point, and the pixel values of the diffused pixel points along the periphery are sequentially increased.
Please refer to fig. 4, which is a schematic structural diagram of a terminal device according to an embodiment of the present application. The terminal device 40 shown in fig. 4 includes: at least one processor 401, a communication interface 402, a user interface 403 and a memory 404, wherein the processor 401, the communication interface 402, the user interface 403 and the memory 404 may be connected by a bus or other means, and the embodiment of the present invention is exemplified by being connected by a bus 405. Wherein the content of the first and second substances,
processor 401 may be a general-purpose processor such as a Central Processing Unit (CPU).
The communication interface 402 may be a wired interface (e.g., an ethernet interface) or a wireless interface (e.g., a cellular network interface or using a wireless local area network interface) for communicating with other terminals or websites. In this embodiment of the present invention, the communication interface 402 is specifically configured to acquire LSC data and the like.
The user interface 403 may be a touch panel, including a touch screen and a touch screen, for detecting an operation instruction on the touch panel, and the user interface 403 may also be a physical button or a mouse. The user interface 403 may also be a display screen for outputting, displaying images or data.
The Memory 404 may include Volatile Memory (Volatile Memory), such as Random Access Memory (RAM); the Memory may also include a Non-Volatile Memory (Non-Volatile Memory), such as a Read-Only Memory (ROM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, HDD), or a Solid-State Drive (SSD); the memory 404 may also comprise a combination of memories of the kind described above. The memory 404 is used for storing a set of program codes, and the processor 401 is used for calling the program codes stored in the memory 404 and executing the following operations:
obtaining LSC data;
analyzing the LSC data to obtain image channel data, wherein the image channel data comprises R channel data, Gr channel data, Gb channel data and B channel data;
and carrying out validity detection on the image channel data, and determining whether the LSC data is valid data.
Optionally, the performing validity check on the image channel data and determining whether the LSC data is valid data includes:
judging whether the image channel data meet a preset effective detection condition;
if so, determining the LSC data as valid data;
if not, determining the LSC data as failure data;
wherein the valid detection conditions at least comprise: the edge processing data is smaller than a first threshold value, and the internal processing data is smaller than a second threshold value; the edge processing data is obtained by processing data located in a preset edge area in the image channel data, and the internal processing data is obtained by processing data in other areas except the preset edge area in the image channel data.
Optionally, the edge processing data is a maximum value of data located in a preset edge region in the image channel data, and the internal processing data is a maximum value of data located in other regions except the preset edge region in the image channel data.
Optionally, before determining whether the image channel data meets a preset valid detection condition, the processor 401 is further configured to:
carrying out average value calculation on the image channel data to obtain average channel data, wherein the image channel data and the average channel data have the same data dimension;
calculating difference values of the average channel data to obtain difference channel data, wherein the difference channel data and the average channel data have the same data dimension;
performing maximum value calculation on data located in a preset edge area in the difference channel data to obtain edge processing data;
and carrying out maximum value calculation on data of other regions except the preset edge region in the difference channel data to obtain the internal processing data.
Optionally, the valid detection condition further includes: and the difference value between the Gr channel data and the Gb channel data is smaller than a third threshold value.
Optionally, before determining whether the image channel data meets a preset valid detection condition, the processor 401 is further configured to:
calculating difference values of the Gr channel data and the Gb channel data to obtain difference image data;
and determining the maximum value in the difference image data as the difference value between the Gr channel data and the Gb channel data.
Optionally, the valid detection condition further includes: and the image channel data takes a preset central pixel point as a reference point, and the pixel values of the diffused pixel points along the periphery are sequentially increased.
Since the terminal device described in this embodiment is a terminal device used for implementing the method for detecting lens shading correction LSC data in this embodiment, based on the method described in this embodiment, a person skilled in the art can understand the specific implementation of the terminal device of this embodiment and various variations thereof, so that a detailed description of how to implement the method in this embodiment by the terminal device is omitted here. The terminal device used by a person skilled in the art to implement the method for processing information in the embodiment of the present application is within the scope of the protection intended by the present application.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages: according to the method and the device, the LSC data are acquired, then the LSC data are analyzed to obtain the image channel data, finally the image channel data are subjected to effectiveness detection to determine whether the LSC data are effective data, so that the effectiveness detection of the LSC data can be conveniently and rapidly realized, the efficiency and the convenience of the LSC data effectiveness detection are improved, and the technical problems that in the prior art, due to the fact that the effectiveness of the LSC data cannot be judged, calculation resources are wasted, the service processing efficiency is reduced and the like are solved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for detecting lens shading correction LSC data, the method comprising:
obtaining LSC data;
analyzing the LSC data to obtain image channel data, wherein the image channel data comprises R channel data, Gr channel data, Gb channel data and B channel data;
and carrying out validity detection on the image channel data, and determining whether the LSC data is valid data.
2. The method of claim 1, wherein the performing validity checking on the image channel data and determining whether the LSC data is valid data comprises:
judging whether the image channel data meet a preset effective detection condition;
if so, determining the LSC data as valid data;
if not, determining the LSC data as failure data;
wherein the valid detection conditions at least comprise: the edge processing data is smaller than a first threshold value, and the internal processing data is smaller than a second threshold value; the edge processing data is obtained by processing data located in a preset edge area in the image channel data, and the internal processing data is obtained by processing data in other areas except the preset edge area in the image channel data.
3. The method according to claim 2, wherein the edge processing data is a maximum value of data in the image channel data located in a preset edge region, and the internal processing data is a maximum value of data in the image channel data located in other regions except the preset edge region.
4. The method according to claim 2, wherein before determining whether the image channel data satisfies a preset valid detection condition, the method further comprises:
carrying out average value calculation on the image channel data to obtain average channel data, wherein the image channel data and the average channel data have the same data dimension;
calculating difference values of the average channel data to obtain difference channel data, wherein the difference channel data and the average channel data have the same data dimension;
performing maximum value calculation on data located in a preset edge area in the difference channel data to obtain edge processing data;
and carrying out maximum value calculation on data of other regions except the preset edge region in the difference channel data to obtain the internal processing data.
5. The method of claim 2, wherein the valid detection condition further comprises: and the difference value between the Gr channel data and the Gb channel data is smaller than a third threshold value.
6. The method according to claim 5, wherein before determining whether the image channel data satisfies a preset valid detection condition, the method further comprises:
calculating difference values of the Gr channel data and the Gb channel data to obtain difference image data;
and determining the maximum value in the difference image data as the difference value between the Gr channel data and the Gb channel data.
7. The method of claim 2, wherein the valid detection condition further comprises: and the image channel data takes a preset central pixel point as a reference point, and the pixel values of the diffused pixel points along the periphery are sequentially increased.
8. An apparatus for detecting Lens Shading Correction (LSC) data, the apparatus comprising: the device comprises an acquisition module, an analysis module and a detection module, wherein:
the acquisition module is used for acquiring LSC data;
the analysis module is used for analyzing the LSC data to obtain image channel data, wherein the image channel data comprises R channel data, Gr channel data, Gb channel data and B channel data;
the detection module is used for carrying out validity detection on the image channel data and determining whether the LSC data is valid data.
9. A terminal device, characterized in that the terminal device comprises: a processor, a memory, a communication interface, and a bus; the processor, the memory and the communication interface are connected through the bus and complete mutual communication; the memory stores executable program code; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory for executing the lens shading correction LSC data detection method as recited in any one of claims 1 to 7 above.
10. A computer-readable storage medium characterized by storing a program which, when run on a terminal device, executes the lens shading correction LSC data detection method according to any one of claims 1 to 7.
CN202111217855.6A 2021-10-19 2021-10-19 LSC data detection method, device, terminal equipment and medium Pending CN114051132A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111217855.6A CN114051132A (en) 2021-10-19 2021-10-19 LSC data detection method, device, terminal equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111217855.6A CN114051132A (en) 2021-10-19 2021-10-19 LSC data detection method, device, terminal equipment and medium

Publications (1)

Publication Number Publication Date
CN114051132A true CN114051132A (en) 2022-02-15

Family

ID=80205523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111217855.6A Pending CN114051132A (en) 2021-10-19 2021-10-19 LSC data detection method, device, terminal equipment and medium

Country Status (1)

Country Link
CN (1) CN114051132A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100114343A (en) * 2009-04-15 2010-10-25 삼성전자주식회사 Apparatus for correcting channel sensitivity and lens shading of a photographed image and method thereof
US20110007969A1 (en) * 2009-07-08 2011-01-13 Samsung Electronics Co., Ltd. Method and apparatus for correcting lens shading
CN105933686A (en) * 2016-05-19 2016-09-07 浙江大学 Method for correcting color lens shadow of digital camera with adaptive light source
CN106170065A (en) * 2016-09-26 2016-11-30 信利光电股份有限公司 The LSC compensation method of a kind of fish-eye camera and device
CN106506905A (en) * 2016-10-20 2017-03-15 湖南国科微电子股份有限公司 Camera lens shadow correction method
US20190324268A1 (en) * 2018-04-20 2019-10-24 AMD (Shanghai) Co. Ltd. Efficient radial lens shading correction
CN111182293A (en) * 2020-01-06 2020-05-19 昆山丘钛微电子科技有限公司 Method and system for detecting lens shadow correction data
CN112243116A (en) * 2020-09-30 2021-01-19 格科微电子(上海)有限公司 Multichannel LSC gain adjusting method and device, storage medium and image processing equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100114343A (en) * 2009-04-15 2010-10-25 삼성전자주식회사 Apparatus for correcting channel sensitivity and lens shading of a photographed image and method thereof
US20110007969A1 (en) * 2009-07-08 2011-01-13 Samsung Electronics Co., Ltd. Method and apparatus for correcting lens shading
CN105933686A (en) * 2016-05-19 2016-09-07 浙江大学 Method for correcting color lens shadow of digital camera with adaptive light source
CN106170065A (en) * 2016-09-26 2016-11-30 信利光电股份有限公司 The LSC compensation method of a kind of fish-eye camera and device
CN106506905A (en) * 2016-10-20 2017-03-15 湖南国科微电子股份有限公司 Camera lens shadow correction method
US20190324268A1 (en) * 2018-04-20 2019-10-24 AMD (Shanghai) Co. Ltd. Efficient radial lens shading correction
CN111182293A (en) * 2020-01-06 2020-05-19 昆山丘钛微电子科技有限公司 Method and system for detecting lens shadow correction data
CN112243116A (en) * 2020-09-30 2021-01-19 格科微电子(上海)有限公司 Multichannel LSC gain adjusting method and device, storage medium and image processing equipment

Similar Documents

Publication Publication Date Title
CN111091572B (en) Image processing method and device, electronic equipment and storage medium
US8913080B2 (en) Partitioning high resolution images into sub-images for display
CN113870293B (en) Image processing method, image processing device, electronic equipment and storage medium
CN111161195B (en) Feature map processing method and device, storage medium and terminal
CN110298858B (en) Image clipping method and device
US20220383637A1 (en) Live streaming sampling method and apparatus, and electronic device
CN115131714A (en) Intelligent detection and analysis method and system for video image
CN109272526B (en) Image processing method and system and electronic equipment
CN112651953A (en) Image similarity calculation method and device, computer equipment and storage medium
CN110555014B (en) Data migration method and system, electronic device and storage medium
CN108596120B (en) Target detection method and device based on deep learning
CN114119964A (en) Network training method and device, and target detection method and device
CN114051132A (en) LSC data detection method, device, terminal equipment and medium
CN116137061A (en) Training method and device for quantity statistical model, electronic equipment and storage medium
CN111428740A (en) Detection method and device for network-shot photo, computer equipment and storage medium
US9594955B2 (en) Modified wallis filter for improving the local contrast of GIS related images
CN111754518B (en) Image set expansion method and device and electronic equipment
CN113313642A (en) Image denoising method and device, storage medium and electronic equipment
CN110879948B (en) Image processing method, device and storage medium
US8908986B1 (en) Systems and methods for selecting ink colors
CN105243062B (en) Method and device for detecting webpage feature area
CN109375952B (en) Method and apparatus for storing data
CN111292342A (en) Method, device and equipment for cutting text in image and readable storage medium
CN113568733A (en) Resource allocation method, device, electronic equipment and storage medium
CN112333155A (en) Abnormal flow detection method and system, electronic equipment and storage medium

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