A method and device for binarizing light point images and a method for correcting LED display screens
By determining the target area in the LED display light point image and using the Log-normal distribution model to calculate the threshold, the inaccurate binarization problem of the Otsu method in complex backgrounds is solved, and more accurate light point segmentation and display correction are achieved.
Patent Information
- Application Number
- CN202111004141.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-30
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2041-08-30
AI Technical Summary
In the existing technology, the Otsu method has a poor effect on the binarization of LED display screen light point images, especially when the background size ratio is very different and the inter-class variance function presents a bimodal or multi-modal state, resulting in poor binarization effect of the light point image, and there are transition pixels between the light point pixels and the background pixels, making it difficult to accurately segment.
The preset target area determination strategy and probability density function model are adopted. The light point image is divided into 3×3 candidate areas, the middle area is selected as the target area, and the probability density distribution of the grayscale value is calculated using the Log-normal distribution model. The light point binarization threshold is determined to accurately distinguish the light point pixels and the pixels between the light points.
The accuracy of the binarization processing of the light point image is improved, ensuring the correct separation of light point pixels and pixels between light points, generating more accurate correction images, and improving the brightness and color correction effect and correction efficiency of the LED display.
Smart Images

Figure CN115731246B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of correction of LED display screens, and in particular to a method and device for binarizing a light point image and a correction method for an LED display screen. Background Art
[0002] The existing marking and extraction of light points in LED display screens is based on the Otsu method. The Otsu method mainly uses a grayscale value threshold (light point binarization threshold) to divide the pixels in the light point image taken by the camera into two categories. The grayscale values below the threshold are background pixels, and the grayscale values greater than the threshold are foreground pixels. However, the problem with the existing technology is that the Otsu method is sensitive to image noise, so it can only perform segmentation processing on a single target. Therefore, when the background size ratio (area) is very different and the inter-class variance function may be bimodal or multimodal, the light point image binarization effect is poor. At the same time, since there are often multiple light points in the light point image, there are more background pixels than foreground pixels, and there are many transition pixels between the light point pixels (foreground pixels) and the background pixels. At this time, after using the Otsu method for binarization, the grayscale value threshold is often too large (too large will cause the light point area extracted after binarization to be too small or some light points not to be marked, such as Figure 1 as shown) or too small (too small will cause adjacent light points to connect to become one light point as shown Figure 2 Therefore, those skilled in the art are in urgent need of finding a new technical solution to solve the above problems. Summary of the Invention
[0003] In response to the above problems, the present invention provides a method and device for binarizing a light point image and a method for correcting an LED display screen, the method comprising:
[0004] Obtain a light point image, and determine a target area consisting of light point pixels and pixels between light points from the light point image according to a preset target area determination strategy;
[0005] According to the preset probability density function model and the grayscale value of each pixel in the target area, the probability density distribution statistics of the grayscale value of the target area are obtained;
[0006] Determine the light point binarization threshold based on the preset threshold determination strategy and probability density distribution statistical data;
[0007] The light point image is binarized according to the light point binarization threshold.
[0008] Furthermore, the preset target area determination strategy includes:
[0009] Divide the light point image into 3×3 areas to be selected;
[0010] The selected area in the middle of the light point image is used as the target area.
[0011] Furthermore, the method further comprises:
[0012] Evaluate multiple probability density function models according to a preset probability density function model evaluation strategy, and obtain the fitting error of each probability density function model respectively;
[0013] The probability density function model with the smallest fitting error is used as the preset probability density function model;
[0014] Among them, the probability density function models include Rayleigh distribution model, Log-normal distribution model, Weibull distribution model and K distribution model.
[0015] Furthermore, multiple probability density function models are evaluated according to a preset probability density function model evaluation strategy, and the fitting error of each probability density function model is obtained respectively, including:
[0016] Obtain a sample light point image, and determine a target area consisting of light point pixels and pixels between light points from the sample light point image according to a target area determination strategy;
[0017] Obtaining a grayscale histogram of the target area of the sample light point image, where the grayscale histogram is used to represent the number of pixels corresponding to each grayscale value in the target area of the sample light point image;
[0018] According to the grayscale histogram, the frequency value corresponding to each grayscale value in the target area of the sample light point image is obtained;
[0019] According to the probability density function corresponding to each probability density function model, the probability density distribution value corresponding to each gray value in the target area of the sample light point image under each probability density function model is calculated;
[0020] According to the fitting error of the formula Calculate the fitting error of each probability density function model, where f i Represents the frequency value corresponding to the gray value i, Represents the probability density distribution value corresponding to the gray value i, and the value range of i is [0,255].
[0021] Furthermore, the probability density function model with the smallest fitting error is the Log-normal distribution model.
[0022] Furthermore, the preset probability density function model is a Log-normal distribution model, and the probability density distribution statistics include the probability density distribution mean, the probability density distribution mode, and the probability density distribution median. According to the preset probability density function model and the grayscale value of each pixel in the target area, the probability density distribution statistics of the grayscale value of the target area are obtained, including:
[0023] According to the formula Calculate the expected value of the grayscale value logarithm where ln x j Represents the grayscale value logarithm of the j-th pixel in the target area. The value range of j is [1, N], where N is the total number of pixels in the target area.
[0024] According to the formula Calculate the variance of the gray value logarithm
[0025] According to the formula Calculate the probability density distribution mean E(X) of the target area;
[0026] According to the formula Calculate the probability density distribution mode (X) of the target area;
[0027] According to the formula Calculate the median (X) of the probability density distribution of the target area.
[0028] Furthermore, according to the preset threshold determination strategy and probability density distribution statistical data, determining the light point binarization threshold includes:
[0029] According to the cumulative distribution function of the standard normal distribution, the cumulative distribution function values corresponding to the mean of the probability density distribution, the median of the probability density distribution, and the mode of the probability density distribution are obtained respectively;
[0030] According to the relationship between the cumulative distribution function value, the number of pixels between light points and the number of pixels on light points, one is selected from the mean, median and mode of the probability density distribution as the light point binarization threshold.
[0031] Furthermore, if the preset probability density function model is a Log-normal distribution model, the mean of the probability density distribution is selected as the light point binarization threshold according to the relationship between the cumulative distribution function value, the number of pixels between light points, and the number of pixels on light points.
[0032] The present invention also provides a method for correcting an LED display screen, characterized in that the method comprises:
[0033] Obtain a light point image of the LED display screen, perform binarization processing on the light point image according to the above light point image binarization method, and generate a corrected image;
[0034] The LED display screen is calibrated according to the calibration image.
[0035] The present invention also provides a device for binarizing a light point image, which includes a target area determination module, a statistics module, a threshold selection module, and a binarization processing module, wherein:
[0036] The target region determination module is connected to the statistical module and is used to obtain the light point image and determine the target region composed of light point pixels and pixels between light points from the light point image according to a preset target region determination strategy;
[0037] The statistical module is connected to the threshold selection module and is used to obtain the probability density distribution statistics of the grayscale value of the target area according to the preset probability density function model and the grayscale value of each pixel in the target area;
[0038] The threshold selection module is connected to the binarization processing module and is used to determine the light point binarization threshold according to the preset threshold determination strategy and probability density distribution statistical data;
[0039] The binarization processing module performs image binarization processing on the light point image according to the light point binarization threshold.
[0040] The light point image binarization method, device and LED display screen correction method provided by the present invention include at least the following beneficial effects: first, according to a preset target area determination strategy, a target area consisting of light point pixels and pixels between light points is determined from the light point image, and the interference of background pixels is removed; then, according to a preset probability density function model and threshold determination strategy, a light point binarization threshold that can distinguish the light point pixels and pixels between light points in the target area is calculated; then, according to the light point binarization threshold, the light point image is binarized, which can more accurately distinguish the light point pixels from the pixels between light points, extract the light point pixels therefrom, and improve the light point image binarization processing effect. The light point binarization method of the present invention is further used to binarize the light point image to generate a correction image, and then perform brightness and chromaticity correction on the LED display screen. This can improve the correction effect of the LED display screen in brightness and chromaticity correction (the original method may miss the corrected light points or add other interfering pixels, resulting in poor correction effect) and correction efficiency (after the light point binarization threshold of the original Otsu method is determined, the light point binarization threshold needs to be manually adjusted). BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 The image obtained after binarization processing when the gray value threshold is too large in the background technology of the present invention;
[0043] Figure 2 The image obtained after binarization processing when the gray value threshold is too small in the background technology of the present invention;
[0044] Figure 3 This is a flow chart of a method for binarizing a light point image in one embodiment of the present invention;
[0045] Figure 4 Schematic diagram of light point image division in one embodiment of the present invention;
[0046] Figure 5 It is the grayscale histogram corresponding to the light point image when the number of jump points is large;
[0047] Figure 6 The grayscale histogram corresponding to the light point image when the number of jump points is small and the light point area occupies a small proportion;
[0048] Figure 7 It is the grayscale histogram corresponding to the light point image when the number of jump points is small and the proportion of light point area is large;
[0049] Figure 8 This is a flowchart of the steps of obtaining the mean, median, and mode of the probability density distribution of the target area according to the Log-normal distribution model in one embodiment of the present invention;
[0050] Figure 9 This is a flow chart of a threshold selection method when the model is a Log-normal distribution model in one embodiment of the present invention;
[0051] Figure 10 The light point image is binarized using the light point image binarization method of the present invention;
[0052] Figure 11 The light point image is binarized using the large law in the existing technology;
[0053] Figure 12 Schematic diagram of a device for binarizing a light point image in one embodiment of the present invention;
[0054] 1-Target area determination module, 2-Statistical module, 3-Threshold selection module, 4-Binarization processing module. DETAILED DESCRIPTION
[0055] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present invention.
[0056] In one embodiment of the present invention, Figure 3 As shown, a method for binarizing a light point image is provided, the method comprising the following steps:
[0057] Step S101: Obtain a light point image, and determine a target area consisting of light point pixels and pixels between light points from the light point image according to a preset target area determination strategy.
[0058] A light point image is an image captured by an industrial camera after the LED display is illuminated. Pixels in the light point image can be divided into three categories: background pixels, light point pixels, and inter-light point pixels. The grayscale values of these three categories are: background pixels are smaller than inter-light point pixels, which are smaller than light point pixels.
[0059] Binarization of the light point image is to extract the light point pixels in the light point image, that is, to remove the interference of background pixels and pixels between light points.
[0060] In this step, a target region consisting of light point pixels and inter-light point pixels is determined from the light point image based on a preset target region determination strategy. This essentially removes background pixel interference. A subsequent step then determines a light point binarization threshold that separates the light point pixels and inter-light point pixels in the target region. This threshold is then used to perform image binarization on the light point image, extracting the light points from the image and producing a corrected image.
[0061] Specifically, in one implementation of this embodiment, the preset target area determination strategy includes:
[0062] The light point image is divided into 3×3 candidate areas, and the candidate area located in the middle of the light point image is used as the target area.
[0063] In order to facilitate technical personnel to understand, Figure 4 As shown in FIG. 1 , a light point image is divided into 3×3 candidate areas, wherein the candidate area numbered 5 is the target area.
[0064] More specifically, the above target area determination strategy is obtained by technicians after analyzing sample light point images.
[0065] The analysis method is as follows: Based on the spatial distribution and grayscale value distribution of the pixels in the sample light point image, the pixels in the sample light point image are divided into background pixels, inter-light point pixels, and light point pixels. The grayscale values of the three types of pixels are related to each other: background pixels are smaller than inter-light point pixels, which are smaller than light point pixels. The grayscale histogram of the sample light point image is then obtained, and the number of jump points of the three types of pixels in the sample light point image and the proportion of the light point area in the entire image are determined based on the grayscale histogram.
[0066] Among them, when the number of jump points is large, the pixels between the light points "disappear" (the pixels between the light points and the background pixels are merged into background pixels), and there are only background pixels and light point pixels in the grayscale histogram, and a spike of background pixels appears (such as Figure 5 When the number of jump points is small and the area occupied by the light point is small, two peaks appear in the grayscale histogram, namely the background pixel and the pixel between the light points, and the background pixel peak is higher than the pixel peak between the light points (as shown in the figure). Figure 6 When the number of jump points is small and the proportion of the light point area is large, two peaks appear in the grayscale histogram: background pixels and pixels between light points, and the peak of pixels between light points is higher than the peak of background pixels (as shown in the figure). Figure 7 shown).
[0067] contrast Figure 5 、 Figure 6 、 Figure 7 It can be found that due to the influence of the number of jump points and the proportion of the light point area, the grayscale histogram varies greatly (the number and height of peaks), making it difficult to determine the corresponding grayscale value range of the background pixels in the grayscale histogram. After comparing and analyzing a large number of sample light point images, technicians found that the middle 1 / 9 of the sample light point image (that is, the candidate area located in the middle of the light point image after the light point image is divided into 3×3 candidate areas mentioned above) contains only pixels between light points and light point pixels. Therefore, after determining to divide the light point image into 3×3 candidate areas, the candidate area located in the middle of the light point image is selected as the target area.
[0068] It should be understood that the above-mentioned method of dividing the light point image into 3×3 candidate areas and selecting the candidate area located in the middle of the light point image as the target area is only one way to determine the target area and is not a limitation of the present invention. The present invention can also use other methods to determine the target area, as long as the determined target area eliminates the interference of background pixels and only contains light point pixels and pixels between light points.
[0069] Step S102: Obtaining probability density distribution statistics of the grayscale value of the target area according to a preset probability density function model and the grayscale value of each pixel in the target area.
[0070] In this embodiment, the preset probability density function model can be a Rayleigh distribution model, a Log-normal distribution model, a Weibull distribution model, or a K distribution model. The present invention is not limited to this. Preferably, in order to minimize the error, the preset probability density function model is a Log-normal distribution model. The probability density distribution statistical data has multiple data, which can specifically include a probability density distribution mean, a probability density distribution median, and a probability density distribution mode. For different probability density function models, the probability density distribution statistical data will be different.
[0071] (1) The probability density function corresponding to the Log-normal distribution model is:
[0072]
[0073] Where x is the pixel grayscale value; μ is the scale parameter, which refers to the mean of ln x; and σ is the shape parameter, which indicates the skewness of the distribution.
[0074] The maximum likelihood estimate of the scale parameter is: where ln x j Represents the grayscale value logarithm of the jth pixel in the target area, where j ranges from [1, N] and N is the total number of pixels in the target area. The maximum likelihood estimate of the shape parameter is:
[0075] (2) The probability density function corresponding to the Rayleigh distribution model is:
[0076]
[0077] Where x is the pixel grayscale value, and σ is the root mean square of the pixel grayscale value, which is used to measure the degree of fluctuation of the peak. The maximum likelihood estimation of its parameters and the estimation based on the second-order moment are both:
[0078] x j Represents the grayscale value of the jth pixel in the target area. The value range of j is [1, N], and N is the total number of pixels in the target area.
[0079] (3) The probability density function corresponding to the Weibull distribution model is:
[0080]
[0081] Among them, x is the pixel grayscale value, q is the scale parameter, and p is the shape parameter.
[0082] The method for estimating its parameters is
[0083] x j Represents the grayscale value of the jth pixel in the target area. The value range of j is [1, N], and N is the total number of pixels in the target area.
[0084] (4) The probability density function corresponding to the K distribution model is:
[0085] Where x is the pixel grayscale value, Γ(υ) is the gamma function, is the υ-1 order second kind modified Bessel function; a is the scale parameter, which represents the mean of the pixel gray value; υ is the shape parameter, which affects the shape of the distribution curve.
[0086] The parameter estimation method is:
[0087]
[0088]
[0089] in,
[0090] x j Represents the grayscale value of the jth pixel in the target area. The value range of j is [1, N], and N is the total number of pixels in the target area.
[0091] Further, such as Figure 8 As shown, if the preset probability density function model is a Log-normal distribution model, and the probability density distribution statistics include the probability density distribution mean, the probability density distribution mode, and the probability density distribution median, then according to the Log-normal distribution model and the grayscale value of each pixel in the target area, obtaining the probability density distribution statistics of the target area includes the following steps:
[0092] Step S1021: According to the formula Calculate the expected value of the grayscale value logarithm where lnx j represents the grayscale value logarithm of the jth pixel in the target area. The value range of j is [1, N], N is the total number of pixels in the target area, x j ∈[0, 255];
[0093] Specifically, in this step, the expected value of the grayscale value logarithm is calculated In order to simplify the calculation, the grayscale histogram of the target area is used (see Figure 5-Figure 7 ), a total of 256 grayscale values from 0 to 255 are counted, and the number of pixels corresponding to each grayscale value i is hist i According to the formula Calculate the frequency value f of each gray value i i , let the value of i be 0, 1, 2,...255 in sequence, so as to obtain the frequency value of each grayscale value.
[0094] After conversion: Therefore, the expected value can be obtained according to the frequency value corresponding to each gray value i
[0095] Step S1022: According to the formula Calculate the variance of the gray value logarithm
[0096] Step S1023: According to the formula Calculate the probability density distribution mean E(X) of the target area;
[0097] Step S1024: According to the formula Calculate the probability density distribution mode (X) of the target area;
[0098] Step S1025: According to the formula Calculate the median (X) of the probability density distribution of the target area.
[0099] Similarly, if the preset probability density function model is other such as Rayleigh distribution model, Weibull distribution model or K distribution model, also like the Log-normal distribution model, according to the preset probability density function model (the probability density function formula corresponding to each probability density function model mentioned above) and the gray value of each pixel in the target area, the probability density distribution statistics of the gray value of the target area are calculated. Further, the probability density distribution statistics may include the probability density distribution mean, the probability density distribution mode and the probability density distribution median, and may also include other statistics such as the probability density distribution variance, etc. The technician can determine which data the probability density distribution statistics include based on the preset probability density function model finally determined, and the present invention is not limited to this.
[0100] Step S103: Determine the light point binarization threshold according to a preset threshold determination strategy and probability density distribution statistical data.
[0101] As mentioned above, the probability density distribution statistics include multiple data points, specifically the probability density distribution mean, the probability density distribution median, and the probability density distribution mode. In this step, the cumulative distribution function value corresponding to each data point in the probability density distribution statistics can be obtained based on the cumulative distribution function of the standard normal distribution. Based on this cumulative distribution function value, a data point is determined as the light point binarization threshold.
[0102] Specifically, we can use the existing standard normal distribution cumulative probability function table to find the corresponding cumulative distribution function value based on each probability density distribution statistical data (for example, the probability density distribution mean, probability density distribution median, and probability density distribution mode). Then, combining the corresponding cumulative distribution function value of each probability density distribution statistical data with the relationship between the number of pixels between light points and the number of light point pixels, we can determine a probability density distribution statistical data as the light point binarization threshold.
[0103] In one implementation, Figure 9 As shown, when the preset probability density function model is the Log-normal distribution model, the probability density distribution statistics include the probability density distribution mean, the probability density distribution mode, and the probability density distribution median. In step S103, the threshold value for determining the light point binarization according to the preset threshold determination strategy and the probability density distribution statistics includes:
[0104] Step S1031: According to the cumulative distribution function of the standard normal distribution, the cumulative distribution function values corresponding to the probability density distribution mean, the probability density distribution median and the probability density distribution mode are obtained respectively.
[0105] More specifically, the cumulative distribution function value is represented by F(lnX). Let the mean, median and mode of the probability density distribution be X, and lnX is calculated. For each lnX, there is a corresponding cumulative distribution function value in the standard normal distribution cumulative probability function table.
[0106] Set the parameter σ to 1 and μ to 0 to determine the mean The corresponding cumulative distribution function value That is 69.15%, the majority The corresponding cumulative distribution function value is F(-σ)=F(-1), which is 15.87%. The corresponding cumulative distribution function value is F(0) is 50%.
[0107] Step S1032: According to the relationship between the cumulative distribution function value, the number of pixels between light points, and the number of pixels on a light point, one of the probability density distribution mean, the probability density distribution median, and the probability density distribution mode is selected as the light point binarization threshold.
[0108] The relationship between the number of pixels between light points and the number of light point pixels is: the number of light point pixels is smaller than the number of pixels between light points.
[0109] The cumulative distribution function value corresponding to the mode is F(-σ)=F(-1), which is 15.87%. That is, when it is used as the light point binarization threshold, 84.13% of the pixels greater than its value will be identified as light points. This does not meet the requirement that the number of light point pixels is less than the number of pixels between light points. Therefore, the mode cannot be used as the light point binarization threshold.
[0110] The cumulative distribution function corresponding to the median is F(0), which is 50%. If it is used as the light point binarization threshold, 50% of the pixels greater than its value will be identified as light points. This is feasible in theory (the brightness of the center of each light point is the same and the brightness decays in the same way to the surrounding area). However, the actual situation deviates from the theory, so the median cannot be used as the light point binarization threshold.
[0111] The cumulative distribution function corresponding to the mean is F(σ / 2), which is 69.15%. It will be used as the light point binarization threshold, and 30.85% of the pixels greater than its value will be identified as light points. This meets the requirement that the number of light point pixels is less than the number of pixels between light points, and the light point pixels can be separated from the pixels between light points. In addition, F(σ / 2) will automatically adjust as σ changes. Therefore, if the preset probability density function model is the Log-normal distribution model, the probability density distribution mean is selected as the light point binarization threshold based on the relationship between the cumulative distribution function value, the number of pixels between light points, and the number of light point pixels.
[0112] Step S104: performing image binarization processing on the light point image according to the light point binarization threshold.
[0113] Specifically, in this step, the light point image is binarized according to the light point binarization threshold, that is, the light point pixels can be identified, and the pixels with grayscale values greater than the light point binarization threshold are identified as light points, thereby generating a corrected image.
[0114] like Figure 10 As shown in FIG, the light point image (ie, the corrected image) is obtained after binarization processing using the method in this embodiment. Figure 11 As shown in FIG. 1 , the light point image is obtained after binarization processing using the general method in the prior art. It can be found that the binarization processing using the method in this embodiment has a better processing effect and is more accurate in light point recognition.
[0115] The light point image binarization method provided in the present invention first determines the target area composed of light point pixels and pixels between light points from the light point image according to a preset target area determination strategy, removes the interference of background pixels, and then calculates the light point binarization threshold that can distinguish the light point pixels and pixels between light points in the target area according to a preset probability density function model and threshold determination strategy. Subsequently, the light point image is binarized according to the light point binarization threshold, which can more accurately distinguish the light point pixels from the pixels between light points, extract the light point pixels therefrom, and improve the light point image binarization processing effect.
[0116] In yet another embodiment of the present invention, the method for binarizing a light point image further includes: before performing steps S101 to S104 , determining a preset probability density function model according to a preset probability density function model evaluation strategy.
[0117] The specific determination method is: evaluate multiple probability density function models according to a preset probability density function model evaluation strategy, and obtain the fitting error of each probability density function model respectively; take the probability density function model with the smallest fitting error as the preset probability density function model; wherein, the probability density function model includes Rayleigh distribution model, Log-normal distribution model, Weibull distribution model and K distribution model.
[0118] Specifically, in this embodiment, multiple probability density function models are evaluated according to a preset probability density function model evaluation strategy, and the fitting error of each probability density function model is obtained respectively, including:
[0119] A sample light point image is obtained, and a target area consisting of light point pixels and pixels between light points is determined from the sample light point image according to a target area determination strategy.
[0120] The target area determination strategy mentioned in this embodiment is the same as that in step S101 and will not be described in detail here.
[0121] Get the grayscale histogram of the target area of the sample light point image. The grayscale histogram is used to represent the number of pixels corresponding to each grayscale value in the target area of the sample light point image (see Figure 5 、 Figure 6 、 Figure 7 );
[0122] According to the grayscale histogram, the frequency value corresponding to each grayscale value in the target area of the sample light point image is obtained;
[0123] Specifically, according to the formula Calculate the frequency value f of each gray value i i, let the value of i be 0, 1, 2, ···255 in sequence, so as to obtain the frequency value of each gray value, where hist i Indicates the number of pixels hist corresponding to each gray value i in the target area i .
[0124] According to the probability density function corresponding to each probability density function model, the probability density distribution value corresponding to each gray value in the target area of the sample light point image under each probability density function model is calculated;
[0125] Specifically, each grayscale value i is substituted into the probability density function corresponding to each probability density function model, thereby obtaining the probability density distribution value corresponding to each grayscale value i under each probability density function model.
[0126] Taking the Log-normal distribution model as an example, the expression of the probability density function corresponding to the Log-normal distribution model is: Substitute each grayscale value i as x into the probability density function corresponding to the Log-normal distribution model to calculate the corresponding probability density distribution value f(x).
[0127] Similarly, other models such as Rayleigh distribution model, Weibull distribution model and K distribution model perform the same operation.
[0128] According to the fitting error of the formula Calculate the fitting error of each probability density function model, where f i Represents the frequency value corresponding to the gray value i, Represents the probability density distribution value corresponding to the gray value i, and the value range of i is [0,255].
[0129] For example, when calculating the fitting error of the Log-normal distribution model, the frequency value f corresponding to each gray value i is i And the probability density distribution value corresponding to each gray value i in the Log-normal distribution model Substituting this into the above fitting error formula, we can obtain the fitting error for the Log-normal distribution model. The fitting error calculation process for other models is the same as that for the Log-normal distribution model and will not be elaborated on here.
[0130] Furthermore, the probability density function model with the smallest fitting error is the Log-normal distribution model, and the Log-normal distribution model is used as the preset probability density function model.
[0131] In one embodiment of the present invention, the present invention also provides a method for correcting an LED display screen, characterized in that the method includes: obtaining a lamp point image of the LED display screen, binarizing the lamp point image according to the above-mentioned lamp point image binarization method, generating a correction image, and correcting the LED display screen according to the correction image.
[0132] The light point binarization method of the present invention is used to perform binarization processing on the light point image to generate a corrected image, and then perform brightness and chromaticity correction on the LED display screen, thereby improving the correction effect of the LED display screen in brightness and chromaticity correction (the original method may miss the corrected light points or add other interfering pixels, resulting in poor correction effect) and correction efficiency (after the light point binarization threshold of the original Otsu method is determined, the light point binarization threshold needs to be manually adjusted).
[0133] In one embodiment of the present invention, the present invention further provides a light point image binarization device, such as Figure 12 As shown, the device includes a target area determination module 1, a statistics module 2, a threshold selection module 3, and a binarization processing module 4, wherein:
[0134] The target region determination module 1 is connected to the statistical module 2 and is used to obtain the light point image and determine the target region consisting of the light point pixels and the pixels between the light points from the light point image according to the preset target region determination strategy;
[0135] The statistical module 2 is connected to the threshold selection module 3 and is used to obtain the probability density distribution statistics of the grayscale value of the target area according to the preset probability density function model and the grayscale value of each pixel in the target area;
[0136] The threshold selection module 3 is connected to the binarization processing module 4 and is used to determine the light point binarization threshold according to the preset threshold determination strategy and probability density distribution statistics;
[0137] The binarization processing module 4 performs image binarization processing on the light point image according to the light point binarization threshold.
[0138] The present invention provides a method, device and LED display screen correction method for a light point image binarization. First, according to a preset target area determination strategy, a target area consisting of light point pixels and pixels between light points is determined from a light point image, and interference from background pixels is removed. Subsequently, according to a preset probability density function model and a threshold determination strategy, a light point binarization threshold value capable of distinguishing light point pixels and pixels between light points in the target area is calculated. Subsequently, the light point image is binarized according to the light point binarization threshold value, which can more accurately distinguish light point pixels from pixels between light points, extract light point pixels from them, and improve the effect of the light point image binarization. Further, the light point binarization method of the present invention is used to generate a corrected image after binarizing the light point image to perform brightness and chromaticity correction on the LED display screen, which can improve the correction effect of the LED display screen in brightness and chromaticity correction (the original method may miss the corrected light point or add other interfering pixels, resulting in poor correction effect) and correction efficiency (after the light point binarization threshold value of the original Otsu method is determined, the light point binarization threshold value needs to be manually adjusted).
[0139] The terms and expressions used in this specification are for illustrative purposes only and are not intended to be limiting. Those skilled in the art will appreciate that various changes may be made to the details of the embodiments described above without departing from the basic principles of the disclosed embodiments. Therefore, the scope of the present invention is determined solely by the claims. In the claims, unless otherwise indicated, all terms are to be interpreted in their broadest reasonable sense.
Claims
1. A method for binarizing a light point image, characterized in that: The method comprises: Obtaining a light point image, and determining a target area consisting of light point pixels and pixels between light points from the light point image according to a preset target area determination strategy; Obtaining probability density distribution statistics of the grayscale values of the target area according to a preset probability density function model and the grayscale values of each pixel in the target area; Determine the light point binarization threshold according to the preset threshold determination strategy and the probability density distribution statistical data; performing image binarization processing on the light point image according to the light point binarization threshold; The method further includes: evaluating multiple probability density function models according to a preset probability density function model evaluation strategy to obtain the fitting error of each probability density function model; and using the probability density function model with the smallest fitting error as the preset probability density function model; wherein the probability density function model includes a Rayleigh distribution model, a Log-normal distribution model, a Weibull distribution model, and a K distribution model; The method of evaluating multiple probability density function models according to a preset probability density function model evaluation strategy and obtaining the fitting error of each probability density function model respectively includes: obtaining a sample light point image, and determining a target area composed of light point pixels and pixels between light points from the sample light point image according to the target area determination strategy; obtaining a grayscale histogram of the target area of the sample light point image, wherein the grayscale histogram is used to represent the number of pixels corresponding to each grayscale value in the target area of the sample light point image; obtaining a frequency value corresponding to each grayscale value in the target area of the sample light point image according to the grayscale histogram; calculating the probability density distribution value corresponding to each grayscale value in each probability density function model in the target area of the sample light point image according to the probability density function corresponding to each probability density function model; and fitting the error according to the formula Calculate the fitting error of each probability density function model, where f i Represents the frequency value corresponding to the gray value i, Represents the probability density distribution value corresponding to the gray value i, and the value range of i is [0,255].
2. The method for binarizing a light point image according to claim 1, wherein: The preset target area determination strategy includes: Divide the light point image into 3×3 areas to be selected; The area to be selected located in the middle of the light point image is used as the target area.
3. The method for binarizing a light point image according to claim 1, wherein: The probability density function model with the smallest fitting error is the Log-normal distribution model.
4. The method for binarizing a light point image according to claim 1, wherein: The preset probability density function model is a Log-normal distribution model. The probability density distribution statistics include a probability density distribution mean, a probability density distribution mode, and a probability density distribution median. The probability density distribution statistics of the grayscale value of the target area obtained according to the preset probability density function model and the grayscale value of each pixel in the target area include: According to the formula Calculate the expected value of the grayscale value logarithm where lnx j represents the grayscale value logarithm of the j-th pixel in the target area, where j is in the range [1, N], and N is the total number of pixels in the target area; According to the formula Calculate the variance of the gray value logarithm According to the formula Calculate the probability density distribution mean E(X) of the target area; According to the formula Calculate the probability density distribution mode mode (X) of the target area; According to the formula The median (X) of the probability density distribution of the target area is calculated.
5. The method for binarizing a light point image according to claim 4, wherein: Determining the light point binarization threshold according to the preset threshold determination strategy and the probability density distribution statistical data includes: According to the cumulative distribution function of the standard normal distribution, respectively obtain the cumulative distribution function values corresponding to the probability density distribution mean, the probability density distribution median and the probability density distribution mode; According to the relationship between the cumulative distribution function value, the number of pixels between light points and the number of pixels of light points, one is selected from the probability density distribution mean, the probability density distribution median and the probability density distribution mode as the light point binarization threshold.
6. The method for binarizing a light point image according to claim 5, wherein: If the preset probability density function model is a Log-normal distribution model, the probability density distribution mean is selected as the light point binarization threshold according to the relationship between the cumulative distribution function value, the number of pixels between light points, and the number of light point pixels.
7. A method for calibrating an LED display screen, characterized in that: The method comprises: Acquire a light point image of the LED display screen, and perform binarization processing on the light point image according to the light point image binarization method according to any one of claims 1 to 6 to generate a corrected image; The LED display screen is calibrated according to the calibration image.
8. A device for binarizing a light point image, characterized in that: The device includes a target area determination module, a statistics module, a threshold selection module, and a binarization processing module, wherein: The target area determination module is connected to the statistical module and is used to obtain a light point image and determine a target area consisting of light point pixels and pixels between light points from the light point image according to a preset target area determination strategy; The statistical module is connected to the threshold selection module and is used to obtain probability density distribution statistics of the grayscale value of the target area based on a preset probability density function model and the grayscale value of each pixel in the target area; The threshold selection module is connected to the binarization processing module and is used to determine the light point binarization threshold according to a preset threshold determination strategy and the probability density distribution statistical data; The binarization processing module performs image binarization processing on the light point image according to the light point binarization threshold; The method further includes: evaluating multiple probability density function models according to a preset probability density function model evaluation strategy to obtain the fitting error of each probability density function model; and using the probability density function model with the smallest fitting error as the preset probability density function model; wherein the probability density function model includes a Rayleigh distribution model, a Log-normal distribution model, a Weibull distribution model, and a K distribution model; Obtain a sample light point image, and determine a target area consisting of light point pixels and pixels between light points from the sample light point image according to the target area determination strategy; obtain a grayscale histogram of the target area of the sample light point image, wherein the grayscale histogram is used to represent the number of pixels corresponding to each grayscale value in the target area of the sample light point image; obtain a frequency value corresponding to each grayscale value in the target area of the sample light point image according to the grayscale histogram; calculate the probability density distribution value corresponding to each grayscale value in the target area of the sample light point image under each probability density function model according to the probability density function corresponding to each probability density function model; fit the error according to the formula Calculate the fitting error of each probability density function model, where f i Represents the frequency value corresponding to the gray value i, Represents the probability density distribution value corresponding to the gray value i, and the value range of i is [0,255].
Citation Information
Patent Citations
Binaryzation method and device for stacking five-distance detection, equipment and storage medium
CN110163147A
Illumination non-uniform image threshold segmentation method based on brightness balance
CN110443807A