Method and apparatus for acquiring glare database, image processing method and apparatus, electronic device and storage medium
By adding an anti-reflective film to the camera module and changing the incident angle of light, a glare mask image is obtained and a comprehensive glare database is established, solving the problem of degraded image clarity caused by glare in existing technologies and achieving more efficient glare recognition and image restoration.
Patent Information
- Application Number
- CN202310866394.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-13
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-07-13
AI Technical Summary
The lack of a comprehensive database of glare characteristics in current technologies leads to a decrease in image clarity when camera modules encounter glare problems, and existing AI recognition methods can only solve a small portion of glare issues.
By adding an anti-reflective film to the first camera module and combining it with images taken by the second camera module under the same incident light angle, the incident light angle is changed multiple times to obtain glare mask images and extract glare feature data, thus establishing a comprehensive glare database.
The established glare database is more comprehensive and can effectively solve most glare problems, improving the accuracy and clarity of image processing.
Smart Images

Figure CN119316722B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a glare database acquisition method, a glare database acquisition device, an image processing method, an image processing device, an electronic device and a computer readable storage medium. BACKGROUND
[0002] The camera modules of most consumer electronic products on the market inevitably cause the picture clarity to deteriorate due to the glare problem. At present, in order to weaken the glare problem of the camera module, AI is usually used to identify the image shooting scene, and the glare is segmented from the image by using the glare feature to restore the image information of the glare position. However, there is currently a lack of a relatively perfect glare feature database, and only a small part of the glare problem can be solved. SUMMARY
[0003] The present application provides a glare database acquisition method, a glare database acquisition device, an image processing method, an image processing device, an electronic device and a computer readable storage medium.
[0004] In a first aspect, the glare database acquisition method of the present application comprises:
[0005] For the same light source, a first image and a second image under the same incident light angle are shot by using a first camera module and a second camera module to form an image pair, and an anti-reflection film is additionally arranged on a first optical assembly of the first camera module compared with a second optical assembly of the second camera module;
[0006] The incident angle of the collimated light source is changed for multiple times, and a plurality of first images and a plurality of second images are shot by using the first camera module and the second camera module to form a plurality of image pairs;
[0007] According to the first image and the second image in each of the image pairs, a glare mask image is acquired;
[0008] The feature data of the glare in the glare mask image is extracted; and
[0009] According to the glare mask images of the plurality of image pairs and the corresponding feature data of the glare, a glare database is established.
[0010] In a second aspect, the glare database acquisition device of the present application comprises a first camera module, a second camera module and a processor.
[0011] 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 for the same light source, and an anti-reflection film is additionally arranged on the first optical assembly of the first camera module compared with the second optical assembly of the second camera module;
[0012] 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 for the same light source, and an anti-reflection film is additionally arranged on the first optical assembly of the first camera module compared with the second optical assembly of the second camera module;
[0013] The processor is configured to obtain a glare mask image according to the first image and the second image in each image pair, extract feature data of glare in the glare mask image, and
[0014] The glare database is established according to the glare mask images and the corresponding feature data of glare of the plurality of image pairs.
[0015] In a third aspect, an image processing method according to the embodiments of the present application includes:
[0016] obtaining an initial image captured by a 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 a glare database described above; and
[0018] restoring image information of a region where the glare is located to output a target image.
[0019] In a fourth aspect, an image processing device according to the embodiments of the present application includes:
[0020] a glare database, wherein the glare database is obtained according to the method for obtaining a glare database described above, and the glare database stores a glare mask image and feature data of glare; and
[0021] a processor, wherein the processor is configured to:
[0022] obtain an initial image captured by a camera module;
[0023] identify glare in the initial image according to the glare database; and
[0024] restore image information of a region where the glare is located to output a target image.
[0025] In a fifth aspect, an electronic device according to the embodiments of the present application includes a memory and one or more processors. The processor is configured to execute the method for obtaining a glare database described above and / or execute the image processing method described above.
[0026] Sixthly, the computer-readable storage medium of the embodiments of this application stores a computer program that, when executed by at least one processor, implements the glare database acquisition method and / or the image processing method described above.
[0027] The glare database acquisition method, glare database acquisition device, image processing method, image processing device, electronic device, and computer-readable storage medium of this application acquire first and second images captured by a first camera module and a second camera module, forming an image pair, by repeatedly changing the incident angle of light. Then, a glare mask is obtained based on the first and second images in the image pair, and glare feature data is extracted, thereby establishing a comprehensive glare database. Because the first image in the image pair is captured by the hardware-improved first camera module, and the second image is captured by the hardware-unimproved second camera module, the acquisition of the glare mask is very accurate, making the final glare database more comprehensive than current glare databases and capable of solving most glare problems.
[0028] Additional aspects and advantages of embodiments of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of this application. Attached Figure Description
[0029] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, wherein:
[0030] Figure 1 This is a flowchart illustrating a method for obtaining a glare database according to some embodiments of this application;
[0031] Figure 2 This is a schematic diagram of the structure of a glare database acquisition device according to certain embodiments of this application;
[0032] Figure 3 This is a schematic diagram of the structure of a first camera module and a second camera module at multiple identical incident angles in certain embodiments of this application;
[0033] Figure 4 This is a schematic diagram illustrating the extraction of a glare mask image based on a first image and a second image in certain embodiments of this application;
[0034] Figure 5 This is a schematic diagram of a glare database in some embodiments of this application;
[0035] Figure 6This is a structural comparison diagram of a first camera module with an ultra-low reflection coating on the lens and a second camera module without an ultra-low reflection coating on the lens, according to certain embodiments of this application.
[0036] Figure 7 This is a graph showing the reflectance of the ultra-low reflectance film and the anti-reflection film in certain embodiments of this application;
[0037] Figure 8 yes Figure 4 A comparison of the shooting effects of the first camera module and the second camera module in the image;
[0038] Figure 9 This is a structural comparison diagram of a first camera module with an ultra-low reflection film on its protective cover and a second camera module without an ultra-low reflection film on its protective cover, according to certain embodiments of this application.
[0039] Figure 10 This is a schematic diagram comparing the structures of the image sensor in the first camera module and the image sensor in the second camera module in certain embodiments of this application;
[0040] Figure 11 This is a schematic diagram comparing the structures of the image sensor in the first camera module and the image sensor in the second camera module in certain embodiments of this application;
[0041] Figure 12 This is a structural comparison diagram of a first camera module with an infrared light blocking film on the lens and a second camera module without an infrared light blocking film on the lens, according to certain embodiments of this application.
[0042] Figure 13 yes Figure 9 A comparison of the shooting effects of the first camera module and the second camera module in the image;
[0043] Figure 14 This is a structural comparison diagram of a first camera module with an infrared light blocking film on a protective cover plate and a second camera module without an infrared light blocking film on a protective cover plate, according to certain embodiments of this application.
[0044] Figure 15 This is a schematic diagram comparing the structures of the image sensor in the first camera module and the image sensor in the second camera module in certain embodiments of this application;
[0045] Figure 16 This is a schematic diagram comparing the structures of the image sensor in the first camera module and the image sensor in the second camera module in certain embodiments of this application;
[0046] Figure 17This is a structural comparison diagram of a first camera module with microstructures on the inner peripheral wall of a light shield and a second camera module without microstructures on the inner peripheral wall of a light shield, according to certain embodiments of this application.
[0047] Figure 18 yes Figure 14 A comparison of the shooting effects of the first camera module and the second camera module in the image;
[0048] Figure 19 This is a structural comparison diagram of a first camera module with sandblasting or ink coating in the non-optically effective area of the protective cover plate or lens, and a second camera module without sandblasting or ink coating in the non-optically effective area of the protective cover plate or lens, according to certain embodiments of this application.
[0049] Figure 20 This is a structural comparison diagram of a first camera module with black-plated non-optically effective areas of the lens barrel, motor, or filter, and a second camera module with no black-plated non-optically effective areas of the lens barrel, motor, or filter, according to certain embodiments of this application.
[0050] Figure 21 This is a schematic diagram illustrating how the processor removes glare and restores image information in certain embodiments of this application;
[0051] Figure 22 This is a flowchart illustrating the image processing method in some embodiments of this application;
[0052] Figure 23 This is a schematic diagram of the process of identifying glare in an initial image based on a preset glare database in an image processing method according to certain embodiments of this application;
[0053] Figure 24 This is a flowchart illustrating the process of restoring image information of the glare-affected area in an image processing method according to certain embodiments of this application, in order to output a target image.
[0054] Figure 25 This is a schematic diagram of the structure of an image processing apparatus in some embodiments of this application;
[0055] Figure 26 This is a schematic diagram of the structure of an electronic device in some embodiments of this application.
[0056] Explanation of key component symbols:
[0057] 100. Glare database acquisition device; 10. First camera module; 11. First optical component; 111. Anti-reflective film; 1111. Ultra-low reflection film; 1112. Infrared light cut-off film; 1113. Anti-reflective film; 113. Protective cover plate; 115. Lens; 117. Filter; 119. First image sensor; 1191. Microlens; 1193. Filter; 1195. Substrate; 13. Lens barrel; 15. Light shield; 17. Sandblasting or ink coating; 19. Black coating; 30. Second camera module; 31. Second optical component; 311. Second image sensor; 3111. Microlens; 3113. Filter; 3115. Substrate; 50. Processor;
[0058] 300, Image processing device; 301, Glare database; 303, Processor. Detailed Implementation
[0059] The embodiments of this application will be further described below with reference to the accompanying drawings. The same or similar reference numerals in the drawings denote the same or similar elements or elements having the same or similar functions throughout. Furthermore, the embodiments of this application described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of this application, and should not be construed as limiting this application.
[0060] Most consumer electronics camera modules inevitably suffer from image degradation due to glare. Currently, to mitigate glare, AI is typically used to identify the scene being captured and segment glare from the image using glare features to reconstruct the glare location. However, a comprehensive glare feature database is currently lacking, limiting the solutions to only a small portion of glare issues. To address 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 Image processing methods (as shown) Figure 22 As shown), image processing device ( Figure 25 As shown), electronic equipment ( Figure 26 (as shown) and computer-readable storage media ( Figure 26 (As shown).
[0061] Please see Figure 1 , Figure 2 and Figure 6 The method for obtaining the glare database according to the embodiments of this 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 provided with an anti-reflective film 111.
[0063] 02: By repeatedly changing the incident angle of the collimated light source, 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 the glare mask image based on the first and second images in each image pair;
[0065] 04: Extract glare feature data from the glare mask image; and
[0066] 05: Based on the glare mask images of multiple image pairs and the corresponding glare feature data, establish a glare database 301.
[0067] The glare database acquisition device 100 of this 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 under the same incident light angle to form an image pair. Compared to the second optical component 31 of the second camera module 30, an anti-reflective film 111 is added to the first optical component 11 of the first camera module 10. When the incident angle of 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 image based on the first image and the second image in each image pair; extract glare feature data from the glare mask image; and establish a glare database 301 based on the glare mask images of multiple image pairs and the corresponding glare feature data. Figure 25 (As shown).
[0068] In this embodiment, the first camera module 10 is a device for capturing a first image, and the second camera module 30 is a device for capturing a second image. The first camera module 10 and the second camera module 30 in this application embodiment can be, but are not limited to, visible light imaging camera modules, infrared light imaging camera modules, and ultraviolet light imaging camera modules. The first camera module 10 and the second camera module 30 in this application embodiment can be cameras used in consumer electronic products, such as mobile phones, tablets, or laptops, or they can be cameras used in aerospace detection, medical imaging, industrial inspection, and automotive applications.
[0069] The anti-reflective film 111 is a film structure that reduces light reflection on its surface. Because the first camera module 10 has the anti-reflective film 111, the first image captured by the first camera module 10 is almost glare-free. The second camera module 30 does not have the anti-reflective film, therefore the second image captured by the second camera module 10 is the original image with glare.
[0070] Please combine Figure 3 In this embodiment, the incident angle range of the light illuminating the first camera module 10 and the second camera module 30 is [0°, 180°]. The first image and the second image captured by the first camera module 10 and the second camera module 30 under the same incident angle of the illuminating light constitute an image pair. The incident angle of the illuminating light for the first camera module 10 and the second camera module 30 corresponding to multiple 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, a first image captured by the first camera module 10 at an incident angle of 60° and a second image captured by the second camera module 30 at an incident angle of 60° constitute an image pair. Similarly, a first image captured by the first camera module 10 at an incident angle of 90° and a second image captured by the second camera module 30 at an incident angle of 90° constitute an image pair.
[0071] In one embodiment, the light source is a collimated light source, which 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] The number of first images captured by the first camera module 10 within the incident angle range of the illuminating light [0°, 180°] is not limited. 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, and the more accurate the subsequent image processing of the original captured images. 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 and second images can be matched one-to-one to form image pairs.
[0073] Processor 50 obtains a corresponding glare mask by comparing the differences between the first and second images in each image pair. The glare mask removes other information from the image containing glare, retaining only the glare itself. Types of glare can include, but are not limited to, arc ghosting, petal ghosting, feather stray light, and point ghosting. Please refer to... Figure 4 Taking dot ghosting as an example, the left image is the first image, the middle image is the second image, and the right image is the glare mask. Dot ghosting exists in the first image, but not in the second image. The processor 50 extracts the glare mask of the dot ghosting based on the differences between the two images.
[0074] Please combine Figure 5 The processor 50 can acquire glare features from the corresponding glare mask. Glare features include the position of the glare relative to the light source, the intensity of the glare, the area of the glare region, and the angular range of the glare's duration. The processor 50 acquires these glare features by processing the glare mask, thereby establishing a comprehensive glare database 301. Figure 25 (As shown). Here, "Glare position relative to the light source" refers to the position of the glare relative to the origin (light source), with the light source's position as the origin. For example, the glare position relative to the light source could be (X1, Y1) or (X2, Y2), etc. "Glare intensity" refers to the light intensity of the glare itself. "Area of the glare region" refers to the area of the glare displayed in the image. "Angle range of continuous glare occurrence" refers to the angle range of continuous glare occurrence relative to the light source.
[0075] The glare database acquisition method and glare database acquisition device 100 of this application acquire first and second images captured by the first camera module 10 and the second camera module 30 by repeatedly changing the incident angle of light to form an image pair. Then, a glare mask is acquired based on the first and second images in the image pair, and glare feature data is extracted to establish a complete glare database 301. Since the first image in the image pair is captured by the hardware-improved first camera module, and the second image is captured by the hardware-unimproved second camera module, the acquisition of the glare mask is very accurate, making the final glare database more complete than the current glare database and able to solve most glare problems.
[0076] Please see Figure 6 In some embodiments, the anti-reflective film 111 includes an ultra-low reflective film 1111, which is used to suppress light reflection; along the light incident direction of the first camera module 10, the first optical component 11 sequentially includes a protective cover plate 113, at least one lens 115, a filter 117, and a first image sensor 119. Please refer to... Figure 10 Along the light incident direction of the first camera module 10, the first image sensor 119 sequentially includes a microlens 1191 and a filter 1193. At least one of the protective cover plate 113, at least one lens 115, microlens 1191 and filter 1193 has an ultra-low reflection film 1111 in its optically effective area.
[0077] Specifically, the second camera module 30 is the original camera module without any hardware improvements. The lens 115 of the second camera module 30 has an anti-reflective coating 1113. The first camera module 10 replaces the anti-reflective coating 1113 in the second camera module 30 with an ultra-low reflection coating 1111. Please refer to... Figure 7 According to the comparison graph of the reflectance curves of the antireflection film 1113 and the ultra-low reflectance film 1111, it can be seen that the reflectance of the ultra-low reflectance film 1111 is much lower than that of the antireflection film 1113. The use of the ultra-low reflectance film 1111 in the first camera module 10 can effectively improve the glare problem.
[0078] The coating technology for the ultra-low reflection coating 1111 can be sub-wavelength coating (SWC) or atomic layer deposition (ALD). Sub-wavelength coating can form wedge-shaped microstructures smaller than the visible wavelength on the surface of the coated object (e.g., lens 115). This structure can continuously change the refractive index, thereby eliminating the boundary of abrupt changes in refractive index. The ultra-low reflection coating 1111 exhibits excellent reflection suppression for light incident from nearly perpendicular angles to those with larger incident angles. Atomic layer deposition is a method that deposits material layer by layer in the form of single-atom films onto the surface of lens 115.
[0079] Please see Figure 6 In one embodiment, the lens 115 of the first optical component 11 is provided with an ultra-low reflection coating 1111. Figure 6The left-middle figure is a schematic diagram of the structure of a first camera module 10 with an ultra-low reflection coating 1111 on the lens 115, and the right-middle figure is a schematic diagram of the structure of a second camera module 30 without hardware improvements. The lens 115 includes an optically effective area and a non-optically effective area. The optically effective area of the lens 115 allows light to pass through, while the non-optically effective area is used to mount other components and does not allow light to pass through. In one example, the optically effective area of one lens 115 of the first optical assembly 11 has an ultra-low reflection coating 1111. In this case, the ultra-low reflection coating 1111 can be placed in the optically effective area of any lens 115 of the first camera module 10. When the optically effective area of one lens 115 of the first optical assembly 11 has an ultra-low reflection coating 1111, the processing of the first optical assembly 11 is simpler, the cost is lower, and it can better improve the glare problem. In another example, the optically effective areas of multiple lenses 115 of the first optical assembly 11 have ultra-low reflection coatings 1111. At this time, the ultra-low reflection coating 1111 can be set in the optically effective areas of two, three, or all of the lenses 115 of the first camera module 10. When the ultra-low reflection coating 1111 is provided in the optically effective areas of multiple lenses 115 of the first optical assembly 11, the reflectivity of the first optical assembly 11 is low, which can better improve the glare problem.
[0080] Please combine Figure 8 The left image is a second image with arc ghosting captured by the second camera module 30, while the right image is a first image captured by the first camera module 10 with an ultra-low reflection coating 1111 in the optically effective area of the lens 115. A comparison of the two images shows that the ultra-low reflection coating 1111 in the first camera module 10 effectively improves the glare problem caused by arc ghosting.
[0081] Please see Figure 9 In some other embodiments, the protective cover 113 of the first optical component 11 is provided with an ultra-low reflection film 1111. Figure 9 The left-middle figure is a schematic diagram of the structure of a first camera module 10 with an ultra-low reflection film 1111 on the protective cover 113 of the first optical component 11. The right-middle figure is a schematic diagram of the structure of a second camera module 30 without hardware improvements. 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 light to pass through, while the non-optically effective area is used for mounting 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 optically effective area being provided with an ultra-low reflection film 1111, the non-optically effective area of the protective cover 113 may also be provided with an ultra-low reflection film 1111.
[0082] Please see Figure 10In some embodiments, the first image sensor 119 sequentially includes a microlens 1191, a filter 1193, and a substrate 1195 along the light incident direction of the first camera module 10. The second image sensor 311 sequentially includes a microlens 3111, a filter 3113, and a substrate 3115 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 light to pass through, and the non-optically effective area of the microlens 1191 is used for mounting 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 optically effective area being provided with an ultra-low reflection film 1111, the non-optically effective area of the microlens 1191 may also be provided with an ultra-low reflection film 1111.
[0083] Please see Figure 11 In some embodiments, the first image sensor 119 sequentially includes a microlens 1191, a filter 1193, and a substrate 1195 along the light incident direction of the first camera module 10. The second image sensor 311 sequentially includes a microlens 1191, a filter 1193, and a substrate 1195 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 for light to pass through, while the non-optically effective area of the filter 1193 is used for mounting 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 other embodiments, the optically effective areas of multiple elements in the first optical assembly 11 are provided with ultra-low reflection coatings 1111. In one example, the optically effective areas of two types of elements in the first optical assembly 11 are provided with ultra-low reflection coatings 1111. For example, ultra-low reflection coatings 1111 are provided on both the protective cover plate 113 and the lens 115. Alternatively, ultra-low reflection coatings 1111 are provided on both the protective cover plate 113 and the microlens 1191. In another example, the optically effective areas of three types of elements in the first optical assembly 11 are provided with ultra-low reflection coatings 1111. For example, ultra-low reflection coatings 1111 are provided on the protective cover plate 113, the lens 115, and the microlens 1191. Alternatively, ultra-low reflection coatings 1111 are provided on the protective cover plate 113, the microlens 1191, and the filter 1193. In another example, the protective cover 113, lens 115, microlens 1191 and filter 1193 in the first optical assembly 11 are all provided with an ultra-low reflection film 1111.
[0085] By comparing multiple pairs of images captured by the first camera module 10 and the second camera module 30 within the incident angle range of the irradiated light [0°, 180°], the glare mask map of the arc ghost and the feature 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 region where the arc ghost is located, and the range of angles at which the arc ghost continuously appears.
[0086] Please see Figure 12 In some embodiments, the anti-reflective film 111 includes an anti-reflective film 1113, which is used to suppress light reflection; along the light incident direction of the first camera module 10, the first optical component 11 sequentially includes a protective cover plate 113, at least one lens 115, a filter 117, and an image sensor 119. Please refer to... Figure 15 The image sensor 119 includes a microlens 1191 and a filter 1193 in sequence; anti-reflection films 1113 are provided on both sides of the filter 117; an infrared cutoff film 1112 is provided on at least one of the protective cover plate 113, at least one lens 115, microlens 1191 and filter 1193, and the infrared cutoff film 1112 is used to cut off infrared light.
[0087] Specifically, the second camera module 30 is the original camera module without any hardware improvements. The filter 117 of the second camera module 30 has an infrared cut-off (IRC) film 1112 on the side furthest from the image sensor 119. The IRC film 1112 requires high reflectivity to cut off infrared light, which can easily cause glare problems such as ghosting. The filter 117 has an anti-reflection (AR) film 1113 on the side closer to the image sensor, which reduces light reflection. The first camera module 10 moves the infrared cut-off film 1112 from the second camera module 30 to other components of the first optical assembly 11, and sets the AR film 1113 on both sides opposite to the filter 117.
[0088] In one implementation, such as Figure 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 cutoff film 1112. The infrared light cutoff film 1112 can be provided in the optically effective area of any lens 115. Please refer to... Figure 13The left image shows a second image with petal ghosting captured by the second camera module 30, while the right image shows a first image captured by the first camera module 10 with an infrared light cutoff film 1112 in the optically effective area of the lens 115 and anti-reflective films 1113 on both opposite sides of the filter 117. By placing the infrared light cutoff film 1112 on the lens 115 and providing anti-reflective films 1113 on both opposite sides of the filter 117, the first camera module 10 can effectively improve the glare problem of petal ghosting.
[0089] Please see Figure 14 ,like Figure 14 As shown in the left figure, in another embodiment, the optically effective area of the protective cover 113 of the first optical component 11 is provided with an infrared light cutoff film 1112, and anti-reflection films 1113 are provided on both opposite sides of the filter 117. Please refer to [link / reference]. Figure 15 ,like Figure 15 As shown in the left figure, in another embodiment, the effective optical region of the microlens 1191 of the first optical component 11 is provided with an infrared light cutoff film 1112, and anti-reflection films 1113 are provided on both opposite sides of the filter 117. Please refer to [link / reference]. Figure 16 ,like Figure 16 As shown in the left figure, in another embodiment, the optical 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 both opposite sides of the filter 117.
[0090] By comparing multiple pairs of images captured by the first camera module 10 and the second camera module 30 within the incident angle range of the illuminating light [0°, 180°], the glare mask map of the petal ghost and the feature 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 region where the petal ghost is located, and the range of angles at which the petal ghost continuously appears.
[0091] Please see Figure 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 movement of the lens barrel 13. Along the light incident direction of the first camera module 10, the first optical component 11 sequentially includes a protective cover plate 113, at least one lens 115, a filter 117, and an image sensor 119. Please refer to... Figure 15 Alternatively, image sensor 119 may include microlens 1191 and filter 1193, and at least one lens 115 may be housed in lens barrel 13.
[0092] Specifically, the second camera module 30 is the original camera module without any hardware improvements. The inner peripheral wall of the light shield 15, the non-optically effective area of the second optical component 31, the lens barrel 13, and the motor, etc., will produce reflections, which can easily cause glare problems such as stray light.
[0093] In one embodiment, the first camera module 10 further includes a light-shielding plate 15, which is used to block light. The inner peripheral wall of the light-shielding plate 15 has microstructures. The inner peripheral wall of the light-shielding plate 15 is a smooth surface, which easily causes specular reflection of light, resulting in glare. By using chemical etching, the inner peripheral wall of the light-shielding plate 15 of the first camera module 10 is processed into microstructures. Light undergoes diffuse reflection on the surface of the microstructures, dispersing the light in different directions, thereby reducing the reflection of light from the inner peripheral wall of the light-shielding plate 15. Please refer to... Figure 18 The left image is a second image with feather stray light captured by the second camera module 30, and the right image is a first image captured when the inner peripheral wall of the light shield 15 of the first camera module 10 has a microstructure. By providing a microstructure on the inner peripheral wall of the light shield 15, the first camera module 10 can effectively improve the glare problem of feather stray light.
[0094] Please see Figure 19 In another embodiment, the non-optically effective area of at least one of the protective cover plate 113 and at least one lens 115 is sandblasted or inked 17. Figure 19 The left-middle figure shows a schematic diagram of a first camera module with sandblasting or ink coating 17 applied to the non-optically effective areas of the protective cover 113 or lens 115. The right-middle figure shows a schematic diagram of a second camera module without sandblasting or ink coating to the non-optically effective areas of the protective cover 113 or lens 115. The non-optically effective areas of the protective cover 113 and lens 115 easily reflect light, causing glare. The first camera module 10 reduces glare by sandblasting 17 on the non-optically effective areas of at least one of the protective cover 113 and at least one lens 115, causing diffuse reflection of light in these areas. The first camera module 10 also reduces glare by ink coating 17 on the non-optically effective areas of the protective cover 113 and at least one lens 115, absorbing light reaching these areas. In one example, the non-optically effective areas of the protective cover 113 are sandblasted or ink coated 17. In another example, the non-optically effective areas of one or more lenses 115 are sandblasted or inked 17. In yet another example, both the protective cover 113 and the non-optically effective areas of the lenses 115 are sandblasted or inked 17.
[0095] Please see Figure 20 In another embodiment, at least one of the non-optically effective areas of the lens barrel 13, the motor, and the filter 117 is blackened 19. Figure 20The left image shows a schematic diagram of a first camera module with the non-optically effective areas of the lens barrel 13, motor, or filter 117 coated with black 19. The right image shows a schematic diagram of a second camera module without the non-optically effective areas of the lens barrel 13, motor, or filter 117 coated with black 19. The inner surface of the lens barrel 13 and the surface of the motor easily reflect light, as does the surface of the non-optically effective area of the filter 117. The first camera module 10 reduces glare by coating the non-optically effective areas of the lens barrel 13, motor, and filter 117 with black 19. In one example, the inner surface of the lens barrel 13 is coated with black 19. In another example, the surface of the motor is coated with black 19. In yet another example, the surface of the non-optically effective area of the filter 117 is coated with black 19. In another example, the inner surface of the lens barrel 13 and the motor surface are both blackened 19, or the inner surface of the lens barrel 13 and the non-optically effective area surface of the filter 117 are both blackened 19, or the motor surface and the non-optically effective area surface of the filter 117 are both blackened 19. In yet another example, the inner surface of the lens barrel 13, the motor surface, and the non-optically effective area surface of the filter 117 are all blackened 19.
[0096] By comparing multiple pairs of images captured by the first camera module 10 and the second camera module 30 within the incident angle range of the irradiated light [0°, 180°], the glare mask image of the feather stray light and the characteristic data of the 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 embodiments described above. For example, the first camera module 10 may have an ultra-low reflection film 1111 in the optically effective area of at least one of the protective cover plate 113, at least one lens 115, microlens 1191, and filter 1193. Simultaneously, the first camera module 10 may have an infrared light cutoff film 1112 on at least one of the protective cover plate 113, at least one lens 115, microlens 1191, and filter 1193, and anti-reflection films 1113 may be provided on both opposite sides of the filter 117. The ultra-low reflection film 1111 and the infrared light cutoff film 1112 are not located in the same position. The embodiments of this application are not limited to the above combinations.
[0098] In another embodiment, the first camera module 10 may include all three of the embodiments described above. For example, the first camera module 10 may have an ultra-low reflection film 1111 in the optically effective area of at least one of the protective cover plate 113, at least one lens 115, microlens 1191, and filter 1193. The first camera module 10 may also have an infrared light cutoff film 1112 on at least one of the protective cover plate 113, at least one lens 115, microlens 1191, and filter 1193, and anti-reflection films 1113 may be provided on both opposite sides of the filter 117. The ultra-low reflection film 1111 and the infrared light cutoff film 1112 are not located in the same position. The first camera module 10 may also have microstructures on the inner peripheral wall of the light shield 15. The embodiments of this application are not limited to the above combinations.
[0099] In another embodiment, the first camera module 10 may simultaneously include all four of the embodiments described above. For example, the first camera module 10 may have an ultra-low reflection film 1111 in the optically effective area of at least one of the protective cover plate 113, at least one lens 115, microlens 1191, and filter 1193. The first camera module 10 may also have an infrared light cut-off film 1112 on at least one of the protective cover plate 113, at least one lens 115, microlens 1191, and filter 1193, and anti-reflection films 1113 may be provided on both opposite sides of the filter 117. The ultra-low reflection film 1111 and the infrared light cut-off film 1112 are not located in the same position. The first camera module 10 may also have microstructures on the inner peripheral wall of the light shield 15. The first camera module 10 may also have sandblasted or inked 17 in the non-optically effective area of at least one of the protective cover plate 113 and at least one lens 115. The embodiments of this application are not limited to the above combinations.
[0100] In yet another embodiment, the first camera module 10 may include all five of the above-described embodiments simultaneously. In this case, the glare reduction effect of the first camera module 10 is the best.
[0101] The first camera module 10 in this application embodiment is only described using the improvement of arc ghosting, petal ghosting and feather stray light as examples. The improvement of glare problem in the first camera module 10 is not limited to the improvement of the three types of glare in this application.
[0102] The first camera module 10 specifically addresses various glare issues. A first image captured by the first camera module 10 is compared with a second image captured by the second camera module 30 to extract various glare masks and corresponding glare feature data, thereby improving the glare database 301. Figure 25 (As shown).
[0103] Please see Figure 22 The image processing method of this application includes:
[0104] 06: Acquire the initial image captured by the camera module;
[0105] 07: Identify glare in the initial image according to the preset glare database 301, wherein the glare database 301 is obtained according to the glare database acquisition method of any of the above embodiments; and
[0106] 08: Restore the image information of the area where the glare is located to output the target image.
[0107] Please combine Figure 25 The image processing apparatus 300 of this 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 stores glare mask images and glare feature data. The processor 303 is used to acquire an initial image captured by a camera module; identify glare in the initial image according to the glare database 301; and restore the image information of the area where the glare is located, so as to output a target image.
[0108] The processor 303 extracts glare features by comparing the first image and the second image captured by the first camera module 10 and the second camera module 30 to establish a complete glare database 301. The processor 303 uses this glare database 301 to identify whether there is glare in the initial image captured by the camera module. If glare is present in the initial image, the processor 303 restores the image information of the location of the glare. The camera module in this embodiment does not undergo hardware improvements; it only utilizes the already complete glare database 301 and the processor 303 to identify glare and restore the image.
[0109] Please combine Figure 21 The left image is the initial image with glare, and the right image is the glare-free image processed by the processor 303. After identifying glare based on the initial image, the processor 303 reconstructs the image information of the glare area to output a glare-free target image.
[0110] Please see Figure 23 In some embodiments, 07: Identifying glare in the initial image according to a preset glare database 301 includes:
[0111] 071: Identify bright spots in the initial image;
[0112] 073: Identify glare in the initial image based on the glare mask image and glare features in the glare mask image in the bright spot and glare database 301.
[0113] Correspondingly, processor 303 is used to identify bright spots in the initial image. Specifically, processor 303 converts the initial image into a grayscale image and performs binarization processing on the grayscale image using a series of thresholds to obtain a binarized image. In the binarized image, the processor identifies the outlines of white pixels, thereby identifying all bright spots in the initial image. Processor 303 is also used to identify glare in the initial image based on bright spots and the glare mask image and glare features in the glare mask image in the glare database 301. Specifically, processor 303 compares each bright spot in the initial image with the glare mask image and glare features in the glare mask image in the glare database 301 to confirm which bright spots are glare.
[0114] In some embodiments, glare features include the position of the glare relative to the light source, the intensity of the glare, the area of the glare region, and the angular range in which the glare continues to appear. Glare in the initial image is identified based on the glare mask image and glare features in the glare mask image in the bright spot and glare database 301. The bright spot is confirmed as glare if 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 angular range of the incident light rays forming the bright spot and the angular range of the incident light rays of the glare in the glare mask image is within a preset angle range.
[0115] In one implementation, a bright spot is identified as glare if it satisfies two of the above characteristics. 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 shadow 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 shadow is within a preset intensity, then the bright spot can be identified as glare, specifically an arc ghost shadow within the glare. In another example, if the difference between the area C of the bright spot and the area γ2 of the petal ghost shadow is within a preset area, and the difference between the angle range of the incident light rays forming the bright spot and the angle range δ2 of the incident light rays forming the petal ghost shadow is within a preset angle range, then the bright spot can be identified as glare, specifically a petal ghost shadow within the glare.
[0116] In another embodiment, a bright spot is identified as glare if it satisfies three of the above characteristics. In one example, if the difference between the position A of the bright spot relative to the light source and the position α3 of the stray feather 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 stray feather is within a preset intensity, and the difference between the area C of the bright spot and the area γ3 of the stray feather is within a preset area, then the bright spot can be identified as glare, specifically stray feather within glare. In another example, if the difference between the intensity B of the bright spot and the intensity β4 of the ghosting is within a preset intensity, the difference between the area C of the bright spot and the area γ4 of the ghosting is within a preset area, and the difference between the angle range D of the incident light ray forming the bright spot and the angle range δ4 of the incident light ray forming the ghosting is within a preset angle range, then the bright spot can be identified as glare, specifically ghosting within glare.
[0117] In another embodiment, a bright spot is confirmed as glare only if it satisfies four of the above characteristics. 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 rays forming the bright spot and the angle range δ1 of the incident light rays forming the arc ghost is within a preset angle range, then the bright spot can be determined as glare, and specifically as an arc ghost within 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 ray forming the bright spot and the angle range δ2 of the incident light ray forming the petal ghost is within a preset angle range, then the bright spot can be identified as glare, and specifically as a petal ghost within glare. This method of glare identification is the most accurate.
[0118] Please see Figure 24 In some implementations, 08: Restore image information of the glare area to output a target image, including:
[0119] 081: Remove glare from the initial image; and
[0120] 083: Use interpolation algorithms to restore the image information of the glare area in order to output the target image.
[0121] After identifying which bright spots are glare, processor 303 further removes the glare from the initial image, and then uses an interpolation algorithm to restore the image information of the glare area to output the target image. Specifically, after removing the glare from the initial image, processor 303 identifies the pixels surrounding the glare area and interpolates the image information of the glare area to obtain a target image without glare.
[0122] Please see Figure 26 The electronic device according to embodiments of this application includes a memory and one or more processors. The processors are used to execute the glare database acquisition method of any of the above embodiments and / or the image processing method of any of the above embodiments.
[0123] This electronic device can be a terminal, and its internal structure diagram can be as follows: Figure 26 As shown, this electronic device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory.
[0124] The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The input / output interface of the electronic device is used for exchanging information between the processor and external devices. The communication interface of the electronic device is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. The display unit of the electronic device is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink display screen. The input device of the electronic device can be a touch layer covering the display screen, or buttons, a trackball, or a touchpad located on the casing of the electronic device, or an external keyboard, touchpad, or mouse, etc.
[0125] Please refer to [link / reference] Figure 26 The computer-readable storage medium of the embodiments of this application stores a computer program, which, when executed by at least one processor, implements the glare database acquisition method of any of the above embodiments and / or the image processing method of any of the above embodiments.
[0126] The glare database acquisition method, glare database acquisition device 100, image processing method, image processing device 300, electronic device, and computer-readable storage medium of this application acquire first and second images captured by a first camera module 10 and a second camera module 30, forming an image pair, by repeatedly changing the incident angle of light. Then, a glare mask is obtained based on the first and second images in the image pair, and glare feature data is extracted, thereby establishing a complete glare database 301. Since the first image in the image pair is captured by the hardware-improved first camera module, and the second image is captured by the hardware-unimproved second camera module, the acquisition of the glare mask is very accurate, making the final glare database more complete than current glare databases and capable of solving most glare problems.
[0127] To improve the database, a hardware improvement structure is added to the first camera module 10 for comparison with the second camera module 30. The first camera module 10 requires only a few prototypes, resulting in a lower cost for solving the glare problem compared to directly improving the hardware structure of all camera modules. Furthermore, the glare database acquisition method of this application collects various types of glare masks and corresponding glare characteristic data. The glare database 301 of this embodiment is more comprehensive than traditional glare databases and can improve most glare problems.
[0128] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0129] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as will be understood by those skilled in the art to which embodiments of this application pertain.
[0130] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable storage medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including processor 50, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, a computer-readable storage medium can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable storage medium could be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0131] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0132] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it includes one or a combination of the steps of the method embodiments. Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc.
[0133] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application, the scope of which 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 image and a second image under the same incident light angle are captured by a first camera module and a second camera module to form an image pair. Compared with the second optical component of the second camera module, an anti-reflective film is added to the first optical component of the first camera module. By repeatedly changing the incident angle of the collimated light source, the first camera module and the second camera module capture multiple first images and multiple second images to form multiple image pairs; Based on the first image and the second image in each image pair, obtain a glare mask image; Extract the glare feature data from the glare mask image; and A glare database is established based on the glare mask images of multiple image pairs and the corresponding glare feature data.
2. The method for acquiring a glare database according to claim 1, characterized in that, The anti-reflective film includes an ultra-low reflection film, which is used to suppress light reflection; along the light incident direction of the first camera module, the first optical component sequentially includes a protective cover plate, at least one lens, a filter and an image sensor, and the image sensor sequentially includes a microlens and a filter; the ultra-low reflection film is provided in the optically effective area of at least one of the protective cover plate, at least one of the lens, the microlens and the filter.
3. The method for acquiring a glare database according to claim 1, characterized in that, The anti-reflective film includes an anti-reflective film, which is used to suppress the reflection of light; along the light incident direction of the first camera module, the first optical component sequentially includes a protective cover plate, at least one lens, a filter, and an image sensor, and the image sensor sequentially includes a microlens and a filter; the anti-reflective film is provided on both opposite sides of the filter; an infrared light cut-off film is provided on at least one of the protective cover plate, at least one 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 component includes a protective cover plate, 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 of the lenses is housed in the lens barrel. The first camera module further includes a light-shielding plate for blocking light, wherein the inner peripheral wall of the light-shielding plate is provided with microstructures; and / or The protective cover plate, and the non-optically effective area of at least one of the lenses, are sandblasted or coated with ink; and / or At least one of the non-optically effective areas of the lens barrel, the motor, and the filter is blackened.
5. A device for acquiring a glare database, characterized in that, include: First camera module, second camera module, and processor; For the same light source, the first camera module and the second camera module are used to capture a first image and a second image under the same incident light angle to form an image pair. Compared with the second optical component of the second camera module, an anti-reflective film is added to the first optical component of the first camera module. When the incident angle of the collimated light source is changed multiple times, the first camera module and the second camera module are also used to capture multiple first images and multiple second images to form multiple image pairs; The processor is configured to obtain a glare mask image based on the first image and the second image in each image pair; and extract glare feature data from the glare mask image. and A glare database is established based on the glare mask images of multiple image pairs and the corresponding glare feature data.
6. An image processing method, characterized in that, include: Acquire the initial image captured by the camera module; Glare in the initial image is identified according to a preset glare database, wherein the glare database is obtained by the method for obtaining a glare database according to any one of claims 1-4; and Restore the image information of the area where the glare is located to output the target image.
7. The image processing method according to claim 6, characterized in that, The step of identifying the glare in the initial image according to a preset glare database includes: Identify bright spots in the initial image; Glare in the initial image is identified based on the bright spots, 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 features include the position of the glare relative to the light source, the intensity of the glare, the area of the glare region, and the angular range in which the glare persists; the step of identifying the glare in the initial image based on the bright spot, the glare mask image in the glare database, and the glare features in the glare mask image includes: The bright spot is identified as glare if 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 is within a preset distance; the difference between the intensity of the bright spot and the intensity of the glare in the glare mask 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 is within a preset area; and the difference between the angle range of the incident light rays forming the bright spot and the angle range of the incident light rays of the glare in the glare mask is within a preset angle range.
9. The image processing method according to claim 6, characterized in that, The process of restoring the image information of the area where the glare is located to output the target image includes: Remove the glare from the initial image; and An interpolation algorithm is used to reconstruct the image information of the area where the glare is located in order to output the target image.
10. An image processing apparatus, characterized in that, include: Glare database, which is obtained by the method of acquiring a glare database according to any one of claims 1-4, and the glare database stores glare mask images and glare feature data; and Processor, the processor being used for: Acquire the initial image captured by the camera module; Identify glare in the initial image based on the glare database; and Restore the image information of the area where the glare is located to output the target image.
11. An electronic device, characterized in that, include: Memory; and One or more processors, said processors being configured to perform the method for acquiring a glare database as described in any one of claims 1 to 4 and / or to perform the image processing method as described in 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 that, when executed by at least one processor, implements the method for acquiring the glare database as described in any one of claims 1 to 4 and / or the image processing method as described in any one of claims 6 to 9.
Citation Information
Patent Citations
Electronic device, camera device and optical filter thereof
CN112346164A
Image output method and device and electronic equipment
CN112367464A