METHOD FOR DETECTING INTERFERENCE PATTERNS FOR UNDER-SCREEN CAMERA, COMPENSATION METHOD AND CIRCUIT SYSTEM
20230008899 · 2023-01-12
Inventors
Cpc classification
H04N23/57
ELECTRICITY
H04N23/53
ELECTRICITY
G06V10/60
PHYSICS
International classification
G06V10/60
PHYSICS
Abstract
A method for detecting interference patterns for an under-screen camera, a compensation method and a circuit system are provided. The circuit system includes an image-processing circuit and an under-screen camera module. The under-screen camera module captures an image by a lens through a glass substrate of a display module. After receiving the image, the image-processing circuit detects and compensates an interference pattern. In the method, multiple reference points are set in the image, and a brightness average value and a brightness target value for each of the reference points are obtained for calculating an area brightness ratio of the reference points. A binarized image is then obtained. The interference pattern is determined according to symmetrical characteristics of the binarized image. A target matrix is decided for compensating the interference pattern according to weights of all of the reference points of the image.
Claims
1. A method for detecting interference patterns for an under-screen camera, comprising: acquiring an image, wherein multiple reference points are set in the image, a first area with respect to each of the reference points is defined, and a brightness average value of the first area with respect to each of the reference points is calculated; wherein a second area with respect to each of the reference points is defined, and a brightness target value of the second area with respect to each of the reference points is calculated; calculating an area brightness ratio according to the brightness average value of the first area and the brightness target value of the second area of each of the reference points; obtaining a binarized image according to the area brightness ratios of all of the reference points of the image; and determining whether or not an interference pattern is present according to symmetrical characteristics of the binarized image.
2. The method according to claim 1, wherein, if the brightness target value is larger than the brightness average value, dark stripes are determined to be present near a corresponding reference point; if the brightness target value is smaller than the brightness average value, bright stripes are determined to be present near the corresponding reference point.
3. The method according to claim 2, wherein the area brightness ratio equals to the brightness target value divided by the brightness average value.
4. The method according to claim 1, wherein the interference pattern is Newton’s rings, wherein the Newton’s rings have wider rings near a central portion of the Newton’s rings, and thinner rings away from the central portion of the Newton’s rings; wherein the reference points have the same first area, and the reference points have larger second areas for portions closer to the central portion of the Newton’s rings.
5. The method according to claim 1, wherein conditions that satisfy symmetrical characteristics of the binarized image that is determined to have the interference pattern include: a quantity of black dots and a quantity of white dots at a junction of a black area and a white area of the binarized image are the same; and positional deviations of center points calculated respectively from junctions of a plurality of rings of the interference pattern are not larger than a deviation threshold.
6. The method according to claim 1, wherein positions of the interference pattern with respect to a red channel, a green channel and a blue channel of the image are different, and an interference pattern compensation is performed on different color channels of the image by calculating the area brightness ratios with respect to the different color channels for each of the reference points.
7. The method according to claim 6, wherein the area brightness ratios with respect to the different color channels for each of the reference points are divided by each other for highlighting boundaries of one of the interference patterns so as to increase an accuracy of detecting the one of the interference patterns.
8. A compensation method for compensating interference patterns adapted to an under-screen camera, comprising: acquiring an image, wherein multiple reference points are set in the image, a first area with respect to each of the reference point is defined, and a brightness average value of the first area with respect to each of the reference points is calculated; a second area with respect to each of the reference points is defined, and a brightness target value with respect to the second area is calculated; calculating an area brightness ratio according to the brightness average value and the brightness target value for each of the reference points; obtaining a binarized image according to the area brightness ratios for all of the reference points; determining if an interference pattern is present according to symmetrical characteristics of the binarized image; deciding a weight value with respect to the area brightness ratio of each of the reference points; and deciding a target matrix that describes compensation coefficients for all of the reference points according to the weight values for all of the reference points for compensating the interference pattern.
9. The compensation method according to claim 8, wherein, if the brightness target value is larger than the brightness average value, it is determined that there are dark stripes near a corresponding reference point; if the brightness target value is smaller than the brightness average value, it is determined that there are bright stripes near the corresponding reference point.
10. The compensation method according to claim 9, wherein the area brightness ratio equals to the brightness target value divided by the brightness average value.
11. The compensation method according to claim 8, wherein the interference pattern is Newton’s rings, in which the Newton’s rings have wider rings near a central portion, and thinner rings away from the central portion; the reference points have the same first area but the larger second area for the portion closer to the central portion of the Newton’s rings.
12. The compensation method according to claim 11, wherein conditions that satisfy the symmetrical characteristics of the binarized image that is determined to have the interference pattern include: numbers of black dots and white dots at a junction of a black area and a white area of the binarized image are the same; and deviation of positions of a center point calculated from junctions of a plurality of rings of the interference pattern is not larger than a deviation threshold.
13. The compensation method according to claim 8, wherein the positions of the interference patterns with respect to red channel, green channel and blue channel of the image are different, and interference pattern compensation is performed on different color channels of the image by calculating the area brightness ratios with respect to different color channels for each of the reference points.
14. The compensation method according to claim 13, wherein the area brightness ratios of different color channels for each of reference points are divided with each other for highlighting boundaries of the interference pattern so as to improve accuracy of detecting the interference pattern.
15. The compensation method according to claim 13, wherein, a target matrix for the different color channels of the image is obtained, and the target matrix is used to compensate the different color channels of the image.
16. The compensation method according to claim 15, wherein the target matrix describes compensation coefficients for each of the reference points in the image, and a bilinear interpolation process is performed to correct each of the color channels of every pixel of the image so as to compensate the interference pattern of the image.
17. The compensation method according to claim 16, wherein multiple target matrices are used to dynamically compensate the interference pattern by switching the multiple target matrices.
18. A circuit system, comprising: an image-processing circuit; and an under-screen camera module electrically connected with the image-processing circuit and disposed inside a display module, wherein the under-screen camera module is used to capture an image with a lens of the under-screen camera module through a glass substrate of the display module, and the image is transferred to the image-processing circuit used to detect and compensate an interference pattern in the image, wherein the method for compensating the interference pattern includes: setting multiple reference points in the image, wherein a first area with respect to each of the reference point is defined, and a brightness average value of the first area with respect to each of the reference points is calculated; a second area with respect to each of the reference points is defined, and a brightness target value with respect to the second area is calculated; calculating an area brightness ratio according to the brightness average value and the brightness target value for each of the reference points; obtaining a binarized image according to the area brightness ratios for all of the reference points; determining if an interference pattern is present according to symmetrical characteristics of the binarized image; deciding a weight value with respect to the area brightness ratio of each of the reference points; and deciding a target matrix that describes compensation coefficients for all of the reference points according to the weight values for all of the reference points for compensating the interference pattern.
19. The circuit system according to claim 18, wherein the interference pattern is Newton’s rings, wherein the Newton’s rings have wider rings near a central portion of the Newton’s rings, and thinner rings away from the central portion of the Newton’s rings; wherein the reference points have the same first area, and the reference points have larger second areas for portions closer to the central portion of the Newton’s rings.
20. The circuit system according to claim 18, wherein positions of the interference patterns with respect to a red channel, a green channel and a blue channel of the image are different, and an interference pattern compensation is performed on different color channels of the image by calculating the area brightness ratios with respect to the different color channels for each of the reference points.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The described embodiments may be better understood by reference to the following description and the accompanying drawings, in which:
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
DETAILED DESCRIPTION OF THE EXEMPLARY EMBODIMENTS
[0036] The present disclosure is more particularly described in the following examples that are intended as illustrative only since numerous modifications and variations therein will be apparent to those skilled in the art. Like numbers in the drawings indicate like components throughout the views. As used in the description herein and throughout the claims that follow, unless the context clearly dictates otherwise, the meaning of “a”, “an”, and “the” includes plural reference, and the meaning of “in” includes “in” and “on”. Titles or subtitles can be used herein for the convenience of a reader, which shall have no influence on the scope of the present disclosure.
[0037] The terms used herein generally have their ordinary meanings in the art. In the case of conflict, the present document, including any definitions given herein, will prevail. The same thing can be expressed in more than one way. Alternative language and synonyms can be used for any term(s) discussed herein, and no special significance is to be placed upon whether a term is elaborated or discussed herein. A recital of one or more synonyms does not exclude the use of other synonyms. The use of examples anywhere in this specification including examples of any terms is illustrative only, and in no way limits the scope and meaning of the present disclosure or of any exemplified term. Likewise, the present disclosure is not limited to various embodiments given herein. Numbering terms such as “first”, “second” or “third” can be used to describe various components, signals or the like, which are for distinguishing one component/signal from another one only, and are not intended to, nor should be construed to impose any substantive limitations on the components, signals or the like.
[0038] For solving the problem of an interference pattern occurring in an image taken by an under-screen camera, the present disclosure is related to a method for detecting the interference patterns for the under-screen camera, a compensation method and a circuit system. The interference patterns are such as circular interference patterns that form the Newton’s rings, also known as rainbow rings. The image taken by the under-screen camera may have the interference patterns because of the interference phenomena caused by structural materials, gaps among the layers in the structure and thicknesses of the display panel. The interference pattern can be detected according to image features such as multiple alternating bright and dark circular interference stripes. Because the brightness distribution of the image can be referred to for detecting the interference patterns, the method can particularly be used to conduct dynamic compensation adaptive to changes in light sources.
[0039] The method is performed in an image-processing circuit. The image-processing circuit can be used for processing images taken using the under-screen camera. The under-screen camera can be used in a mobile device. One of the objectives of the method for detecting interference patterns is to eliminate the interference patterns of the image through an image-processing process. Various light sources may cause different degrees of interference patterns. For example, the interference phenomena may be obvious if the light emitted from a light source is close to a single wavelength light. With the Newton’s rings as an example, a circular interference pattern formed by bright and dark stripes is obvious when a U30 light source having a color temperature of 3000K is used. However, the Newton’s rings may not be so obvious under a specific circumstance with a specific light source. Furthermore, the interference pattern cannot be solved by a fixed correction value even under the same light source since the positions of the bright and dark stripes forming the interference pattern can be changed due to temporal coherence of the interference phenomena.
[0040] According to one embodiment of the method for detecting interference patterns for the under-screen camera and the compensation method, reference is made to a flow chart of
[0041] In the beginning, such as step S301 of
[0042] In step S407, a second area with respect to each of the reference points can then be set based on an actual condition of the interference pattern. In
[0043] The brightness average value (C) and the brightness target value (T) with respect to each of the reference points are accordingly obtained. If the brightness target value (T) is larger than the brightness average value (C), then dark stripes are present in the area near the corresponding reference point. On the contrary, if the brightness target value (T) is smaller than the brightness average value (C), it is determined that bright stripes are present near the corresponding reference point. At this time, such as in step S411, the brightness target value (T) and the brightness average value (C) for each of the areas are referred to for calculating an area brightness ratio. For example, the area brightness ratio (T/C) equals to the brightness target value (T) divided by the brightness average value (C). Therefore, for compensating the interference pattern, pixel values of dark stripes can be multiplied by the area brightness ratio which is larger than 1 (T/C>1), and pixel values of bright stripes can be multiplied by the area brightness ratio which is smaller than 1 (T/C<1).
[0044] It should be noted that a size of the first area or the second area can be selected according to the bright and dark stripes of the interference pattern under different light sources. The size of the areas should be appropriate and dynamically changed based on actual need. If the selected area is too small, noises in the image may be shown. With the Newton’s rings as an example, a central portion of the Newton’s rings may show wider rings formed by the bright and dark stripes, and thinner rings may be shown at a portion away from the center of the Newton’s rings. In
[0045] Further, since the positions of the interference patterns formed in a red channel image, a green channel image and a blue channel image are different, the area brightness ratios (T/C) should be calculated separately. Therefore, the brightness average values (C), the brightness target values (T) and the area brightness ratios (T/C) for different color channels (e.g., the red channel, the green channel and the blue channel) of the image are calculated separately. With the reference points shown in
[0046] After the area brightness ratio (T/C) for each of the reference points is calculated, such as in step S303 of
[0047] In step S701, area brightness ratios (T/C) for the color channels with respect to each of the reference points are calculated. In step S703, a binarized image is generated. According to the above embodiments, the area brightness ratios (T/C) with respect to each of the reference points are referred to so as to generate a M×N binarized image. Thus, the method relies on the symmetrical characteristics of the binarized image to determine whether or not the image includes an interference pattern. However, a false determination may occur in determining the symmetrical characteristics of the interference pattern when the determination is based only on a binarization result of the area brightness ratio, because the interference pattern may not be obvious in the image. Therefore, such as in step S705, the area brightness ratios of different color channels can be divided with each other for highlighting the boundaries of the interference pattern so as to improve an accuracy of detecting the interference pattern.
[0048]
[0049] After the binarized images are obtained, such as in step S707, points of symmetry can be searched based on the symmetrical characteristics of the interference pattern, such that the symmetrical characteristics are determined (step S709), and by which the interference pattern in the image can be detected. Reference is made to
[0050]
[0051] In a next step, positions of the center points of the five rings are calculated (step S115 of
[0052] A second condition is as follows: the interference pattern should have the symmetrical characteristics. The method is able to determine whether or not any of the symmetrical characteristics of the image is present according to deviations of the center points to be calculated from the positions of the junction points in each of the rings (step S117 of
[0053] According to the embodiment as represented by the process described in
[0054] Referring back to the flow chart of
[0055] Further, in the process described in
[0056] For example, the maximum weight value (max wgt) is 0.5, the first threshold (thr1) is 0.05 and the second threshold (thr2) is 0.08. Reference is also made to
[0057] In the schematic diagram, a first area with respect to a third reference point (having coordinates of (10,23)) 133 is located within a color block of the image, and a second area with respect to the reference point covers most of the color block. Accordingly, an area brightness ratio of the third reference point 133 is larger, and the area brightness ratio with respect to the third reference point 133 may be ignored if it is too large. Therefore, the area brightness ratio that is last used and reliable can still be adopted for determining the interference pattern. It should be noted that the circuit system uses a memory to store the last reliable area brightness ratio that is last used and reliable. In the present example, an absolute value of a difference between the area brightness ratio and 1 (|(T/C)-1|) is 0.182, which is larger than the second threshold (thr2), and the corresponding weight value is 0 according to the relation curve shown in
[0058] After the weight value is decided (step S309 of
[0059] Cur.sub.R.sub._Gain(j,i), Cur.sub.G_Gain(j,i) and Cur.sub.B_Gain(j,i) respectively denote the area brightness ratios (Last.sub.R_.sub.Gain(j,i), Last.sub.G_Gain(j,i) and Last.sub.B_Gain(j,i)) of the red channel, the green channel and the blue channel of the current image that form a target matrix for correcting the color channels of the last image. R.sub.Gain(j,i), G.sub.Gain(j,i) and B.sub.Gain(j,i) form another target matrix for correcting the color channels of the current image. The target matrix is used to describe the compensation coefficients with respect to the color channels of each of the reference points. The compensation coefficients can be expressed by gain values. After the color channels are corrected, a result is applied to update the target matrix of Last.sub.R_Gain(j,i), Last.sub.G_Gain(j,i) and Last.sub.B_Gain(j,i) that are configured to be stored to the memory of the circuit system. The weight value obtained in step S309 of
[0060] Finally, such as in step S313 of
[0061]
[0062] Thus, through the method for detecting and compensating the interference pattern as described in the flowchart of
[0063] In step S151, such as the embodiment described in
[0064] In step S159, in an exemplary example of the method, a k-th target matrix is applied for compensating the interference pattern. The target matrix formed from the color channels of the M×N reference points is used to calculate the pixel values of the color channels for each of the pixels through an interpolation method, thereby completing the compensation of the pixel values. After that, such as in step S161 the area brightness ratios of the M×N reference points are calculated by using the process as described in
[0065]
[0066] In summation, according to the above embodiments of the method for detecting the interference pattern for the under-screen camera, the compensation method and the circuit system, the interference pattern is detected according to the brightness features and the symmetrical characteristics of the image, the interference pattern is such as the circular interference pattern, i.e., the rainbow rings, and the image can be compensated through a target matrix. The compensation can also be dynamically performed on the image since the position of the interference pattern may be changed.
[0067] The foregoing description of the exemplary embodiments of the disclosure has been presented only for the purposes of illustration and description and is not intended to be exhaustive or to limit the disclosure to the precise forms disclosed. Many modifications and variations are possible in light of the above teaching.
[0068] The embodiments were chosen and described in order to explain the principles of the disclosure and their practical application so as to enable others skilled in the art to utilize the disclosure and various embodiments and with various modifications as are suited to the particular use contemplated. Alternative embodiments will become apparent to those skilled in the art to which the present disclosure pertains without departing from its spirit and scope.