Glare level measurement method, glare control method and apparatus therefor, and storage medium
By collecting the images formed by the lens, identifying the glare area and adjusting the light source parameters, the subjectivity problem of lens glare detection is solved, and the quantification of lens glare level and optimization of image quality is achieved.
Patent Information
- Application Number
- PCT/CN2024/071126
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-01-08
- Publication Date
- 2025-07-17
AI Technical Summary
In the prior art, the detection of glare degree of lenses relies on manual observation, resulting in strong subjectivity and the inability to accurately judge the glare degree.
By collecting images formed by the lens, the glare area is identified using color information, and the glare level of the lens is determined based on the characteristics of the glare area, combining the adjustment of the light source incident angle, brightness and area to increase or decrease the glare degree.
Quantitative evaluation of lens glare level is achieved, the accuracy and consistency of detection is improved, and the degree of glare can be adjusted as needed to optimize image quality.
Smart Images

Figure CN2024071126_17072025_PF_FP_ABST
Abstract
Description
Glare level detection method, glare control method and device thereof, and storage medium Technical Field
[0001] The present disclosure relates to the technical field of glare detection, and in particular to a glare level detection method, a glare control method, a device thereof, and a storage medium. Background Art
[0002] Glare refers to visual discomfort and reduced visibility caused by an unsuitable brightness distribution or extreme brightness contrast in space or time. Glare, as an optical phenomenon, is widely present in optical imaging systems with lenses, such as cameras and VR (virtual reality).
[0003] Currently, in order to detect the glare degree of a lens, light is incident on the lens to generate an image, and a staff member observes the glare process in the image, that is, the glare degree of the lens is determined manually.
[0004] Summary of the Invention
[0005] According to a first aspect of an embodiment of the present disclosure, a glare level detection method is provided, comprising: acquiring a first image, wherein the first image is an image formed by a predetermined light source incident on a lens; identifying a glare area in the first image based on color information of the first image; and determining the glare level of the lens based on glare characteristics of the glare area.
[0006] In some embodiments, identifying the glare area in the first image includes: generating a second image based on color information in the first image; and identifying a maximum connected domain of a target graphic in the second image as the glare area.
[0007] In some embodiments, generating the second image includes: converting the first image into a predetermined color space to obtain a third image; and removing brightness information in the third image so as to generate the second image using color information in the third image.
[0008] In some embodiments, identifying the largest connected domain in the second image includes: binarizing the second image to obtain a fourth image; and identifying the largest connected domain of the target graphic in the fourth image as the glare area.
[0009] In some embodiments, the glare characteristic of the glare region includes at least one of the area of the glare region, the brightness of the glare region, and the color value of the glare region.
[0010] In some embodiments, determining the glare level of the lens according to the glare characteristics of the glare area includes: determining the glare level of the lens according to a weighted sum of the area of the glare area, the brightness of the glare area, and the color value of the glare area.
[0011] In some embodiments, the glare area includes N independent sub-areas, where N is a natural number greater than 1, and determining the glare level of the lens includes: determining the glare value of the i-th sub-area based on the glare characteristics of the i-th sub-area, 1≤i≤N; determining the glare value of the lens based on the glare values of the N independent sub-areas; and determining the glare level of the lens based on the glare value of the lens.
[0012] In some embodiments, determining the glare value of the i-th sub-region includes: determining the glare value of the i-th sub-region according to a weighted sum of the area of the i-th sub-region, the brightness of the i-th sub-region, and the color value of the i-th sub-region.
[0013] In some embodiments, the sum of the weight of the area of the i-th sub-region, the weight of the brightness of the i-th sub-region, and the weight of the color value of the i-th sub-region is a predetermined value.
[0014] In some embodiments, the weight of the area of each sub-region in the N independent sub-regions is a predetermined first weight; the weight of the brightness of each sub-region in the N independent sub-regions is a predetermined second weight; and the weight of the color value of each sub-region in the N independent sub-regions is a predetermined third weight.
[0015] In some embodiments, determining the glare value of the lens according to the glare values of the N independent sub-areas includes: determining the glare value of the lens according to the sum of the glare values of the N independent sub-areas.
[0016] In some embodiments, the method further includes: adjusting an incident angle of the predetermined light source incident on the lens, so that the incident angle of the predetermined light source incident on the lens is within a first predetermined range.
[0017] In some embodiments, the first predetermined range is 15° to 25°.
[0018] In some embodiments, the method further includes: adjusting the brightness of the predetermined light source so that the difference between the brightness of the predetermined light source and background brightness is within a second predetermined range.
[0019] In some embodiments, the method further includes: adjusting the area of the predetermined light source so that the area of the predetermined light source is within a third predetermined range.
[0020] According to a second aspect of an embodiment of the present disclosure, a glare level detection device is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute any of the above-mentioned glare level detection methods based on instructions stored in the memory.
[0021] According to a third aspect of an embodiment of the present disclosure, a glare control method is provided, comprising: acquiring a first image, wherein the first image is an image formed by a predetermined light source incident on a lens; identifying a glare area in the first image based on color information of the first image; determining a glare level of the lens based on glare characteristics of the glare area; and, if the glare level of the lens does not meet a predetermined level requirement, adjusting at least one of an incident angle of the predetermined light source incident on the lens, adjusting the brightness of the predetermined light source, or adjusting the area of the predetermined light source, so that the glare level of the lens meets the predetermined level requirement.
[0022] In some embodiments, adjusting the incident angle of the predetermined light source entering the lens includes: when the incident angle of the predetermined light source is within a first predetermined range, reducing the incident angle of the predetermined light source, or increasing the incident angle of the predetermined light source so that the incident angle of the predetermined light source is not within the first predetermined range.
[0023] In some embodiments, when the incident angle of the predetermined light source is less than a lower limit value of the first predetermined range, the incident angle of the predetermined light source is reduced.
[0024] In some embodiments, when the incident angle of the predetermined light source is greater than an upper limit value of the first predetermined range, the incident angle of the predetermined light source is increased.
[0025] In some embodiments, the first predetermined range is 15° to 25°.
[0026] In some embodiments, adjusting the brightness of the predetermined light source includes reducing the brightness of the predetermined light source.
[0027] In some embodiments, adjusting the area of the predetermined light source includes reducing the area of the predetermined light source.
[0028] According to a fourth aspect of the embodiments of the present disclosure, a glare control device is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute the glare control method as described in any of the above embodiments based on instructions stored in the memory.
[0029] According to a fifth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the non-volatile computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method described in any of the above embodiments is implemented.
[0030] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0032] The present disclosure can be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
[0033] FIG1 is a schematic diagram of glare of a Fresnel lens according to an embodiment of the present disclosure;
[0034] FIG2 is a flow chart of a glare level detection method according to an embodiment of the present disclosure;
[0035] FIG3 is a schematic diagram of a light source incident lens according to an embodiment of the present disclosure;
[0036] 4A to 4I are schematic diagrams showing how the degree of glare varies with the incident angle of a light source in some embodiments of the present disclosure;
[0037] 5A and 5B are schematic diagrams showing how the degree of glare varies with the area of a light source in some embodiments of the present disclosure;
[0038] 6A to 6C are schematic diagrams of color space conversion effects according to some embodiments of the present disclosure;
[0039] 7A to 7C are schematic diagrams of glare area detection results according to some embodiments of the present disclosure;
[0040] 8A to 8H are schematic diagrams of glare area detection results according to some embodiments of the present disclosure;
[0041] FIG9 is a schematic diagram of halo detection results according to an embodiment of the present disclosure;
[0042] FIG10 is a schematic structural diagram of a glare level detection device according to an embodiment of the present disclosure;
[0043] FIG11 is a schematic flow chart of a glare control method according to an embodiment of the present disclosure;
[0044] FIG12 is a schematic structural diagram of a glare control device according to an embodiment of the present disclosure.
[0045] It should be understood that the size of each part shown in the drawings is not drawn according to the actual proportional relationship.In addition, the same or similar reference numerals represent the same or similar components. DETAILED DESCRIPTION
[0046] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. The description of the exemplary embodiments is merely illustrative and is in no way intended to limit the present disclosure, its application, or use. The present disclosure can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to make the present disclosure thorough and complete and to fully convey the scope of the present disclosure to those skilled in the art. It should be noted that unless otherwise specifically stated, the relative arrangement of the components and steps, the composition of the materials, and the numerical values set forth in these embodiments should be interpreted as being merely exemplary and not as limiting.
[0047] The terms "first," "second," and similar terms used in this disclosure do not denote any order, quantity, or importance, but are simply used to distinguish one part from another. Terms such as "include" or "comprise" mean that the elements preceding the term include the elements listed after the term, and do not exclude the possibility of also including other elements.
[0048] All terms (including technical or scientific terms) used in this disclosure have the same meaning as those understood by one of ordinary skill in the art to which this disclosure belongs, unless otherwise specifically defined. It should also be understood that terms defined in, for example, general dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology, and should not be interpreted in an idealized or highly formal sense, unless explicitly defined herein.
[0049] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0050] Figure 1 is a schematic diagram of glare generated by a Fresnel lens according to one embodiment of the present disclosure. As shown in Figure 1 , when light is incident on a Fresnel lens, the resulting image is shown in Figure 1 . In Figure 1 , area 1 represents the image of the light source, while areas 2, 3, and 4 represent the glare generated by the Fresnel lens.
[0051] The inventors have noticed that in related art, the glare degree of a lens is usually determined manually. Therefore, the glare detection results are subjective and cannot accurately determine the glare degree of the lens.
[0052] Accordingly, the present disclosure provides a glare level detection method, which provides a quantitative evaluation result of the glare degree by utilizing the glare characteristics of the glare area, thereby being able to accurately determine the glare level of the lens.
[0053] Figure 2 is a flow chart of a glare level detection method according to an embodiment of the present disclosure. In some embodiments, the following glare level detection method is performed by a glare level detection device.
[0054] In step 201 , a first image is acquired, wherein the first image is an image formed when a predetermined light source is incident on a lens.
[0055] The inventors have noted that the degree of glare in an image formed by a predetermined light source incident on a lens is correlated with the angle of incidence of the predetermined light source incident on the lens, the brightness of the predetermined light source, or the area of the predetermined light source. To accurately detect the glare level of a lens, it is desirable to maximize the degree of glare in the image. To this end, the degree of glare in the image can be effectively increased by adjusting at least one of the angle of incidence of the predetermined light source incident on the lens, the brightness of the predetermined light source, or the area of the predetermined light source.
[0056] 3 , a light source located on a plane 32 is incident on a lens 31 at an incident angle θ. The distance between the lens 31 and the plane 32 is u.
[0057] It should be noted that different incident angles of the predetermined light source will result in different degrees of glare in the resulting image.
[0058] In some embodiments, the incident angle of the predetermined light source incident on the lens is adjusted so that the incident angle of the predetermined light source incident on the lens is within a first predetermined range.
[0059] Figures 4A through 4I are schematic diagrams illustrating how the degree of glare varies with the incident angle of a light source in some embodiments of the present disclosure. As can be seen from Figures 4A through 4I, as the incident angle of the light source decreases, the degree of glare in the image first gradually increases and then gradually decreases. Among Figures 4A through 4I, the glare in Figure 4F is the most pronounced.
[0060] Therefore, in order to effectively detect the glare level of the lens, it is necessary to control the incident angle of the light source to be within the first predetermined range so as to increase the glare level of the image.
[0061] In some embodiments, the first predetermined range is 15° to 25°. That is, when the incident angle of the predetermined light source incident on the lens is in the range of 15° to 25°, the glare phenomenon in the image is more significant.
[0062] In some embodiments, the brightness of the predetermined light source is adjusted so that the difference between the brightness of the predetermined light source and the background brightness is within a second predetermined range.
[0063] It's important to note that, with regard to light source brightness, the higher the light source brightness and the lower the background brightness, the more pronounced the glare in the resulting image. For example, on an 8-bit display, the glare in the resulting image is most pronounced when the light source's grayscale is (255, 255, 255) and the background's grayscale is (0, 0, 0). To this end, by increasing the brightness of a predetermined light source so that the difference between the brightness of the predetermined light source and the background brightness remains within a predetermined range, the glare in the resulting image is increased.
[0064] In some embodiments, the area of the predetermined light source is adjusted so that the area of the predetermined light source is within a third predetermined range.
[0065] It should be noted that the degree of glare varies depending on the area of the light source displayed in the image. For example, the diameter of the light source in Figure 5A is 100 pixels, while the diameter of the light source in Figure 5B is 200 pixels. If the size of a pixel is 0.04 cm, the diameter of the light source in Figure 5A is 100 × 0.04 = 4 cm, and the diameter of the light source in Figure 5B is 200 × 0.04 = 8 cm.
[0066] Comparing Figures 5A and 5B, we can see that the image shown in Figure 5B has a greater degree of glare. In other words, increasing the light source area can increase the degree of glare in the image. Therefore, when setting the light source area in the image, the pixel size of the display screen should be considered. Given the same light source area in the image, a larger pixel size will display a larger light source on the screen, resulting in more noticeable glare. Of course, if the area is too large, the computational effort will increase. To this end, by controlling the area of the predetermined light source within a predetermined range, we can increase the degree of glare in the image while keeping the computational effort within a reasonable range.
[0067] In step 202 , a glare area in the first image is identified based on color information of the first image.
[0068] In some embodiments, the step of identifying the glare area in the first image includes the following steps:
[0069] 1) Generate a second image based on the color information in the first image.
[0070] It should be noted that images captured by image acquisition devices typically use the RGB (Red-Gree-Blue) color space. Since it is impossible to obtain color information in an image by removing brightness information in the RGB color space, it is necessary to convert the image to a color space to obtain color information.
[0071] It's also important to note that the RGB color space is a standard color space used in industry. Various colors are created by varying and superimposing the red, green, and blue color channels. The RGB color space encompasses nearly every color perceptible to human vision and is one of the most widely used color spaces.
[0072] In some embodiments, the first image is converted into a predetermined color space to obtain a third image. Next, brightness information in the third image is removed so as to utilize color information in the third image to generate the second image.
[0073] In some embodiments, the predetermined color space is a suitable color space such as a YUV color space (Y represents luminance information, U and V represent chrominance information), an HSV (Hue-Saturation-Value) color space, or the like.
[0074] It should be noted that in the YUV color space, each pixel has two attributes, namely brightness information (Y) and color information (U, V). In other words, the YUV color space can separate the brightness information (Y) and color information (U, V) of the image. Therefore, the brightness information and color information of the image can be stored separately without affecting the image quality, thus achieving efficient image compression.
[0075] The HSV color space, also known as the Hexcone Model, is a color space created based on the intuitive characteristics of color. In the HSV color space, each color is represented by hue (H), saturation (S), and value (V).
[0076] In some embodiments, when the predetermined color space is a YUV color space, the image is converted from the RGB color space to the YUV color space using the following formula (1), removing the Y component (brightness information) to retain the U component and the V component (color information).
[0077] For example, the image captured uses the RGB color space, as shown in Figure 6A. By converting the image shown in Figure 6 to the YUV color space, the resulting image is shown in Figure 6B. Next, the brightness information in the image shown in Figure 6B is removed, retaining only the color information. The resulting image is shown in Figure 6C.
[0078] As can be seen from FIG6C , the glare area is gray, while the light source and the background are both approximately black. In this case, the glare area can be easily detected through image detection.
[0079] In some embodiments, when the predetermined color space is the HSV color space, an image retaining only color information is obtained by extracting the H component or the S component in the image.
[0080] 2) Identify the largest connected domain of the target graphic in the second image as the glare area.
[0081] It should be noted here that, as shown in FIG6C , the target pattern in the second image is the gray area in the second image, ie, the glare area.
[0082] In some embodiments, the second image is binarized to obtain a third image. Next, the maximum connected domain in the third image is identified as the glare area.
[0083] It should be noted here that by binarizing the image and converting it into a binary image, the goal is to separate the glare area in the image from the background so that the glare area can be more easily identified. For example, an image with only color information is shown in Figure 7A. By binarizing the image shown in Figure 7A, the resulting image is shown in Figure 7B. Next, in the image shown in Figure 7B, the glare area is identified, as shown in Figure 7C. In Figure 7C, the bounding rectangle 71 of the target figure and the minimum bounding rectangle 72 of the target figure are identified. The bounding rectangle 71 is used to finely locate the glare, light source and background. The minimum bounding rectangle 72 is used to calculate the characteristics of the glare area.
[0084] In step 203, the glare level of the lens is determined according to the glare characteristics of the glare area.
[0085] In some embodiments, the glare characteristic of the glare region includes at least one of an area of the glare region, a brightness of the glare region, and a color value of the glare region.
[0086] In some embodiments, the glare level of the lens is determined based on a weighted sum of the area of the glare region, the brightness of the glare region, and the color value of the glare region.
[0087] In some embodiments, the glare area includes N independent sub-areas, where N is a natural number greater than 1. In this case, the step of determining the glare level of the lens includes the following steps:
[0088] 1) Determine the glare value of the i-th sub-region according to the glare characteristics of the i-th sub-region, 1≤i≤N.
[0089] In some embodiments, the glare value of the i-th sub-region is determined according to a weighted sum of the area of the i-th sub-region, the brightness of the i-th sub-region, and the color value of the i-th sub-region.
[0090] For example, the glare value of the i-th sub-area Glare i As shown in formula (2).
[0091] in, is the area of the ith subregion, is the brightness of the i-th sub-region, Color i is the color value of the i-th sub-region. k S is the weight of the area of the i-th sub-region, k V is the brightness weight of the i-th sub-region, k C is the weight of the color value of the i-th sub-region.
[0092] In some embodiments, the weight k S , weight k V and weight k C The sum is a predetermined value.
[0093] For example, the weight k S , weight k V and weight k C Satisfy the conditions shown in formula (3). k S +k V +k C =1 (3)
[0094] 2) Determine the glare value of the lens according to the glare values of the N independent sub-areas.
[0095] In some embodiments, the glare value of the lens is determined according to the sum of the glare values of N independent sub-regions.
[0096] In some embodiments, the area of each of the N independent sub-regions is weighted by a predetermined first weight, the brightness of each of the N independent sub-regions is weighted by a predetermined second weight, and the color of each of the N independent sub-regions is weighted by a predetermined third weight. In other words, in each sub-region, the three parameters of area, brightness, and color have the same influence on the glare value, thereby ensuring that the calculated lens glare value accurately reflects the degree of glare in each sub-region.
[0097] For example, the glare value of the lens is Glare level As shown in formula (4).
[0098] 3) Determine the glare level of the lens based on the glare value of the lens.
[0099] For example, if the lens glare value is greater than 1, the glare in the image is quite obvious, and the glare level is poor. If the lens glare value is less than 0.6, the glare in the image is almost invisible, and the glare level is excellent. If the lens glare value is between 0.6 and 1, the glare in the image is visible but does not cause a significant impact on the user, and the glare level is good.
[0100] The present disclosure is described below through specific examples.
[0101] Two sets of Fresnel lenses were used for testing. The first set of lenses was provided by the first manufacturer, and the second set of lenses was provided by the second manufacturer. The first set of lenses included four lenses: F1, F2, F3, and F4. The glare test results are shown in Figures 8A, 8B, 8C, and 8D. The second set of lenses included four lenses: S1, S2, S3, and S4. The glare test results are shown in Figures 8E, 8F, 8G, and 8H. In Figures 8A to 8H, the white rectangle represents the circumscribed rectangle of the glare.
[0102] By utilizing the solution provided by the present disclosure, the glare values and glare levels of lenses F1 to F4 and lenses S1 to S4 are shown in Table 1.
[0103] Table 1
[0104] Table 1 shows that, under the same testing conditions, only one of the four lenses in the first lens group had a poor glare rating. However, three of the four lenses in the second lens group had poor glare ratings. This indicates that the glare rating of the first lens group provided by the second manufacturer is significantly better than that of the second lens group provided by the second manufacturer.
[0105] It should also be noted that the solutions provided by the above embodiments of the present disclosure, in addition to being able to identify glare areas in an image, can also be used to measure halo in local dimming technology. As shown in Figure 9, by using the solutions provided by the above embodiments of the present disclosure to identify glare areas, halo areas 91 in an image are effectively identified.
[0106] FIG10 is a schematic diagram of the structure of a glare level detection device according to an embodiment of the present disclosure. As shown in FIG10 , the glare level detection device includes a memory 101 and a processor 102 .
[0107] The memory 101 is used to store instructions. The processor 102 is coupled to the memory 101. The processor 102 is configured to execute the method involved in any embodiment of FIG. 2 based on the instructions stored in the memory.
[0108] As shown in FIG10 , the glare level detection device further includes a communication interface 103 for exchanging information with other devices and a bus 104 through which the processor 102 , the communication interface 103 , and the memory 101 communicate with each other.
[0109] Memory 101 may include high-speed RAM (Random Access Memory) or NVM (Non-Volatile Memory), for example, at least one disk storage device. Memory 101 may also be a storage array. Memory 101 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules.
[0110] In addition, the processor 102 may be a central processing unit, or may be an ASIC (Application Specific Integrated Circuit), or may be one or more integrated circuits configured to implement the embodiments of the present disclosure.
[0111] The present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the method involved in any one of the embodiments in FIG. 2 .
[0112] It should also be noted that in the above embodiment, to detect the glare level of the lens, the glare level in the image can be minimized by adjusting the angle of incidence of the light source entering the lens, the brightness of the light source, or the area of the light source. Conversely, when viewing images generated through a lens, users always want to minimize the glare level in the image. Accordingly, by adjusting at least one of the angle of incidence of the light source entering the lens, the brightness of the light source, or the area of the predetermined light source, the glare level in the image can be effectively reduced.
[0113] Figure 11 is a flow chart of a glare control method according to an embodiment of the present disclosure. In some embodiments, the following glare control method is executed by a glare control device.
[0114] In step 1101 , a first image is acquired, where the first image is an image formed when a predetermined light source is incident on a lens.
[0115] In step 1102 , a glare area in the first image is identified based on color information of the first image.
[0116] In some embodiments, the step of identifying the glare area in the first image includes the following steps:
[0117] 1) Generate a second image based on the color information in the first image.
[0118] It should be noted that images captured by image acquisition devices are usually in the RGB color space. Since it is impossible to obtain the color information in the image by removing the brightness information in the RGB color space, it is necessary to convert the image into a color space to obtain the color information in the image.
[0119] In some embodiments, the first image is converted into a predetermined color space to obtain a third image. Next, brightness information in the third image is removed so as to utilize color information in the third image to generate the second image.
[0120] In some embodiments, the predetermined color space is a suitable color space such as a YUV color space, an HSV color space, etc.
[0121] In some embodiments, when the predetermined color space is a YUV color space, the image is converted from the RGB color space to the YUV color space using the above formula (1), and the Y component (brightness information) is removed to retain the U component and the V component (color information).
[0122] For example, the image captured uses the RGB color space, as shown in Figure 6A. By converting the image shown in Figure 6 to the YUV color space, the resulting image is shown in Figure 6B. Next, the brightness information in the image shown in Figure 6B is removed, retaining only the color information. The resulting image is shown in Figure 6C.
[0123] As can be seen from FIG6C , the glare area is gray, while the light source and the background are both approximately black. In this case, the glare area can be easily detected through image detection.
[0124] In some embodiments, when the predetermined color space is the HSV color space, an image retaining only color information is obtained by extracting the H component or the S component in the image.
[0125] 2) Identify the largest connected domain of the target graphic in the second image as the glare area.
[0126] It should be noted here that, as shown in FIG6C , the target pattern in the second image is the gray area in the second image, ie, the glare area.
[0127] In some embodiments, the second image is binarized to obtain a third image. Next, the maximum connected domain in the third image is identified as the glare area.
[0128] It should be noted here that by binarizing the image and converting it into a binary image, the goal is to separate the glare area in the image from the background so that the glare area can be more easily identified. For example, an image with only color information is shown in Figure 7A. By binarizing the image shown in Figure 7A, the resulting image is shown in Figure 7B. Next, in the image shown in Figure 7B, the glare area is identified, as shown in Figure 7C. In Figure 7C, the bounding rectangle 71 of the target figure and the minimum bounding rectangle 72 of the target figure are identified. The bounding rectangle 71 is used to finely locate the glare, light source and background. The minimum bounding rectangle 72 is used to calculate the characteristics of the glare area.
[0129] In step 1103, the glare level of the lens is determined according to the glare characteristics of the glare area.
[0130] In some embodiments, the glare characteristic of the glare region includes at least one of an area of the glare region, a brightness of the glare region, and a color value of the glare region.
[0131] In some embodiments, the glare level of the lens is determined based on a weighted sum of the area of the glare region, the brightness of the glare region, and the color value of the glare region.
[0132] In some embodiments, the glare area includes N independent sub-areas, where N is a natural number greater than 1. In this case, the step of determining the glare level of the lens includes the following steps:
[0133] 1) Determine the glare value of the i-th sub-region according to the glare characteristics of the i-th sub-region, 1≤i≤N.
[0134] In some embodiments, the glare value of the i-th sub-region is determined according to a weighted sum of the area of the i-th sub-region, the brightness of the i-th sub-region, and the color value of the i-th sub-region.
[0135] For example, the glare value of the i-th sub-area Glare i As shown in the above formula (2).
[0136] In some embodiments, the weight k of the area of the i-th sub-region S , the brightness weight k of the i-th sub-region V and the weight k of the color value of the i-th sub-region C The sum is a predetermined value.
[0137] For example, the weight k S , weight k V and weight k C The conditions shown in the above formula (3) are satisfied.
[0138] 2) Determine the glare value of the lens according to the glare values of the N independent sub-areas.
[0139] In some embodiments, the glare value of the lens is determined according to the sum of the glare values of N independent sub-regions.
[0140] In some embodiments, the area of each of the N independent sub-regions is weighted by a predetermined first weight, the brightness of each of the N independent sub-regions is weighted by a predetermined second weight, and the color of each of the N independent sub-regions is weighted by a predetermined third weight. In other words, in each sub-region, the three parameters of area, brightness, and color have the same influence on the glare value, thereby ensuring that the calculated lens glare value accurately reflects the degree of glare in each sub-region.
[0141] For example, the glare value of the lens is Glare level As shown in the above formula (4).
[0142] 3) Determine the glare level of the lens based on the glare value of the lens.
[0143] For example, if the lens glare value is greater than 1, the glare in the image is quite obvious, and the glare level is poor. If the lens glare value is less than 0.6, the glare in the image is almost invisible, and the glare level is excellent. If the lens glare value is between 0.6 and 1, the glare in the image is visible but does not cause a significant impact on the user, and the glare level is good.
[0144] In step 1104, when the glare level of the lens does not meet the predetermined level requirement, at least one of adjusting the incident angle of the predetermined light source entering the lens, adjusting the brightness of the predetermined light source, or adjusting the area of the predetermined light source is performed so that the glare level of the lens meets the predetermined level requirement.
[0145] In some embodiments, adjusting the incident angle of the predetermined light source into the lens includes:
[0146] In a case where the incident angle of the predetermined light source is within the first predetermined range, the incident angle of the predetermined light source is reduced, or the incident angle of the predetermined light source is increased so that the incident angle of the predetermined light source is not within the first predetermined range.
[0147] The above analysis shows that, as shown in Figures 4A to 4I, as the incident angle of the light source decreases, the degree of glare in the image first gradually increases and then gradually decreases. In other words, when the incident angle of the light source is within a predetermined range, the degree of glare in the image is more significant. Therefore, by adjusting the incident angle of the predetermined light source so that it is outside this predetermined range, the degree of glare in the image can be effectively reduced.
[0148] In some embodiments, the first predetermined range is 15° to 25°. That is, by adjusting the incident angle of the predetermined light source so that the incident angle of the predetermined light source is not within the range of 15° to 25°, the degree of glare in the image can be effectively reduced.
[0149] For example, if the current incident angle of the predetermined light source is 20°, in order to reduce the degree of glare in the image, the incident angle of the predetermined light source can be reduced from 20° to 13°, or the incident angle of the predetermined light source can be increased from 20° to 26°, thereby effectively reducing the degree of glare in the image.
[0150] In some embodiments, when the incident angle of the predetermined light source is less than a lower limit value of the first predetermined range, the incident angle of the predetermined light source is reduced.
[0151] For example, if the current incident angle of the predetermined light source is 13°, which is not within the range of 15° to 25°, but the user wants to further reduce the degree of glare in the image, the incident angle of the predetermined light source can be further reduced, for example, reducing the incident angle of the predetermined light source from 13° to 10°, thereby further reducing the degree of glare in the image.
[0152] In some embodiments, when the incident angle of the predetermined light source is greater than an upper limit value of the first predetermined range, the incident angle of the predetermined light source is increased.
[0153] For example, if the current incident angle of the predetermined light source is 26°, which is not within the range of 15° to 25°, but the user wants to further reduce the degree of glare in the image, the incident angle of the predetermined light source can be further increased, for example, the incident angle of the predetermined light source can be reduced from 26° to 28°, thereby further reducing the degree of glare in the image.
[0154] In some embodiments, adjusting the brightness of the predetermined light source includes reducing the brightness of the predetermined light source.
[0155] The above analysis shows that, with respect to light source brightness, the higher the light source brightness and the lower the background brightness, the more pronounced the glare in the resulting image. Therefore, by reducing the brightness of a predetermined light source, the difference between the brightness of the predetermined light source and the background brightness can be reduced, thereby reducing the degree of glare in the image.
[0156] In some embodiments, adjusting the area of the predetermined light source includes reducing the area of the predetermined light source.
[0157] From the above analysis, it can be seen that the glare level in the image can be increased by increasing the area of the light source. Accordingly, the glare level in the image can be reduced by reducing the area of the predetermined light source.
[0158] Figure 12 is a schematic diagram of the structure of a glare control device according to one embodiment of the present disclosure. As shown in Figure 12, the glare control device includes a memory 121, a processor 122, a communication interface 123, and a bus 124. Figure 12 differs from Figure 10 in that, in the embodiment shown in Figure 12, the processor 122 is configured to execute instructions stored in the memory to implement the method described in any of the embodiments of Figure 11.
[0159] The present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the method involved in any one of the embodiments in FIG. 11 .
[0160] Thus far, the embodiments of the present disclosure have been described in detail. To avoid obscuring the concept of the present disclosure, some details known in the art have not been described. Based on the above description, those skilled in the art can fully understand how to implement the technical solutions disclosed herein.
[0161] Although some specific embodiments of the present disclosure have been described in detail through examples, those skilled in the art will understand that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. Those skilled in the art will understand that the above embodiments may be modified or some technical features may be replaced with equivalents without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.
Claims
1. A glare level detection method, comprising: Collecting a first image, wherein the first image is an image formed by a predetermined light source incident on a lens; Identifying a glare area in the first image according to the color information of the first image; Determining the glare level of the lens according to the glare characteristics of the glare area.
2. The method according to claim 1, wherein The identifying the glare area in the first image includes: Generating a second image according to the color information in the first image; Identifying the largest connected domain of the target graphic in the second image as the glare area.
3. The method according to claim 2, wherein, The generating the second image includes: Converting the first image into a predetermined color space to obtain a third image; Removing the brightness information in the third image so as to generate the second image by using the color information in the third image.
4. The method according to claim 2, wherein, The identifying the largest connected domain in the second image includes: Performing binarization processing on the second image to obtain a fourth image; Identifying the largest connected domain of the target graphic in the fourth image as the glare area.
5. The method according to claim 1, wherein, The glare characteristics of the glare area include at least one of the area of the glare area, the brightness of the glare area, and the color value of the glare area.
6. The method according to claim 5, wherein Determining the glare level of the lens according to the glare characteristics of the glare area includes: Determining the glare level of the lens according to the weighted sum of the area of the glare area, the brightness of the glare area, and the color value of the glare area.
7. The method according to claim 6, wherein, The glare area includes N independent sub-areas, N is a natural number greater than 1, and the determining the glare level of the lens includes: Determining the glare value of the i-th sub-area according to the glare characteristics of the i-th sub-area, 1 ≤ i ≤ N; Determining the glare value of the lens according to the glare values of the N independent sub-areas; Determining the glare level of the lens according to the glare value of the lens.
8. The method according to claim 7, wherein, Determining the glare value of the i-th sub-area includes: Determining the glare value of the i-th sub-area according to the weighted sum of the area of the i-th sub-area, the brightness of the i-th sub-area, and the color value of the i-th sub-area.
9. The method according to claim 8, wherein, The sum of the weight value of the area of the i-th sub-area, the weight value of the brightness of the i-th sub-area, and the weight value of the color value of the i-th sub-area is a predetermined value.
10. The method according to claim 9, wherein, The weight of the area of each sub-area in the N independent sub-areas is a predetermined first weight value; The weight value of the brightness of each sub-area in the N independent sub-areas is a predetermined second weight value; The weight of the color value of each sub-area in the N independent sub-areas is a predetermined third weight value.
11. The method according to claim 7, wherein, The determining the glare value of the lens according to the glare values of the N independent sub-areas includes: Determining the glare value of the lens according to the sum of the glare values of the N independent sub-areas.
12. The method according to any one of claims 1-11, further comprising: Adjusting the incident angle of the predetermined light source incident on the lens so that the incident angle of the predetermined light source incident on the lens is within a first predetermined range.
13. The method according to claim 12, wherein the first predetermined range is from 15° to 25°.
14. The method according to claim 12, further comprising: adjusting the brightness of the predetermined light source so that the difference between the brightness of the predetermined light source and the background brightness is within a second predetermined range.
15. The method according to claim 12, further comprising: adjusting the area of the predetermined light source so that the area of the predetermined light source is within a third predetermined range.
16. A glare level detection device, comprising: a memory; a processor, coupled to the memory, the processor being configured to execute, based on instructions stored in the memory, the method according to any one of claims 1-15.
17. A glare control method, comprising: acquiring a first image, wherein the first image is an image formed by a predetermined light source incident on a lens; identifying a glare area in the first image according to the color information of the first image; determining the glare level of the lens according to the glare characteristics of the glare area; when the glare level of the lens does not meet a predetermined level requirement, performing at least one of adjusting the incident angle of the predetermined light source incident on the lens, adjusting the brightness of the predetermined light source, or adjusting the area of the predetermined light source, so that the glare level of the lens meets the predetermined level requirement.
18. The method according to claim 17, wherein Adjusting the incident angle of the predetermined light source incident on the lens includes: when the incident angle of the predetermined light source is within a first predetermined range, reducing the incident angle of the predetermined light source or increasing the incident angle of the predetermined light source so that the incident angle of the predetermined light source is not within the first predetermined range.
19. The method according to claim 18, wherein when the incident angle of the predetermined light source is less than the lower limit value of the first predetermined range, reducing the incident angle of the predetermined light source.
20. The method according to claim 18, wherein when the incident angle of the predetermined light source is greater than the upper limit value of the first predetermined range, increasing the incident angle of the predetermined light source.
21. The method according to claim 18, wherein the first predetermined range is from 15° to 25°.
22. The method according to any one of claims 17-21, wherein Adjusting the brightness of the predetermined light source includes: reducing the brightness of the predetermined light source.
23. The method according to any one of claims 17-21, wherein, Adjusting the area of the predetermined light source includes: reducing the area of the predetermined light source.
24. A glare control device, comprising: a memory; a processor, coupled to the memory, the processor being configured to execute, based on instructions stored in the memory, the method according to any one of claims 17-23.
25. A computer-readable storage medium, wherein, A computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method according to any one of claims 1-15, 17-23 is implemented.
Citation Information
Patent Citations
Glare measurement system
CN105678799A
Systems and methods for detection and visualization of reflective glards
CN116026560A
Glare value detection system and method based on video stream
CN117201945A
Program, information storage medium and image generation system
JP2006244011A
Method and apparatus for glare detection
US20180197039A1