Lens correction data detection method and device, electronic equipment and medium
By dividing the lens correction data into N blocks and grouping them into M groups, the system directly determines whether the lens correction data meets the correction requirements using additive and subtractive parameters and pixel value conditions. This solves the problem of low detection efficiency in existing technologies and achieves efficient and accurate detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- KUNSHAN QIUTI PHOTOELECTRIC TECH CO LTD
- Filing Date
- 2022-10-19
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, the efficiency of lens calibration data detection in camera modules is low, mainly because the software calibration and detection process requires taking pictures for calculation, which results in a long time.
The lens correction data is divided into N blocks and grouped into M groups. By judging whether the incremental or decremental parameters of each block of correction data, the maximum pixel coordinate value and pixel value of each group of data meet the set conditions, it is directly determined whether the lens correction data meets the correction requirements.
It improves the detection efficiency of lens correction data and ensures the accuracy of detection. It eliminates the need for image capture and calculation, and directly uses the conditions of the effective correction data itself for judgment.
Smart Images

Figure CN115767071B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, electronic device, and medium for detecting lens correction data. Background Technology
[0002] In existing technologies, camera modules typically use image sensor chips. However, due to their physical structure, image sensor chips can experience crosstalk between adjacent pixels. To reduce crosstalk, software is used during module production to perform calibration and testing, obtaining a series of calibration data which is then stored in the module's storage devices. Since calibration and effect detection are both implemented in software, and software is encapsulated, camera module manufacturers need to take an image and apply the data to that image to calculate the result when detecting the calibration data in the camera module. This process is time-consuming and results in low efficiency for detecting the calibration data of the camera module. Summary of the Invention
[0003] This invention provides a method, apparatus, electronic device, and medium for detecting lens calibration data, which can effectively improve the detection efficiency of calibration data for camera modules.
[0004] A first aspect of this invention provides a method for detecting lens correction data, the method comprising:
[0005] Extract the valid correction data from the lens correction data, and divide the valid correction data into N blocks of correction data, where N is a multiple of 4;
[0006] The N blocks of correction data are grouped to obtain M groups of data, where M is an integer greater than 1, and each group of data in the M groups includes multiple blocks of correction data.
[0007] Determine whether the incremental or decremental parameter of each of the N blocks of correction data meets the set incremental or decremental conditions;
[0008] Determine whether the coordinate value of the largest pixel in each of the M sets of data meets the set coordinate conditions;
[0009] Determine whether the maximum and minimum pixel values of the valid correction data meet the set pixel value conditions;
[0010] If the incremental or decremental parameters of each correction data block meet the set incremental or decremental conditions, and the coordinate value of the maximum pixel in each group of data meets the set coordinate conditions, and the maximum pixel value and the minimum pixel value meet the set pixel value conditions, then the lens correction data is determined to meet the correction requirements.
[0011] Optionally, determining whether the increment / decretion parameter of each of the N blocks of correction data meets the set increment / decretion condition includes:
[0012] For each of the N blocks of correction data, the row increment / decrement parameter of the correction data block is obtained based on the average value of each row of data in the correction data block; and the column increment / decrement parameter of the correction data block is obtained based on the average value of each column of data in the correction data block; and the increment / decrement parameter of the correction data block is obtained based on the row increment / decrement parameter and the column increment / decrement parameter of the correction data block.
[0013] Determine whether the incremental or decremental parameters of each correction data block meet the set incremental or decremental conditions.
[0014] Optionally, for each of the N blocks of correction data, obtaining the row increment / decrement parameter for that block of correction data based on the average value of each row in that block includes:
[0015] For each of the N blocks of correction data, the average value of each row in that block is obtained; a straight line is fitted using the average value of the middle row data in that block to obtain the row fitting line for that block of correction data, where the middle row data is the remaining row data after removing the edge row data; and the row increment / decrement parameters for that block of correction data are obtained based on the slope of the row fitting line for that block of correction data.
[0016] Optionally, for each of the N blocks of correction data, obtaining the column increment / decrement parameters for that block of correction data based on the average value of each column in that block includes:
[0017] For each of the N blocks of correction data, the average value of each column of data in that block is obtained; the average value of the middle column of data in that block is used to fit a column line to obtain a column fitting line for that block of correction data, wherein the middle column of data in that block of correction data is the remaining column data after removing the edge column data; the column addition / decrease parameters of that block of correction data are obtained based on the slope of the column fitting line.
[0018] Optionally, determining whether the coordinate value of the largest pixel in each of the M sets of data meets the set coordinate conditions includes:
[0019] For each of the M sets of data, obtain the adjacent column data from the multiple correction data blocks in that set of data. Based on the average value of each row of data in the adjacent column data blocks in that set of data, obtain the row coordinates of the largest pixel in that set of data. Obtain the adjacent row data from the multiple correction data blocks in that set of data. Based on the average value of each column of data in the adjacent row data blocks in that set of data, obtain the column coordinates of the largest pixel in that set of data. Based on the row coordinates and column coordinates of the largest pixel in that set of data, obtain the coordinate value of the largest pixel in that set of data.
[0020] Determine whether the coordinates of the largest pixel in each group of data meet the set coordinate conditions.
[0021] Optionally, for each of the M sets of data, obtaining the adjacent column data from multiple blocks of correction data in that set of data, and obtaining the row coordinates of the largest pixel in that set of data based on the average value of each row of adjacent column data, includes:
[0022] For each of the M sets of data, a quadratic polynomial fitting is performed using the average value of each row of data in the adjacent columns of that set of data to obtain the row fitting curve of that set of data. Based on the maximum value of the row fitting curve of that set of data, the row coordinate of the largest pixel in that set of data is obtained.
[0023] Optionally, for each of the M sets of data, obtaining adjacent row data from multiple blocks of corrected data in that set, and obtaining the column coordinates of the largest pixel in that set of data based on the average value of each column data in the adjacent row data, includes:
[0024] For each set of data, adjacent rows of data from multiple correction data blocks in that set are obtained. The average value of each column of data in the adjacent rows of that set is used to perform a quadratic polynomial fitting to obtain the column fitting curve of that set of data. Based on the maximum value of the column fitting curve of that set of data, the column coordinate of the largest pixel in that set of data is obtained.
[0025] A second aspect of the present invention also provides a lens correction data detection device, the device comprising:
[0026] The effective data extraction unit is used to extract the effective correction data from the lens correction data and divide the effective correction data into N blocks of correction data, where N is a multiple of 4;
[0027] A data grouping unit is used to group the N blocks of correction data into M groups of data, where M is an integer greater than 1, and each group of data in the M groups includes multiple blocks of correction data.
[0028] The judgment unit is used to determine whether the incremental or decremental parameter of each correction data in the N correction data blocks meets the set incremental or decremental conditions; to determine whether the coordinate value of the maximum pixel in each group of data in the M groups of data meets the set coordinate conditions; and to determine whether the maximum and minimum pixel values of the effective correction data meet the set pixel value conditions.
[0029] The determination unit is configured to determine that the lens correction data meets the correction requirements if the incremental or decremental parameters of each correction data block meet the set incremental or decremental conditions, the coordinate value of the maximum pixel in each group of data meets the set coordinate conditions, and the maximum pixel value and the minimum pixel value meet the set pixel value conditions.
[0030] A third aspect of the present invention provides an electronic device including a memory and one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors, comprising operation instructions for performing a detection method for lens correction data as provided in the first aspect.
[0031] A fourth aspect of the present invention provides a computer program product, characterized in that the computer program product includes computer instructions stored in a computer-readable storage medium and adapted to be read and executed by a processor, so as to cause a computer device having the processor to perform the steps corresponding to the lens correction data detection method provided in the first aspect.
[0032] The above-described one or more technical solutions in the embodiments of this application have at least the following technical effects:
[0033] Based on the above technical solution, effective correction data is extracted from the lens correction data and divided into N blocks of correction data, where N is a multiple of 4. The N blocks of correction data are then grouped into M groups of data, where M is an integer greater than 1. Each group of data in the M groups includes multiple blocks of correction data. If the incremental / decrease parameters of each block of correction data meet the set incremental / decrease conditions, and the coordinate value of the maximum pixel in each group of data meets the set coordinate conditions, and the maximum and minimum pixel values meet the set pixel value conditions, then the lens correction data is determined to meet the correction requirements. Thus, by using the incremental / decrease parameters of each block of correction data, the coordinate value of the maximum pixel in each group of data, and whether the maximum and minimum pixel values meet the corresponding conditions, the lens correction data is directly determined to meet the correction requirements based on the conditions met by the effective correction data itself. Compared with the prior art, this eliminates the need for taking pictures and performing calculations on the pictures, thereby effectively improving detection efficiency. Furthermore, this application directly uses the conditions met by the effective correction data itself to determine whether the lens correction data meets the correction requirements, which effectively ensures the accuracy of detection, thereby improving detection efficiency while ensuring detection accuracy. Attached Figure Description
[0034] Figure 1 A schematic flowchart illustrating a method for detecting lens correction data provided in an embodiment of this application;
[0035] Figure 2 This is a schematic diagram illustrating the structure of dividing the effective correction data provided in the embodiments of this application into N blocks of correction data;
[0036] Figure 3 This is a schematic diagram of the structure for obtaining the incremental / decrease parameters of block correction data provided in an embodiment of this application;
[0037] Figure 4 A schematic diagram illustrating the structure for obtaining the coordinate values of the largest pixel in a set of data, as provided in an embodiment of this application.
[0038] Figure 5 This is a schematic diagram of the structure for obtaining a fitted curve using a quadratic polynomial fitting, provided in an embodiment of this application.
[0039] Figure 6 A block diagram of a lens correction data detection device provided in an embodiment of this application;
[0040] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0041] The main implementation principles, specific implementation methods, and corresponding beneficial effects of the technical solutions of the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0042] Example
[0043] Please refer to Figure 1 This application provides a method for detecting lens correction data, the method comprising:
[0044] S101. Extract the effective correction data from the lens correction data, and divide the effective correction data into N blocks of correction data, where N is a multiple of 4;
[0045] S102. The N blocks of correction data are grouped to obtain M groups of data, where M is an integer greater than 1, and each group of data in the M groups includes multiple blocks of correction data.
[0046] S103. Determine whether the incremental / decrease parameter of each of the N blocks of correction data meets the set incremental / decrease condition;
[0047] S104. Determine whether the coordinate value of the largest pixel in each of the M groups of data meets the set coordinate conditions.
[0048] S105. Determine whether the maximum and minimum pixel values of the effective correction data meet the set pixel value conditions;
[0049] S106. If the incremental or decremental parameters of each piece of correction data meet the set incremental or decremental conditions, and the coordinate value of the maximum pixel in each group of data meets the set coordinate conditions, and the maximum pixel value and the minimum pixel value meet the set pixel value conditions, then the lens correction data is determined to meet the correction requirements.
[0050] The lens correction data detection method described in this specification can be applied to a server or a user terminal. The server can be an all-in-one computer, tablet computer, laptop computer, or desktop computer, etc., and the user terminal can be a smartphone, smartwatch, tablet computer, laptop computer, or desktop computer, etc.
[0051] In step S101, the lens correction data stored in the camera module is first read, and the head parameters and tail blanks in the lens correction data are removed to obtain the retained valid part as valid correction data.
[0052] In one embodiment, when extracting valid correction data, valid data can also be directly extracted from lens correction data to form valid correction data.
[0053] After obtaining valid correction data, the valid correction data is divided into blocks to obtain N blocks of correction data. In order to make subsequent processing more convenient and faster, N is usually set to a multiple of 4. Of course, N can also be set to a multiple of 3 or a multiple of 2, etc. The embodiments in this specification do not impose specific limitations.
[0054] For example, reading lens calibration data stored in a camera module typically contains 600 data points. After removing the header parameters and trailing blanks, the remaining valid portion is usually 576 data points. These 576 data points are used as the valid calibration data and can then be divided into 16 blocks, resulting in 16 blocks of calibration data: B1, B2, B3, B4, Gb1, Gb2, Gb3, Gb4, Gr1, Gr2, Gr3, Gr4, R1, R2, R3, and R4. Each block of calibration data consists of 6 rows and 6 columns, totaling 36 data points. (See [reference needed]). Figure 2 .
[0055] After obtaining N blocks of correction data, proceed to step S102.
[0056] In step S102, after dividing the effective correction data into N blocks of correction data, since the adjacent blocks of correction data in the N blocks of correction data have a pattern of larger overall center value and smaller surrounding values, the N blocks of correction data are divided into M groups of data using this pattern. M is an integer greater than 1, such as 2, 3, 4, and 8. Each group of data in the M groups includes multiple blocks of correction data, such as 2 blocks, 3 blocks, 4 blocks, and 8 blocks.
[0057] For example, see Figure 2 After dividing the effective correction data into 16 data blocks, according to the rule that the overall central value is large while the surrounding areas are small, since the overall central values of B1, B2, B3, and B4 are large while the surrounding areas are small, B1, B2, B3, and B4 are grouped into one group of data. Correspondingly, Gb1, Gb2, Gb3, and Gb4 are grouped into one group of data, Gr1, Gr2, Gr3, and Gr4 are grouped into one group of data, and R1, R2, R3, and R4 are grouped into one group of data, thus obtaining 4 groups of data that can be represented by B14, Gb14, Gr14, and R14 respectively.
[0058] After obtaining M sets of data, step S103 is executed. Step S103 can be executed after step S101, simultaneously with step S102, or before or after step S102.
[0059] In step S103, the incremental or decremental parameters of each correction data in the N correction data are first obtained, and then it is determined whether the incremental or decremental parameters of each correction data meet the set incremental or decremental conditions.
[0060] In one embodiment, when obtaining the incremental / decrease parameter of each block of correction data, for each block of correction data in N blocks of correction data, the row incremental / decrease parameter of the block of correction data can be obtained based on the average value of each row of data in the block of correction data; and the column incremental / decrease parameter of the block of correction data can be obtained based on the average value of each column of data in the block of correction data; and the incremental / decrease parameter of the block of correction data can be obtained based on the row incremental / decrease parameter and the column incremental / decrease parameter of the block of correction data.
[0061] Specifically, for each block of calibration data, a straight line can be fitted using the average value of each row in the block to obtain the row fitting line. Based on the slope of the row fitting line, the row increment / decrement parameter of the block can be obtained. Similarly, a straight line can be fitted using the average value of each column in the block to obtain the column fitting line. Based on the slope of the column fitting line, the column increment / decrement parameter of the block can be obtained. Finally, based on the row and column increment / decrement parameters, the increment / decrement parameter of the block can be obtained.
[0062] In another embodiment, to improve the accuracy of the incremental / decrease parameters of each piece of correction data, the average value of each row in each of the N pieces of correction data can be obtained; a straight line fitting is performed using the average value of the middle row data in the correction data to obtain the row fitting line of the correction data, wherein the middle row data of the correction data is the remaining row data after removing the edge row data in the correction data; the row incremental / decrease parameters of the correction data are obtained based on the slope of the row fitting line of the correction data; and for each of the N pieces of correction data, the average value of each column data in the correction data can be obtained; a column fitting line is performed using the average value of the middle column data in the correction data to obtain the column fitting line of the correction data, wherein the middle column data of the correction data is the remaining column data after removing the edge column data in the correction data; the column incremental / decrease parameters of the correction data are obtained based on the slope of the column fitting line of the correction data.
[0063] Thus, for each block of correction data, the average of the middle rows in that block is used to obtain the row increment / decrement parameters. The middle rows are the remaining rows after removing edge rows. Since edge rows have lower accuracy and middle rows have higher accuracy, the accuracy of the row increment / decrement parameters obtained using the average of the middle rows is also improved. Similarly, for each block of correction data, the average of the middle columns is used to obtain the column increment / decrement parameters. The middle columns are the remaining columns after removing edge columns. Again, since edge columns have lower accuracy and middle columns have higher accuracy, the accuracy of the column increment / decrement parameters obtained using the average of the middle columns is also improved.
[0064] Furthermore, for each block of correction data, based on the improved accuracy of obtaining the row increment / decrement parameters and column increment / decrement parameters of that block of correction data, the accuracy of obtaining the increment / decrement parameters of that block of correction data will also be improved.
[0065] In one embodiment, the least squares method and gradient descent method can be used when performing line fitting. The least squares method will be used as an example below.
[0066] In one embodiment, when obtaining the row increment / decrement parameters of the correction data block based on the slope of the row fitting line, the slope of the row fitting line can be directly used as the corresponding row increment / decrement parameter. Alternatively, the product of the slope and the weight can be used as the row increment / decrement parameter, where the weight is a number greater than 0. Similarly, the column increment / decrement parameters of the correction data block can be obtained using the above method.
[0067] For example, see Figure 3In (a), taking B1 as an example, the average value of each row of data in B1 is calculated and represented by row_ave[0] to row_ave[5], where row_ave[0] is -123.17, row_ave[1] is -119.33, row_ave[2] is -120.17, row_ave[3] is 38.17, row_ave[4] is 40.67, and row_ave[5] is 41.50. Since the edge data is inaccurate, row_ave[0] and row_ave[5] need to be removed, and the remaining row_ave[1] to row_ave[4] are the average values of the middle rows. After obtaining row_ave[1] to row_ave[4], a straight line is fitted using row_ave[1] to row_ave[4]. At this time, the least squares method can be used to fit the straight line, such as Figure 3 In step (b), the row fitting line corresponding to B1 is obtained. The slope of the row fitting line corresponding to B1 is used as the row increment / decrement parameter of B1, represented by row_slope_B1. At this time, if row_slope_B1 > 0, it is determined that the row increment / decrement parameter of B1 indicates that the row of B1 is increasing; if row_slope_B1 < 0, it is determined that the row increment / decrement parameter of B1 indicates that the row of B1 is decreasing.
[0068] Furthermore, the average values of each column of data in B1 are calculated and represented by col_ave[0] to col_ave[5], where col_ave[0] is -121.33, col_ave[1] is -119.67, col_ave[2] is -2.50, col_ave[3] is 0.67, col_ave[4] is 3.33, and col_ave[5] is -2.83. Since the edge data is inaccurate, col_ave[0] and col_ave[5] need to be removed, and the remaining col_ave[1] to col_ave[4] are the average values of the middle column data. And, after obtaining col_ave[1]~col_ave[4], use col_ave[1]~col_ave[4] to fit the column line. At this time, the least squares method can be used to fit the column line to obtain the column fitting line corresponding to B1. The slope of the column fitting line corresponding to B1 is used as the column increment / decrement parameter of B1, represented by col_slope_B1. At this time, if col_slope_B1>0, then the column increment / decrement parameter of B1 indicates that the column of B1 is increasing; if col_slope_B1<0, then the column increment / decrement parameter of B1 indicates that the column of B1 is decreasing.
[0069] Thus, the row increment / decrement parameters and column increment / decrement parameters of each block of correction data can be obtained using the above method, and the increment / decrement parameters of each block of correction data include the row increment / decrement parameters and column increment / decrement parameters of that block of correction data.
[0070] In one embodiment, after obtaining the incremental or decremental parameters of each correction data block, it is necessary to determine whether the incremental or decremental parameters of each correction data block meet the set incremental or decremental conditions. The set incremental or decremental conditions can be obtained by statistical analysis of correct historical shot correction data. For each correction data block, each row generally shows an increasing or decreasing trend from left to right (the trend of data blocks at different positions is different); similarly, each column also generally shows an increasing or decreasing trend from left to right (the trend of data blocks at different positions is different).
[0071] In one embodiment, when determining whether the incremental or decremental parameter of each correction data block meets the set incremental or decremental conditions, if N correction data blocks are 16 correction data blocks, the specific determination of whether each correction data block meets the set incremental or decremental conditions is shown in Table 1 below:
[0072]
[0073] Table 1
[0074] Where row_slope_B1 represents the row increment / decrement parameter of B1, and col_slope_B1 represents the column increment / decrement parameter of B1; correspondingly, row_slope_B2 and col_slope_B2 represent the row increment / decrement parameter and column increment / decrement parameter of B2, respectively; row_slope_B3 and col_slope_B3 represent the row increment / decrement parameter and column increment / decrement parameter of B3, respectively; and row_slope_B4 and col_slope_B4 represent the row increment / decrement parameter and column increment / decrement parameter of B4, respectively. Similarly, row_slope_Gb1-Gb4 represent the row increment / decrement parameters for Gb1-Gb4, and col_slope_Gb1-Gb4 represent the column increment / decrement parameters for Gb1-Gb4; row_slope_Gr1-Gr4 represent the row increment / decrement parameters for Gr1-Gr4, and col_slope_Gr1-Gr4 represent the column increment / decrement parameters for Gb1-Gb4; and row_slope_R1-R4 represent the row increment / decrement parameters for Gr1-Gr4, and col_slope_Gr1-Gr4 represent the column increment / decrement parameters for R1-R4.
[0075] When determining whether the increment / decrement parameters of each correction data block meet the set increment / decrement conditions, it is necessary to determine whether row_slope_B1, row_slope_Gb1, row_slope_Gr1, row_slope_R1, row_slope_B2, row_slope_Gb2, row_slope_Gr2, and row_slope_R2 are greater than 0, that is, the row increment / decrement parameters of the above 8 correction data blocks indicate an increment; and to determine whether row_slope_B3, row_slope_Gb3, row_slope_Gr3, row_slope_R3, row_slope_B4, row_slope_Gb4, row_slope_Gr4, and row_slope_R4 are less than 0, that is, the row increment / decrement parameters of the above 8 correction data blocks indicate a decrement.
[0076] Additionally, it is necessary to determine whether col_slope_B1, col_slope_Gb1, col_slope_Gr1, col_slope_R1, col_slope_B3, col_slope_Gb3, col_slope_Gr3, and col_slope_R3 are greater than 0, meaning that the column increment / decrement parameters of the above 8 correction data blocks indicate an increasing trend; and to determine whether col_slope_B2, col_slope_Gb2, col_slope_Gr2, col_slope_R2, col_slope_B4, col_slope_Gb4, col_slope_Gr4, and col_slope_R4 are less than 0, meaning that the column increment / decrement parameters of the above 8 correction data blocks indicate a decreasing trend.
[0077] If the incremental or decremental parameters of each of the 16 correction data blocks meet the conditions in Table 1, then it is determined that the incremental or decremental parameters of each correction data block meet the set incremental or decremental conditions; otherwise, it is determined that the incremental or decremental parameters of some correction data blocks do not meet the set incremental or decremental conditions.
[0078] After step S103, step S104 is executed. Step S104 can be executed simultaneously with step S103, or step S104 can be executed first.
[0079] In step S104, the coordinates of the maximum pixel in each of the M sets of data can be obtained first, and then it can be determined whether the coordinates of the maximum pixel in each set of data meet the set coordinate conditions.
[0080] In one embodiment, since the M groups of data are obtained by grouping adjacent correction data in the N correction data according to the rule that the overall center value is large and the surrounding values are small, the coordinate value of the largest pixel in each group of data is located at the center of each group of data.
[0081] In one embodiment, based on the fact that the coordinate value of the maximum pixel in each group of data is located at the center of each group of data, when determining whether the coordinate value of the maximum pixel in each group of data meets the set coordinate conditions, for each group of data in M groups of data, the adjacent column data in the multiple blocks of correction data in that group of data is obtained, and the row coordinate of the maximum pixel in that group of data is obtained according to the average value of each row data in the adjacent column data in that group of data; the adjacent row data in the multiple blocks of correction data in that group of data is obtained, and the column coordinate of the maximum pixel in that group of data is obtained according to the average value of each column data in the adjacent row data in that group of data; the coordinate value of the maximum pixel in that group of data is obtained according to the row coordinate and column coordinate; and then it is determined whether the coordinate value of the maximum pixel in each group of data meets the set coordinate conditions.
[0082] Specifically, for each set of data, when obtaining adjacent column data from multiple correction data blocks in that set of data, the middle two, three, or four columns of data from the multiple correction data blocks can be obtained as adjacent column data; correspondingly, for each set of data, the middle two, three, or four rows of data from the multiple correction data blocks in that set of data can be obtained as adjacent row data. The following example uses the middle two columns of data as adjacent column data and the middle two rows of data as adjacent row data.
[0083] In one embodiment, when obtaining the row coordinates of the maximum pixel in each group of data, a quadratic polynomial fitting can be performed on each group of data in the M groups of data using the average value of each row of data in the adjacent columns of that group of data to obtain the row fitting curve of that group of data. The row coordinates of the maximum pixel in that group of data can be obtained based on the maximum value of the row fitting curve of that group of data.
[0084] Furthermore, when obtaining the column coordinates of the maximum pixel in each set of data, for each set of data, adjacent rows of data from multiple blocks of correction data in that set of data can be obtained. The average value of each column of adjacent rows of data in that set of data can be used to perform quadratic polynomial fitting to obtain the column fitting curve of that set of data. Based on the maximum value of the column fitting curve of that set of data, the column coordinates of the maximum pixel in that set of data can be obtained.
[0085] In one embodiment, since the M groups of data are obtained by grouping adjacent correction data in the N correction data according to the rule that the overall center value is large and the surrounding values are small, it can be known that the coordinate of the maximum value of the maximum pixel in each group of data should be 6.5. The maximum value of the maximum pixel in historical data is collected and statistically analyzed to obtain the set coordinate conditions. The set coordinate conditions are that the row coordinate and column coordinate of the maximum pixel in each group of data are in the range of 4.5-8.5, or 4-8, or 5-9, etc. The following is an example with the row coordinate and column coordinate of the maximum pixel in each group of data in the range of 4.5-8.5.
[0086] For example, see Figure 4 Taking the data set B1-B4 as an example, since the adjacent columns in B14 are the 6th and 7th columns, we obtain the data from the 6th and 7th columns. We then calculate the average of each row in these columns, resulting in 12 values: -4.5, -1.5, 3.5, 118, 107, 118.5, 123.5, 1106.5, 118.5, 0, -4, and -124. Using these 12 values, we fit a quadratic polynomial to obtain the fitted curve, whose analytical expression is y = ax². 2 +bx+c, specifically as follows Figure 5 As shown, where a = -6.4644, b = 79.298, and c = 118.49. Furthermore, due to the properties of a quadratic polynomial (i.e., a quadratic function), the x-coordinate corresponding to its maximum value is located at the axis of symmetry, i.e., row_max_index_B = b / (-2a) = 79.298 / (-2*(-6.4644)) = 6.13, where row_max_index_B represents the row coordinate of the maximum pixel value of B14.
[0087] Accordingly, since adjacent rows in the B1-B4 data set are the 6th and 7th rows, we obtain the data from the 6th and 7th rows. We then calculate the average of each column in these 6th and 7th rows, resulting in 12 data points. These 12 data points are then used to fit a quadratic polynomial to obtain the fitted curve, whose analytical expression is y = ax². 2 +bx+c, due to the properties of a quadratic polynomial, i.e., a quadratic function, the x-coordinate corresponding to its maximum value is at the axis of symmetry, i.e., col_max_index_B=b / (-2a), where col_max_inIdex_B represents the column coordinate of the maximum pixel value of B14; then row_max_index_B and col_max_inIdex_B are used as the coordinate values of the maximum pixel of B14.
[0088] Thus, by using the above method for each set of data, the coordinates of the maximum pixel in each set of data can be obtained, so that the coordinates of the maximum pixel in Gb14 are row_max_index_Gb and col_max_inIdex_Gb, the coordinates of the maximum pixel in Gr14 are row_max_index_Gr and col_max_inIdex_Gr, and the coordinates of the maximum pixel in R14 are row_max_index_R and col_max_inIdex_R.
[0089] Furthermore, after obtaining the row and column coordinates of the maximum pixel in the four sets of data (B14, Gb14, Gr14, and R14), the determination of whether the coordinate value of the maximum pixel in each set of data meets the set coordinate conditions is shown in Table 2 below:
[0090]
[0091] Table 2
[0092] Specifically, when determining whether the coordinates of the largest pixel in each data set meet the set coordinate conditions, for each data set, it is checked whether both the row and column coordinates of the largest pixel are within the range of 4.5-8.5. If both are within this range, the coordinates of the largest pixel in that data set are considered to meet the set coordinate conditions; otherwise, they are considered not to meet the set coordinate conditions. After performing the above operation for each data set, it can be determined whether the coordinates of the largest pixel in each data set meet the set coordinate conditions.
[0093] After step S104, step S105 is executed. Step S105 can be executed simultaneously with step S104, or step S105 can be executed first.
[0094] In step S105, correct historical lens correction data can be obtained. Then, the valid data in the correct historical lens correction data is statistically analyzed to obtain the maximum and minimum pixel value ranges. Thus, when determining whether the maximum and minimum pixel values of the valid correction data meet the set pixel value conditions, it is determined whether the maximum pixel value of the valid correction data is within the maximum pixel value range and whether the minimum pixel value of the valid correction data is within the minimum pixel value range. If both are within the range, it is determined that the maximum and minimum pixel values of the valid correction data meet the set pixel value conditions; otherwise, it is determined that the maximum and minimum pixel values of the valid correction data do not meet the set pixel value conditions.
[0095] In one embodiment, the maximum pixel value range is typically 0-127, and the minimum pixel value range is typically -128-0. Of course, it can also be 0-126 or -127-0, etc., and this specification does not impose specific limitations. The following uses 0-127 and -128-0 as examples.
[0096] In one embodiment, the pixel values of each data point in the effective correction data are traversed, and then the maximum pixel value in the effective correction data is represented by max and the minimum pixel value by min. Based on the max and min obtained from the statistical results, the determination of whether the maximum and minimum pixel values of the effective correction data meet the set pixel value conditions is shown in Table 3 below:
[0097] Value max min condition 0≤max≤127 -128≤min<0
[0098] Table 3
[0099] Specifically, when determining whether the maximum and minimum pixel values of the valid correction data meet the set pixel value conditions, it is determined whether max is not less than 0 and not greater than 127, and whether min is not less than -128 and less than 0. If 0≤max≤127 and -128≤min<0, then the maximum and minimum pixel values of the valid correction data are determined to meet the set pixel value conditions; otherwise, the maximum and minimum pixel values of the valid correction data are determined not to meet the set pixel value conditions.
[0100] After executing steps S103-S105, if it is determined that the incremental or subtractive parameters of each correction data block meet the set incremental or subtractive conditions, and the coordinate value of the maximum pixel of each group of data meets the set coordinate conditions, and the maximum and minimum pixel values meet the set pixel value conditions, then step S106 is executed; otherwise, it is determined that the lens correction data does not meet the correction requirements.
[0101] In step S106, if it is determined that the incremental or decremental parameters of each correction data block meet the set incremental or decremental conditions, and the coordinate value of the maximum pixel in each group of data meets the set coordinate conditions, and the maximum and minimum pixel values meet the set pixel value conditions, then it is determined that the lens correction data meets the correction requirements, indicating that the lens correction data is correct. If it is determined that the lens correction data does not meet the correction requirements, it indicates that the lens correction data is incorrect. The judgment results in steps S103-S104 can be used to analyze and locate the bad data in the lens correction data. For example, if it is determined that row_slope_Gr2 < 0 in step S104, it can be determined that there is a problem with the Gr2 block of data corresponding to row_slope_Gr2, thereby achieving accurate location of the bad data.
[0102] Because the accuracy of the incremental / decrease parameters of each piece of correction data is high, the accuracy of determining whether the incremental / decrease parameters of each piece of correction data meet the set incremental / decrease conditions is also improved. The set coordinate conditions are set according to the patterns of correct historical lens correction data, and the set pixel value conditions are obtained by statistical analysis using correct historical lens correction data. This allows for accurate determination of whether the lens correction data meets the correction requirements by judging whether the incremental / decrease parameters of each piece of correction data in the N pieces of correction data meet the set incremental / decrease conditions; judging whether the coordinate value of the maximum pixel in each group of data in the M groups of data meets the set coordinate conditions; and judging whether the maximum and minimum pixel values of the valid correction data meet the set pixel value conditions. If they meet the requirements, the lens correction data is determined to be correct; if any one of the judgments fails to meet the requirements, the lens correction data is determined to be incorrect.
[0103] The above-described one or more technical solutions in the embodiments of this application have at least the following technical effects:
[0104] Based on the above technical solution, effective correction data is extracted from the lens correction data and divided into N blocks of correction data, where N is a multiple of 4. The N blocks of correction data are then grouped into M groups of data, where M is an integer greater than 1. Each group of data in the M groups includes multiple blocks of correction data. If the incremental / decrease parameters of each block of correction data meet the set incremental / decrease conditions, and the coordinate value of the maximum pixel in each group of data meets the set coordinate conditions, and the maximum and minimum pixel values meet the set pixel value conditions, then the lens correction data is determined to meet the correction requirements. Thus, by using the incremental / decrease parameters of each block of correction data, the coordinate value of the maximum pixel in each group of data, and whether the maximum and minimum pixel values meet the corresponding conditions, the lens correction data is directly determined to meet the correction requirements based on the conditions met by the effective correction data itself. Compared with the prior art, this eliminates the need for taking pictures and performing calculations on the pictures, thereby effectively improving detection efficiency. Furthermore, this application directly uses the conditions met by the effective correction data itself to determine whether the lens correction data meets the correction requirements, which effectively ensures the accuracy of detection, thereby improving detection efficiency while ensuring detection accuracy.
[0105] In accordance with the above embodiments, a method for detecting lens correction data is provided. This application also provides a corresponding device for detecting lens correction data. Please refer to... Figure 6 The device includes:
[0106] The effective data extraction unit 601 is used to extract the effective correction data from the lens correction data and divide the effective correction data into N blocks of correction data, where N is a multiple of 4;
[0107] The data grouping unit 602 is used to group the N blocks of correction data into M groups of data, where M is an integer greater than 1, and each group of data in the M groups includes multiple blocks of correction data.
[0108] The judgment unit 603 is used to determine whether the incremental or decremental parameter of each correction data in the N blocks of correction data meets the set incremental or decremental conditions; to determine whether the coordinate value of the maximum pixel in each group of data in the M groups of data meets the set coordinate conditions; and to determine whether the maximum pixel value and minimum pixel value of the effective correction data meet the set pixel value conditions.
[0109] The determination unit 604 is used to determine that the lens correction data meets the correction requirements if the incremental or decremental parameters of each piece of correction data meet the set incremental or decremental conditions, the coordinate value of the maximum pixel of each group of data meets the set coordinate conditions, and the maximum pixel value and the minimum pixel value meet the set pixel value conditions.
[0110] In one optional implementation, the determination unit 603 is configured to, for each of the N blocks of correction data, obtain a row increment / decrement parameter for the correction data block based on the average value of each row of data in the correction data block; and obtain a column increment / decrement parameter for the correction data block based on the average value of each column of data in the correction data block; obtain an increment / decrement parameter for the correction data block based on the row increment / decrement parameter and the column increment / decrement parameter; and determine whether the increment / decrement parameter of each correction data block meets the set increment / decrement condition.
[0111] In one optional implementation, the judgment unit 603 is configured to, for each of the N blocks of correction data, obtain the average value of each row of data in that block of correction data; perform line fitting using the average value of the middle row of data in that block of correction data to obtain the line fitting line of that block of correction data, wherein the middle row of data in that block of correction data is the remaining row of data after removing the edge row of data in that block of correction data; and obtain the row increment / decrement parameter of that block of correction data based on the slope of the line fitting line of that block of correction data.
[0112] In one optional implementation, the judgment unit 603 is configured to, for each of the N blocks of correction data, obtain the average value of each column of data in that block of correction data; use the average value of the middle column of data in that block of correction data to perform column fitting to obtain the column fitting line of that block of correction data, wherein the middle column of data in that block of correction data is the remaining column data after removing the edge column data in that block of correction data; and obtain the column increase / decrease parameters of that block of correction data based on the slope of the column fitting line of that block of correction data.
[0113] In one optional implementation, the judgment unit 603 is configured to, for each of the M groups of data, obtain adjacent column data from multiple blocks of correction data in that group of data, obtain the row coordinate of the largest pixel in that group of data based on the average value of each row of data in the adjacent column data in that group of data; obtain adjacent row data from multiple blocks of correction data in that group of data, obtain the column coordinate of the largest pixel in that group of data based on the average value of each column of data in the adjacent row data in that group of data; obtain the coordinate value of the largest pixel in that group of data based on the row coordinate and column coordinate of the largest pixel in that group of data; and determine whether the coordinate value of the largest pixel in each group of data meets the set coordinate conditions.
[0114] In one optional implementation, the judgment unit 603 is used to perform quadratic term polynomial fitting on each group of data in the M groups of data using the average value of each row of data in the adjacent columns of the data in that group of data to obtain the row fitting curve of the data in that group of data, and to obtain the row coordinate of the largest pixel of the data in that group of data based on the maximum value of the row fitting curve of the data in that group of data.
[0115] In one optional implementation, the judgment unit 603 is used to obtain adjacent row data from multiple blocks of correction data in each group of data, perform quadratic term polynomial fitting using the average value of each column data in the adjacent row data in the group of data to obtain the column fitting curve of the group of data, and obtain the column coordinate of the largest pixel in the group of data based on the maximum value of the column fitting curve of the group of data.
[0116] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0117] Figure 7 This is a block diagram illustrating an electronic device 800 for a method of detecting lens correction data according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0118] Reference Figure 7 The electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / display (I / O) interface 812, a sensor component 814, and a communication component 816.
[0119] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0120] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0121] Power supply component 806 provides power to various components of electronic device 800. Power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.
[0122] Multimedia component 808 includes a screen that provides a display interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0123] Audio component 810 is configured to display and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for displaying audio signals.
[0124] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0125] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0126] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0127] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0128] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of an electronic device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0129] Furthermore, it should be noted that this application also provides a computer program product or computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, causing the computer device to perform the aforementioned actions. Figure 1 The description of the lens correction data detection method in the corresponding embodiments is omitted here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer program products or computer program embodiments related to this application, please refer to the description of the method embodiments of this application.
[0130] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
[0131] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
[0132] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for detecting lens correction data, characterized in that, The method includes: Extract the valid correction data from the lens correction data, and divide the valid correction data into N blocks of correction data, where N is a multiple of 4; The N blocks of correction data are grouped to obtain M groups of data, where M is an integer greater than 1, and each group of data in the M groups includes multiple blocks of correction data. Determine whether the incremental or decremental parameter of each of the N blocks of correction data meets the set incremental or decremental conditions; Determine whether the coordinate value of the largest pixel in each of the M sets of data meets the set coordinate conditions; Determine whether the maximum and minimum pixel values of the valid correction data meet the set pixel value conditions; If the incremental or subtractive parameters of each piece of correction data meet the set incremental or subtractive conditions, and the coordinate value of the maximum pixel in each group of data meets the set coordinate conditions, and the maximum pixel value and the minimum pixel value meet the set pixel value conditions, then the lens correction data is determined to meet the correction requirements. The step of determining whether the increment / decretion parameter of each of the N blocks of correction data meets the set increment / decretion condition includes: For each of the N blocks of correction data, the row increment / decrement parameter of the correction data block is obtained based on the average value of each row of data in the correction data block; and the column increment / decrement parameter of the correction data block is obtained based on the average value of each column of data in the correction data block; and the increment / decrement parameter of the correction data block is obtained based on the row increment / decrement parameter and the column increment / decrement parameter of the correction data block. Determine whether the incremental or decremental parameters of each correction data block meet the set incremental or decremental conditions; For each of the N blocks of correction data, the row increment / decrement parameter for that block of correction data is obtained based on the average value of each row in that block, including: For each of the N blocks of correction data, the average value of each row of data in that block is obtained; a straight line is fitted using the average value of the middle row of data in that block to obtain the row fitting line of the block, where the middle row of data in that block is the remaining row of data after removing the edge row data; and the row increment / decrement parameters of the block are obtained based on the slope of the row fitting line of the block. For each of the N blocks of correction data, the column increment / decrement parameters for that block of correction data are obtained based on the average value of each column of data in that block, including: For each of the N blocks of correction data, the average value of each column of data in that block is obtained; the average value of the middle column of data in that block is used to fit a column line to obtain a column fitting line for that block of correction data, wherein the middle column of data in that block of correction data is the remaining column data after removing the edge column data; the column addition / decrease parameters of that block of correction data are obtained based on the slope of the column fitting line.
2. The detection method as described in claim 1, characterized in that, The step of determining whether the coordinate value of the largest pixel in each of the M sets of data meets the set coordinate conditions includes: For each of the M sets of data, obtain the adjacent column data from the multiple correction data blocks in that set of data. Based on the average value of each row of data in the adjacent column data blocks in that set of data, obtain the row coordinates of the largest pixel in that set of data. Obtain the adjacent row data from the multiple correction data blocks in that set of data. Based on the average value of each column of data in the adjacent row data blocks in that set of data, obtain the column coordinates of the largest pixel in that set of data. Based on the row coordinates and column coordinates of the largest pixel in that set of data, obtain the coordinate value of the largest pixel in that set of data. Determine whether the coordinates of the largest pixel in each group of data meet the set coordinate conditions.
3. The detection method as described in claim 2, characterized in that, For each of the M sets of data, the adjacent column data from multiple blocks of corrected data in that set are obtained. Based on the average value of each row of adjacent column data in that set, the row coordinates of the largest pixel in that set are obtained, including: For each of the M sets of data, a quadratic polynomial fitting is performed using the average value of each row of data in the adjacent columns of that set of data to obtain the row fitting curve of that set of data. Based on the maximum value of the row fitting curve of that set of data, the row coordinate of the largest pixel in that set of data is obtained.
4. The detection method as described in claim 3, characterized in that, For each of the M sets of data, the adjacent row data from multiple blocks of corrected data in that set is obtained, and the column coordinates of the largest pixel in that set are obtained based on the average value of each column data in the adjacent row data. This includes: For each set of data, adjacent rows of data from multiple correction data blocks in that set are obtained. The average value of each column of data in the adjacent rows of that set is used to perform a quadratic polynomial fitting to obtain the column fitting curve of that set of data. Based on the maximum value of the column fitting curve of that set of data, the column coordinate of the largest pixel in that set of data is obtained.
5. A device for detecting lens correction data, characterized in that, The device includes: The effective data extraction unit is used to extract the effective correction data from the lens correction data and divide the effective correction data into N blocks of correction data, where N is a multiple of 4; A data grouping unit is used to group the N blocks of correction data into M groups of data, where M is an integer greater than 1, and each group of data in the M groups includes multiple blocks of correction data. The judgment unit is used to determine whether the incremental or decremental parameter of each correction data in the N correction data blocks meets the set incremental or decremental conditions; to determine whether the coordinate value of the maximum pixel in each group of data in the M groups of data meets the set coordinate conditions; and to determine whether the maximum and minimum pixel values of the effective correction data meet the set pixel value conditions. The judgment unit is further configured to, for each of the N blocks of correction data, obtain a row increment / decrement parameter for the correction data block based on the average value of each row of data in the correction data block; and obtain a column increment / decrement parameter for the correction data block based on the average value of each column of data in the correction data block; and obtain an increment / decrement parameter for the correction data block based on the row increment / decrement parameter and the column increment / decrement parameter. Determine whether the incremental or decremental parameters of each correction data block meet the set incremental or decremental conditions; For each of the N blocks of correction data, the average value of each row in that block is obtained; a straight line is fitted using the average value of the middle row data in that block to obtain a row fitting line for that block, where the middle row data is the remaining row data after removing edge rows; the row increment / decrement parameters for that block are obtained based on the slope of the row fitting line. For each of the N blocks of correction data, the average value of each column in that block is obtained; a column fitting line is fitted using the average value of the middle column data in that block, to obtain a column fitting line for that block, where the middle column data is the remaining column data after removing edge columns; the column increment / decrement parameters for that block are obtained based on the slope of the column fitting line. The determination unit is configured to determine that the lens correction data meets the correction requirements if the incremental or decremental parameters of each correction data block meet the set incremental or decremental conditions, the coordinate value of the maximum pixel in each group of data meets the set coordinate conditions, and the maximum pixel value and the minimum pixel value meet the set pixel value conditions.
6. An electronic device, characterized in that, It includes a memory and one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs containing operation instructions for performing the methods described in any one of claims 1 to 4.
7. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium and adapted to be read and executed by a processor to cause a computer device having the processor to perform the detection method according to any one of claims 1-4.
Citation Information
Patent Citations
Lens shadow correction data detection method and system
CN111182293A
Camera module detection system and method
CN115002327A