CN112884681B - Image shadow processing method and device, computer equipment and storage medium - Google Patents

Image shadow processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112884681B
CN112884681B CN202110463253.2A CN202110463253A CN112884681B CN 112884681 B CN112884681 B CN 112884681B CN 202110463253 A CN202110463253 A CN 202110463253A CN 112884681 B CN112884681 B CN 112884681B
Authority
CN
China
Prior art keywords
abnormal
point
brightness value
target
lamp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110463253.2A
Other languages
Chinese (zh)
Other versions
CN112884681A (en
Inventor
何志民
王利文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Colorlight Cloud Technology Co Ltd
Original Assignee
Colorlight Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Colorlight Cloud Technology Co Ltd filed Critical Colorlight Cloud Technology Co Ltd
Priority to CN202110463253.2A priority Critical patent/CN112884681B/en
Publication of CN112884681A publication Critical patent/CN112884681A/en
Application granted granted Critical
Publication of CN112884681B publication Critical patent/CN112884681B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • G06T5/70
    • G06T5/77

Abstract

The application relates to an image shadow processing method, an image shadow processing device, computer equipment and a storage medium. The method comprises the following steps: acquiring the original brightness value of each lamp point in the LED box image; determining abnormal lamp points with original brightness values exceeding the brightness value range from the lamp points; acquiring position information of the abnormal lamp points, and determining target lamp points currently covered by a preset convolution template in the LED box body image according to the position information; performing convolution smoothing processing on the original brightness value of the target lamp point currently covered by the preset convolution template in the LED box body image to obtain a brightness correction coefficient of the abnormal lamp point; and determining a target brightness value of the abnormal light point according to the brightness correction coefficient and the original brightness value of the abnormal light point, wherein the target brightness value is used as the brightness value of the abnormal light point after shadow is removed. By adopting the method, the accuracy of the brightness correction coefficient can be ensured, and the influence of a dark cluster on the correction effect of the LED screen, which is caused by the correction error of the camera lens, is eliminated.

Description

Image shadow processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of LED correction technologies, and in particular, to an image shadow processing method and apparatus, a computer device, and a storage medium.
Background
The screen correction is an important link in the production process of the LED display screen, the brightness correction is carried out on the LED display screen at present, and generally, a camera is used for shooting an image of the LED screen, and then the shot image is used for correcting the LED display screen.
However, in this correction method, when the camera and the lens are corrected before shipping, there may be a correction error, which may cause a phenomenon of uneven imaging of the captured screen image, for example, a dark blob (i.e., a vignetting and a camera vignetting) that is approximately circular or annular appears in the captured screen image. The brightness correction needs to analyze the brightness value of each lamp point in the LED screen, so the brightness correction of the LED screen by using the screen image containing the dark clusters will affect the correction effect of the LED screen.
Disclosure of Invention
Based on this, it is necessary to provide an image shading processing method, apparatus, computer device and storage medium for solving the technical problem that dark clusters occurring due to correction errors of a camera lens affect the correction effect on an LED screen in the above brightness correction method.
A method of image shading, the method comprising:
acquiring the original brightness value of each lamp point in the LED box image;
determining abnormal lamp points with original brightness values exceeding the brightness value range from the lamp points;
acquiring position information of the abnormal lamp points, and determining target lamp points currently covered by a preset convolution template in the LED box body image according to the position information; the preset convolution template is used for covering a target lamp point in the LED box image at present, wherein the target lamp point is a part of lamp points after the abnormal lamp points are removed from all the lamp points;
performing convolution smoothing processing on the original brightness value of the target lamp point currently covered by the preset convolution template in the LED box body image to obtain a brightness correction coefficient of the abnormal lamp point;
and determining a target brightness value of the abnormal light point according to the brightness correction coefficient and the original brightness value of the abnormal light point, wherein the target brightness value is used as the brightness value of the abnormal light point after shadow is removed.
In one embodiment, the determining, from the plurality of lamp points, an abnormal lamp point whose original brightness value exceeds the brightness value range includes:
acquiring the mean value and the mean square error of the original brightness value of each lamp point;
determining a first abnormal brightness value threshold and a second abnormal brightness value threshold according to the mean value and the mean square error;
and taking the lamp points with the original brightness values larger than the first abnormal brightness value threshold value or the original brightness values smaller than the second abnormal brightness value threshold value as abnormal lamp points.
In one embodiment, the performing convolution smoothing processing on the original brightness value of the target light point currently covered by the preset convolution template in the LED box image to obtain the brightness correction coefficient of the abnormal light point includes:
acquiring relative position information of the target lamp point relative to the abnormal lamp point, and acquiring a weight value of the target lamp point according to the relative position information of the target lamp point and the position information of the abnormal lamp point;
and acquiring a brightness correction coefficient of the abnormal lamp point according to the weight value and the original brightness value of the target lamp point.
In one embodiment, the obtaining the weight value of the target lamp point according to the relative position information of the target lamp point and the position information of the abnormal lamp point includes:
obtaining a weight model; the weight model is constructed based on a weight kernel function for determining the weight, and the relational expression of the weight kernel function is
Figure 683920DEST_PATH_IMAGE001
(ii) a Wherein (i, j) represents position information of the abnormal lamp point, and (p, q) represents relative position information of the target lamp point with respect to the abnormal lamp point;
and inputting the relative position information of the target lamp point and the position information of the abnormal lamp point into the weight model to obtain the weight value of the target lamp point.
In one embodiment, the obtaining the luminance correction coefficient of the abnormal light point according to the weight value and the original luminance value of the target light point includes:
according to the weight value of each target lamp point, carrying out weighting processing on the original brightness value of each target lamp point to obtain the weighted brightness value of each target lamp point;
obtaining a total weighted brightness value according to the weighted brightness value of each target lamp point;
and acquiring the accumulated sum of the weights of the target lamp points, and taking the ratio of the total weighted brightness value to the accumulated sum of the weights as a brightness correction coefficient of the abnormal lamp points.
In one embodiment, the determining the target brightness value of the abnormal light point according to the brightness correction coefficient and the original brightness value of the abnormal light point includes:
normalizing the brightness correction coefficient of the abnormal lamp point to obtain a normalized brightness correction coefficient;
and determining the target brightness value of the abnormal light point according to the normalized brightness correction coefficient and the original brightness value of the abnormal light point.
In one embodiment, the determining the target brightness value of the abnormal light point according to the normalized brightness correction coefficient and the original brightness value of the abnormal light point includes:
and acquiring the ratio of the original brightness value of the abnormal lamp point to the normalized brightness correction coefficient of the abnormal lamp point, and taking the ratio as the target brightness value of the abnormal lamp point.
An image shading processing apparatus, the apparatus comprising:
the original brightness value acquisition module is used for acquiring the original brightness value of each lamp point in the LED box image;
the abnormal lamp point determining module is used for determining the abnormal lamp points of which the original brightness values exceed the brightness value range from the lamp points;
the target lamp point determining module is used for acquiring the position information of the abnormal lamp points and determining the target lamp points currently covered by the preset convolution template in the LED box body image according to the position information; the preset convolution template is used for covering a target lamp point in the LED box image at present, wherein the target lamp point is a part of lamp points after the abnormal lamp points are removed from all the lamp points;
the correction coefficient determining module is used for performing convolution smoothing processing on the original brightness value of the target lamp point currently covered by the preset convolution template to obtain the brightness correction coefficient of the abnormal lamp point;
and the target brightness value determining module is used for determining the target brightness value of the abnormal light point according to the brightness correction coefficient and the original brightness value of the abnormal light point, and the target brightness value is used as the brightness value of the abnormal light point after shadow is removed.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring the original brightness value of each lamp point in the LED box image;
determining abnormal lamp points with original brightness values exceeding the brightness value range from the lamp points;
acquiring position information of the abnormal lamp points, and determining target lamp points currently covered by a preset convolution template in the LED box body image according to the position information; the preset convolution template is used for covering a target lamp point in the LED box image at present, wherein the target lamp point is a part of lamp points after the abnormal lamp points are removed from all the lamp points;
performing convolution smoothing processing on the original brightness value of the target lamp point currently covered by the preset convolution template in the LED box body image to obtain a brightness correction coefficient of the abnormal lamp point;
and determining a target brightness value of the abnormal light point according to the brightness correction coefficient and the original brightness value of the abnormal light point, wherein the target brightness value is used as the brightness value of the abnormal light point after shadow is removed.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring the original brightness value of each lamp point in the LED box image;
determining abnormal lamp points with original brightness values exceeding the brightness value range from the lamp points;
acquiring position information of the abnormal lamp points, and determining target lamp points currently covered by a preset convolution template in the LED box body image according to the position information; the preset convolution template is used for covering a target lamp point in the LED box image at present, wherein the target lamp point is a part of lamp points after the abnormal lamp points are removed from all the lamp points;
performing convolution smoothing processing on the original brightness value of the target lamp point currently covered by the preset convolution template in the LED box body image to obtain a brightness correction coefficient of the abnormal lamp point;
and determining a target brightness value of the abnormal light point according to the brightness correction coefficient and the original brightness value of the abnormal light point, wherein the target brightness value is used as the brightness value of the abnormal light point after shadow is removed.
According to the image shadow processing method, the image shadow processing device, the computer equipment and the storage medium, in the single-box correction process, after the original brightness value of each lamp point in the LED box image is obtained, the abnormal lamp point is determined from each lamp point according to the original brightness value, then the target lamp point currently covered by the preset convolution template in the LED box image is determined according to the position information of the abnormal lamp point, then the convolution smoothing processing is carried out on the original brightness value of the target lamp point currently covered by the preset convolution template in the LED box image, the brightness correction coefficient of the abnormal lamp point is obtained, and finally the target brightness value of the abnormal lamp point is determined according to the brightness correction coefficient and the original brightness value of the abnormal lamp point and is used as the brightness value of the abnormal lamp point after the shadow is removed. According to the method, the convolution template is adopted to carry out convolution smoothing on the original brightness values of the target light points near the abnormal light points, the brightness correction coefficient is determined, the brightness values of the abnormal light points are corrected, the accuracy of the brightness correction coefficient is ensured, and the influence of a dark cluster caused by the correction error of a camera lens on the correction effect of the LED screen is eliminated.
Drawings
FIG. 1 is a diagram illustrating an exemplary embodiment of a shadow processing method;
FIG. 2 is a schematic diagram illustrating the convolution smoothing process using a convolution template according to an embodiment;
FIG. 3 is a flowchart illustrating a luminance correction coefficient obtaining step according to an embodiment;
FIG. 4 is a flowchart illustrating an image shading processing method according to another embodiment;
FIG. 5 is a schematic flowchart of an overall image shading processing method in another embodiment;
FIG. 6 is a block diagram showing the configuration of an image shading processing apparatus according to an embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, an image shadow processing method is provided, and this embodiment is illustrated by applying the method to a terminal, and it is to be understood that the method may also be applied to a server, and may also be applied to a system including a terminal and a server, and is implemented by interaction between the terminal and the server. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers. In this embodiment, the method includes the steps of:
and S102, acquiring the original brightness value of each lamp point in the LED box image.
The LED display screen comprises a plurality of LED boxes, wherein the LED boxes are components of the LED display screen, and one LED display screen can be composed of a plurality of LED boxes.
In the specific implementation, in the process of performing single-box correction on the LED display screen, an image shooting device (such as a camera) is used to shoot an image of the LED box, the correction device is used to perform data acquisition on the image of the LED box, the original brightness value and the index (i.e., position information) of each light point in the image of the LED box are obtained, and the obtained original brightness value and the obtained position information are sent to the terminal.
And step S104, determining abnormal light points with the original brightness values exceeding the brightness value range from the light points.
Wherein, the brightness value range is the brightness value range of the normal lamp point.
In specific implementation, after the original brightness value of each lamp point in the image of the LED box is obtained, a brightness value range for determining whether the lamp point is abnormal is determined according to the original brightness value of each lamp point, and then an abnormal lamp point whose original brightness value exceeds the brightness value range is determined from each lamp point.
More specifically, the luminance value range may be determined by a first abnormal luminance value threshold and a second abnormal luminance value threshold, where the first abnormal luminance value threshold is greater than the second abnormal luminance value threshold, the luminance value range may be expressed as: when the brightness value of a certain lamp point is smaller than the first abnormal brightness value threshold and larger than the second abnormal brightness value threshold, the lamp point is determined to be a normal lamp point. Therefore, the principle of judging the abnormal lamp point can be as follows: when the brightness value of a certain lamp point is larger than the first abnormal brightness value threshold value or smaller than the second abnormal brightness value threshold value, the lamp point is judged to be an abnormal lamp point.
Step S106, acquiring position information of the abnormal lamp points, and determining the target lamp points currently covered by the preset convolution template in the LED box body image according to the position information; the preset convolution template currently covers a target lamp point in the LED box body image, wherein the target lamp point is a part of lamp points obtained by removing abnormal lamp points from all the lamp points.
The convolution template may be a convolution template of 5 × 5, for example, referring to fig. 2, 25 squares shown in the black-and-bold frame 20 of fig. 2 may represent the convolution template of 5 × 5, each square included in the area 22 may represent a position of each light point before convolution, a numerical value of each position may represent an original brightness value of each light point, each square included in the area 24 may represent a corresponding position of each light point after convolution, and a numerical value of the corresponding position represents a brightness correction coefficient.
In a specific implementation, the processed abnormal light point is located at the center of the preset convolution template, and therefore before calculating the luminance correction coefficient of the abnormal light point, the position information of the abnormal light point needs to be acquired, all the light points currently covered by the convolution template in the LED box image are determined by taking the position information as the center, and then the identified abnormal light point is removed from the light points covered by the convolution template, so as to obtain each target light point currently covered by the convolution template, for example, in the leftmost schematic diagram of fig. 2, if the light point at position 1 is the abnormal light point, the position 1 is taken as the center, and the abnormal light point in each light point currently covered by the convolution template of 5 × 5 is removed, so as to obtain a plurality of target light points currently covered by the convolution template of 5 × 5.
And S108, performing convolution smoothing on the original brightness value of the target lamp point currently covered by the preset convolution template in the LED box image to obtain the brightness correction coefficient of the abnormal lamp point.
The brightness correction coefficient is used for correcting the brightness value of the abnormal lamp point shielded by the dark cluster.
In the specific implementation, the convolution process is a process of performing linear transformation and mapping at each position of an image to a new value, after a preset convolution template is determined for a target lamp point currently covered in an LED box image, the relative position information of each target lamp point relative to an abnormal lamp point can be determined according to the size of the convolution template, the weight value of each target lamp point is calculated according to the relative position information of each target lamp point and the position information of the abnormal lamp point, and then the brightness correction coefficient of the abnormal lamp point at the central position is determined according to the original brightness value and the weight value of each target lamp point.
More specifically, the original brightness value of each target lamp point and the corresponding weight value may be weighted and summed respectively to obtain a total weighted brightness value, and a ratio of the total weighted brightness value to the sum of the weight values of each target lamp point is used as a brightness correction coefficient of the abnormal lamp point.
Furthermore, each abnormal light point in the image of the LED box body can be processed point by adopting a preset convolution template to obtain the brightness correction coefficient of each abnormal light point, a shadow model for eliminating lens shadow is formed by the brightness correction coefficient of each abnormal light point, and the shadow model can be directly applied to the LED box body shot by the same camera to eliminate the shadow.
Further, in order to improve the accuracy of the shadow model, the same camera may be used to take images of a plurality of LED boxes, for example, if the number of collected boxes is less than a set value (e.g. 10), the correction device may be repeatedly used to collect data, the steps from step S102 to step S108 may be repeatedly executed to obtain a plurality of shadow models, for each abnormal light point, the average value of the luminance correction coefficients in each shadow model is calculated, the finally obtained shadow model is used as the target shadow model, and the shadow elimination is performed on the LED boxes subsequently taken by the same camera.
Step S110, determining a target brightness value of the abnormal light point according to the brightness correction coefficient and the original brightness value of the abnormal light point, and taking the target brightness value as the brightness value of the abnormal light point after the shadow is removed.
In the specific implementation, after the brightness correction coefficient of each abnormal light point is obtained, in order to avoid a large difference between the brightness value of the LED box after the shadow is removed and the brightness value of the normal light point, normalization processing needs to be performed on the brightness correction coefficient of each abnormal light point, and a ratio of an original brightness value of the abnormal light point to the normalized brightness correction coefficient is used as a target brightness value of the abnormal light point, that is, the brightness value of the abnormal light point after the shadow is removed.
In the image shadow processing method, in the single-box correction process, after the original brightness value of each lamp point in the LED box image is obtained, the abnormal lamp point is determined from each lamp point according to the original brightness value, then the target lamp point currently covered by the preset convolution template in the LED box image is determined according to the position information of the abnormal lamp point, then the convolution smoothing processing is carried out on the original brightness value of the target lamp point currently covered by the preset convolution template in the LED box image, the brightness correction coefficient of the abnormal lamp point is obtained, and finally the target brightness value of the abnormal lamp point is determined according to the brightness correction coefficient and the original brightness value of the abnormal lamp point and is used as the brightness value of the abnormal lamp point after the shadow is removed. According to the method, the convolution template is adopted to carry out convolution smoothing on the original brightness values of the target light points near the abnormal light points, the brightness correction coefficient is determined, the brightness values of the abnormal light points are corrected, the accuracy of the brightness correction coefficient is ensured, and the influence of a dark cluster caused by the correction error of a camera lens on the correction effect of the LED screen is eliminated.
In an embodiment, the step S104 specifically includes: obtaining the mean value and the mean square error of the original brightness value of each lamp point; determining a first abnormal brightness value threshold value and a second abnormal brightness value threshold value according to the mean value and the mean square error; and taking the lamp points of which the original brightness values are larger than the first abnormal brightness value threshold value or the original brightness values are smaller than the second abnormal brightness value threshold value as the abnormal lamp points.
In a specific implementation, the mean value of the original brightness values of the respective lamp points may be calculated first, then the mean square error may be calculated according to a mathematical relation between the mean value and the mean square error (i.e., a standard deviation), the sum of the mean value and a set multiple (e.g., 3 times) of the mean square error may be obtained as a first abnormal brightness value threshold, and the difference between the mean value and the set multiple (e.g., 3 times) of the mean square error may be obtained as a second abnormal brightness value threshold.
For example, if the mean value of the original luminance values of the respective lamp points is mean, that is, the mean square error is std, the relation of the first abnormal luminance value threshold may be represented as mean +3 std, and the relation of the second abnormal luminance value threshold may be represented as mean-3 std. And if the brightness value of a certain lamp point is > mean +3 std or < mean-3 std, judging the lamp point as an abnormal lamp point.
In this embodiment, the first abnormal brightness value threshold and the second abnormal brightness value threshold are determined by the mean value and the mean square error of the original brightness values of the respective lamp points, and the abnormal lamp points are identified according to the first abnormal brightness value threshold and the second abnormal brightness value threshold, so that the accuracy of the identification result of the abnormal lamp points is improved.
In an embodiment, as shown in fig. 3, the step S108 specifically includes:
step S302, acquiring relative position information of each target lamp point currently covered by a preset convolution template in an LED box image relative to an abnormal lamp point, and acquiring a weight value of the target lamp point according to the relative position information of the target lamp point and the position information of the abnormal lamp point;
step S304, acquiring a brightness correction coefficient of the abnormal light point according to the weight value and the original brightness value of the target light point.
It can be understood that, since the convolution template is fixed, and the abnormal light point of the luminance correction coefficient to be determined is located at the center of the convolution template, the distance between each target light point and the abnormal light point in the convolution template is fixed, that is, the relative position information of each target light point is fixed, and therefore, the weight value of each target light point is also a fixed value, that is, the weight value of each target light point covered by the same convolution template is a fixed value.
In a specific implementation, for a convolution template of 5 × 5, if (p, q) represents the relative position of a target lamp point and (i, j) represents the position of an abnormal lamp point, p ∈ [ i-2, i +2], q ∈ [ j-2, j +2] exist, where i-2 represents a lamp point in a first column counted from left to right in the convolution template, i +2 represents a lamp point in a fifth column counted from left to right in the convolution template, j-2 represents a lamp point in a first row counted from top to bottom in the convolution template, and j +2 represents a lamp point in a fifth row counted from top to bottom in the convolution template. After the position information of the abnormal lamp point is obtained, the relative position information of each target lamp point can be determined. After the weight model is obtained, the relative position information of the abnormal lamp points and the position information of the target lamp points can be input into the weight model, so that the weight value of each target lamp point is obtained. And then weighting and summing the original brightness values of the target lamp points respectively through corresponding weight values to obtain a total weighted brightness value, and calculating the ratio of the total weighted brightness value to the accumulated sum of the weight values to be used as a brightness correction coefficient of the abnormal lamp points.
In this embodiment, the relative position information of each target light point currently covered by the preset convolution template in the LED box image with respect to the abnormal light point is used to obtain the weight value of each target light point, and further determine the brightness correction coefficient of the abnormal light point.
Further, in an embodiment, the step of obtaining the weight value of each target lamp point according to the relative position information of the target lamp point and the position information of the abnormal lamp point in the step S302 specifically includes: obtaining a weight model; the weight model is obtained by constructing a weight kernel function for determining the weight, and the relational expression of the weight kernel function is
Figure 295161DEST_PATH_IMAGE001
(ii) a Wherein, (i, j) represents the position information of the abnormal lamp point, and (p, q) represents the relative position information of the target lamp point relative to the abnormal lamp point; eye protection (reduction)And inputting the relative position information of the target lamp point and the position information of the abnormal lamp point into the weight model to obtain the weight value of the target lamp point.
The weighting kernel function makes the weighting value smaller the farther the distance of the target lamp point relative to the abnormal lamp point is; the closer the distance, the greater the weight value.
In a specific implementation, when the relative position of the target lamp point is represented by (p, q) and the position of the abnormal lamp point is represented by (i, j), the weight kernel function can be expressed as:
Figure 962903DEST_PATH_IMAGE002
where the value 500 is used to adjust the difference between the center point and the edge of the convolved template.
Since the abnormal lamp point is located at the center of the convolution template, and the distance between each target lamp point and the abnormal lamp point is a fixed value, after the position of the abnormal lamp point (i, j) and the distance between each target lamp point and the abnormal lamp point are determined, the position (p, q) of each target lamp point can be determined, wherein p belongs to [ i-2, i +2], and q belongs to [ j-2, j +2 ]. And sequentially inputting the positions (i, j) of the abnormal lamp points and the positions (p, q) of the target lamp points into the weight model constructed by the weight kernel function to obtain the weight values of the target lamp points.
In this embodiment, the weight value of the target lamp point farther away from the abnormal lamp point is made smaller, and the weight value of the target lamp point closer to the abnormal lamp point is made larger, so that the determined weight value of each target lamp point is associated with the distance from the abnormal lamp point, thereby improving the accuracy of the luminance correction coefficient of the abnormal lamp point determined according to the weight values.
In an embodiment, the step S304 specifically includes: according to the weight value of each target lamp point, weighting the original brightness value of each target lamp point to obtain the weighted brightness value of each target lamp point; obtaining a total weighted brightness value according to the weighted brightness value of each target lamp point; and acquiring the accumulated sum of the weights of all the target lamp points, and taking the ratio of the total weighted brightness value to the accumulated sum of the weight values as a brightness correction coefficient of the abnormal lamp points.
In a specific implementation, the original brightness value of the target lamp point is multiplied by the corresponding weight value through a weighting process of the corresponding weight value, and if the original brightness value of the target lamp point is represented by lumi (p, q) and the weight value of the target lamp point is represented by coef (p, q), the weighted brightness value of each target lamp point may be represented as: lumi (p, q) × coef (p, q). Further, the weighted brightness values of the target lamp points are added to obtain a total weighted brightness value:
Figure 225257DEST_PATH_IMAGE003
the brightness correction coefficient of the abnormal light point (i, j) determined according to the ratio between the total weighted brightness value and the accumulated sum of the weighted values can be expressed by the following relation:
luminance correction coefficient =
Figure 687462DEST_PATH_IMAGE004
In this embodiment, a total weighted luminance value is obtained by weighted summation processing of the original luminance value and the weight value of each target lamp point, and a ratio of the total weighted luminance value to an accumulated sum of the weight values of each target lamp point is used as a luminance correction coefficient of an abnormal lamp point.
In an embodiment, the step S110 specifically includes: normalizing the brightness correction coefficient of the abnormal lamp point to obtain a normalized brightness correction coefficient; and determining the target brightness value of the abnormal lamp point according to the normalized brightness correction coefficient and the original brightness value of the abnormal lamp point.
Further, the step of determining the target brightness value of the abnormal light point according to the normalized brightness correction coefficient and the original brightness value of the abnormal light point further includes: and acquiring the ratio of the original brightness value of the abnormal lamp point to the normalized brightness correction coefficient of the abnormal lamp point as the target brightness value of the abnormal lamp point.
Wherein the normalization process means scaling the luminance correction coefficient of each abnormal light point to between (0, 1).
In a specific implementation, after the brightness correction coefficient of each abnormal light point is obtained, in order to ensure the uniformity of the brightness of the abnormal light point in the LED screen after the lens shadow is removed and the brightness of the normal light point, the brightness coefficient of each abnormal light point needs to be normalized to obtain the normalized brightness correction coefficient. For each abnormal light point, a ratio of an original brightness value of the abnormal light point to the normalized brightness correction coefficient of the abnormal light point can be obtained to obtain a target brightness value of the abnormal light point, wherein a relational expression of the target brightness value can be represented as:
img(i,j).lumi2 = img(i,j).lumi1 / module,
wherein img (i, j) lumi2 is a brightness value of the lamp point abnormality (i, j) after the shadow is removed, namely a target brightness value; img (i, j) lumi1 is the original brightness at the abnormal lamp point (i, j); module represents the normalized luminance correction factor.
Further, after the normalized brightness correction coefficient is obtained, a shadow model can be constructed according to the normalized brightness correction coefficient, the shadow model comprises the brightness correction coefficient of each abnormal lamp point of the LED box body, and then the shadow model can be directly applied to elimination of lens shadows of the LED box body shot by the same camera, so that the flow of lens shadow elimination operation for the LED box body is greatly simplified.
In this embodiment, after the brightness correction coefficient of each abnormal light point is obtained, the brightness coefficient of each abnormal light point is normalized, and the normalized brightness correction coefficient and the original brightness value are adopted to determine the target brightness value of the abnormal light point, so that the uniformity of the brightness of the abnormal light point in the LED screen after the lens shading is removed and the brightness of the normal light point is ensured.
In one embodiment, as shown in fig. 4, there is provided an image shading processing method, including the steps of:
s402, acquiring the original brightness value of each lamp point in the LED box image;
step S404, determining and eliminating abnormal light points with original brightness values exceeding the brightness value range from the light points to obtain target light points of the LED box body image;
step S406, aiming at each lamp point, acquiring the position information of the lamp point, and determining a target lamp point currently covered by a preset convolution template in the LED box body image according to the position information;
step S408, performing convolution smoothing processing on the original brightness value of the target light point currently covered by the preset convolution template in the LED box image to obtain a brightness correction coefficient of each light point;
step S410, determining a target brightness value of each light point according to the brightness correction coefficient and the original brightness value of each light point, and using the target brightness value as the brightness value of each light point after the shadow is removed.
Specifically, after the brightness correction coefficients of the light points are obtained, in order to ensure that the screen brightness of the LED display screen after the lens shading is removed remains unchanged, normalization processing needs to be performed on the brightness correction coefficients of the light points to obtain normalized brightness correction coefficients, a shadow model is constructed according to the normalized brightness correction coefficients, and then the shadow model can be applied to elimination of lens shading of the LED box body shot by the same camera.
It should be noted that, in the image shading processing method of this embodiment, the luminance correction coefficient is calculated for each light point, where specific limitations on technical features and beneficial effects of each step correspond to the technical features and the beneficial effects set forth in the foregoing embodiments, and are not described herein again.
In the embodiment, the brightness correction coefficient of each lamp point in the LED box image can be calculated, so that the shadow model under the current environment is obtained.
In another embodiment, as shown in fig. 5, there is provided an image shading processing method, in this embodiment, the method includes the steps of:
step S502, acquiring the original brightness value of each lamp point in the LED box image;
step S504, obtaining the mean value and the mean square error of the original brightness value of each lamp point, and determining a first abnormal brightness value threshold value and a second abnormal brightness value threshold value according to the mean value and the mean square error;
step S506, regarding the lamp points with the original brightness values larger than the first abnormal brightness value threshold value or the original brightness values smaller than the second abnormal brightness value threshold value as abnormal lamp points;
step S508, acquiring position information of the abnormal lamp points, and determining the target lamp points currently covered by the preset convolution template in the LED box body image according to the position information;
step S510, obtaining relative position information of each target lamp point relative to the abnormal lamp point, and obtaining a weight value of each target lamp point according to the relative position information and the position information of the abnormal lamp point;
step S512, acquiring a brightness correction coefficient of the abnormal light points according to the weight value and the original brightness value of each target light point;
step S514, the brightness correction coefficient of the abnormal light point is normalized to obtain a normalized brightness correction coefficient;
in step S516, the ratio of the original brightness value of the abnormal light point to the normalized brightness correction coefficient of the abnormal light point is obtained as the target brightness value of the abnormal light point.
The image shadow processing method provided by the embodiment is applied to a single-box correction process, in the single-box correction process, the LED screen data (including the original brightness values and the position information of all the lamp points) are collected, after a certain number of boxes are collected, the collected LED screen data are used for determining the brightness correction coefficients of all the abnormal lamp points in the current environment, a shadow model in the current environment is constructed according to all the brightness correction coefficients, and then the shadow model can be applied to the LED boxes which are subjected to data collection in the same environment or the LED boxes which are to be subjected to data collection. The method can independently eliminate the lens shadow corrected each time according to the single-box correction environment, has strong adaptability to the lens, does not need calibration, and reduces the consumption of manpower and time.
It should be understood that although the steps in the flowcharts of fig. 1, 3-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1, 3-5 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or at least partially with other steps or with at least some of the other steps.
In one embodiment, as shown in fig. 6, there is provided an image shading processing apparatus including: an original brightness value obtaining module 602, an abnormal light point determining module 604, a target light point determining module 606, a correction coefficient determining module 608, and a target brightness value determining module 610, wherein:
an original brightness value obtaining module 602, configured to obtain an original brightness value of each light point in the LED box image;
an abnormal light point determining module 604, configured to determine, from the light points, an abnormal light point whose original brightness value exceeds the brightness value range;
a target lamp point determining module 606, configured to obtain position information of the abnormal lamp point, and determine, according to the position information, a target lamp point currently covered by the preset convolution template in the LED box image; the preset convolution template is used for removing the abnormal light points from all the light points to obtain a target light point covered in the LED box image at present;
a correction coefficient determining module 608, configured to perform convolution smoothing on an original brightness value of a target light point currently covered by a preset convolution template to obtain a brightness correction coefficient of an abnormal light point;
and a target brightness value determining module 610, configured to determine a target brightness value of the abnormal light point according to the brightness correction coefficient and the original brightness value of the abnormal light point, where the target brightness value is used as a brightness value of the abnormal light point after the shadow is removed.
In an embodiment, the abnormal light point determining module 604 is specifically configured to obtain a mean value and a mean square error of the original brightness values of the light points; determining a first abnormal brightness value threshold value and a second abnormal brightness value threshold value according to the mean value and the mean square error; and taking the lamp points of which the original brightness values are larger than the first abnormal brightness value threshold value or the original brightness values are smaller than the second abnormal brightness value threshold value as the abnormal lamp points.
In one embodiment, the correction factor determining module 608 includes:
the weight value determining submodule is used for acquiring the relative position information of the target lamp point relative to the abnormal lamp point and acquiring the weight value of the target lamp point according to the relative position information of the target lamp point and the position information of the abnormal lamp point;
and the correction coefficient acquisition submodule is used for acquiring the brightness correction coefficient of the abnormal lamp point according to the weight value and the original brightness value of the target lamp point.
In an embodiment, the weight value determining submodule is specifically configured to obtain a weight model; the weight model is constructed based on a weight kernel function for determining the weight, and the relational expression of the weight kernel function is
Figure 284534DEST_PATH_IMAGE001
(ii) a Wherein, (i, j) represents the position information of the abnormal lamp point, and (p, q) represents the relative position information of the target lamp point relative to the abnormal lamp point; and inputting the relative position information of the target lamp point and the position information of the abnormal lamp point into the weight model to obtain the weight value of the target lamp point.
In an embodiment, the correction coefficient obtaining submodule is specifically configured to perform weighting processing on the original brightness value of each target lamp point according to the weight value of each target lamp point, so as to obtain a weighted brightness value of each target lamp point; obtaining a total weighted brightness value according to the weighted brightness value of each target lamp point; and acquiring the accumulated sum of the weights of all the target lamp points, and taking the ratio of the total weighted brightness value to the accumulated sum of the weight values as a brightness correction coefficient of the abnormal lamp points.
In an embodiment, the target brightness value determining module 610 is specifically configured to perform normalization processing on the brightness correction coefficient of the abnormal light point to obtain a normalized brightness correction coefficient; and determining the target brightness value of the abnormal lamp point according to the normalized brightness correction coefficient and the original brightness value of the abnormal lamp point.
In an embodiment, the target brightness value determining module 610 is further configured to obtain a ratio of an original brightness value of the abnormal light point to a normalized brightness correction coefficient of the abnormal light point, as the target brightness value of the abnormal light point.
It should be noted that, the image shadow processing apparatus of the present application corresponds to the image shadow processing method of the present application one to one, and the technical features and the advantages thereof described in the embodiments of the image shadow processing method are all applicable to the embodiments of the image shadow processing apparatus, and specific contents may refer to the descriptions in the embodiments of the method of the present application, which are not repeated herein, and thus are stated herein.
In addition, all or part of each module in the image shading processing apparatus may be implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an image shading processing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An image shading processing method, characterized in that the method comprises:
acquiring the original brightness value of each lamp point in the LED box image;
determining abnormal lamp points with original brightness values exceeding the brightness value range from the lamp points;
acquiring position information of the abnormal lamp points, and determining target lamp points currently covered by a preset convolution template in the LED box body image according to the position information; the preset convolution template is used for covering a target lamp point in the LED box image at present, wherein the target lamp point is a part of lamp points after the abnormal lamp points are removed from all the lamp points;
performing convolution smoothing processing on the original brightness value of the target lamp point currently covered by the preset convolution template in the LED box body image to obtain a brightness correction coefficient of the abnormal lamp point;
determining a target brightness value of the abnormal light point according to the brightness correction coefficient and the original brightness value of the abnormal light point, and taking the target brightness value as a brightness value of the abnormal light point after shadow is removed;
performing convolution smoothing processing on the original brightness value of the target lamp point currently covered by the preset convolution template in the LED box image to obtain a brightness correction coefficient of the abnormal lamp point, wherein the convolution smoothing processing comprises the following steps: acquiring relative position information of the target lamp point relative to the abnormal lamp point, and acquiring a weight value of the target lamp point according to the relative position information of the target lamp point and the position information of the abnormal lamp point; and acquiring a brightness correction coefficient of the abnormal lamp point according to the weight value and the original brightness value of the target lamp point.
2. The method of claim 1, wherein said determining an abnormal light point from each of said light points whose original brightness value is outside of the brightness value range comprises:
acquiring the mean value and the mean square error of the original brightness value of each lamp point;
determining a first abnormal brightness value threshold and a second abnormal brightness value threshold according to the mean value and the mean square error;
and taking the lamp points with the original brightness values larger than the first abnormal brightness value threshold value or the original brightness values smaller than the second abnormal brightness value threshold value as abnormal lamp points.
3. The method according to claim 1, wherein the obtaining the weight value of the target lamp point according to the relative position information of the target lamp point and the position information of the abnormal lamp point comprises:
obtaining a weight model; the weight model is constructed on the basis of a weight kernel function for determining the weight;
and inputting the relative position information of the target lamp point and the position information of the abnormal lamp point into the weight model to obtain the weight value of the target lamp point.
4. The method of claim 3, wherein the weight kernel function has a relationship of
Figure 709541DEST_PATH_IMAGE001
(ii) a Wherein (i, j) represents position information of the abnormal lamp point, and (p, q) represents relative position information of the target lamp point with respect to the abnormal lamp point.
5. The method according to claim 1, wherein the obtaining a luminance correction coefficient of the abnormal light point according to the weight value and the original luminance value of the target light point comprises:
according to the weight value of each target lamp point, carrying out weighting processing on the original brightness value of each target lamp point to obtain the weighted brightness value of each target lamp point;
obtaining a total weighted brightness value according to the weighted brightness value of each target lamp point;
and acquiring the accumulated sum of the weights of the target lamp points, and taking the ratio of the total weighted brightness value to the accumulated sum of the weights as a brightness correction coefficient of the abnormal lamp points.
6. The method according to claim 1, wherein the determining a target brightness value of the abnormal lamp point according to the brightness correction coefficient and the original brightness value of the abnormal lamp point comprises:
normalizing the brightness correction coefficient of the abnormal lamp point to obtain a normalized brightness correction coefficient;
and determining the target brightness value of the abnormal light point according to the normalized brightness correction coefficient and the original brightness value of the abnormal light point.
7. The method according to claim 6, wherein the determining a target brightness value of the abnormal light point according to the normalized brightness correction coefficient and the original brightness value of the abnormal light point comprises:
and acquiring the ratio of the original brightness value of the abnormal lamp point to the normalized brightness correction coefficient of the abnormal lamp point, and taking the ratio as the target brightness value of the abnormal lamp point.
8. An image shading processing apparatus, characterized in that the apparatus comprises:
the original brightness value acquisition module is used for acquiring the original brightness value of each lamp point in the LED box image;
the abnormal lamp point determining module is used for determining the abnormal lamp points of which the original brightness values exceed the brightness value range from the lamp points;
the target lamp point determining module is used for acquiring the position information of the abnormal lamp points and determining the target lamp points currently covered by the preset convolution template in the LED box body image according to the position information; the preset convolution template is used for covering a target lamp point in the LED box image at present, wherein the target lamp point is a part of lamp points after the abnormal lamp points are removed from all the lamp points;
the correction coefficient acquisition module is used for performing convolution smoothing processing on the original brightness value of the target lamp point currently covered by the preset convolution template to obtain the brightness correction coefficient of the abnormal lamp point;
a target brightness value determining module, configured to determine a target brightness value of the abnormal light point according to the brightness correction coefficient and the original brightness value of the abnormal light point, where the target brightness value is used as a brightness value of the abnormal light point after the shadow is removed;
the correction coefficient acquisition module is further configured to acquire relative position information of the target lamp point with respect to the abnormal lamp point, and acquire a weight value of the target lamp point according to the relative position information of the target lamp point and the position information of the abnormal lamp point; and acquiring a brightness correction coefficient of the abnormal lamp point according to the weight value and the original brightness value of the target lamp point.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110463253.2A 2021-04-28 2021-04-28 Image shadow processing method and device, computer equipment and storage medium Active CN112884681B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110463253.2A CN112884681B (en) 2021-04-28 2021-04-28 Image shadow processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110463253.2A CN112884681B (en) 2021-04-28 2021-04-28 Image shadow processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112884681A CN112884681A (en) 2021-06-01
CN112884681B true CN112884681B (en) 2021-09-17

Family

ID=76040752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110463253.2A Active CN112884681B (en) 2021-04-28 2021-04-28 Image shadow processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112884681B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106023883A (en) * 2016-07-15 2016-10-12 西安诺瓦电子科技有限公司 Local abnormal light point processing method after correction of LED display device
CN106604459A (en) * 2016-12-08 2017-04-26 韦尚仁 LED lamp brightness debugging device
CN107027214A (en) * 2017-03-10 2017-08-08 广东德洛斯照明工业有限公司 A kind of lamp power automatic correcting method
CN107507558A (en) * 2017-06-27 2017-12-22 深圳市灵星雨科技开发有限公司 A kind of bearing calibration of LED display

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104217684B (en) * 2014-09-11 2016-09-07 西安诺瓦电子科技有限公司 LED bad point processing method and LED display control method
CN105976753B (en) * 2016-07-15 2019-01-29 西安诺瓦电子科技有限公司 Abnormal lamp point in LED display correction detects compensation method
CN106710517B (en) * 2016-11-17 2019-01-29 西安诺瓦电子科技有限公司 LED display bearing calibration
CN111210764B (en) * 2020-01-21 2021-01-12 卡莱特(深圳)云科技有限公司 LED screen correction method and correction device
CN112102762A (en) * 2020-09-30 2020-12-18 卡莱特(深圳)云科技有限公司 Method and device for identifying abnormal light points of LED screen
CN112185299B (en) * 2020-10-14 2022-05-20 西安诺瓦星云科技股份有限公司 Correction method and device for display screen

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106023883A (en) * 2016-07-15 2016-10-12 西安诺瓦电子科技有限公司 Local abnormal light point processing method after correction of LED display device
CN106604459A (en) * 2016-12-08 2017-04-26 韦尚仁 LED lamp brightness debugging device
CN107027214A (en) * 2017-03-10 2017-08-08 广东德洛斯照明工业有限公司 A kind of lamp power automatic correcting method
CN107507558A (en) * 2017-06-27 2017-12-22 深圳市灵星雨科技开发有限公司 A kind of bearing calibration of LED display

Also Published As

Publication number Publication date
CN112884681A (en) 2021-06-01

Similar Documents

Publication Publication Date Title
US10645364B2 (en) Dynamic calibration of multi-camera systems using multiple multi-view image frames
WO2014070489A1 (en) Recursive conditional means image denoising
CN110147708B (en) Image data processing method and related device
CN110910445B (en) Object size detection method, device, detection equipment and storage medium
CN110909663A (en) Human body key point identification method and device and electronic equipment
CN111080571A (en) Camera shielding state detection method and device, terminal and storage medium
CN111507298A (en) Face detection method and device, computer equipment and storage medium
CN113132695A (en) Lens shadow correction method and device and electronic equipment
CN113628259A (en) Image registration processing method and device
CN112884681B (en) Image shadow processing method and device, computer equipment and storage medium
CN113179421A (en) Video cover selection method and device, computer equipment and storage medium
CN110288691B (en) Method, apparatus, electronic device and computer-readable storage medium for rendering image
CN113766203A (en) Image white balance processing method
CN111428740A (en) Detection method and device for network-shot photo, computer equipment and storage medium
CN115147296A (en) Hyperspectral image correction method, device, computer equipment and storage medium
CN114820376A (en) Fusion correction method and device for stripe noise, electronic equipment and storage medium
CN114004839A (en) Image segmentation method and device of panoramic image, computer equipment and storage medium
CN110322478B (en) Feature point observation window processing method, tracking method, device, equipment and medium
CN113592753A (en) Image processing method and device based on industrial camera shooting and computer equipment
CN113643377B (en) Single lens consistency error analysis method and system based on multiple calibration
Sheth Deep neural networks for HDR imaging
CN116659520B (en) Matching positioning method, device and equipment based on bionic polarization vision enhancement
CN110971785B (en) Camera shielding state detection method and device, terminal and storage medium
CN113095211B (en) Image processing method, system and electronic equipment
CN115661368B (en) Image matching method, device, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant