Glare database acquisition method and device, image processing method and device, electronic equipment and storage medium

By using the first camera module and the second camera module to capture image pairs, obtain the glare mask map and extract feature data, and establish a complete glare database, which solves the problem of incomplete glare database in the existing technology and realizes large-scale analysis Effective solution to some glare problems.

CN119316722AActive Publication Date: 2025-01-14GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD

Patent Information

Application Number
CN202310866394.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-13
Publication Date
2025-01-14
Estimated Expiration
2043-07-13

AI Technical Summary

Technical Problem

The lack of a relatively complete glare feature database in the prior art has resulted in only a small number of glare problems being solved.

Method used

By using the first camera module and the second camera module to capture image pairs at the same incident light angle, using the anti-reflective film of the first camera module and the original optical components of the second camera module, the glare mask map is obtained and Extract glare characteristic data and establish a complete glare database.

Benefits of technology

The established glare database is more complete, can effectively solve most glare problems, and improves the accuracy of image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119316722A_ABST
    Figure CN119316722A_ABST
Patent Text Reader

Abstract

The invention discloses a glare database acquisition method, a glare database acquisition device, an image processing method, an image processing device, electronic equipment and a computer readable storage medium. The glare database acquisition method comprises the following steps: for the same light source, adopting a first camera module and a second camera module to shoot a first image and a second image under the same incident light angle so as to form an image pair, an anti-reflection film is additionally arranged on a first optical assembly of the first camera module; the incident angle of the illumination light of the collimation light source is changed for multiple times, and the first camera module and the second camera module shoot a plurality of first images and a plurality of second images to form a plurality of image pairs; obtaining a glare mask pattern according to the first image and the second image in each image pair; extracting feature data of glare in the glare mask pattern; and establishing a glare database according to the glare mask patterns of the plurality of image pairs and the corresponding glare feature data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method for acquiring a glare database, a device for acquiring a glare database, an image processing method, an image processing device, an electronic device, and a computer-readable storage medium. Background Art

[0002] The camera modules of most consumer electronic products on the market inevitably suffer from poor image clarity due to glare problems. Currently, in order to reduce the glare problem of camera modules, AI is usually used to identify the image shooting scene, and the glare characteristics are used to segment the glare from the image to restore the image information of the glare position. However, there is currently a lack of a relatively complete glare feature database, which can only solve a small number of glare problems. Summary of the invention

[0003] Embodiments of the present application provide a method for acquiring a glare database, a device for acquiring a glare database, an image processing method, an image processing device, an electronic device, and a computer-readable storage medium.

[0004] In a first aspect, a method for acquiring a glare database according to an embodiment of the present application includes:

[0005] For the same light source, a first camera module and a second camera module are used to capture a first image and a second image at the same incident light angle to form an image pair, and an anti-reflection film is added to the first optical component of the first camera module compared to the second optical component of the second camera module;

[0006] The incident angle of the light irradiated by the collimated light source is changed multiple times, and the first camera module and the second camera module capture multiple first images and multiple second images to form multiple image pairs;

[0007] Acquire a glare mask image according to the first image and the second image in each of the image pairs;

[0008] Extracting characteristic data of glare in the glare mask image; and

[0009] A glare database is established according to the glare mask images of the plurality of image pairs and the corresponding characteristic data of the glare.

[0010] In a second aspect, a device for acquiring a glare database according to an embodiment of the present application includes a first camera module, a second camera module, and a processor;

[0011] For the same light source, the first camera module and the second camera module are respectively used to capture a first image and a second image under the same incident light angle to form an image pair, and compared with the second optical component of the second camera module, an anti-reflection film is additionally provided on the first optical component of the first camera module;

[0012] When the incident angle of the light irradiated by the collimated light source is changed multiple times, the first camera module and the second camera module are further used to capture multiple first images and multiple second images to form multiple image pairs;

[0013] The processor is used to obtain a glare mask image according to the first image and the second image in each of the image pairs; extract characteristic data of glare in the glare mask image; and

[0014] A glare database is established according to the glare mask images of a plurality of the image pairs and the corresponding glare feature data.

[0015] In a third aspect, the image processing method of the embodiment of the present application includes:

[0016] Acquire an initial image captured by the second camera module;

[0017] identifying glare in the initial image according to a preset glare database, wherein the glare database is obtained according to the method for obtaining the glare database of the above embodiment; and

[0018] The image information of the area where the glare is located is restored to output a target image.

[0019] In a fourth aspect, an image processing device according to an embodiment of the present application includes:

[0020] A glare database, wherein the glare database is obtained according to the method for obtaining a glare database in the above-mentioned embodiment, and the glare database stores a glare mask image and characteristic data of glare; and

[0021] A processor, the processor being configured to:

[0022] Get the initial image taken by the camera module;

[0023] identifying glare in the initial image according to the glare database; and

[0024] The image information of the area where the glare is located is restored to output a target image.

[0025] In a fifth aspect, an electronic device according to an embodiment of the present application includes a memory and one or more processors. The processor is used to execute the method for acquiring a glare database according to the above embodiment and / or execute the above image processing method.

[0026] In a sixth aspect, a computer-readable storage medium of an embodiment of the present application stores a computer program, and when the computer program is executed by at least one processor, the method for acquiring a glare database of the above embodiment and / or the above image processing method are implemented.

[0027] The glare database acquisition method, glare database acquisition device, image processing method, image processing device, electronic device and computer-readable storage medium of the present application acquire the first image and the second image captured by the first camera module and the second camera module to form an image pair by changing the incident angle of light multiple times, and then acquire the glare mask map according to the first image and the second image in the image pair, and extract the characteristic data of glare, so as to establish a complete glare database. Since the first image in the image pair is captured by the first camera module with hardware improvement, and the second image is captured by the second camera module with hardware unimproved, the acquisition of the glare mask map is very accurate, so that the glare database finally established is more complete than the current glare database, and can solve most glare problems.

[0028] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0030] Figure 1 is a flowchart of a method for acquiring a glare database in some embodiments of the present application;

[0031] Figure 2 is a schematic diagram of the structure of a device for acquiring a glare database in certain embodiments of the present application;

[0032] Figure 3 is a schematic diagram of a structure in which a first camera module and a second camera module of certain embodiments of the present application are at multiple identical incident angles;

[0033] Figure 4 is a schematic diagram of extracting a glare mask image according to a first image and a second image in certain embodiments of the present application;

[0034] Figure 5 is a schematic diagram of a glare database in certain embodiments of the present application;

[0035] Figure 61 is a schematic diagram for comparing the structures of a first camera module having an ultra-low reflection film on the lens and a second camera module having no ultra-low reflection film on the lens in certain embodiments of the present application;

[0036] Figure 7 is a curve diagram of the reflectivity of an ultra-low reflection film and an anti-reflection film in certain embodiments of the present application;

[0037] Figure 8 yes Figure 4 A comparison chart of the shooting effects of the first camera module and the second camera module;

[0038] Fig. 9 2 is a schematic diagram for comparing the structures of a first camera module having an ultra-low reflection film on a protective cover plate and a second camera module having no ultra-low reflection film on the protective cover plate according to certain embodiments of the present application;

[0039] Fig.10 is a schematic diagram comparing the structures of an image sensor in a first camera module and an image sensor in a second camera module in certain embodiments of the present application;

[0040] Fig.11 is a schematic diagram comparing the structures of an image sensor in a first camera module and an image sensor in a second camera module in certain embodiments of the present application;

[0041] Fig.12 It is a schematic diagram comparing the structures of a first camera module with an infrared light cutoff film provided on the lens and a second camera module with no infrared light cutoff film provided on the lens in certain embodiments of the present application;

[0042] Fig.13 yes Fig. 9 A comparison chart of the shooting effects of the first camera module and the second camera module;

[0043] Fig.14 1 is a schematic diagram for comparing the structures of a first camera module with an infrared light cutoff film provided on a protective cover plate and a second camera module with no infrared light cutoff film provided on the protective cover plate in certain embodiments of the present application;

[0044] Fig.15 is a schematic diagram comparing the structures of an image sensor in a first camera module and an image sensor in a second camera module in certain embodiments of the present application;

[0045] Fig.16 is a schematic diagram comparing the structures of an image sensor in a first camera module and an image sensor in a second camera module in certain embodiments of the present application;

[0046] Fig.171 is a schematic diagram for comparing the structures of a first camera module having a microstructure on the inner peripheral wall of a light shielding sheet and a second camera module having no microstructure on the inner peripheral wall of the light shielding sheet in certain embodiments of the present application;

[0047] Fig.18 yes Fig.14 A comparison chart of the shooting effects of the first camera module and the second camera module;

[0048] Fig.19 is a schematic diagram comparing the structures of a first camera module sandblasted or inked on a non-optically effective area of ​​a protective cover or lens and a second camera module not sandblasted or inked on a non-optically effective area of ​​the protective cover or lens in certain embodiments of the present application;

[0049] Fig. 20 1 is a schematic diagram comparing the structures of a first camera module having a black coating on a non-optically effective area of ​​a lens barrel, a motor or a filter and a second camera module having a non-optically effective area of ​​a lens barrel, a motor or a filter according to certain embodiments of the present application;

[0050] Fig.21 is a schematic diagram of a processor removing glare and restoring image information in certain embodiments of the present application;

[0051] Fig. 22 is a flowchart of an image processing method in certain embodiments of the present application;

[0052] Fig.23 is a schematic diagram of a process of identifying glare in an initial image according to a preset glare database in an image processing method in certain embodiments of the present application;

[0053] Fig.24 It is a schematic diagram of a process of restoring the image information of the area where the glare is located in the image processing method in certain embodiments of the present application to output a target image;

[0054] Fig.25 is a schematic diagram of the structure of an image processing device in certain embodiments of the present application;

[0055] Fig.26 It is a schematic diagram of the structure of an electronic device in some embodiments of the present application.

[0056] Description of main component symbols:

[0057] 100. Device for acquiring glare database; 10. First camera module; 11. First optical component; 111. Anti-reflection film; 1111. Ultra-low reflection film; 1112. Infrared light cut-off film; 1113. Anti-reflection film; 113. Protective cover; 115. Lens; 117. Filter; 119. First image sensor; 1191. Micro lens; 1193. Filter; 1195. Substrate; 13. Lens barrel; 15. Shading sheet; 17. Sandblasting or ink coating; 19. Black plating; 30. Second camera module; 31. Second optical component; 311. Second image sensor; 3111. Micro lens; 3113. Filter; 3115. Substrate; 50. Processor;

[0058] 300, image processing device; 301, glare database; 303, processor. DETAILED DESCRIPTION

[0059] The following is a further description of the embodiments of the present application in conjunction with the accompanying drawings. The same or similar reference numerals in the accompanying drawings represent the same or similar elements or elements with the same or similar functions from beginning to end. In addition, the embodiments of the present application described below in conjunction with the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the present application.

[0060] The camera modules of most consumer electronic products on the market inevitably suffer from poor image clarity due to glare problems. At present, in order to reduce the glare problem of camera modules, AI is usually used to identify the image shooting scene, and the glare characteristics are used to segment the glare from the image to restore the image information of the glare position. However, there is currently a lack of a relatively complete glare feature database, which can only solve a small part of the glare problem. In order to solve this problem, this application provides a method for obtaining a glare database ( Figure 1 As shown), a device for acquiring a glare database ( Figure 2 As shown), image processing method ( Fig. 22 As shown), image processing device ( Fig.25 As shown), electronic equipment ( Fig.26 ) and a computer readable storage medium ( Fig.26 shown).

[0061] See also Figure 1 , Figure 2 and Figure 6 The method for acquiring the glare database in the embodiment of the present application includes:

[0062] 01: For the same light source, the first camera module 10 and the second camera module 30 are used to capture the first image and the second image under the same incident light angle to form an image pair. Compared with the second optical component 31 of the second camera module 30, the first optical component 11 of the first camera module 10 is additionally provided with an anti-reflection film 111;

[0063] 02: The incident angle of the light irradiated by the collimated light source is changed multiple times, and the first camera module 10 and the second camera module 30 capture multiple first images and multiple second images to form multiple image pairs;

[0064] 03: Obtain a glare mask image according to the first image and the second image in each image pair;

[0065] 04: Extracting the characteristic data of glare in the glare mask image; and

[0066] 05: Establish a glare database 301 according to the glare mask images of the plurality of image pairs and the corresponding glare feature data.

[0067] The device 100 for acquiring a glare database of the embodiment of the present application includes a first camera module 10, a second camera module 30 and a processor 50. For the same light source, the first camera module 10 and the second camera module 30 are respectively used to capture a first image and a second image at the same incident light angle to form an image pair. Compared with the second optical component 31 of the second camera module 30, an anti-reflection film 111 is additionally provided on the first optical component 11 of the first camera module 10. When the incident angle of the light irradiated by the collimated light source is changed multiple times, the first camera module 10 and the second camera module 30 are also used to capture multiple first images and multiple second images to form multiple image pairs. The processor 50 is used to acquire a glare mask map according to the first image and the second image in each image pair; extract the characteristic data of glare in the glare mask map; and establish a glare database 301( according to the glare mask maps of multiple image pairs and the corresponding characteristic data of glare. Fig.25 shown).

[0068] Among them, the first camera module 10 is a device for shooting a first image, and the second camera module 30 is a device for shooting a second image. The first camera module 10 and the second camera module 30 in the embodiment of the present application can be, but are not limited to, a camera module for visible light imaging, a camera module for infrared light imaging, and a camera module for ultraviolet light imaging. The first camera module 10 and the second camera module 30 in the embodiment of the present application can be used in consumer electronic products, such as cameras in mobile phones, PADs, or laptops, and can also be aerospace detection, medical imaging detection, industrial detection cameras, and vehicle-mounted cameras.

[0069] The anti-reflection film 111 is a film structure that can reduce the reflection of light on its surface. Since the first camera module 10 is provided with the anti-reflection film 111, the first image captured by the first camera module 10 is almost glare-free. The second camera module 30 is not provided with the anti-reflection film, so the second image captured by the second camera module 10 is an original image with glare.

[0070] Please combine Figure 3 , the incident angle range of the light irradiated by the light source of the embodiment of the present application to the first camera module 10 and the second camera module 30 is [0°, 180°], and the first image and the second image captured by the first camera module 10 and the second camera module 30 at the same incident angle of the irradiated light are an image pair. The incident angle of the irradiated light of the first camera module 10 and the second camera module 30 corresponding to the plurality of image pairs can be [I 11 , I 21 ]、[I 12 , I 22 ]、[I 13 , I 23 ]……[I 1n , I 2n ], etc., among which, I 1n =I 2n For example, the first image captured by the first camera module 10 when the incident angle of the irradiated light is 60° and the second image captured by the second camera module 30 when the incident angle of the irradiated light is 60° are an image pair. The first image captured by the first camera module 10 when the incident angle of the irradiated light is 90° and the second image captured by the second camera module 30 when the incident angle of the irradiated light is 90° are an image pair.

[0071] In one embodiment, the light source is a collimated light source, the collimated light source is movable, the first camera module 10 is fixed, and the collimated light source rotates around the first camera module 10, so that the incident angle of the irradiated light on the first camera module 10 varies within [0°, 180°]. Similarly, the collimated light source is movable, the second camera module 30 is fixed, and the collimated light source rotates around the second camera module 30, so that the incident angle of the irradiated light on the second camera module 30 varies within [0°, 180°]. In another embodiment, the first camera module 10 is movable, the collimated light source is fixed, and the first camera module 10 rotates around the collimated light source, so that the incident angle of the irradiated light on the first camera module 10 varies within [0°, 180°]. Similarly, the second camera module 30 is movable, the collimated light source is fixed, and the first camera module 10 rotates around the collimated light source, so that the incident angle of the irradiated light on the second camera module 30 varies within [0°, 180°].

[0072] There is no limit on the number of first images captured by the first camera module 10 within the incident angle range of [0°, 180°] of the irradiated light. The more first images there are, the more image pairs there are in the glare feature database, the more complete the data in the database is, and the subsequent image processing of the original image taken is more accurate. The number of second images captured by the second camera module 30 is the same as the number of first images, so that the first images and the second images form image pairs in one-to-one correspondence.

[0073] The processor 50 compares the different points between the first image and the second image in each image pair to obtain the corresponding glare mask. The glare mask removes other information from the image with glare and only retains the image with glare. The types of glare can be but are not limited to arc ghost, petal ghost, feather stray light and point ghost. Please combine Figure 4 , taking point-like ghosts as an example, the left picture is the first image, the middle picture is the second image, and the right picture is the glare mask. There are point-like ghosts in the first image, but there are no point-like ghosts in the second image. The processor 50 extracts the glare mask of the point-like ghosts according to the differences between the two images.

[0074] Please combine Figure 5 , the processor 50 can obtain the glare features in the corresponding glare mask image. The glare features include the position of the glare relative to the light source, the intensity of the glare, the area of ​​the glare area, and the angle range of the glare. The processor 50 obtains the above glare features by processing the glare mask image, thereby establishing a complete glare database 301 ( Fig.25 ). Among them, "the position of glare relative to the light source" refers to the position of the light source as the origin, thereby obtaining the position of the glare relative to the origin (light source). For example, the position of the glare relative to the light source can be (X1, Y1) or (X2, Y2), etc. "The intensity of glare" refers to the light intensity of the glare itself. "The area where the glare is located" refers to the area where the glare appears in the image. "The angle range where the glare continues to appear" refers to the angle range where the glare continues to appear relative to the light source.

[0075] The method for acquiring a glare database and the device for acquiring a glare database 100 of the embodiment of the present application acquire the first image and the second image captured by the first camera module 10 and the second camera module 30 to form an image pair by changing the incident angle of light multiple times, and then acquire a glare mask map based on the first image and the second image in the image pair, and extract the characteristic data of glare, so as to establish a complete glare database 301. Since the first image in the image pair is captured by the first camera module with hardware improvement, and the second image is captured by the second camera module with hardware unimproved, the acquisition of the glare mask map is very accurate, so that the glare database finally established is more complete than the current glare database, and can solve most glare problems.

[0076] See also Figure 6 In some embodiments, the anti-reflection film 111 includes an ultra-low reflection film 1111, which is used to suppress the reflection of light; along the light incident direction of the first camera module 10, the first optical component 11 includes a protective cover 113, at least one lens 115, a filter 117 and a first image sensor 119 in sequence. Fig.10 Along the light incident direction of the first camera module 10, the first image sensor 119 includes a micro lens 1191 and a filter 1193 in sequence. An ultra-low reflection film 1111 is provided in the optically effective area of ​​at least one of the protective cover 113, at least one lens 115, the micro lens 1191 and the filter 1193.

[0077] Specifically, the second camera module 30 is an original camera module without hardware improvement, and the lens 115 of the second camera module 30 is provided with an anti-reflection film 1113. The first camera module 10 replaces the anti-reflection film 1113 in the second camera module 30 with an ultra-low reflection film 1111. Figure 7 According to the comparison diagram of the reflectivity curves of the anti-reflection film 1113 and the ultra-low-reflection film 1111, it can be seen that the reflectivity of the ultra-low-reflection film 1111 is much lower than that of the anti-reflection film 1113. The first camera module 10 adopts the ultra-low-reflection film 1111 to effectively improve the glare problem.

[0078] The coating technology of the ultra-low reflection film 1111 can be sub-wavelength coating (SWC) or atomic layer deposition (ALD). Among them, the sub-wavelength coating can form wedge-shaped microstructures smaller than the visible wavelength on the surface of the coated object (such as the lens 115). This structure can continuously change the refractive index, thereby eliminating the boundary of the sudden change of the refractive index. For light with nearly vertical incidence to light with a large incident angle, the ultra-low reflection film 1111 has a good reflection suppression effect. Atomic layer deposition is a method that can coat a material on the surface of the lens 115 layer by layer in the form of a single atomic film.

[0079] See also Figure 6 In one embodiment, an ultra-low reflection film 1111 is provided on the lens 115 of the first optical component 11. Figure 6The left figure in the middle is a schematic diagram of the structure of the first camera module 10 with an ultra-low reflection film 1111 on the lens 115, and the right figure is a schematic diagram of the structure of the second camera module 30 without hardware improvement. The lens 115 includes an optically effective area and a non-optically effective area. The optically effective area of ​​the lens 115 is used for light to pass through, and the non-optically effective area of ​​the lens 115 is used to be installed on other components and cannot allow light to pass through. In one example, the optically effective area of ​​a lens 115 of the first optical component 11 is provided with an ultra-low reflection film 1111. At this time, the ultra-low reflection film 1111 can be set in the optically effective area of ​​any lens 115 of the first camera module 10. In the case where the optically effective area of ​​a lens 115 of the first optical component 11 is provided with an ultra-low reflection film 1111, the processing of the first optical component 11 is relatively simple, the cost is low, and the glare problem can be better improved. In another example, the optically effective area of ​​multiple lenses 115 of the first optical component 11 is provided with an ultra-low reflection film 1111. At this time, the ultra-low reflection film 1111 can be set in the optically effective area of ​​two, three or all lenses 115 of the first camera module 10. In the case where the optically effective area of ​​multiple lenses 115 of the first optical component 11 is provided with an ultra-low reflection film 1111, the reflectivity of the first optical component 11 is low, which can better improve the glare problem.

[0080] Please combine Figure 8 , the left picture is a second image with arc ghost image taken by the second camera module 30, and the right picture is a first image taken by the first camera module 10 when the optical effective area of ​​the lens 115 is provided with an ultra-low reflection film 1111. From the comparison of the two pictures, it can be seen that the ultra-low reflection film 1111 is provided on the first camera module 10, which can effectively improve the glare problem of arc ghost image.

[0081] See also Fig. 9 In some other embodiments, an ultra-low reflection film 1111 is provided on the protective cover plate 113 of the first optical component 11. Fig. 9 The middle left figure is a schematic diagram of the structure of the first camera module 10 with an ultra-low reflection film 1111 on the protective cover 113 of the first optical component 11, and the right figure is a schematic diagram of the structure of the second camera module 30 without hardware improvement. Specifically, the protective cover 113 includes an optically effective area and a non-optically effective area, the optically effective area of ​​the protective cover 113 is used for allowing light to pass through, and the non-optically effective area of ​​the protective cover 113 is used to be installed on other components and cannot allow light to pass through. In some embodiments, an ultra-low reflection film 1111 is provided at least in the optically effective area of ​​the protective cover 113. In other embodiments, in addition to the ultra-low reflection film 1111 provided in the optically effective area of ​​the protective cover 113, the ultra-low reflection film 1111 may also be provided in the non-optically effective area of ​​the protective cover 113.

[0082] See also Fig.10In some other embodiments, the first image sensor 119 includes a microlens 1191, a filter 1193, and a substrate 1195 in sequence along the light incident direction of the first camera module 10. The second image sensor 311 includes a microlens 3111, a filter 3113, and a substrate 3115 in sequence along the light incident direction of the first camera module 10. An ultra-low reflection film 1111 is provided on the microlens 1191 of the first image sensor 119. The microlens 1191 includes an optically effective area and a non-optically effective area. The optically effective area of ​​the microlens 1191 is used for allowing light to pass through, and the non-optically effective area of ​​the microlens 1191 is used to be installed on other components and cannot allow light to pass through. In some embodiments, an ultra-low reflection film 1111 is provided at least in the optically effective area of ​​the microlens 1191. In other embodiments, in addition to the ultra-low reflection film 1111 provided in the optically effective area of ​​the microlens 1191, the ultra-low reflection film 1111 may also be provided in the non-optically effective area of ​​the microlens 1191.

[0083] See also Fig.11 In some other embodiments, the first image sensor 119 includes a microlens 1191, a filter 1193, and a substrate 1195 in sequence along the light incident direction of the first camera module 10. The second image sensor 311 includes a microlens 1191, a filter 1193, and a substrate 1195 in sequence along the light incident direction of the first camera module 10. An ultra-low reflection film 1111 is provided on the filter 1193 of the first image sensor 119. The filter 1193 includes an optically effective area and a non-optically effective area. The optically effective area of ​​the filter 1193 is used to allow light to pass through, and the non-optically effective area of ​​the filter 1193 is used to be installed on other components and cannot allow light to pass through. In some embodiments, the ultra-low reflection film 1111 is provided at least in the optically effective area of ​​the filter 1193, and the non-optically effective area of ​​the filter 1193 may also be provided with an ultra-low reflection film 1111.

[0084] In some further embodiments, the optically effective areas of multiple elements in the first optical component 11 are provided with ultra-low reflection films 1111. In one example, the optically effective areas of two types of elements in the first optical component 11 are provided with ultra-low reflection films 1111. For example, ultra-low reflection films 1111 are provided on both the protective cover 113 and the lens 115. Alternatively, ultra-low reflection films 1111 are provided on the protective cover 113 and the microlens 1191, etc. In another example, the optically effective areas of three types of elements in the first optical component 11 are provided with ultra-low reflection films 1111. For example, ultra-low reflection films 1111 are provided on the protective cover 113, the lens 115, and the microlens 1191. Alternatively, ultra-low reflection films 1111 are provided on the protective cover 113, the microlens 1191, and the filter 1193, etc. In another example, the protective cover 113 , the lens 115 , the microlens 1191 and the filter 1193 in the first optical component 11 are all provided with an ultra-low reflection film 1111 .

[0085] By comparing multiple pairs of images taken by the first camera module 10 and the second camera module 30 within the incident angle range of [0°, 180°] of the illuminating light, a glare mask image of the arc ghost and characteristic data of the arc ghost can be obtained, such as the position of the arc ghost relative to the light source, the intensity of the arc ghost, the area of ​​the arc ghost, and the angle range in which the arc ghost continues to appear.

[0086] See also Fig.12 In some embodiments, the anti-reflection film 111 includes an anti-reflection film 1113, and the anti-reflection film 1113 is used to suppress the reflection of light; along the light incident direction of the first camera module 10, the first optical component 11 includes a protective cover 113, at least one lens 115, a filter 117 and an image sensor 119 in sequence. Fig.15 The image sensor 119 includes a microlens 1191 and a filter 1193 in sequence; an anti-reflection film 1113 is provided on opposite sides of the filter 117; an infrared light cutoff film 1112 is provided on the protective cover 113, at least one lens 115, the microlens 1191 and at least one of the filters 1193, and the infrared light cutoff film 1112 is used to cut off infrared light.

[0087] Specifically, the second camera module 30 is an original camera module without hardware improvement. An infrared cutoff film 1112 (IRC) is provided on the side of the filter 117 of the second camera module 30 away from the image sensor 119. The infrared cutoff film 1112 requires a higher reflectivity to cut off infrared light, which is prone to cause glare problems such as petal ghosting. An anti-reflection film 1113 (AR) is provided on the side of the filter 117 close to the image sensor. The anti-reflection film 1113 is used to reduce the reflection of light. The first camera module 10 moves the infrared cutoff film 1112 in the second camera module 30 to other elements of the first optical component 11, and anti-reflection films 1113 are provided on both opposite sides of the filter 117.

[0088] In one embodiment, if Fig.12 As shown in the left figure, the optically effective area of ​​the lens 115 of the first optical component 11 is provided with an infrared light cut-off film 1112. The infrared light cut-off film 1112 can be provided in the optically effective area of ​​any lens 115. Fig.13, the left picture is a second image with petal ghosts taken by the second camera module 30, and the right picture is a first image taken by the first camera module 10 when an infrared light cut-off film 1112 is provided on the optically effective area of ​​the lens 115, and anti-reflection films 1113 are provided on opposite sides of the filter 117. The first camera module 10 can effectively improve the glare problem of petal ghosts by providing the infrared light cut-off film 1112 on the lens 115 and anti-reflection films 1113 on opposite sides of the filter 117.

[0089] See also Fig.14 ,like Fig.14 As shown in the left figure, in another embodiment, the optical effective area of ​​the protective cover plate 113 of the first optical component 11 is provided with an infrared light cut-off film 1112, and anti-reflection films 1113 are provided on both opposite sides of the filter 117. Fig.15 ,like Fig.15 As shown in the left figure, in another embodiment, the optically effective area of ​​the microlens 1191 of the first optical component 11 is provided with an infrared light cut-off film 1112, and anti-reflection films 1113 are provided on both opposite sides of the filter 117. Fig.16 ,like Fig.16 As shown in the left figure, in another embodiment, the optically effective area of ​​the filter 1193 of the first optical component 11 is provided with an infrared light cutoff film 1112 , and anti-reflection films 1113 are provided on opposite sides of the filter 117 .

[0090] By comparing multiple pairs of images taken by the first camera module 10 and the second camera module 30 within the incident angle range of [0°, 180°] of the illuminating light, a glare mask image of the petal ghost and characteristic data of the petal ghost can be obtained, such as the position of the petal ghost relative to the light source, the intensity of the petal ghost, the area of ​​the petal ghost, and the angle range in which the petal ghost continues to appear.

[0091] See also Fig.17 In some embodiments, the first camera module 10 includes a lens barrel 13 and a motor (not shown in the figure) for driving the lens barrel 13 to move. Along the light incident direction of the first camera module 10, the first optical component 11 includes a protective cover 113, at least one lens 115, a filter 117 and an image sensor 119 in sequence. Fig.15 Or 16, the image sensor 119 includes a micro lens 1191 and a filter 1193 in sequence, and at least one lens 115 is housed in the lens barrel 13.

[0092] Specifically, the second camera module 30 is an original camera module without any hardware improvement. The inner wall of the shading film 15, the non-optically effective area of ​​the second optical component 31, the surface of the lens barrel 13 and the motor etc. will produce reflections, which may easily cause the glare problem of feather stray light.

[0093] In one embodiment, the first camera module 10 further includes a light shielding sheet 15, which is used to block light, and the inner wall of the light shielding sheet 15 is provided with a microstructure. The inner wall of the light shielding sheet 15 is a smooth surface, and light is easily mirror-reflected, resulting in glare problems. The inner wall of the light shielding sheet 15 of the first camera module 10 is processed into a microstructure by chemical etching, and light is diffusely reflected on the surface of the microstructure, and the light is dispersed in different directions, thereby reducing the reflection of light on the inner wall of the light shielding sheet 15. Please refer to the following figure for details. Fig.18 The left picture is a second image with feather stray light taken by the second camera module 30, and the right picture is a first image taken when the inner wall of the light shielding sheet 15 of the first camera module 10 is provided with a microstructure. The first camera module 10 can effectively improve the glare problem of feather stray light by providing a microstructure on the inner wall of the light shielding sheet 15.

[0094] See also Fig.19 In another embodiment, the non-optically effective area of ​​at least one of the protective cover plate 113 and the at least one lens 115 is sandblasted or ink-coated 17 . Fig.19 The left figure in the middle is a schematic diagram of the structure of the first camera module with sandblasting or ink coating 17 on the non-optical effective area of ​​the protective cover 113 or the lens 115, and the right figure is a schematic diagram of the structure of the second camera module without sandblasting or ink coating on the non-optical effective area of ​​the protective cover 113 or the lens 115. The non-optical effective area of ​​the protective cover 113 and the lens 115 easily reflects light, causing glare problems. The first camera module 10 uses a method of sandblasting 17 on the non-optical effective area of ​​at least one of the protective cover 113 and the at least one lens 115 to make the light diffusely reflected in the non-optical effective area of ​​the protective cover 113 and the lens 115, thereby reducing the glare problem. The first camera module 10 uses a method of inkjet 17 on the non-optical effective area of ​​at least one of the protective cover 113 and the at least one lens 115 to absorb the light reaching the non-optical effective area of ​​the protective cover 113 and the lens 115, thereby reducing the glare problem. In one example, the non-optical effective area of ​​the protective cover 113 is sandblasted or ink coated 17. In another example, the non-optically active areas of one or more lenses 115 are sandblasted or ink-coated 17. In yet another example, the non-optically active areas of the protective cover 113 and the lenses 115 are both sandblasted or ink-coated 17.

[0095] See also Fig. 20 In yet another embodiment, at least one of the non-optically effective areas of the lens barrel 13 , the motor, and the filter 117 is plated black 19 . Fig. 20The left figure in the middle is a schematic diagram of the structure of the first camera module with the non-optical effective area of ​​the lens barrel 13, the motor or the filter 117 plated with black 19, and the right figure is a schematic diagram of the structure of the second camera module without the non-optical effective area of ​​the lens barrel 13, the motor or the filter 117 plated with black. The inner surface of the lens barrel 13 and the motor surface are easy to reflect light, and the surface of the non-optical effective area of ​​the filter 117 is easy to reflect light. The first camera module 10 absorbs the light reaching the lens barrel 13 and the motor surface, as well as the non-optical effective area surface of the filter 117 by plating black 19 on the non-optical effective area of ​​the lens barrel 13, the motor, and the filter 117, thereby reducing the glare problem. In one example, the inner surface of the lens barrel 13 is plated with black 19. In another example, the motor surface is plated with black 19. In another example, the non-optical effective area surface of the filter 117 is plated with black 19. In another example, the inner surface of the lens barrel 13 and the motor surface are all plated black 19, or the inner surface of the lens barrel 13 and the non-optically effective area surface of the optical filter 117 are all plated black 19, or the motor surface and the non-optically effective area surface of the optical filter 117 are all plated black 19. In another example, the inner surface of the lens barrel 13, the motor surface, and the non-optically effective area surface of the optical filter 117 are all plated black 19.

[0096] By comparing multiple pairs of images taken by the first camera module 10 and the second camera module 30 within the incident angle range [0°, 180°] of the illuminating light, a glare mask image of feather stray light and characteristic data of feather stray light can be obtained, such as the position of the feather stray light relative to the light source, the intensity of the feather stray light, the area of ​​the region where the feather stray light is located, and the angle range in which the feather stray light continues to appear.

[0097] In one embodiment, the first camera module 10 may include two of the above embodiments at the same time. For example, the first camera module 10 may be provided with an ultra-low reflection film 1111 in the optically effective area of ​​at least one of the protective cover 113, at least one lens 115, the microlens 1191 and the filter 1193. At the same time, the first camera module 10 is provided with an infrared light cut-off film 1112 on at least one of the protective cover 113, at least one lens 115, the microlens 1191 and the filter 1193, and an anti-reflection film 1113 is provided on both opposite sides of the filter 117. Among them, the ultra-low reflection film 1111 and the infrared light cut-off film 1112 are not provided at the same position. The embodiments of the present application are not limited to the above combinations.

[0098] In another embodiment, the first camera module 10 may include three of the above embodiments at the same time. For example, the first camera module 10 may be provided with an ultra-low reflection film 1111 in the optically effective area of ​​at least one of the protective cover 113, at least one lens 115, the microlens 1191 and the filter 1193. The first camera module 10 may also be provided with an infrared light cut-off film 1112 on at least one of the protective cover 113, at least one lens 115, the microlens 1191 and the filter 1193, and an anti-reflection film 1113 is provided on both opposite sides of the filter 117. Among them, the ultra-low reflection film 1111 and the infrared light cut-off film 1112 are not arranged at the same position. The first camera module 10 may also be provided with a microstructure on the inner peripheral wall of the light shielding film 15. The embodiments of the present application are not limited to the above combinations.

[0099] In another embodiment, the first camera module 10 may include four of the above embodiments at the same time. For example, the first camera module 10 may be provided with an ultra-low reflection film 1111 in the optically effective area of ​​at least one of the protective cover 113, at least one lens 115, the microlens 1191 and the filter 1193. The first camera module 10 may also be provided with an infrared light cut-off film 1112 on at least one of the protective cover 113, at least one lens 115, the microlens 1191 and the filter 1193, and an anti-reflection film 1113 is provided on both opposite sides of the filter 117. Among them, the ultra-low reflection film 1111 and the infrared light cut-off film 1112 are not provided at the same position. The first camera module 10 may also be provided with a microstructure on the inner peripheral wall of the light shielding sheet 15. The first camera module 10 may also be sandblasted or ink-coated 17 in the non-optically effective area of ​​at least one of the protective cover 113 and at least one lens 115. The embodiments of the present application are not limited to the above combinations.

[0100] In another embodiment, the first camera module 10 may include the above five embodiments at the same time. In this case, the first camera module 10 has the best glare improvement effect.

[0101] The first camera module 10 in the implementation manner of the present application is only illustrated by taking the improvement of arc ghost, petal ghost and feather stray light as an example, and the improvement of the glare problem in the first camera module 10 is not limited to the improvement of the three types of glare in the present application.

[0102] The first camera module 10 improves various glare problems in a targeted manner. The first image captured by the first camera module 10 is compared with the second image captured by the second camera module 30, thereby extracting various glare mask images and corresponding glare feature data to improve the glare database 301 ( Fig.25 shown).

[0103] See also Fig. 22 , the image processing method of the embodiment of the present application includes:

[0104] 06: Get the initial image taken by the camera module;

[0105] 07: identifying glare in the initial image according to a preset glare database 301, where the glare database 301 is obtained according to the method for obtaining a glare database in any one of the above embodiments; and

[0106] 08: Restore the image information of the glare area to output the target image.

[0107] Please combine Fig.25 The image processing device 300 of the embodiment of the present application includes a glare database 301 and a processor 303. The glare database 301 is obtained according to the glare database acquisition method of any of the above embodiments, and the glare database 301 stores a glare mask map and glare feature data. The processor 303 is used to obtain an initial image taken by a camera module; identify glare in the initial image according to the glare database 301; and restore the image information of the glare area to output a target image.

[0108] The processor 303 extracts glare features to establish a complete glare database 301 by comparing the first image and the second image taken by the first camera module 10 and the second camera module 30. The processor 303 uses the glare database 301 to identify whether there is glare in the initial image taken by the camera module, and restores the image information of the location of the glare when there is glare in the initial image. The camera module of the embodiment of the present application does not make hardware improvements, but only uses the already complete glare database 301 and the processor 303 to identify glare and restore images.

[0109] Please combine Fig.21 , the left picture is an initial image with glare, and the right picture is an image without glare after being processed by the processor 303. After the processor 303 recognizes the glare according to the initial image, it restores the image information of the area where the glare is located to output a target image without glare.

[0110] See also Fig.23 In some embodiments, 07: identifying glare in the initial image according to a preset glare database 301, comprising:

[0111] 071: Identify bright spots in the initial image;

[0112] 073: Identify glare in the initial image according to the glare mask image in the bright spot and glare database 301 and the glare features in the glare mask image.

[0113] Correspondingly, the processor 303 is used to identify the bright spots in the initial image. Specifically, the processor 303 converts the initial image into a grayscale image, and uses a series of thresholds to perform binarization processing on the grayscale image to obtain a binarized image, finds the outline of white pixels in the binarized image, and thus finds all bright spots in the initial image. The processor 303 is also used to identify the glare in the initial image based on the glare mask map and the glare features in the glare mask map in the bright spot and glare database 301. Specifically, the processor 303 compares the bright spots in the initial image with the glare mask map and the glare features in the glare mask map in the glare database 301 one by one, so as to confirm which bright spots are glare.

[0114] In some embodiments, the glare features include the position of the glare relative to the light source, the intensity of the glare, the area of ​​the region where the glare is located, and the angle range in which the glare continues to appear; the glare in the initial image is identified based on the glare mask map in the bright spot and glare database 301 and the glare features in the glare mask map, and the bright spot is confirmed to be glare when at least two of the following conditions are met: the difference between the position of the bright spot relative to the light source and the position of the glare relative to the light source in the glare mask map is within a preset distance, the difference between the intensity of the bright spot and the intensity of the glare in the glare mask map is within a preset intensity, the difference between the area of ​​the bright spot and the area of ​​the region where the glare is located in the glare mask map is within a preset area, and the difference between the angle range of the incident light that forms the bright spot and the angle range of the incident light of the glare in the glare mask map is within a preset angle range.

[0115] In one embodiment, if a bright spot meets two of the above characteristics, it is confirmed that the bright spot is glare. In one example, the difference between the position A of the bright spot relative to the light source and the position α1 of the arc ghost relative to the light source is within a preset distance, and the difference between the intensity B of the bright spot and the intensity β1 of the arc ghost is within a preset intensity, then the bright spot can be determined to be glare, and it is an arc ghost in the glare. In another example, the difference between the area C of the bright spot and the area γ2 of the petal ghost is within a preset area, and the difference between the angle range of the incident light that forms the bright spot and the angle range δ2 of the incident light of the petal ghost is within a preset angle range, then the bright spot can be determined to be glare, and it is a petal ghost in the glare.

[0116] In another embodiment, if a bright spot meets three of the above characteristics, the bright spot is confirmed to be glare. In one example, the difference between the position A of the bright spot relative to the light source and the position α3 of the feather stray light relative to the light source is within a preset distance, the difference between the intensity B of the bright spot and the intensity β3 of the feather stray light is within a preset intensity, and the difference between the area C of the bright spot and the area γ3 of the feather stray light is within a preset area, then the bright spot can be determined to be glare, and it is feather stray light in the glare. In another example, the difference between the intensity B of the bright spot and the intensity β4 of the point-like ghost is within a preset intensity, the difference between the area C of the bright spot and the area γ4 of the point-like ghost is within a preset area, and the difference between the angle range D of the incident light that forms the bright spot and the angle range δ4 of the incident light of the point-like ghost is within a preset angle range, then the bright spot can be determined to be glare, and it is a point-like ghost in the glare.

[0117] In another embodiment, the bright spot meets four of the above characteristics before it is confirmed that the bright spot is glare. In one example, if the difference between the position A of the bright spot relative to the light source and the position α1 of the arc ghost relative to the light source is within a preset distance, the difference between the intensity B of the bright spot and the intensity β1 of the arc ghost is within a preset intensity, the difference between the area C of the bright spot and the area γ1 of the arc ghost is within a preset area, and the difference between the angle range D of the incident light forming the bright spot and the angle range δ1 of the incident light forming the arc ghost is within a preset angle range, then the bright spot can be determined to be glare and an arc ghost in the glare. In another example, if the difference between the position A of the bright spot relative to the light source and the position α2 of the petal ghost relative to the light source is within a preset distance, the difference between the intensity B of the bright spot and the intensity β2 of the petal ghost is within a preset intensity, the difference between the area C of the bright spot and the area γ2 of the petal ghost is within a preset area, and the difference between the angle range D of the incident light forming the bright spot and the angle range δ2 of the incident light forming the petal ghost is within a preset angle range, then it can be determined that the bright spot is glare and is a petal ghost in the glare. This determination of glare is the most accurate.

[0118] See also Fig.24 In some embodiments, 08: restoring the image information of the area where the glare is located to output a target image includes:

[0119] 081: Remove glare from the original image; and

[0120] 083: Use interpolation algorithm to restore the image information of the glare area to output the target image.

[0121] After confirming which bright spots are glare, the processor 303 is further used to remove the glare in the initial image, and 083: restore the image information of the area where the glare is located using an interpolation algorithm to output a target image. Specifically, after removing the glare in the initial image, the processor 303 identifies the pixels around the area where the glare is located, and interpolates the image information of the area where the glare is located, thereby obtaining a target image without glare in the image.

[0122] See also Fig.26 The electronic device of the embodiment of the present application includes a memory and one or more processors. The processor is used to execute the method for acquiring the glare database of any of the above embodiments and / or execute the image processing method of any of the above embodiments.

[0123] The electronic device may be a terminal, and its internal structure diagram may be as follows: Fig.26 As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory.

[0124] The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and the external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0125] See also Fig.26 The computer-readable storage medium of the embodiment of the present application stores a computer program, and when the computer program is executed by at least one processor, it implements the method for acquiring the glare database of any of the above embodiments and / or the image processing method of any of the above embodiments.

[0126] The method for acquiring a glare database, the device 100 for acquiring a glare database, the image processing method, the image processing device 300, the electronic device and the computer-readable storage medium of the present application acquire the first image and the second image captured by the first camera module 10 and the second camera module 30 to form an image pair by changing the incident angle of light multiple times, and then acquire a glare mask map based on the first image and the second image in the image pair, and extract the characteristic data of glare, so as to establish a complete glare database 301. Since the first image in the image pair is captured by the first camera module with hardware improvement, and the second image is captured by the second camera module with no hardware improvement, the acquisition of the glare mask map is very accurate, so that the glare database finally established is more complete than the current glare database, and can solve most glare problems.

[0127] In order to improve the database, a hardware improvement structure is added to the first camera module 10 to compare with the second camera module 30. Among them, the first camera module 10 only needs to make a few samples. Compared with directly improving the hardware structure of all camera modules by hardware, the cost of solving the glare problem is lower. Moreover, the method for obtaining the glare database of the present application collects various types of glare mask images and corresponding glare feature data. The glare database 301 of this embodiment is more complete than the traditional glare database and can improve most glare problems.

[0128] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0129] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0130] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable storage medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor 50, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, a computer-readable storage medium can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable storage media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable storage medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0131] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0132] A person of ordinary skill in the art will appreciate that all or part of the steps carried by the method for implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment. In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc.

[0133] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application. The scope of the present application is defined by the claims and their equivalents.

Claims

1. A method for acquiring a glare database, characterized in that: include: For the same light source, a first camera module and a second camera module are used to capture a first image and a second image at the same incident light angle to form an image pair, and an anti-reflection film is added to the first optical component of the first camera module compared to the second optical component of the second camera module; The incident angle of the light irradiated by the collimated light source is changed multiple times, and the first camera module and the second camera module capture multiple first images and multiple second images to form multiple image pairs; Acquire a glare mask image according to the first image and the second image in each of the image pairs; Extracting characteristic data of glare in the glare mask image; and A glare database is established according to the glare mask images of the plurality of image pairs and the corresponding characteristic data of the glare.

2. The method for acquiring a glare database according to claim 1, characterized in that: The anti-reflection film includes an ultra-low reflection film, which is used to suppress the reflection of light; along the light incident direction of the first camera module, the first optical component includes a protective cover, at least one lens, a filter and an image sensor in sequence, and the image sensor includes a microlens and a filter in sequence; the optically effective area of ​​at least one of the protective cover, at least one of the lens, the microlens and the filter is provided with the ultra-low reflection film.

3. The method for acquiring a glare database according to claim 1, characterized in that: The anti-reflection film includes an anti-reflection film, which is used to suppress the reflection of light; along the light incident direction of the first camera module, the first optical component includes a protective cover, at least one lens, a filter and an image sensor in sequence, and the image sensor includes a microlens and a filter in sequence; the anti-reflection film is provided on opposite sides of the filter; an infrared light cut-off film is provided on the protective cover, at least one of the lens, the microlens and the filter, and the infrared light cut-off film is used to cut off infrared light.

4. The method for acquiring a glare database according to claim 1, characterized in that: The first camera module includes a lens barrel and a motor for driving the lens barrel to move. Along the light incident direction of the first camera module, the first optical assembly includes a protective cover, at least one lens, a filter and an image sensor in sequence. The image sensor includes a microlens and a filter in sequence. At least one lens is accommodated in the lens barrel. The first camera module further includes a light shielding sheet, the light shielding sheet is used to shield light, and the inner peripheral wall of the light shielding sheet is provided with a microstructure; and / or The non-optically effective area of ​​at least one of the protective cover plate and at least one of the lenses is sandblasted or inked; and / or At least one of the lens barrel, the motor, and the optically inactive area of ​​the filter is plated black.

5. A device for acquiring a glare database, characterized in that: include: A first camera module, a second camera module and a processor; For the same light source, the first camera module and the second camera module are respectively used to capture a first image and a second image under the same incident light angle to form an image pair, and compared with the second optical component of the second camera module, an anti-reflection film is additionally provided on the first optical component of the first camera module; When the incident angle of the light irradiated by the collimated light source is changed multiple times, the first camera module and the second camera module are further used to capture multiple first images and multiple second images to form multiple image pairs; The processor is used to obtain a glare mask image according to the first image and the second image in each of the image pairs; and extract characteristic data of glare in the glare mask image; and A glare database is established according to the glare mask images of a plurality of the image pairs and the corresponding glare feature data.

6. An image processing method, characterized in that: include: Get the initial image taken by the camera module; identifying glare in the initial image according to a preset glare database, wherein the glare database is obtained according to the method for obtaining a glare database according to any one of claims 1 to 4; and The image information of the area where the glare is located is restored to output a target image.

7. The image processing method according to claim 6, characterized in that: The identifying the glare in the initial image according to a preset glare database includes: identifying bright spots in the initial image; The glare in the initial image is identified according to the bright spot, the glare mask image in the glare database, and the glare features in the glare mask image.

8. The image processing method according to claim 7, characterized in that: The glare characteristics include the position of the glare relative to the light source, the intensity of the glare, the area of ​​the glare region, and the angle range in which the glare continues to appear; the identifying the glare in the initial image according to the bright spot and the glare mask map in the glare database and the glare characteristics in the glare mask map includes: The bright spot is confirmed to be glare when at least two of the following conditions are met: the difference between the position of the bright spot relative to the light source and the position of the glare relative to the light source in the glare mask image is within a preset distance, the difference between the intensity of the bright spot and the intensity of the glare in the glare mask image is within a preset intensity, the difference between the area of ​​the bright spot and the area of ​​the glare region in the glare mask image is within a preset area, and the difference between the angle range of the incident light forming the bright spot and the angle range of the incident light of the glare in the glare mask image is within a preset angle range.

9. The image processing method according to claim 6, characterized in that: The restoring the image information of the area where the glare is located to output a target image includes: removing the glare in the initial image; and The image information of the area where the glare is located is restored by using an interpolation algorithm to output a target image.

10. An image processing device, characterized in that: include: A glare database, wherein the glare database is obtained according to the method for obtaining a glare database according to any one of claims 1 to 4, and wherein the glare database stores a glare mask image and characteristic data of glare; and A processor, the processor being configured to: Get the initial image taken by the camera module; identifying glare in the initial image according to the glare database; and The image information of the area where the glare is located is restored to output a target image.

11. An electronic device, characterized in that: include: Memory; and One or more processors, wherein the processors are used to execute the method for acquiring a glare database according to any one of claims 1 to 4 and / or execute the image processing method according to any one of claims 6 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by at least one processor, the method for acquiring a glare database according to any one of claims 1 to 4 and / or the image processing method according to any one of claims 6 to 9 is implemented.

Citation Information

Patent Citations

  • Electronic device, camera device and optical filter thereof

    CN112346164A

  • Image output method and device and electronic equipment

    CN112367464A

  • Method and device for removing image glare, terminal equipment and storage medium

    CN113507558A

  • Apparatus and Method for Reducing Glare in Images

    US20090273843A1

Cited By

  • Low-light enhancement and glare processing method and device for image data and electronic equipment

    CN121724882A

  • An arch bridge suspender edge coordinate identification method based on physical constraint light halo generation

    CN122990233A