CN114051132B - LSC data detection method, device, terminal equipment and medium - Google Patents
LSC data detection method, device, terminal equipment and medium Download PDFInfo
- Publication number
- CN114051132B CN114051132B CN202111217855.6A CN202111217855A CN114051132B CN 114051132 B CN114051132 B CN 114051132B CN 202111217855 A CN202111217855 A CN 202111217855A CN 114051132 B CN114051132 B CN 114051132B
- Authority
- CN
- China
- Prior art keywords
- data
- channel data
- lsc
- image
- preset
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
- H04N17/002—Diagnosis, testing or measuring for television systems or their details for television cameras
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
- H04N23/81—Camera processing pipelines; Components thereof for suppressing or minimising disturbance in the image signal generation
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Image Analysis (AREA)
- Studio Devices (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a detection method, a device, terminal equipment and a medium of lens shading correction LSC data, wherein the method comprises the steps of obtaining LSC data, analyzing the LSC data to obtain image channel data, and detecting validity of the image channel data to determine whether the LSC data is valid data or not. The invention can solve the technical problems of waste of computing resources, reduction of service processing efficiency and the like caused by incapability of judging the validity of LSC data in the prior art.
Description
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method, an apparatus, a terminal device, and a medium for detecting lens shading correction LSC data.
Background
Currently, camera module suppliers need to burn the Lens Shading Correction (LSC) data into a terminal platform, such as a taiwan concurrent technology multimedia chip provider (MediaTek, MTK) tool platform, for subsequent image processing.
However, during the recording or transmission of LSC data, partial image content is lost due to transmission stability or other special conditions. Because of the limited image processing algorithm, the effective data of the large-scale service is supported to be processed, and whether the effective data is invalid data cannot be judged.
However, if the valid data and the invalid data are not distinguished, the same high-complexity calculation is performed on the valid data and the invalid data, which results in waste of calculation resources and also reduces the service processing efficiency.
Therefore, it is desirable to propose a validity detection scheme for LSC data.
Disclosure of Invention
The embodiment of the application solves the technical problems of waste of computing resources, reduction of service processing efficiency and the like caused by incapability of judging the effectiveness of LSC data in the prior art by providing the detection method of the lens shading correction LSC data.
In one aspect, the present application provides a method for detecting lens shading correction LSC data according to an embodiment of the present application, the method comprising:
acquiring 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 to determine whether the LSC data are valid data.
Optionally, the performing validity detection 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 or not;
If yes, determining the LSC data as effective data;
if not, determining the LSC data as invalid data;
The effective detection condition at least comprises edge processing data which are obtained by processing data in a preset edge area in the image channel data, wherein the edge processing data are smaller than a first threshold value and internal processing data are smaller than a second threshold value, and the internal processing data are 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 than the preset edge region in the image channel data.
Optionally, before the determining whether the image channel data meets the 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;
Performing difference value calculation on 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 the data in other areas except the preset edge area in the difference channel data to obtain the internal processing data.
Optionally, the effective detection condition further includes that a difference value between the Gr channel data and the Gb channel data is smaller than a third threshold value.
Optionally, before the determining whether the image channel data meets the preset valid detection condition, the method further includes:
performing difference value calculation on 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 a difference value between the Gr channel data and the Gb channel data.
Optionally, the effective detection condition further includes that the pixel values of the peripheral diffusion pixel points are sequentially increased by taking a preset central pixel point as a reference point in the image channel data.
On the other hand, the application provides a device for detecting lens shading correction LSC data, which 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 are valid data or not.
The descriptions or not described in the embodiments of the present application may be referred to the relevant descriptions in the foregoing method embodiments, which are not repeated herein.
In another aspect, the present application provides a terminal device according to an embodiment of the present application, the terminal device including a processor, a memory, a communication interface, and a bus, the processor, the memory, and the communication interface being connected through the bus and completing communication with each other, the memory storing executable program code, the processor running a program corresponding to the executable program code by reading the executable program code stored in the memory, for executing the method for detecting lens shading correction LSC data as described above.
In another aspect, the present application provides a computer-readable storage medium storing a program that when run on a terminal device performs the method of detecting lens shading correction LSC data as described above.
The one or more technical schemes provided by the embodiment of the application have at least the following technical effects or advantages that the application obtains the image channel data by acquiring the LSC data, then analyzing the LSC data, and finally carrying out validity detection on the image channel data to determine whether the LSC data is valid data, so that the validity detection of the LSC data can be conveniently and rapidly realized, the high efficiency and the convenience of the validity detection of the LSC data are improved, and the technical problems of calculation resource waste, service processing efficiency reduction and the like caused by incapability of judging the validity of the LSC data in the prior art are solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for detecting lens shading correction LSC data according to an embodiment of the present application.
Fig. 2 is a flowchart of another method for detecting lens shading correction LSC data according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of a device for detecting 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 solves the technical problems of calculation resource waste, service processing efficiency reduction and the like caused by incapability of judging the effectiveness of LSC data in the prior art by providing the detection method of the lens shading correction LSC data.
The technical scheme of the embodiment of the application aims to solve the technical problems and has the general idea that LSC data are acquired, the LSC data are analyzed to obtain image channel data, the image channel data comprise R channel data, gr channel data, gb channel data and B channel data, validity detection is carried out on the image channel data, and whether the LSC data are valid data is determined.
In order to better understand the above technical solutions, the following detailed description will refer to the accompanying drawings and specific embodiments.
First, the term "and/or" appearing herein is merely an association relationship describing the associated object, and means that three relationships may exist, for example, a and/or B, and may mean that a exists alone, while a and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
Fig. 1 is a flowchart of a method for detecting lens shading correction LSC data according to an embodiment of the present application. The method as shown in fig. 1 comprises the following implementation steps:
s101, acquiring LSC data.
The LSC data of the present application is data burned into a terminal platform, such as an MTK tool platform, by a camera module vendor, which 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) Gr channel data, also referred to as Gr 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, version of the MTK platform, chip information in the MTK platform, such as a power management chip, a radio frequency chip, 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 application can analyze the LSC data to obtain the image channel data and the image platform data. The data length of each of the image channel data and the image platform data is not limited, and may be set according to practical requirements, for example, the image channel data and the image platform data occupy 1868 data lengths in total, and the image platform data may also be referred to as header information, and includes 68 data, for example, versions 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 the case of recording LSC data, the image frame is divided into a region of a fixed size a×b for recording test, for example, into a region of 15×15. Accordingly, the size/data dimension of the image channel data obtained through analysis is A multiplied by B. Taking 15×15 region division as an example, the present application can parse LSC data, and parse and arrange them according to header information, R channel data, gr channel data, gb channel data, and B channel number, where the R channel data, the Gr channel data, the Gb channel data, and the B channel data are correspondingly arranged in a single channel matrix of 15×15 in capacity expansion.
S103, validity detection is carried out on the image channel data, and whether the LSC data are valid data is determined.
The application can judge/determine whether the LSC data is valid data by judging whether the image channel data meets the 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 coloring, rendering, or the like may be subsequently performed on the image channel data in the LSC data. 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 flow may be ended.
The effective detection condition is set by system customization, for example, the effective detection condition can at least comprise that edge processing data is smaller than a first threshold value and internal processing data is smaller than a second threshold value, and optionally, the effective detection condition can also comprise any one or more of the following combination of the following, namely, the difference value between Gr channel data and Gb channel data is smaller than a third threshold value, and the image channel data meets the change rule of big and small surrounding centers (namely, the image channel data takes a preset center pixel point as a datum point and sequentially increases the pixel values of the surrounding diffusion pixel points).
The edge processing data is data obtained by processing data located in a preset edge area in the image channel data, namely data obtained by processing edge channel data in the image channel data in a mode of, for example, maximum value, average value and the like. The internal processing data is data obtained by processing data of other areas except the preset edge area in the image channel data, that is, data obtained by processing internal channel data except the edge channel data in the image channel data in a mode of, for example, maximum value, average value and the like.
Optionally, the edge processing data may be the maximum value of data located in a preset edge area in the image channel data, that is, the maximum value of edge channel data, and the internal processing data may be the maximum value of data located in other areas except the preset edge area in the image channel data, that is, the maximum value of internal channel data, and the like, which is not limited in the present application. The preset edge area is an area which is set by a system in a self-defining mode. The first threshold, the second threshold and the third threshold are set by a system or a user in a self-defining way, for example, experience values set according to user experience or thresholds set according to actual demands of the system.
By implementing the application, the LSC data is acquired, then the LSC data is analyzed to obtain the image channel data, and finally the validity detection is carried out on the image channel data to determine whether the LSC data is valid data, so that the validity detection of the LSC data can be conveniently and rapidly realized, the validity detection efficiency and convenience of the LSC data are improved, and the technical problems of calculation resource waste, service processing efficiency reduction and the like caused by incapability of judging the validity of the LSC data in the prior art are solved.
Fig. 2 is a flowchart of another method for detecting lens shading correction LSC data according to an embodiment of the present application. The method as shown in fig. 2 comprises the following implementation steps:
s201, acquiring LSC data.
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.
The application can respectively carry out validity detection on each image channel data, and specifically carries out validity detection on R channel data, gr channel data, gb channel data and B channel data, and the specific implementation mode is described in the following steps S203-S213.
And 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 application can adopt a preset frame to calculate the sliding average value of the image channel data to obtain corresponding average channel data, wherein the image channel data and the average channel data have the same data dimension, such as a matrix with dimension of A multiplied by B. The size of the preset frame can be set according to the actual requirement of the system, and the application is not limited.
For example, taking the image channel data as R-channel data as an example, it may be represented as a15×15 single channel matrix as shown in table 1 below.
TABLE 1
As shown in table 1, the present application can select a preset frame with a suitable size according to the position of the image channel data to perform average calculation on the corresponding image channel data, for example, in the illustration, average calculation is performed on the R channel data of the 8 th column according to a preset frame of 2×1, average calculation is performed on the R channel data of the 8 th row according to a preset frame of 1×2, and average calculation is performed on the R channel data of the rest rows/columns according to a preset frame of 2×2. Specifically, as shown in the black boxes in table 1, average channel data of 15×15 size can be calculated by using average values of 14587 and 13123 as the 1 st row and 8 th column result data, average values of 19644 and 16591 as the 8 th row and 1 st column result data, R channel data of the remaining rows/columns, and average values of 31081, 24684, 27259 and 22144 as the 1 st row and 1 st column result data, and the principle in turn.
S204, performing difference value calculation on 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 application can adopt the following formula (1) to calculate the difference value of the average channel data so as to obtain the difference channel data with the same data dimension as the average channel data, such as a matrix with dimension of A multiplied by B, and the like.
Wherein C mn is the data of the nth row and the nth column in the differential channel data, i mn is the data of the nth row and the nth column in the average channel data, the dimension of the average channel data is a×b, i (A+1-m)n is the data of the nth row and the nth column in the (a+1-m) th row in the average channel data, i m(B+1-n) is the data of the (b+1-n) th column in the mth row in the average channel data, i (A+1-m)(B+1-n) is the data of the (b+1-n) th row and the (b+1-n) th column in the average channel data, m is a positive integer less than or equal to a, n is a positive integer less than or equal to B, and i is an absolute value ABS operation.
For example, taking the R channel matrix with 15×15 average channel data as an example, it can be specifically represented as the following table 2.
TABLE 2
Taking C 11 as an example, the application can calculate and obtain C 11 by adopting the following formula (2) when calculating the difference channel data.
As can be seen from Table 2 above, i 11 is 2692, i 15,1 is 26731, i 1,15 is 26537, and i 15,15 is 27157, specifically as shown by the black boxes in Table 2 above. In turn, the present application can calculate the differential channel data as shown in table 3 below.
TABLE 3 Table 3
S205, carrying out maximum value calculation on the data positioned in the preset edge area in the difference channel data to obtain the edge processing data.
The preset edge area in the present application is an edge area set by a system or a user in a user-defined manner, for example, 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 shown in the above table 3 are set as data located in the preset edge area, and so on.
The present application may process the data located in the preset edge area in the difference channel data, for example, maximum value processing, average value processing, mode selection processing, etc., to obtain the edge processing data. Preferably, the edge processing data is obtained by performing maximum value calculation/selection on the data of the edge region. For example, referring to the differential channel data shown in the above table 3 as an example, the preset edge region is a region where the 1 st row, 1 st column, 15 th row and 15 th column data are located in the differential channel data, and the edge processing data can be obtained by calculating according to the following formula (3).
Edge processing data=max (C 1 Row of lines ,C1 Column of ,C15 Row of lines ,C15 Column of ) formula (3)
The above formula (3) indicates that the maximum value of the data located in the 1 st row, 1 st column, 15 th row, and 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 in other areas except the preset edge area in the difference channel data to obtain the internal processing data.
The application can refer to other areas except the preset edge area in the difference channel data as an inner area, and refer to the data of the inner area as inner area data. Furthermore, the application can perform maximum value calculation/selection on the internal region data so as to obtain the internal processing data.
For example, referring to the example of step S205, the present application may calculate and obtain the internal processing data using the following formula (4):
max { row data and column data except (C 1 Row of lines ,C1 Column of ,C15 Row of lines ,C15 Column of ) } equation (4)
S207, judging whether the edge processing data is smaller than a first threshold value and whether the internal processing data is smaller than a second threshold value.
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 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 value and the internal processing data is smaller than the second threshold value, continuing to execute the step S208 or the step S212, otherwise, executing the step S213, and ending the flow.
The first threshold and the second threshold may be the same or different threshold set by the system in a self-defining manner, and the application is not limited thereto, for example, the first threshold is 10% of the preset maximum threshold, the second threshold is 5% of the preset maximum threshold, and so on.
S208, performing difference value calculation on the Gr channel data and the Gb channel data to obtain difference image data.
The present application may calculate and obtain the difference between the Gr channel data and the Gb channel data, that is, the difference image data, 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 dimensions are all a×b.
Wherein H mn is data of an mth row and an nth column in the difference image data. Gr mn is the data of the m-th row and n-th column in Gr channel data. Gb mn is the data of the mth row and the nth column in the Gb channel data. 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 operation. And I is an absolute value ABS operation.
S209, determining a maximum value in the difference image data as a difference value between the Gr channel data and the Gb channel data.
The present application may determine a difference value between the Gr channel data and the Gb channel data from the difference image data, for example, select a maximum value, an average value, a mode, or the like in the difference image data 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 or not can be further judged. If the threshold value is smaller than the third threshold value, the step S211 is continuously executed or the step S212 is continuously executed, otherwise, the step S213 is executed, and the flow is ended.
The third threshold is a threshold set by system customization, for example, an experience value set according to user experience, 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 a preset maximum difference value, etc.
S211, judging whether the image channel data meet the rule that the pixel values of the pixel points spread along the periphery are sequentially increased by taking a preset central pixel point as a datum point.
The application can further judge the change regularity of the image data channel, such as whether the change regularity of 'big circumference, small center' is satisfied. Specifically, the application can judge whether the image channel data meets the condition that the preset central pixel point is taken as a reference point, and the pixel values of the pixel points diffused along the periphery are sequentially increased. If yes, step S212 is continued, otherwise step S213 is executed, ending the flow. For example, the present application may adopt the following formula (6) to determine whether the image data channel satisfies a rule that pixel values of pixels that diffuse to the periphery along the preset center pixel point sequentially increase.
Wherein X mn is the data of the mth row and the nth column in the image channel data. X m(n-1) is the data of the (n-1) th column of the m-th row in the image channel data. X m(n+1) is the data of the (n+1) th column of the m-th row in the image channel data. X (m-1)n is the data of the (m-1) th row and the nth column in the image channel data. X (m+1)n is the data of the (m+1) th row and the nth column in the image channel data, m is less than or equal toN is less than or equal to a positive integer ofWhereinIs a round-up operation.
For example, referring to the image channel data shown in table 1 as R channel data, the preset center pixel point is a pixel point located at a preset center position in the image channel data, for example, the preset center pixel point in table 1 is a pixel point of the 8 th row and the 8 th column. From table 1, it can be determined that the R channel data satisfies the rule that the pixel values of the pixels spread along the periphery sequentially increase with the preset central pixel point as the reference point, that is, X88<X87<X86<X85<X84<X83<X82<X81,X88<X89<X8,10<X8,11<X8,12<X8,13<X8,14<X8,15( in the 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 X ij is the data of the ith row and the jth column in the R channel data, i and j are positive integers not exceeding 9, for example, X 88 is the data of the 8 th row and the 8 th column in the R channel data, etc.
S212, determining the LSC data as valid data.
S213, determining the LSC data as invalid data.
It should be noted that, the present application may also be capable of performing visual display on the image channel data, the average channel data, and the difference channel data in a chart form, for example, table 1 shows a table corresponding to the image channel data, table 2 shows a table corresponding to the average channel data, table 3 shows a table corresponding to the difference channel data, and so on.
By implementing the application, the LSC data is acquired, then the LSC data is analyzed to obtain the image channel data, and finally the validity detection is carried out on the image channel data to determine whether the LSC data is valid data, so that the validity detection of the LSC data can be conveniently and rapidly realized, the validity detection efficiency and convenience of the LSC data are improved, and the technical problems of calculation resource waste, service processing efficiency reduction and the like caused by incapability of judging the validity of the LSC data 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 device for detecting lens shading correction LSC data according to an embodiment of the present application. The apparatus 30 shown in fig. 3 includes an acquisition module 301, an analysis module 302, and a detection module 303, where:
The acquiring module 301 is configured to acquire LSC data;
the parsing module 302 is configured to parse 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 detection module 303 is specifically configured to:
Judging whether the image channel data meet a preset effective detection condition or not;
If yes, determining the LSC data as effective data;
if not, determining the LSC data as invalid data;
The effective detection condition at least comprises edge processing data which are obtained by processing data in a preset edge area in the image channel data, wherein the edge processing data are smaller than a first threshold value and internal processing data are smaller than a second threshold value, and the internal processing data are 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 than the preset edge region in the image channel data.
Optionally, the apparatus further comprises a calculation module 304, the calculation module 304 being 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;
Performing difference value calculation on 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 the data in other areas except the preset edge area in the difference channel data to obtain the internal processing data.
Optionally, the effective detection condition further includes that a difference value between the Gr channel data and the Gb channel data is smaller than a third threshold value.
Optionally, the computing module 304 is further configured to:
performing difference value calculation on 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 a difference value between the Gr channel data and the Gb channel data.
Optionally, the effective detection condition further includes that the pixel values of the peripheral diffusion pixel points are sequentially increased by taking a preset central pixel point as a reference point in the image channel data.
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 as shown in fig. 4 comprises at least one processor 401, a communication interface 402, a user interface 403 and a memory 404, the processor 401, the communication interface 402, the user interface 403 and the memory 404 being connectable by a bus or otherwise, the embodiments of the application being exemplified by the connection via a bus 405. Wherein,
The processor 401 may be a general purpose processor such as a central processing unit (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 the embodiment of the present invention, the communication interface 402 is specifically configured to obtain 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 be a physical key 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 (RAM), such as random access Memory (Random Access Memory), non-Volatile Memory (Non-Volatile Memory), such as Read-Only Memory (ROM), flash Memory (Flash Memory), hard disk (HARD DISK DRIVE, HDD), or Solid state disk (Solid-state-STATE DRIVE, SSD), and the Memory 404 may also include a combination of the above types of Memory. 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 to perform the following operations:
acquiring 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 to determine whether the LSC data are valid data.
Optionally, the performing validity detection 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 or not;
If yes, determining the LSC data as effective data;
if not, determining the LSC data as invalid data;
The effective detection condition at least comprises edge processing data which are obtained by processing data in a preset edge area in the image channel data, wherein the edge processing data are smaller than a first threshold value and internal processing data are smaller than a second threshold value, and the internal processing data are 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 than the preset edge region in the image channel data.
Optionally, before the determining whether the image channel data meets the 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;
Performing difference value calculation on 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 the data in other areas except the preset edge area in the difference channel data to obtain the internal processing data.
Optionally, the effective detection condition further includes that a difference value between the Gr channel data and the Gb channel data is smaller than a third threshold value.
Optionally, before the determining whether the image channel data meets the preset valid detection condition, the processor 401 is further configured to:
performing difference value calculation on 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 a difference value between the Gr channel data and the Gb channel data.
Optionally, the effective detection condition further includes that the pixel values of the peripheral diffusion pixel points are sequentially increased by taking a preset central pixel point as a reference point in the image channel data.
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 of the present application, based on the method described in this embodiment of the present application, those skilled in the art can understand the specific implementation of the terminal device in this embodiment and various modifications thereof, so how this terminal device implements the method in this embodiment of the present application will not be described in detail herein. The terminal device adopted by the method for processing information in the embodiment of the application belongs to the scope of protection required by the application as long as the person skilled in the art implements the method.
The technical scheme of the embodiment of the application has at least the following technical effects or advantages that the LSC data are acquired, then the LSC data are analyzed to obtain the image channel data, and finally the validity detection is carried out on the image channel data to determine whether the LSC data are valid data, so that the validity detection of the LSC data can be conveniently and rapidly realized, the validity detection of the LSC data is improved, the efficiency and the convenience of the LSC data are improved, and the technical problems of calculation resource waste, service processing efficiency reduction and the like caused by incapability of judging the validity of the LSC data in the prior art are solved.
It will be appreciated by those skilled in the art that 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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. It is therefore intended that the following claims be interpreted as including the 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 modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
Claims (9)
1. A method for detecting lens shading correction LSC data, the method comprising:
acquiring 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;
Performing validity detection on the image channel data to determine whether the LSC data is valid data, including:
Judging whether the image channel data meet a preset effective detection condition or not;
If yes, determining the LSC data as effective data;
if not, determining the LSC data as invalid data;
The effective detection condition at least comprises edge processing data which are obtained by processing data in a preset edge area in the image channel data, wherein the edge processing data are smaller than a first threshold value and internal processing data are smaller than a second threshold value, and the internal processing data are obtained by processing data in other areas except the preset edge area in the image channel data.
2. The method according to claim 1, wherein 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 than the preset edge region in the image channel data.
3. The method of claim 1, 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;
Performing difference value calculation on 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 the data in other areas except the preset edge area in the difference channel data to obtain the internal processing data.
4. The method of claim 1, wherein the effective detection condition further comprises a difference value between the Gr channel data and the Gb channel data being less than a third threshold.
5. The method of claim 4, wherein before determining whether the image channel data satisfies a preset valid detection condition, the method further comprises:
performing difference value calculation on 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 a difference value between the Gr channel data and the Gb channel data.
6. The method of claim 1, wherein the effective detection condition further comprises sequentially increasing pixel values of the peripheral diffusion pixels with a preset center pixel point as a reference point in the image channel data.
7. The device for detecting the LSC data of the lens shading correction is characterized by comprising 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 are valid data or not;
The detection module is specifically configured to:
Judging whether the image channel data meet a preset effective detection condition or not;
If yes, determining the LSC data as effective data;
if not, determining the LSC data as invalid data;
The effective detection condition at least comprises edge processing data which are obtained by processing data in a preset edge area in the image channel data, wherein the edge processing data are smaller than a first threshold value and internal processing data are smaller than a second threshold value, and the internal processing data are obtained by processing data in other areas except the preset edge area in the image channel data.
8. 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 perform communication with each other, the memory stores executable program codes, and the processor runs a program corresponding to the executable program codes by reading the executable program codes stored in the memory for executing the lens shading correction LSC data detection method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a program that, when run on a terminal device, performs the method of detecting lens shading correction LSC data according to any one of the preceding claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111217855.6A CN114051132B (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 CN114051132B (en) | 2021-10-19 | 2021-10-19 | LSC data detection method, device, terminal equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114051132A CN114051132A (en) | 2022-02-15 |
CN114051132B true CN114051132B (en) | 2025-01-10 |
Family
ID=80205523
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111217855.6A Active CN114051132B (en) | 2021-10-19 | 2021-10-19 | LSC data detection method, device, terminal equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114051132B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117979151B (en) * | 2024-04-02 | 2024-06-04 | 南昌同兴达精密光电有限公司 | Lens shading correction data processing method and system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101626155B1 (en) * | 2009-04-15 | 2016-06-01 | 삼성전자주식회사 | Apparatus for correcting channel sensitivity and lens shading of a photographed image and method thereof |
KR101589310B1 (en) * | 2009-07-08 | 2016-01-28 | 삼성전자주식회사 | LENS SHADING CORRECTION METHOD AND APPARATUS |
CN106506905B (en) * | 2016-10-20 | 2019-07-16 | 湖南国科微电子股份有限公司 | Camera lens shadow correction method |
US10754149B2 (en) * | 2018-04-20 | 2020-08-25 | Amd (Shanghai) Co., Ltd. | Efficient radial lens shading correction |
CN111182293B (en) * | 2020-01-06 | 2021-07-06 | 昆山丘钛微电子科技有限公司 | Method and system for detecting lens shadow correction data |
CN112243116B (en) * | 2020-09-30 | 2022-05-31 | 格科微电子(上海)有限公司 | Method and device for adjusting multichannel lens shadow compensation LSC gain, storage medium and image processing equipment |
-
2021
- 2021-10-19 CN CN202111217855.6A patent/CN114051132B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Also Published As
Publication number | Publication date |
---|---|
CN114051132A (en) | 2022-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110225366B (en) | Video data processing and advertisement space determining method, device, medium and electronic equipment | |
CN104244024B (en) | Video cover generation method and device and terminal | |
CN106021421B (en) | method and device for accelerating webpage rendering | |
CN110213614B (en) | Method and device for extracting key frame from video file | |
US10558447B2 (en) | Application push method, and a service device | |
CN112565890B (en) | Video clipping method and device, storage medium and electronic equipment | |
CN109272526B (en) | Image processing method and system and electronic equipment | |
CN111784712B (en) | Image processing method, device, equipment and computer readable medium | |
CN112491877A (en) | User behavior sequence anomaly detection method, terminal and storage medium | |
CN111091572B (en) | Image processing method and device, electronic equipment and storage medium | |
US20220383637A1 (en) | Live streaming sampling method and apparatus, and electronic device | |
CN114051132B (en) | LSC data detection method, device, terminal equipment and medium | |
CN110321454B (en) | Video processing method and device, electronic equipment and computer readable storage medium | |
CN113364702B (en) | Advertisement traffic abnormality detection method, system, storage medium and electronic equipment | |
CN113329096B (en) | Message transmission method and device, electronic equipment and storage medium | |
CN112069033B (en) | Page monitoring method and device, electronic equipment and storage medium | |
CN112333155B (en) | Abnormal flow detection method and system, electronic equipment and storage medium | |
CN114119964A (en) | Network training method and device, and target detection method and device | |
CN111542837A (en) | Three-dimensional convolution neural network computing device and related product | |
CN106682130B (en) | Similar picture detection method and device | |
CN116137061B (en) | Training method and device for quantity statistical model, electronic equipment and storage medium | |
CN105243062B (en) | Method and device for detecting webpage feature area | |
CN109922359B (en) | User processing method, device, equipment and storage medium | |
CN113313642A (en) | Image denoising method and device, storage medium and electronic equipment | |
CN109214474B (en) | Behavior analysis and information coding risk analysis method and device based on information coding |
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 |