A mobile phone screen uniformity detection method based on image analysis
By extracting grayscale sequences in four directions and calculating slope changes, a grayscale trend distribution image is generated to identify areas of abnormal brightness. This solves the problem of misjudgment in the uniformity detection of mobile phone screens in existing technologies and achieves high-precision identification and detection of abnormal brightness points.
Patent Information
- Application Number
- CN202510634811.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-05-16
AI Technical Summary
Existing technologies struggle to accurately identify small but continuous fluctuations in brightness when detecting the uniformity of mobile phone screens, leading to misjudgments and insufficient detection sensitivity. This is especially true in OLED screens where the subtle structures of local brightness shifts are difficult to capture and quantify.
By acquiring screen images, extracting grayscale sequences in four directions, calculating the grayscale difference and slope of adjacent pixels, generating a grayscale trend distribution image, identifying areas of abnormal brightness, and combining pixel distribution contour maps and patch contrast enhancement layers, a brightness jump segment map is generated to accurately identify abnormal brightness points.
It improves the detection sensitivity and judgment accuracy of mobile phone screen uniformity detection, adapts to the brightness difference detection needs under complex display structures, and enhances the capture of brightness trend details and the positioning accuracy of abnormal areas.
Smart Images

Figure CN120451130B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image analysis technology, and in particular to a method for detecting the uniformity of mobile phone screens based on image analysis. Background Technology
[0002] Image analysis technology encompasses computational methods and operational processes for the automatic identification and interpretation of image data, aiming to extract meaningful information or features from images. The core of this technology includes key steps such as image preprocessing, feature extraction, image segmentation, target recognition, and classification, and it is widely applied in various fields such as medical imaging, industrial inspection, security monitoring, intelligent transportation, and mobile terminal image quality inspection. In its implementation, image analysis relies on statistical analysis based on image pixel distribution, structural pattern recognition, and transformation calculations based on image matrices to accurately describe and quantitatively evaluate the characteristics of targets in images, exhibiting high automation and processing efficiency.
[0003] The image analysis-based mobile phone screen uniformity detection method involves capturing an image of the mobile phone screen while it is lit using an image acquisition device. Then, through pixel grayscale value distribution analysis in the image processing workflow, the brightness differences in different areas of the image are evaluated. The technical aspects involved in this method include key steps such as constructing screen uniformity evaluation criteria, dividing the captured image into regions, extracting and normalizing image grayscale values, using brightness gradient analysis methods, and setting uniformity judgment rules. The entire detection process uses the actual acquired image as input and quantifies the brightness consistency of the screen display area through numerical calculations of the pixel grayscale levels in the image matrix.
[0004] In traditional image pixel grayscale distribution analysis methods, grayscale data is mostly presented in a static statistical form, lacking a dynamic response mechanism for directional changes in the grayscale sequence. This makes it difficult to identify small but continuous fluctuations in the image. Especially when there is a slight brightness shift in a local area of the screen, the overall grayscale normalization process can mask local change features and reduce the saliency of abnormal areas. In practice, image region division is often performed according to a regular grid, ignoring the spatial continuity of grayscale change paths, resulting in blurred grayscale boundaries or confusion between interference areas and real abnormal areas, leading to misjudgments. In brightness difference assessment, due to the lack of deep extraction of grayscale gradient distribution patterns, consistency is assessed only by the difference between bright and dark extreme values, which cannot cover intermediate grayscale changes under complex structures, causing a delay in brightness fluctuation response. For example, in OLED screens, the difference between edge grayscale change bands and central uniformity is subtle but has a significant impact on display quality. Such subtle differences are difficult to accurately capture and quantify using traditional grayscale statistical methods, affecting the sensitivity and robustness of actual detection and limiting the breadth and accuracy control capabilities of this technology in complex display structures. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and propose a mobile phone screen uniformity detection method based on image analysis.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for detecting the uniformity of a mobile phone screen based on image analysis, comprising the following steps:
[0007] S1: Collect the uniformly distributed central region in the screen image, extract the gray-level sequence in four directions, calculate the gray-level difference and change slope of adjacent pixels, extract the position of directional change, statistically analyze the slope amplitude distribution, construct the concentration ratio, and combine to generate a gray-level trend distribution image.
[0008] S2: Based on the changing direction of the grayscale trend distribution image, extract the slope sequence, obtain the starting point of change in the reverse slowing segment, calculate the center pixel trajectory difference and adjust the coordinates to generate a pixel distribution contour map.
[0009] S3: Based on the pixel distribution contour map, extract the gray-level difference of the patches, count the local spatial gradient, identify the transition zones with consistent direction and frequent fluctuations, mark them as contrast enhancement areas, and superimpose the gray-level difference to generate a patch contrast enhancement layer.
[0010] S4: Read the edge grayscale bands of each region in the tile contrast enhancement layer, extract the start and end coordinates of brightness changes, calculate and sort the brightness span, group and sort by region index, and generate a brightness jump segment map.
[0011] S5: Call the image region of the brightness span in the brightness jump segment spectrum, extract the coordinates and calculate the geometric centroid and gray value, combine the brightness fluctuation range to judge the difference, and generate a mobile phone screen uniformity detection scheme.
[0012] As a further aspect of the present invention, the grayscale trend distribution image includes directional grayscale slope change features, slope change amplitude distribution, and grayscale trend combination ratio; the pixel distribution contour map includes main direction slope frequency features, reverse grayscale change segments, and coordinate offset adjustment parameters; the patch contrast enhancement layer includes local grayscale difference gradient, continuous grayscale transition region, and same-direction grayscale fluctuation frequency distribution; the brightness jump segment map includes bright and dark pixel jump span, continuous jump dense distribution, and brightness level grouping blocks; and the mobile phone screen uniformity detection scheme includes pixel sets with grayscale values higher than the mean, geometric bright spot centroid coordinates, and brightness difference judgment threshold.
[0013] As a further aspect of the present invention, the specific steps of S1 are as follows:
[0014] S101: Collect the initial central region that is uniformly distributed in the screen image, extract the continuous gray value sequence of each central region in the four directions of up, down, left and right, calculate the difference between adjacent pixels in the gray value sequence, and group and summarize the difference sequence according to the direction to generate the directional gray value difference sequence.
[0015] S102: Based on the gray-scale difference sequence of the direction, select three adjacent differences to calculate two sets of slope differences, then mark the position of the amplitude between the slope differences, count the number of change positions of each direction within a fixed pixel range, and obtain the direction slope change density distribution value.
[0016] S103: Based on the density distribution value of the slope change in the direction, the density values of the four directions in each group of central areas are combined in sequence, the difference between the directions is calculated and the absolute value is taken, and then the ratio of the difference between the direction combinations is calculated and normalized to generate a grayscale trend distribution image.
[0017] As a further aspect of the present invention, the specific steps of S2 are as follows:
[0018] S201: Based on the gray distribution characteristics of the detection area in the gray trend distribution image, extract the main change direction of the area, and mark the center position where the difference exceeds the set gray difference threshold according to the difference between the gray fluctuation of the direction and the mean value in the area, and obtain the coordinate set of the gray offset sensitive area.
[0019] S202: Call the gray-scale sequence of the main direction of each region in the gray-scale offset sensitive region coordinate set, extract the continuous segments with frequent slope changes, locate the starting point of the gray-scale decreasing segment, obtain the corresponding pixel index, and obtain the coordinate set of the starting point of the reverse slope change.
[0020] S203: Based on the coordinate set of the starting point of the reverse slope change, calculate the pixel trajectory offset value in the main direction between adjacent starting points, establish the corresponding linear connection relationship, perform a unified directional offset transformation on all coordinates, and generate a pixel distribution contour map.
[0021] As a further aspect of the present invention, the formula for calculating the pixel trajectory offset value in the main direction between adjacent starting points is as follows:
[0022]
[0023] Where, ΔT k Δx represents the pixel trajectory offset value in the main direction between adjacent starting points. k Δy represents the coordinate difference in the x-axis direction between the k-th pair of adjacent starting points. k θ represents the coordinate difference in the y-axis direction between the k-th pair of adjacent starting points. k This represents the change in the reverse slope between the k-th pair of adjacent starting points. λ represents the mean slope of the entire set of coordinates representing the starting points of the reverse slope change.k This represents the normalized parameter adjusted according to the principal direction weighting coefficient. This represents the pixel density gradient vector of the local region where the k-th pair of adjacent starting points are located.
[0024] As a further aspect of the present invention, the specific steps of S3 are as follows:
[0025] S301: Based on the image boundary in the pixel distribution contour map, extract the gray values of the current pixel and its neighboring pixels in the horizontal and vertical directions of the image patch, calculate the gray value difference, classify them according to coordinates, and generate a set of patch gray value differences.
[0026] S302: Based on the set of grayscale difference values of the blocks, count the difference positions in the differential directions of the blocks, extract the continuous gradient amplitude change segments, mark the continuous areas where the grayscale fluctuation frequency exceeds the directional mean, and obtain the grayscale transition marking area.
[0027] S303: Call the gray-level difference value in the gray-level transition mark area, accumulate the continuous gray-level segments, and overlay the accumulation result onto the original block position to generate a block contrast enhancement layer.
[0028] As a further aspect of the present invention, the grayscale difference calculation formula is specifically as follows:
[0029]
[0030] Where, ΔQ u,v p represents the local gray-level difference of the pixel at coordinates (u,v) in the image. u,v q represents the grayscale value of the current pixel (u,v). u+1,v r represents the grayscale value of the pixel at (u+1,v) directly below it. u,v s represents the horizontal grayscale sample value of the current pixel (u,v). u,v+1 t represents the grayscale value of the pixel at position (u, v+1) to its right. u-1,v w represents the grayscale contrast value of the area directly above it (u-1, v). u,v-1 This represents the grayscale contrast value of its left side (u, v-1), |·| represents the absolute value operator, and 2 is a constant offset term.
[0031] As a further aspect of the present invention, the specific steps of S4 are as follows:
[0032] S401: Read the grayscale band of the tile edge in the tile contrast enhancement layer, extract the start and end coordinates of the continuous brightness change segment in the grayscale sequence, calculate the grayscale difference between adjacent bright and dark pixels, and generate a brightness span list;
[0033] S402: Based on the brightness span list, sort all span values, extract continuous jump segments with a spacing less than a set threshold, mark the pixel range index, and obtain a set of brightness jump segment indexes;
[0034] S403: Call the set of brightness jump segment indices, count the number of brightness spans in segments, group them by brightness level, establish a brightness hierarchy structure and map it to layer coordinates to generate a brightness jump segment map.
[0035] As a further aspect of the present invention, the specific steps of S5 are as follows:
[0036] S501: Call all brightness span regions in the brightness jump segment map, extract the pixels with gray values higher than the local brightness average level in the region, record the coordinate positions, and generate a set of coordinates of pixels with strong brightness.
[0037] S502: Based on the set of coordinates of the pixels with higher brightness, calculate the weighted offset value of the coordinates of the pixels with higher brightness relative to the centroid, and extract the gray value corresponding to the coordinates to obtain the gray value of the centroid of the bright spot.
[0038] S503: Call the gray value of the center of gravity of the bright spot, perform difference calculation on the gray value set of the area, determine whether the difference exceeds the threshold of brightness fluctuation range, and establish a mobile phone screen uniformity detection scheme.
[0039] As a further aspect of the present invention, the formula for calculating the weighted offset value of the coordinates of the pixel with higher brightness relative to the centroid is as follows:
[0040]
[0041] in, The weighted offset value of the coordinates of the brighter pixels relative to the centroid, x i y represents the horizontal coordinate value of the i-th pixel with relatively high brightness. i This represents the vertical coordinate value of the i-th pixel with relatively high brightness. This represents the average horizontal coordinate of all pixels with relatively high brightness. I represents the average vertical coordinate of all pixels with relatively high brightness. i This represents the grayscale value of the i-th pixel. w represents the average grayscale value of all pixels with relatively high brightness. i represents the weighting factor of the i-th pixel in the coordinate distribution, and n represents the total number of pixels with stronger brightness.
[0042] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0043] In this invention, by extracting the slope of the multi-directional grayscale sequence and constructing fluctuation aggregation features, the detailed capture of brightness trends is enhanced. By combining the location of the starting point of the reverse grayscale change and coordinate offset, the accuracy of abnormal area location is improved. Local transition zones and jump segments are extracted to achieve grayscale fluctuation partitioning enhancement. Through the analysis of the centroid of high grayscale pixel sets and local fluctuation differences, brightness anomalies are accurately identified. The overall process integrates grayscale trend extraction, change trajectory adjustment, contrast enhancement and centroid analysis, etc., to enhance detection sensitivity and judgment accuracy, and adapt to the needs of screen brightness micro-difference detection. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a schematic diagram of the steps of the present invention. Detailed Implementation
[0046] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0047] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0048] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, their intended meanings are consistent. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, their intended meanings are consistent.
[0049] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0050] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0051] Please see Figure 1 A method for detecting the uniformity of mobile phone screens based on image analysis includes the following steps:
[0052] S1: Collect multiple initial central regions evenly distributed on the mobile phone screen image, extract continuous gray value sequences in four directions in each region, solve the difference between adjacent pixels in the gray value sequence and calculate the slope of change, extract the slope change position sequence from each direction, then statistically analyze the amplitude distribution of the slope change and construct the change concentration ratio, combine the directional gray value trends through the ratio sequence to generate a gray value trend distribution image;
[0053] The gradient concentration ratio is obtained by calculating the ratio of the sum of the absolute values of the gray-level differences between adjacent pixels to the standard deviation of the gray-level values. It is used to measure the degree of concentration of gray-level changes. The higher the ratio, the more concentrated the gray-level changes are in a specific direction.
[0054] S2: Based on the main change direction of the detection area in the gray-level trend distribution image, identify the central area where the concentration of gray-level fluctuations is far from the mean distribution, extract the frequently changing slope sequence from the gray-level sequence in the main direction, obtain the starting position of the change speed in the reverse gray-level deceleration segment of the sequence, calculate the pixel trajectory position difference between the center points, and adjust the coordinate offset according to the trajectory direction to generate a pixel distribution contour map.
[0055] The reverse gradient decay segment determines its starting position by detecting the point where the acceleration direction of the grayscale change rate reverses. When the acceleration direction changes from positive to negative, it indicates that the grayscale change rate begins to slow down.
[0056] S3: Based on the image boundary content in the pixel distribution contour map, extract the gray-level difference between the current pixel and the neighboring pixels for each patch in the image, count the spatial distribution gradient of the difference in the local patch, extract continuous gray-level transition bands according to the gradient change direction and amplitude, mark the transition areas with high gray-level fluctuation frequency in the same direction as contrast enhancement areas, and then superimpose the gray-level difference of the contrast enhancement areas to generate a patch contrast enhancement layer.
[0057] S4: Read the edge grayscale bands of each region in the tile contrast enhancement layer, extract the start and end coordinates of the edge brightness value change, calculate the brightness variation span of adjacent bright and dark pixels, sort and extract the abrupt change dense segments, mark the pixel range of brightness span in the continuous abrupt change S, extract the segment index by grouping the corresponding area of the pixel range, and then sort them into multiple brightness level blocks by abrupt change density to generate a brightness abrupt change segment map;
[0058] The brightness transition span is the maximum difference in brightness values between adjacent pixels. A high-frequency transition segment is defined as a region where the span value is significantly higher than the global brightness statistical standard deviation.
[0059] S5: Call the image region of the brightness span in the brightness jump segment map, identify the set of pixels in the region whose gray value is higher than the local brightness level, extract the coordinate values of all pixels in the set, calculate the average of the horizontal and vertical coordinate values as the geometric bright spot centroid coordinates, extract the gray value of the region centroid, calculate the difference value, determine whether the difference value is greater than the fluctuation range of the overall brightness distribution, and generate a mobile phone screen uniformity detection scheme.
[0060] The difference value is obtained by calculating the absolute difference between the centroid gray value and the global brightness mean. If the difference value exceeds 2-3 times the standard deviation of the brightness distribution, it is judged as an abnormal screen brightness distribution.
[0061] The grayscale trend distribution image includes directional grayscale slope change features, slope change amplitude distribution, and grayscale trend combination ratio. The pixel distribution contour map includes main direction slope frequency features, reverse grayscale change segments, and coordinate offset adjustment parameters. The patch contrast enhancement layer includes local grayscale difference gradient, continuous grayscale transition area, and grayscale fluctuation frequency distribution in the same direction. The brightness jump segment map includes bright and dark pixel jump span, continuous jump dense distribution, and brightness level grouping blocks. The mobile phone screen uniformity detection scheme includes pixel sets with grayscale values higher than the mean, geometric bright spot centroid coordinates, and brightness difference judgment threshold.
[0062] The specific steps of S1 are as follows:
[0063] S101: Collect the initial central region that is uniformly distributed in the screen image, extract the continuous gray value sequence of each central region in the four directions of up, down, left and right, calculate the difference between adjacent pixels in the gray value sequence, and group and summarize the difference sequence according to the direction to generate the directional gray value difference sequence.
[0064] The initial central regions of the screen image are uniformly distributed. For an image size of 1920×1080, 20 center points are selected horizontally and vertically every 40 pixels, forming 400 central regions. For each central region, a grayscale sampling path is extended in four directions (up, down, left, and right) based on the center coordinates. Assuming a sampling path length of 7 pixels (3 pixels in each direction starting from the center point), four grayscale sequences are obtained. The grayscale values are read point by point in each sequence. For example, if the grayscale values in the up direction are 122, 125, 129, 131, 130, 127, and 124, the difference between adjacent grayscale values is calculated sequentially. 3, 4, 2, -1, -3, and -3 correspond to the grayscale difference sequence in the upward direction, respectively. The same operation is performed in the downward, left, and right directions to generate difference sequences. After generating the differences, the data in the four directions are stored separately. Four sets of difference sequences with a length of 6 are generated for each central region. The same operation is performed on all central regions in the image in the order from left to right and from top to bottom. The grayscale sequence changes in different regions are compared. For example, the difference changes in static regions of the image are small, with fluctuations not exceeding 5, while the difference in edge or moving regions may be between ±15. The difference sequences in each direction are summarized and a structured storage record is established to prepare for subsequent slope change analysis.
[0065] S102: Based on the directional grayscale difference sequence, select three adjacent differences to calculate two sets of slope differences, then mark the position of the amplitude between the slope differences, count the number of change positions of each direction within a fixed pixel range, and obtain the directional slope change density distribution value.
[0066] Based on the obtained directional gray-level difference sequence, for each group of 6 values, three consecutive differences are sequentially taken from beginning to end, such as 3, 4, 2, forming two difference pairs 3-4 and 4-2. The changes between these differences are 1 and -2, respectively. The magnitude difference is then taken as 3, and it is determined whether this is greater than a set threshold. If it is, a sudden change in gray-level slope is considered to exist at that location, and the relative index of the current location is marked. This operation is performed sequentially on each sequence, thereby generating a set of positional change markers in each direction. When setting the threshold, the overall gray-level change trend of the image is used as a basis. If the slope difference change in most areas does not exceed 2, the threshold can be set. The value is 3. When used for monitoring video images, if the image is in daylight with sufficient light and a static background, setting the threshold to 4 can filter out high-frequency noise changes. In nighttime environments, based on the characteristics of infrared image changes, it is recommended to adjust the threshold to 2 to enhance the sensitivity of change detection. After completing the statistics of change points in each direction, the number of abrupt change points in each 5×5 pixel area is counted. For example, in the left direction, if 3 abrupt change points are found in a 5×5 area, the density value of the left direction is recorded as 3. The density statistics are completed in the other directions in the same way to obtain a structure containing density values in 4 directions, ready to enter the grayscale trend determination stage.
[0067] S103: Based on the density distribution value of the slope change, the density values of the four directions in each group of central areas are combined in turn. The difference between directions is calculated and the absolute value is taken. Then, the ratio of the difference between the direction combinations is calculated and normalized to generate a grayscale trend distribution image.
[0068] Based on the density values in the four directions of each central region, pairwise comparisons are performed on ρ_top, ρ_bottom, ρ_left, and ρ_right. First, the density difference in the vertical direction and the density difference in the horizontal direction are calculated separately. For example, if the density values in the four directions of a central region are 2 for top, 5 for bottom, 1 for left, and 6 for right, then the vertical difference is 3 and the horizontal difference is 5. Next, the ratio between the two sets of differences is compared. The ratio of 3 to 5 is 0.6. Then, this ratio is normalized according to a preset ratio range. To maintain the grayscale range of the output image between 0 and 255, all ratios are collected from the entire image and then statistically analyzed. If the ratio is greater than or equal to the minimum value (e.g., the minimum is 0.2 and the maximum is 3.0), then during normalization, each ratio is linearly scaled to the range of 0 to 255. This value will be used as the grayscale value of the current pixel in the final generated image. For the ratio 0.6, after scaling, it is approximately 45, and the corresponding pixel grayscale is set to 45. All central regions are processed sequentially, and the results are mapped back to the corresponding pixel positions in the original image. During the image reconstruction process, an interpolation completion method is used to smoothly fill the unsampled areas, ultimately obtaining a complete grayscale trend image for subsequent visualization of scene stability or regional feature changes.
[0069] The specific steps of S2 are as follows:
[0070] S201: Based on the gray distribution characteristics of the detection area in the gray trend distribution image, extract the main change direction of the area, and mark the center position where the difference exceeds the set gray difference threshold according to the gray fluctuation of the direction and the difference of the mean in the area, and obtain the coordinate set of the gray offset sensitive area.
[0071] Based on the grayscale distribution characteristics of the detection region in the grayscale trend distribution image, the image is divided into blocks, each 40×40 pixels. Within each block, the maximum, minimum, and average grayscale values of all pixels are calculated, denoted as G_max, G_min, and G_avg. Then, grayscale change trend data in four directions are extracted for each region. For each grayscale change curve in each direction, the rising and falling segments are extracted, and the fluctuation amplitude is calculated. The fluctuation amplitude is defined as the difference between the maximum and minimum grayscale values. If the grayscale value in a certain direction changes from 120 to 145 and then drops to 130, the fluctuation amplitude is 25. Based on the fluctuation amplitude in each direction, the direction with the largest change is selected as the main change direction. If the vertical direction is 25 and the horizontal direction is 15, then the main direction is the vertical direction. Each grayscale path along the main direction is compared point-by-point with the region mean G_avg. If the difference between the grayscale value and G_avg at a certain point is greater than the threshold ΔG_thresh, then that location is marked as a grayscale shift sensitive point. The threshold ΔG_thresh is set to the overall brightness distribution of the reference image. In medium brightness images, a value of 15 is reasonable. In high contrast images, it can be set to 20, while in low contrast images, the value should be 10. For example, when the region G_avg is 130, if the grayscale value at a certain point is 110 or 150, that is, the grayscale difference is 20, then the threshold requirement is met and it is marked. This process is repeated for all detection regions of the entire grayscale trend image, and the coordinates of the center points that meet the conditions are recorded to form a set of coordinates of grayscale shift sensitive regions.
[0072] S202: Call the grayscale sequence of the main direction of each region in the grayscale offset sensitive region coordinate set, extract the continuous segments with frequent slope changes, locate the starting point of the grayscale decreasing segment, obtain the corresponding pixel index, and obtain the coordinate set of the starting point of the reverse slope change.
[0073] The algorithm calls upon the center coordinates of each point in the grayscale shift sensitive area coordinate set. Based on the previously extracted main change direction, a grayscale sequence is selected. If the main direction is up and down, grayscale values are sampled upwards and downwards from the center point to obtain a sequence of 9 grayscale values, containing the grayscale values of the center point and four pixels on each side. This sequence of 9 points is used for slope analysis. The grayscale difference between every two consecutive points in this sequence is calculated pairwise to obtain the slope sequence. For example, if the sequence is 140, 138, 135, 132, 130, 128, 127, 126, 125, then the difference sequence is -2, -3, -3, -2, -2, -1, -1, - 1. Next, determine whether the change between each difference pair is a continuous occurrence of negative values, that is, whether the length of the continuous negative value segment exceeds the set continuous threshold L_thresh. The continuous threshold L_thresh is generally set to 3, which means that only continuously decreasing segments with a length greater than or equal to 3 are retained. In the above sequence, there is a continuous decrease from 140 to 127 with a length of 6, which meets the condition. The sequence index position corresponding to the starting point of this segment is taken as the starting point of the gray-level decreasing segment, and its coordinate position in the original image is recorded. Repeat the processing of all gray-level sequences obtained from the center points, and finally extract the coordinate positions of the starting points of all segments that meet the slope decreasing feature to form the coordinate set of the starting points of the reverse slope change.
[0074] S203: Based on the coordinate set of the starting point of the reverse slope change, calculate the pixel trajectory offset value in the main direction between adjacent starting points, establish the corresponding linear connection relationship, perform a unified directional offset transformation on all coordinates, and generate a pixel distribution contour map.
[0075] The specific formula for calculating the pixel trajectory offset value in the main direction between adjacent starting points is as follows:
[0076]
[0077] Where, ΔT k Δx represents the pixel trajectory offset value in the main direction between adjacent starting points. k Δy represents the coordinate difference in the x-axis direction between the k-th pair of adjacent starting points. k θ represents the coordinate difference in the y-axis direction between the k-th pair of adjacent starting points. k This represents the change in the reverse slope between the k-th pair of adjacent starting points. λ represents the mean slope of the entire set of coordinates representing the starting points of the reverse slope change. k This represents the normalized parameter adjusted according to the principal direction weighting coefficient. This represents the pixel density gradient vector of the local region where the k-th pair of adjacent starting points are located;
[0078] Take the coordinates of adjacent starting points A(2,3) and B(5,7), and calculate Δx. k =5-2=3, Δy k=7-3=4; Reverse slope θ k Calculated from the coordinate difference between adjacent points After standardization and rounding to three decimal places, the result is 1.333; the overall slope mean is... Let C(8, 4) be the arithmetic mean of the reverse slopes of all adjacent points in the coordinate set. If there is another adjacent pair of points C(8, 4), calculate its reverse slope as C(8, 4). but The normalization parameter λ_k is determined by the principal direction weighting coefficient, which is the cosine of the angle between the direction of the current adjacent point and the principal direction. If the principal direction is the positive x-axis direction, the cosine of the angle is... Normalization parameter λ k =1 / (0.6×10)=0.167; Pixel density gradient vector Calculations were performed on a local 5×5 pixel region, yielding a horizontal gradient component Gx = 3, a vertical gradient component Gy = 4, and a vector magnitude of...
[0079] Substitute into the formula to perform the calculation:
[0080]
[0081] The results indicate that the trajectory offset of adjacent point pairs is composed of the pixel density gradient weighted by geometric distance and slope difference, with 39.97 as ΔT. k The value will be used to establish subsequent linear connections;
[0082] Parameter definition:
[0083] Δx k The x-coordinate difference between the k-th pair of adjacent starting points is calculated by subtracting the x-coordinate of the previous point from the x-coordinate of the subsequent point. Δy k Similarly; θ k Represents the reverse slope of the k-th pair of adjacent points, given by Δy. k / Δx k The calculation should be rounded to three decimal places. λ represents the arithmetic mean of the slopes of all adjacent points with respect to the opposite direction. k This represents the normalized parameter adjusted according to the main direction weight coefficient. The weight coefficient is the cosine of the angle between the current direction and the main direction. The normalized parameter is calculated as 1 / (weight coefficient × 10). The pixel density gradient vector representing the local region is calculated by using the Sobel operator to calculate the horizontal gradient Gx and the vertical gradient Gy, and then the vector magnitude is taken.
[0084] Parameter value source constraints:
[0085] Coordinate difference Δx k Δy kDerived from actual coordinate monitoring data; reverse slope θ k The calculation accuracy is limited by the resolution of the coordinate acquisition device; the main direction weight coefficient is based on the definition of angle cosine in the international standard ISO80000-2; the pixel density gradient vector follows the standard calculation process of Sobel operator convolution kernel [-1, 0, 1; -2, 0, 2; -1, 0, 1]; the denominator term 10 of the normalization parameter is the image width normalization constant, which is set according to the IEEE image processing standard.
[0086] Parameter rationality verification
[0087] Coordinate difference Δx k =3, Δy k =4 conforms to the range of adjacent feature point spacing (1 to 50 pixels) under normal image resolution (such as 1920×1080);
[0088] reverse slope θ k =1.333 is within the normal slope range of [-5, 5], avoiding infinite slopes in the vertical direction;
[0089] Normalization parameter λ k =0.167 satisfies the constraint condition of the interval (0, 1);
[0090] Pixel gradient magnitude It conforms to the calculation range of the Sobel operator (0~20√2);
[0091] Final ΔT k =39.97 is within the typical trajectory offset value range (0-100 pixels).
[0092] The specific steps for S3 are as follows:
[0093] S301: Based on the image boundary in the pixel distribution contour map, extract the gray values of the current pixel and its neighboring pixels in the horizontal and vertical directions of the image patch, calculate the gray value difference, classify them according to coordinates, and generate a set of patch gray value differences.
[0094] The specific formula for calculating grayscale difference is as follows:
[0095]
[0096] Where, ΔQ u,v p represents the local gray-level difference of the pixel at coordinates (u,v) in the image. u,v q represents the grayscale value of the current pixel (u,v). u+1,v r represents the grayscale value of the pixel at (u+1,v) directly below it. u,v s represents the horizontal grayscale sample value of the current pixel (u,v). u,v+1t represents the grayscale value of the pixel at position (u, v+1) to its right. u-1,v w represents the grayscale contrast value of the area directly above it (u-1, v). u,v-1 This represents the grayscale contrast value of its left side (u, v-1), |·| represents the absolute value operator, and 2 is a constant offset term;
[0097] Parameter acquisition method and value setting:
[0098] p u,v The grayscale value of the pixel at coordinates (u,v) is measured using an image acquisition device, and the value obtained is 150.
[0099] q u+1,v The grayscale value of the pixel at coordinates (u+1,v) is measured and the value obtained is 145.
[0100] r u,v Perform horizontal grayscale sampling on the pixel with coordinates (u,v) and obtain a value of 150.
[0101] s u,v+1 The grayscale value of the pixel at coordinates (u, v+1) is measured and the value obtained is 155.
[0102] t u-1,v The grayscale value of the pixel at coordinates (u-1,v) was measured and the value obtained was 148.
[0103] w u,v-1 The grayscale value of the pixel at coordinates (u, v-1) is measured and the value obtained is 152.
[0104] Formula calculation process:
[0105] Calculate the numerator:
[0106] p u,v -q u+1,v +r u,v -s u,v+1 =150-145+150-155=0;
[0107] Calculate the denominator:
[0108] 2+|t u-1,v -w u,v-1 |=2+|148-152|=2+4=6;
[0109] Substitute into the formula to calculate ΔQ u,v :
[0110]
[0111] The results show that the pixel with coordinates (u,v) has small gray-level variation in its neighborhood and a local gray-level difference of 0, indicating that the gray-level distribution in this area is relatively uniform, which helps to identify flat areas in an image during image processing.
[0112] S302: Based on the set of grayscale difference values of the blocks, count the difference positions in the differential directions of the blocks, extract the continuous gradient amplitude change segments, mark the continuous areas where the grayscale fluctuation frequency exceeds the directional mean, and obtain the grayscale transition marking area.
[0113] Based on the set of grayscale differences in the image patch, the grayscale differences of each pixel in the patch are scanned and statistically analyzed in both the horizontal and vertical directions. The direction of grayscale difference change is determined to be consistent. If multiple consecutive pixels in a certain direction have the same grayscale difference sign and the value change is not less than the set minimum change threshold ΔG_thresh_min, then it is marked as a gradient change segment. ΔG_thresh_min is set according to the overall grayscale range of the image. In scenarios where the image grayscale value range is 0–255, it can be set to 5. For example, if the grayscale differences of a consecutive segment of pixels in the horizontal direction of the patch are 6, 8, 7, 5, and 10, then this segment is determined to be a continuous gradient change segment. The frequency of occurrence of all consecutive segments that meet this condition is statistically analyzed. Then, it is compared with the average change frequency in all directions within the tile. The total number and average length of continuous gradient change segments in the horizontal and vertical directions of the tile are calculated. The frequency comparison threshold F_thresh_ratio is set to 1.5. That is, if the change frequency of a certain continuous change area is higher than 1.5 times the directional average, the area is determined to be an abnormal gray-scale fluctuation frequency area and is marked. For example, if the average gray-scale fluctuation frequency of a tile in the horizontal direction is 0.8 times / pixel, and the frequency of a certain continuous area reaches 1.3 times / pixel, which is higher than 1.5 times, the condition is met and it is marked. After traversing the entire gray-scale difference set of the tile, the positions of all areas that meet the conditions are marked, and finally the gray-scale transition marked area is obtained.
[0114] S303: Call the gray-level difference in the gray-level transition marker area, accumulate the continuous gray-level segments, and overlay the accumulated result onto the original tile position to generate a tile contrast enhancement layer;
[0115] The grayscale difference data at each marker position in the grayscale transition marker area is retrieved. For each continuous grayscale region, the grayscale difference is accumulated item by item from beginning to end. If a grayscale difference sequence is 5, 6, 4, 7, 5, then it is accumulated sequentially to obtain 5, 11, 15, 22, 27. Each item in the accumulation operation is the sum of the previous item and the current item. After accumulation, the accumulated values are mapped to the corresponding pixel grayscale values at the original image patch positions. An enhancement intensity coefficient K is set to control the overlay intensity, and the value of K is set to 1. .2 indicates that each accumulated value is multiplied by 1.2 before being superimposed. For example, if the previous accumulated value is 22, the enhanced value will be 26.4, which is rounded down to 26. Finally, each pixel in the original grayscale image block is locally enhanced in this way, and the enhancement result is generated into a block enhancement layer. This layer is the same size as the block, and all enhancement values match the corresponding positions in the original image one by one. After repeating the processing of all blocks, the contrast enhancement layers of each block are merged into a unified image size, and finally a complete block contrast enhancement layer is generated.
[0116] The specific steps of S4 are as follows:
[0117] S401: Read the grayscale bands of the tile edges in the tile contrast enhancement layer, extract the start and end coordinates of the continuous brightness change segments in the grayscale sequence, calculate the grayscale difference between adjacent bright and dark pixels, and generate a brightness span list;
[0118] Read the grayscale bands at the edges of each tile in the tile contrast enhancement layer. Extract grayscale sequences from the four boundary positions of each tile in the row and column directions. Extract the grayscale sequence G_top from left to right at the top edge, G_bottom from left to right at the bottom edge, G_left from top to bottom at the left edge, and G_right from top to bottom at the right edge. Each sequence is a one-dimensional array, where each element represents the grayscale value of the corresponding pixel. After extracting the grayscale sequences, perform a point-by-point difference operation on each sequence, calculating the grayscale difference between the current pixel and the next pixel from the first pixel to the last pixel. Record the sign of the difference and determine whether it is continuous. For example, in the G_top sequence, the grayscale values change to 112, 118, 123, 125. Given the values 128, 125, 120, and 114, the grayscale differences are 6, 5, 2, 3, -3, -5, and -6. The continuous positive value segment is determined to be from 112 to 128, and the negative value segment is from 128 to 114. The start and end coordinates of these continuous segments are extracted as (0, 0) to (0, 4) and (0, 4) to (0, 7), respectively. Then, the difference in grayscale values between the first and last pixels between the start and end coordinates is calculated. For example, 128-112=16 is a positive span, and 128-114=14 is a negative span. These span values are recorded in the brightness span list. Each span record must include the start coordinate, end coordinate, and span value. The same operation is performed on all continuous segments at the boundaries. Finally, the extraction of continuous grayscale segments and the calculation of span values are completed at the edges of all blocks in the entire image, resulting in a brightness span list containing brightness span information of the edges of the complete image blocks.
[0119] S402: Based on the brightness span list, sort all span values, extract continuous transition segments with a spacing less than a set threshold, mark the pixel range index, and obtain the brightness transition segment index set;
[0120] Based on the obtained list of brightness spans, all span values are sorted in ascending order of grayscale difference. After sorting, the results are iterated, and the grayscale difference between any two consecutive spans is compared. The distance between these grayscale differences is calculated. If the distance between two span values is less than the set brightness distance threshold ΔL_thresh, they are considered a group of continuous transition segments, and the starting and ending span positions are recorded. The brightness distance threshold ΔL_thresh should be configured based on the grayscale distribution characteristics of the entire image. If the overall grayscale span of the image is concentrated between 10 and 30, a threshold of 5 is reasonable, indicating that any two grayscale transitions within 5 are considered to belong to the same type of change region. For example, if there are spans in the sorted list... The values are 11, 13, 14, 18, 25, and 40. Among them, the distance between 13 and 14 is 1, which meets the condition and is merged into one segment. The distance between 25 and 40 is 15, so they are not merged. After continuously judging the entire list, several continuous transition segments are obtained. Then, the start and end coordinate ranges of the span contained in each segment are marked. For example, the span value of 13 corresponds to the coordinates (0, 5) to (0, 10), and the span value of 14 corresponds to the coordinates (0, 11) to (0, 15). Then the coordinate range of the transition segment is (0, 5) to (0, 15). The pixel indices involved in the segment are uniformly organized and recorded as an element in the brightness transition segment index set. All continuous transition segments that meet the distance condition are traversed and filtered to finally obtain the complete brightness transition segment index set.
[0121] S403: Call the set of brightness jump segment indexes, count the number of brightness spans in segments, group them by brightness level, establish a brightness hierarchy structure and map it to layer coordinates, and generate a brightness jump segment map.
[0122] The index range of each segment in the brightness transition segment index set is called to extract all brightness span values within the corresponding segment and count the number of brightness spans contained in the segment. For example, if a segment contains span values of 12, 14, 13, and 11, a total of 4 spans, then the number of brightness spans in the segment is 4. Then, all transition segments are grouped according to their span values. The grouping criterion is determined based on the average gray value within the segment. If the average gray value is between 0 and 85, it is classified as a low brightness level; between 86 and 170, it is classified as a medium brightness level; and between 171 and 255, it is classified as a high brightness level. For example, a segment... The inner span values are 120, 130, and 125, with an average value of 125, which are classified as medium brightness groups. Next, a hierarchical structure is established, and the segments within each brightness group are numbered and their respective levels are recorded. When establishing the hierarchy, the segments are arranged from top to bottom in the order of high, medium, and low. Each segment is accompanied by its own level information. Then, these hierarchical results are mapped back to the original image layer coordinate position. Using the start and end coordinate range of each segment as the positioning basis, the brightness level result is assigned to the corresponding pixel point in the corresponding area of the layer. Finally, a complete brightness jump segment map is constructed based on the hierarchical mapping results.
[0123] The specific steps of S5 are as follows:
[0124] S501: Call all brightness span regions in the brightness jump segment map, extract the pixels with gray values higher than the local brightness average level within the region, record the coordinate positions, and generate a set of coordinates of pixels with stronger brightness.
[0125] First, calculate the average grayscale value of all pixels in each brightness span region, denoted as the local average brightness level L_avg. Then, compare the grayscale value of each pixel in that region with L_avg. If the current pixel's grayscale value is greater than L_avg, mark it as a pixel with relatively high brightness and record its coordinates (x, y) in the original image. Repeat this process to traverse all brightness span regions. For example, if the pixel grayscale value distribution in a certain region is 135, 138, 140, 144, 130, 132, then L_avg is 136.5, and pixels with grayscale values of 138, 140, and 144 meet the condition and are recorded. Perform the above process sequentially on all regions in the image. Finally, summarize the coordinates of all pixels with relatively high brightness and store them in a unified structure to form a set of coordinates for pixels with relatively high brightness. This coordinate set data structure should contain the horizontal and vertical coordinate values of each pixel and its corresponding original image index information so that subsequent association operations can accurately point to the corresponding position in the image.
[0126] S502: Based on the set of coordinates of pixels with strong brightness, calculate the weighted offset value of the coordinates of pixels with strong brightness relative to the centroid, and extract the gray value corresponding to the coordinates to obtain the gray value of the centroid of the bright spot.
[0127] The specific formula for calculating the weighted offset value of the coordinates of pixels with higher brightness relative to the centroid is as follows:
[0128]
[0129] in, The weighted offset value of the coordinates of the brighter pixels relative to the centroid, x i y represents the horizontal coordinate value of the i-th pixel with relatively high brightness. i This represents the vertical coordinate value of the i-th pixel with relatively high brightness. This represents the average horizontal coordinate of all pixels with relatively high brightness. I represents the average vertical coordinate of all pixels with relatively high brightness. i This represents the grayscale value of the i-th pixel. w represents the average grayscale value of all pixels with relatively high brightness. i represents the weighting factor of the i-th pixel in the coordinate distribution, and n represents the total number of pixels with stronger brightness.
[0130] Let's take calculating the weighted offset of the coordinates of a pixel with higher brightness relative to the centroid as an example. Consider a specific set of data containing the coordinates and grayscale values of five pixels. This data was obtained using image analysis software to ensure that the accuracy of each value matches reality. First, calculate the average horizontal and vertical coordinates of all pixels (…). and and average gray value Assume the data is as follows: Pixel 1: x1 = 15, y1 = 20, I1 = 240;
[0131] Pixel 2: x2 = 16, y2 = 22, i2 = 250;
[0132] Pixel 3: x3 = 15, y3 = 21, i3 = 245;
[0133] Pixel 4: x4 = 14, y4 = 19, i4 = 235;
[0134] Pixel 5: x5 = 13, y5 = 18, i5 = 230;
[0135] Through monitoring, we obtained the following:
[0136]
[0137] weight w i The setting is based on the deviation between the brightness of each pixel and the average brightness. Higher deviations are given greater weight to emphasize the contribution of pixels with larger grayscale value differences to the offset. The settings are as follows:
[0138] w1 = |240 - 240| + 1 = 1;
[0139] w2 = |250-240|+1 = 11;
[0140] w3 = |245-240|+1 = 6;
[0141] w4 = |235-240|+1 = 6;
[0142] w5 = |230-240|+1 = 11;
[0143] The specific calculation is as follows:
[0144]
[0145] In the calculation, the Euclidean distance between each point's coordinates and the average coordinates was multiplied by the product of the absolute value of the grayscale deviation and the weight, and then divided by the sum of the weights to obtain the weighted average offset value for all points. This result shows that the weighted average offset value can more accurately measure the distribution deviation of a pixel set relative to its grayscale centroid.
[0146] S503: Call the gray value of the bright spot's center of gravity, perform difference calculation on the gray value set of the area, determine whether the difference exceeds the brightness fluctuation range threshold, and establish a mobile phone screen uniformity detection scheme.
[0147] The algorithm calls the grayscale value L_center of the highlight and constructs a complete grayscale set L_region for all pixels within the brightness transition region. Then, it calculates the difference between each pixel's grayscale value in the set and L_center, generating a difference list D_list from the absolute values of these differences. For example, if L_center is 145 and the grayscale values within the region are 140, 147, 150, 142, and 138, the differences are 5, 2, 5, 3, and 7 respectively. The algorithm then calculates the maximum value D_max of D_list and compares it with a set brightness fluctuation range threshold L_thresh. If D_max is greater than L_thresh... If `esh` is used, the area is determined to have uneven brightness. The threshold L_thresh needs to be set with reference to the standard brightness uniformity index of the screen. In mobile phone screen detection, the maximum allowable brightness deviation is usually 10-15 gray levels. Therefore, L_thresh can be set to 12. In the previous example, D_max is 7, which is less than the threshold and is not judged as uneven brightness. If there is an area with D_max of 18, it exceeds the threshold and the area is judged as an uneven area. Finally, all bright spot center areas are traversed and the above judgment is performed. The uniformity status of each area is marked according to the judgment result, and a structured record containing coordinate position, brightness difference degree, and judgment result is generated to construct a mobile phone screen uniformity detection scheme.
[0148] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for detecting the uniformity of a mobile phone screen based on image analysis, characterized in that, Includes the following steps: S1: Collect the uniformly distributed central region in the screen image, extract the gray-level sequence in four directions, calculate the gray-level difference and change slope of adjacent pixels, extract the position of directional change, statistically analyze the slope amplitude distribution, construct the concentration ratio, and combine to generate a gray-level trend distribution image. S2: Based on the changing direction of the grayscale trend distribution image, extract the slope sequence, obtain the starting point of change in the reverse slowing segment, calculate the center pixel trajectory difference and adjust the coordinates to generate a pixel distribution contour map. S3: Based on the pixel distribution contour map, extract the gray-level difference of the patches, count the local spatial gradient, identify the transition zones with consistent direction and frequent fluctuations, mark them as contrast enhancement areas, and superimpose the gray-level difference to generate a patch contrast enhancement layer. S4: Read the edge grayscale bands of each region in the tile contrast enhancement layer, extract the start and end coordinates of brightness changes, calculate and sort the brightness span, group and sort by region index, and generate a brightness jump segment map. S5: Call the image region of the brightness span in the brightness jump segment spectrum, extract the coordinates and calculate the geometric centroid and gray value, combine the brightness fluctuation range to judge the difference, and generate a mobile phone screen uniformity detection scheme. The specific steps of S3 are as follows: S301: Based on the image boundary in the pixel distribution contour map, extract the gray values of the current pixel and its neighboring pixels in the horizontal and vertical directions of the image patch, calculate the gray value difference, classify them according to coordinates, and generate a set of patch gray value differences. S302: Based on the set of grayscale difference values of the blocks, count the difference positions in the differential directions of the blocks, extract the continuous gradient amplitude change segments, mark the continuous areas where the grayscale fluctuation frequency exceeds the directional mean, and obtain the grayscale transition marking area. S303: Call the gray-level difference value in the gray-level transition mark area, accumulate the continuous gray-level segments, and overlay the accumulation result onto the original block position to generate a block contrast enhancement layer; The specific formula for calculating the grayscale difference is as follows: ; in, The coordinates in the image are The local grayscale difference of the pixel. Represents the current pixel grayscale value, Represents its direct bottom The grayscale value of the pixel. Represents the current pixel Horizontal grayscale sample value, Represents its right side The grayscale value of the pixel. Represents the area directly above it grayscale contrast value Represents its left side grayscale contrast value Represents the absolute value operator. This is a constant offset term; The specific steps of S5 are as follows: S501: Call all brightness span regions in the brightness jump segment map, extract the pixels with gray values higher than the local brightness average level in the region, record the coordinate positions, and generate a set of coordinates of pixels with strong brightness. S502: Based on the set of coordinates of the pixels with higher brightness, calculate the weighted offset value of the coordinates of the pixels with higher brightness relative to the centroid, and extract the gray value corresponding to the coordinates to obtain the gray value of the centroid of the bright spot. S503: Call the gray value of the bright spot's center of gravity, perform difference calculation on the gray value set of the area, determine whether the difference exceeds the brightness fluctuation range threshold, and establish a mobile phone screen uniformity detection scheme. The specific formula for calculating the weighted offset value of the coordinates of the pixel with higher brightness relative to the centroid is as follows: ; in, This represents the weighted offset value of the coordinates of pixels with higher brightness relative to the centroid. Representing the The horizontal coordinate value of a pixel with relatively high brightness. Representing the The vertical coordinate value of a pixel with relatively high brightness. This represents the average horizontal coordinate of all pixels with relatively high brightness. This represents the average vertical coordinate of all pixels with relatively high brightness. Representing the The grayscale value of each pixel This represents the average grayscale value of all pixels with relatively high brightness. Representing the The weighting factor of each pixel in the coordinate distribution. This represents the total number of pixels with relatively high brightness.
2. The mobile phone screen uniformity detection method based on image analysis according to claim 1, characterized in that, The grayscale trend distribution image includes directional grayscale slope change features, slope change amplitude distribution, and grayscale trend combination ratio. The pixel distribution contour map includes main direction slope frequency features, reverse grayscale change segments, and coordinate offset adjustment parameters. The patch contrast enhancement layer includes local grayscale difference gradient, continuous grayscale transition region, and grayscale fluctuation frequency distribution in the same direction. The brightness jump segment map includes bright and dark pixel jump span, continuous jump dense distribution, and brightness level grouping blocks. The mobile phone screen uniformity detection scheme includes pixel set with grayscale value higher than the mean, geometric bright spot centroid coordinates, and brightness difference judgment threshold.
3. The mobile phone screen uniformity detection method based on image analysis according to claim 1, characterized in that, The specific steps of S1 are as follows: S101: Collect the initial central region that is uniformly distributed in the screen image, extract the continuous gray value sequence of each central region in the four directions of up, down, left and right, calculate the difference between adjacent pixels in the gray value sequence, and group and summarize the difference sequence according to the direction to generate the directional gray value difference sequence. S102: Based on the gray-scale difference sequence of the direction, select three adjacent differences to calculate two sets of slope differences, then mark the position of the amplitude between the slope differences, count the number of change positions of each direction within a fixed pixel range, and obtain the direction slope change density distribution value. S103: Based on the density distribution value of the slope change in the direction, the density values of the four directions in each group of central areas are combined in sequence, the difference between the directions is calculated and the absolute value is taken, and then the ratio of the difference between the direction combinations is calculated and normalized to generate a grayscale trend distribution image.
4. The mobile phone screen uniformity detection method based on image analysis according to claim 1, characterized in that, The specific steps of S2 are as follows: S201: Based on the gray distribution characteristics of the detection area in the gray trend distribution image, extract the main change direction of the area, and mark the center position where the difference exceeds the set gray difference threshold according to the difference between the gray fluctuation of the direction and the mean value in the area, and obtain the coordinate set of the gray offset sensitive area. S202: Call the gray-scale sequence of the main direction of each region in the gray-scale offset sensitive region coordinate set, extract the continuous segments with frequent slope changes, locate the starting point of the gray-scale decreasing segment, obtain the corresponding pixel index, and obtain the coordinate set of the starting point of the reverse slope change. S203: Based on the coordinate set of the starting point of the reverse slope change, calculate the pixel trajectory offset value in the main direction between adjacent starting points, establish the corresponding linear connection relationship, perform a unified directional offset transformation on all coordinates, and generate a pixel distribution contour map.
5. The mobile phone screen uniformity detection method based on image analysis according to claim 4, characterized in that, The specific formula for calculating the pixel trajectory offset value in the main direction between adjacent starting points is as follows: ; in, This represents the pixel trajectory offset value in the main direction between adjacent starting points. Representing the For adjacent starting points The coordinate difference along the axis. Representing the For adjacent starting points The coordinate difference along the axis. Representing the For the reverse slope change values between adjacent starting points, The average slope of the entire set of coordinates representing the starting points of the reverse slope change. This represents the normalized parameter adjusted according to the principal direction weighting coefficient. Representing the The pixel density gradient vector of the local region where the adjacent starting points are located.
6. The mobile phone screen uniformity detection method based on image analysis according to claim 1, characterized in that, The specific steps of S4 are as follows: S401: Read the grayscale band of the tile edge in the tile contrast enhancement layer, extract the start and end coordinates of the continuous brightness change segment in the grayscale sequence, calculate the grayscale difference between adjacent bright and dark pixels, and generate a brightness span list; S402: Based on the brightness span list, sort all span values, extract continuous jump segments with a spacing less than a set threshold, mark the pixel range index, and obtain a set of brightness jump segment indexes; S403: Call the set of brightness jump segment indices, count the number of brightness spans in segments, group them by brightness level, establish a brightness hierarchy structure and map it to layer coordinates to generate a brightness jump segment map.
Citation Information
Patent Citations
Mobile phone screen defect intelligent detection method based on computer vision
CN117078672A
Screen brightness uniformity detection method and detection equipment
CN118762626A