Image acquisition method and apparatus, electronic device, and medium
By adjusting the transmittance using electrochromic lenses, the problem of poor image acquisition under strong light sources was solved, enabling high-quality image acquisition and recognition under strong light conditions.
Patent Information
- Application Number
- CN202110972625.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-24
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2041-08-24
AI Technical Summary
Under strong light sources, the image acquisition effect of facial recognition devices is affected, resulting in slow recognition speed or failure to recognize normally. Existing adjustment solutions cannot effectively solve the problem of excessively dark images caused by strong light sources.
Electrochromic lenses are used to adjust the transmittance of the target area. The transmittance of the electrochromic lenses is adaptively adjusted according to the brightness detection results to adapt to changes in strong light sources and ensure image acquisition quality.
It improves image acquisition quality under strong light conditions, ensures the recognition effect of target objects, and enhances the environmental adaptability and recognition accuracy of the equipment.
Smart Images

Figure CN115720287B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image acquisition technology, and in particular to an image acquisition method, apparatus, electronic device and medium. Background Technology
[0002] With the development of facial recognition technology, its application is becoming increasingly widespread in order to improve the efficiency, accuracy, and convenience of personnel access management. There are numerous examples of facial recognition technology being used to manage personnel access in schools, industrial parks, and public transportation systems.
[0003] In both outdoor and indoor applications, the illumination of light sources in the environment has a significant impact on recognition performance. When a strong light source shines directly on the lens, facial recognition may become very slow or even fail to recognize the face. This can cause various inconveniences for people passing through, reduce the adaptability of the equipment to the environment, and affect the versatility of the solution.
[0004] Currently, one solution to the above problem is to use image signal processing technology to adjust the brightness of the captured image. This involves adjusting the brightness of the captured image based on the overall brightness of the image, the face's brightness, or the brightness of a specified area. However, this adjustment can only affect the brightness of the entire image. Under strong light sources, this can result in an overly dark image, affecting face imaging and consequently impacting subsequent detection and recognition. Another solution is to install a sunshade in front of the lens. However, the angle and size of the sunshade are fixed and difficult to adjust automatically. In the absence of strong light sources, it can block light, resulting in a dark image. Summary of the Invention
[0005] This application provides an image acquisition method, apparatus, electronic device, and medium to adaptively adjust the brightness of the image entering the lens during image acquisition, thereby improving the quality of the acquired image.
[0006] In one embodiment, this application provides an image acquisition method executed by an image acquisition device, the image acquisition device including a lens and an electrochromic lens disposed in front of the lens, the method including:
[0007] If a target object is detected in the captured image, the first transmittance of the target lens area in the electrochromic lens is increased to the second transmittance; wherein, the target lens area is the area in the electrochromic lens corresponding to the target area in the captured image, and the target area is the area in the captured image where the brightness has exceeded the preset brightness.
[0008] Based on the brightness detection results of the target area in the captured image, the second transmittance of the target lens area is adjusted;
[0009] In the process of adjusting the second light transmittance of the target lens area or after the adjustment is completed, the image acquisition module acquires the image according to the quality detection result of the acquisition image.
[0010] In another embodiment, the embodiment of the present application further provides an image acquisition device, which comprises:
[0011] The initial increasing module is configured to increase the first light transmittance of the target lens area in the electrochromic lens to the second light transmittance if the target object is detected in the acquisition image; wherein the target lens area is an area in the electrochromic lens corresponding to the target area in the acquisition image, and the target area is an area in the acquisition image in which the luminance is greater than the preset luminance.
[0012] The light transmittance adjusting module is configured to adjust the second light transmittance of the target lens area according to the luminance detection result of the target area in the acquisition image.
[0013] The image acquisition module is configured to acquire the image according to the quality detection result of the acquisition image in the process of adjusting the second light transmittance of the target lens area or after the adjustment is completed.
[0014] In yet another embodiment, the embodiment of the present application further provides an electronic device, which comprises:
[0015] The memory is configured to store one or more programs.
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the image acquisition method according to any one of the embodiments of the present application.
[0017] In one embodiment, the embodiment of the present application further provides a computer readable storage medium having a computer program stored thereon, which is executed by a processor to implement the image acquisition method according to any one of the embodiments of the present application.
[0018] In the embodiment of the present application, if the target object is detected in the collected picture, the first light transmittance of the target lens area in the electrochromic lens is increased to the second light transmittance; wherein the target lens area is the area in the electrochromic lens corresponding to the target area in the collected picture, and the target area is the area in the collected picture where the brightness is greater than the preset brightness; the second light transmittance of the target lens area is adjusted according to the brightness detection result of the target area in the collected picture; during or after the adjustment of the second light transmittance of the target lens area, the collected picture is collected according to the quality detection result of the collected picture. The above-mentioned scheme can adaptively adjust the light transmittance of the electrochromic lens according to the influence of the external light source on the brightness of the collected picture, and when the target object is detected, the light transmittance of the electrochromic lens is adjusted to determine whether the target object blocks the external light source, and then the light transmittance of the electrochromic lens is adaptively adjusted according to whether the target object blocks the light source to affect the brightness of the collected picture, so as to improve the quality of the collected image. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 The flow chart of the image collection method provided by an embodiment of the present application is shown in the figure;
[0020] Figure 2 The structural schematic diagram of the image collector provided by an embodiment of the present application is shown in the figure;
[0021] Figure 3 The structural schematic diagram of the electrochromic glass provided by an embodiment of the present application is shown in the figure;
[0022] Figure 4 The relationship between the light transmittance and the voltage of the electrochromic glass provided by an embodiment of the present application is shown in the figure;
[0023] Figure 5 The candidate area schematic diagram provided by an embodiment of the present application is shown in the figure;
[0024] Figure 6 The flow chart of the image collection method provided by another embodiment of the present application is shown in the figure;
[0025] Figure 7 The electrochromic unit schematic diagram provided by another embodiment of the present application is shown in the figure;
[0026] Figure 8 The row-column scanning control schematic diagram provided by another embodiment of the present application is shown in the figure;
[0027] Figure 9 The structural schematic diagram of the image collection device provided by an embodiment of the present application is shown in the figure;
[0028] Figure 10 The structural schematic diagram of the electronic device provided by an embodiment of the present application is shown in the figure.
[0029] The application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely intended for the purpose of interpretation of the present application and are not intended to limit the present application. In addition, it should be noted that only the parts related to the present application are shown in the drawings for the purpose of description. DETAILED DESCRIPTION
[0030] Figure 1 A flow chart of an image acquisition method according to an embodiment of the present application is provided. The image acquisition method according to the embodiment of the present application can be applied to the case of image acquisition by an image acquisition device. Typically, the embodiment of the present application is applied to the case of adaptively adjusting the light transmittance of an electrochromic lens according to the brightness of the captured image to improve the quality of the captured image. The method can be specifically executed by an image acquisition device, which can be realized by software and / or hardware, and the device can be integrated in an electronic device capable of realizing the image acquisition method. The method according to the embodiment of the present application is executed by an image acquisition device, which includes a lens and an electrochromic lens arranged in front of the lens. As shown in FIG. 1, the side of the lens facing the captured scene is the front side of the lens, and the front side of the lens is configured with an electrochromic lens. The size of the cross section of the electrochromic lens is greater than or the same as the size of the cross section of the lens to completely cover the light entrance surface of the lens. The light first passes through the electrochromic lens and then enters the lens. The material of the electrochromic lens can be electrochromic glass, which includes a glass substrate, a transparent conductive layer, an ion storage layer, an ion conductor layer, and an electrochromic layer. When a voltage is applied between the two transparent conductive layers, electrons from the negative electrode of the power source enter the electrochromic layer through the transparent conductive layer, and the ions in the ion storage layer enter the electrochromic layer through the ion conductor layer to generate light absorption due to charge balance. The relationship between the light transmittance of the electrochromic glass and the voltage is shown in FIG. 2. The light transmittance of the electrochromic glass can be changed by changing the value of the voltage. Figure 2 Figure 3 Figure 4
[0031] Referring to FIG. 3, the method can include: Figure 1
[0032] S110, if a target object is detected in the captured image, the first light transmittance of a target lens region in the electrochromic lens is increased to the second light transmittance; wherein the target lens region is a region in the electrochromic lens corresponding to a target region in the captured image, and the target region is a region in the captured image where the brightness is greater than the preset brightness.
[0033] The acquisition picture is a picture presented in the image acquisition device when the image acquisition device is preparing to acquire an image of a scene in a field of view. For example, if the image acquisition device is a mobile phone equipped with a camera, when the camera application is opened in the mobile phone and the scene to be photographed is aligned to prepare for image acquisition, the picture displayed on the screen of the mobile phone is the acquisition picture. The target region is a candidate region in the acquisition picture, and the brightness of the candidate region is greater than a preset brightness. The candidate region can be determined according to actual conditions. For example, the rectangular acquisition picture can be divided into 3*3=9 candidate regions, as shown in FIG. 8A. The candidate regions can also be set as 4*4=16 candidate regions, 8*8=64 candidate regions, and the like. Figure 5
[0034] In the embodiments of the present application, the preset brightness can be set according to actual conditions. For example, the brightness of the acquisition picture when the image quality is the highest or the visual effect is the best can be taken as the preset brightness, so as to compare the brightness of the acquisition picture with the preset brightness in the subsequent process, to preliminarily evaluate the image quality of the acquisition picture from the aspect of brightness. The brightness of the candidate region in the acquisition picture is detected. If the brightness of the candidate region is greater than the preset brightness, the candidate region is taken as the target region. The brightness of the target region is greater than the preset brightness, which indicates that the illuminance of the external environment light source is relatively large, and the strong light source irradiates the image acquisition device, resulting in that the light entering the lens of the image acquisition device is relatively strong, and the brightness of the target region in the acquisition picture is greater than the preset brightness. At this time, the light transmittance of the target lens region of the electrochromic lens in front of the lens corresponding to the target region can be adjusted to reduce the light transmittance of the target lens region, so as to reduce the brightness of the target region. In the embodiments of the present application, the target object can be a face, a vehicle, a building, or the like. In the scene of collecting the target object, if the target object blocks the external environment light source after entering the acquisition picture and weakens the strong light irradiation of the external environment light source, the brightness of the target region will be correspondingly reduced. At this time, if the target lens region of the electrochromic lens still maintains the first light transmittance, the light entering amount can be relatively small, the brightness of the target region is relatively dark, and the quality of the acquisition picture is affected or the recognition of the target object is affected. Therefore, the scheme adopted in the embodiments of the present application is to adaptively increase the first light transmittance of the target lens region to increase the light transmittance of the target lens region, to moderately increase the brightness of the target region, and further to judge whether the target object blocks the external environment light source according to the brightness detection result of the target region, and to take corresponding adjustment measures.
[0035] In the embodiments of the present application, if the target object is detected in the acquisition picture, before the first light transmittance of the target lens region in the electrochromic lens is increased to the second light transmittance, the method further includes: if it is detected that the brightness of the target region in the acquisition picture is greater than the preset brightness, the initial light transmittance of the target lens region in the electrochromic lens is reduced to the first light transmittance.
[0036] In order to ensure that the lens has sufficient light quantity, the initial transmittance can be set to a relatively large value, for example, 100%. The change amount between the initial transmittance and the first transmittance can be an amount determined according to the relationship between the brightness of the target area and the preset brightness, for example, according to the difference between the brightness of the target area and the preset brightness, the transmittance change amount required if the brightness of the target area is adjusted to be close to the preset brightness, and the initial transmittance is reduced to the first transmittance based on the transmittance change amount to reduce the brightness of the target area.
[0037] In the embodiments of the present application, increasing the first transmittance of the target lens area to the second transmittance includes: taking the product of the difference between the initial transmittance and the first transmittance of the target lens area and the second preset ratio as the second increase amount of the transmittance of the target lens area; and increasing the first transmittance of the target lens area to the second transmittance based on the second increase amount.
[0038] Exemplarily, after the initial transmittance of the target lens area is reduced to the first transmittance, the brightness of the target area is lower than the preset brightness, and the first transmittance can be adaptively increased, but the adjustment amount of the first transmittance cannot exceed the difference between the initial transmittance and the first transmittance, so as to prevent the adjustment amount from being too large and causing the brightness of the target area to exceed the preset brightness. In the embodiments of the present application, the second preset ratio is set, and the second preset ratio is less than 100%, which can be set to 5%-10%. The product of the difference between the initial transmittance and the first transmittance of the target lens area and the second preset ratio is taken as the second increase amount of the transmittance of the target lens area, and the first transmittance of the target lens area is increased to the second transmittance based on the second increase amount, so as to adjust the first transmittance in a small amount and realize fine-grained adjustment.
[0039] S120, adjusting the second transmittance of the target lens area according to the brightness detection result of the target area in the collected picture.
[0040] Exemplarily, after the first transmittance is increased to the second transmittance, the brightness of the target area in the collected picture is further detected in the case that the target object may shield the external environment light source or the target object does not shield the external environment light source, and the second transmittance is adaptively adjusted according to the brightness detection result, so as to adaptively adjust the second transmittance of the target lens area based on the current light quantity, and adjust the light quantity of the lens.
[0041] In the embodiments of the present application, the brightness detection result of the target region can also be the comparison result of the brightness of the target region and the preset brightness, as the brightness detection result. The adjustment of the second light transmittance of the target lens region can be a pre-set fixed adjustment amount, and the second light transmittance is adjusted in sequence according to the adjustment amount. The adjustment amount of the adjustment of the second light transmittance each time can also be set to different values, for example, when the brightness of the target region is greatly different from the preset brightness, a larger adjustment amount is set to speed up the adjustment progress and realize rapid adjustment of the light amount to a suitable value. When the brightness of the target region is small, a smaller adjustment amount is set to perform fine-grained adjustment. In the present application, the final target of the adjustment is that the brightness of the target region is equal to the preset brightness, so as to adjust the brightness parameter affecting the image quality of the captured picture to an ideal value.
[0042] In the process of adjusting the second light transmittance of the target lens region or after the adjustment is completed, the quality of the captured picture is detected according to the quality detection result of the captured picture, and the captured picture is captured.
[0043] In the embodiments of the present application, the brightness of the captured picture is only one factor affecting the image quality of the image captured by the image capture device, and the actual quality of the image needs to be finally considered. Therefore, in the process of adjusting the second light transmittance to adjust the light amount and adjust the brightness of the captured picture, the quality of the captured picture is detected in real time, so as to determine whether the image capture is suitable according to the quality of the picture. For example, in the process of adjusting the second light transmittance of the target lens region, the image capture device detects the quality of the captured picture in real time. If the quality detection result of the captured picture indicates that the quality of the captured picture has met the requirements during the adjustment of the second light transmittance, the captured picture is captured, and it is not necessary to wait until the adjustment of the second light transmittance is completed before the image capture. If the quality of the captured picture cannot meet the requirements during the adjustment of the second light transmittance, the captured picture is captured after the adjustment of the second light transmittance is completed.
[0044] In the embodiments of the present application, in the process of adjusting the second light transmittance of the target lens region or after the adjustment is completed, the quality of the captured picture is detected according to the quality detection result of the captured picture, and the captured picture is captured, including: in the process of adjusting the second light transmittance of the target lens region or after the adjustment is completed, if the quality score of the captured picture is greater than a preset score, the captured picture is captured. The preset score can be determined according to actual conditions.
[0045] In the embodiment of the present application, if a target object is detected in the captured picture, the first light transmittance of a target lens region in the electrochromic lens is increased to a second light transmittance; wherein the target lens region is a region in the electrochromic lens corresponding to a target region in the captured picture, and the target region is a region in the captured picture in which the brightness is greater than a preset brightness; the second light transmittance of the target lens region is adjusted according to the detection result of the brightness of the target region in the captured picture; and the captured picture is captured according to the quality detection result of the captured picture after the second light transmittance of the target lens region is adjusted. The above scheme can adaptively adjust the light transmittance of the electrochromic lens according to the influence of the external light source on the brightness of the captured picture, and determine whether the target object blocks the external light source by adjusting the light transmittance of the electrochromic lens when the target object is detected, and then adaptively adjust the light transmittance of the electrochromic lens according to the influence of the target object on the brightness of the captured picture, thereby improving the quality of the captured image.
[0046] Figure 6 The flowchart of the image capturing method provided by another embodiment of the present application is shown in FIG. 4. The embodiment of the present application is a further optimization of the above-mentioned embodiment, and the details not described in the embodiment of the present application are described in the above-mentioned embodiment. Referring to FIG. 4, Figure 6 The image capturing method provided by the embodiment of the present application can include:
[0047] S210, if a target object is detected in the captured picture, the first light transmittance of a target lens region in the electrochromic lens is increased to a second light transmittance; wherein the target lens region is a region in the electrochromic lens corresponding to a target region in the captured picture, and the target region is a region in the captured picture in which the brightness is greater than a preset brightness.
[0048] S220, the brightness of the target region is compared with the preset brightness.
[0049] S230, if the brightness of the target region is equal to the preset brightness, the second light transmittance of the target lens region is not adjusted.
[0050] For example, if the brightness of the target region is equal to the preset brightness, it is determined that the current light amount is appropriate, and the brightness of the target region is appropriate, and thus the image effect of the captured picture is better, and therefore the second light transmittance is not adjusted.
[0051] S240, if the brightness of the target region is greater than the preset brightness, the second light transmittance of the target lens region is reduced according to the difference between the second light transmittance and the first light transmittance.
[0052] For example, if the brightness of the target region is still greater than the preset brightness, it is determined that the light amount is still large, and the target object can not have blocked the external environment light source to a large extent. At this time, the second light transmittance of the target lens region is adaptively reduced to reduce the light amount, thereby reducing the brightness of the target region. The adjustment amount of reducing the second light transmittance of the target lens region can be determined according to the difference between the second light transmittance and the first light transmittance. Since the first light transmittance is obtained by reducing the initial light transmittance when the brightness of the target region in the captured image is greater than the preset brightness, the brightness of the target region should be less than the preset brightness when the target lens region is in the first light transmittance. When the target lens region is in the second light transmittance, the brightness of the target region is greater than the preset brightness. Therefore, the light transmittance corresponding to the brightness of the target region equal to the preset brightness should be between the first light transmittance and the second light transmittance. Therefore, the adjustment amount of reducing the second light transmittance is determined according to the difference between the second light transmittance and the first light transmittance, so as to avoid an excessively large adjustment range, thereby causing the brightness of the target region to be too low.
[0053] In the embodiments of the present application, the second light transmittance of the target lens region can be equal to the difference between the second light transmittance and the first light transmittance, so as to restore the light transmittance of the target lens region to the first light transmittance, thereby ensuring that the brightness of the target region is not greater than the preset brightness. At this time, when the brightness of the target region is less than the preset brightness, subsequent adjustment can be performed according to the steps of S250-S270, or the adjustment can not be performed, so as to make the brightness of the target region less than the preset brightness.
[0054] S250, if the brightness of the target region is less than the preset brightness, the second light transmittance of the target lens region is gradually increased until the brightness of the target region is greater than or equal to the preset brightness.
[0055] For example, if the brightness of the target region is less than the preset brightness, the second light transmittance of the target lens region is gradually increased to make the brightness of the target region equal to the preset brightness. During the process of gradually increasing the second light transmittance of the target lens region, if the brightness of the target region is greater than or equal to the preset brightness, the operation of increasing the second light transmittance of the target lens region is stopped, and further operations of S260 or S270 are performed according to the detection result of the brightness of the target region.
[0056] In the embodiments of the present application, the adjustment amount of increasing the second light transmittance of the target lens region each time can be determined according to actual conditions. If fine-grained adjustment is required for the second light transmittance, a smaller adjustment amount is set, and if the adjustment speed needs to be accelerated, a larger adjustment amount is set. The adjustment amount of increasing the second light transmittance each time is not more than the difference between the initial light transmittance and the current light transmittance. The adjustment amount of increasing the second light transmittance each time can be the same or different.
[0057] In the embodiment of the present application, the second transmittance of the target lens area is gradually increased, including: taking the product of the difference between the initial transmittance and the current transmittance of the target lens area and the first preset ratio as the first increase amount of the transmittance of the target lens area; and increasing the second transmittance of the target lens area based on the first increase amount.
[0058] The first preset ratio can be determined according to actual conditions, for example, it can be 5%-10%, so as to adjust at a suitable granularity and at a suitable speed. The product of the difference between the initial transmittance and the current transmittance of the target lens area and the first preset ratio is taken as the first increase amount of the transmittance of the target lens area, so as to gradually increase the second transmittance, so as to gradually improve the brightness of the target area, and make the brightness of the target area close to the preset brightness.
[0059] In the process of gradually increasing the second transmittance of the target lens area, if the brightness of the target area is greater than the preset brightness, the last increase operation of the second transmittance is cancelled.
[0060] For example, in the process of gradually increasing the second transmittance of the target lens area, if the brightness of the target area is greater than the preset brightness, it is determined that the increase of the second transmittance of the target lens area is excessive, and therefore the last increase operation of the second transmittance is cancelled, so as to make the brightness of the target area lower than the preset brightness and be in a state closest to the preset brightness.
[0061] In the process of gradually increasing the second transmittance of the target lens area, if the brightness of the target area is equal to the preset brightness, the adjusted second transmittance is not adjusted.
[0062] In the embodiment of the present application, in the process of gradually increasing the second transmittance of the target lens area, if the brightness of the target area is equal to the preset brightness, it is determined that the transmittance of the current target lens area is appropriate, and therefore the adjusted second transmittance is not adjusted, so as to make the brightness of the target area consistent with the preset brightness.
[0063] In the process of adjusting the second transmittance of the target lens area or after the adjustment is completed, the image acquisition is performed on the collected picture according to the quality detection result of the collected picture.
[0064] In the embodiment of the present application, if the brightness of the target region is greater than the preset brightness, the second light transmittance of the target lens region is reduced according to the difference between the second light transmittance and the first light transmittance. If the brightness of the target region is less than the preset brightness, the second light transmittance of the target lens region is gradually increased until the brightness of the target region is greater than or equal to the preset brightness. If the brightness of the target region is greater than the preset brightness, the last operation of increasing the second light transmittance is cancelled. Thus, whether the target object has an impact on the amount of incoming light is reflected by the brightness of the target region after the appearance of the target object, and the light transmittance of the target lens region is gradually adjusted to gradually make the brightness of the target region close to the preset brightness, thereby improving the quality of the collected image in the presence of a strong light source.
[0065] In the embodiment of the present application, the light transmittance is adjusted by the quantified brightness change. For example, the theoretical brightness change of the target region is determined if the initial light transmittance is reduced to the first light transmittance. After the initial light transmittance is reduced to the first light transmittance and the target object is detected, the actual brightness change of the target region is detected. If the actual brightness change is equal to the theoretical brightness change, it is determined that the target object does not block the strong light source. If the actual brightness change is greater than the theoretical brightness change, it is determined that the target object blocks the strong light source. At this time, the theoretical adjustment amount of the first light transmittance of the target lens region can be determined according to the difference between the brightness of the target region and the preset brightness in the presence of the target object blocking the strong light source. The first light transmittance of the target lens region is adjusted according to the theoretical adjustment amount to make the brightness of the target region equal to the preset brightness. The above scheme requires precise quantitative calculation.
[0066] In the embodiment of the present application, the process of adjusting the light transmittance of the target lens region in the electrochromic lens includes: determining the to-be-adjusted rows and the to-be-adjusted columns of the electrochromic cell array in the electrochromic lens according to the target lens region; connecting the to-be-adjusted rows in sequence through the row-column driver and delivering the first target voltage; and connecting the to-be-adjusted columns in sequence through the row-column driver and delivering the second target voltage when the row-column driver connects each to-be-adjusted row.
[0067] For example, the electrochromic lens includes electrochromic cells, and a plurality of electrochromic cells form an array, as shown in Figure 7 For example, the target lens region is the region corresponding to the array coordinates (2, 1), (2, 2), (3, 1), (3, 2), (4, 1), and (4, 2) of the electrochromic cells. The corresponding to-be-adjusted rows and to-be-adjusted columns can be determined as shown in Figure 8The to-be-adjusted row 1, the to-be-adjusted row 2, the to-be-adjusted row 3, the to-be-adjusted column 1, and the to-be-adjusted column 2 are adjusted by using the row-column scanning control mode. The row-column controller is connected to the to-be-adjusted row 1 first to deliver the first target voltage, and then connected to the to-be-adjusted column 1 and the to-be-adjusted column 2 in sequence to deliver the second target voltage. Then, the row-column controller is connected to the to-be-adjusted row 2 to deliver the first target voltage, and then connected to the to-be-adjusted column 1 and the to-be-adjusted column 2 in sequence to deliver the second target voltage. Then, the row-column controller is connected to the to-be-adjusted row 3 to deliver the first target voltage, and then connected to the to-be-adjusted column 1 and the to-be-adjusted column 2 in sequence to deliver the second target voltage. In this way, the voltage control of the electrochromic units with the array coordinates of (2, 1), (2, 2), (3, 1), (3, 2), (4, 1), and (4, 2) is realized, and the transmittance of the target lens region is adjusted. Since the scanning frequency is fast, the delay can be ignored.
[0068] The current point-to-point voltage control mode sets one control port for each electrochromic unit, which leads to waste of control ports, increases the usage amount and processing pressure of IO ports. The above scheme of the present application saves the usage amount and processing pressure of IO ports and realizes accurate adjustment of transmittance through row-column scanning control.
[0069] The embodiment of the present application is a specific implementation scheme of the above embodiment. Specifically as follows:
[0070] The device is initialized, and it is judged whether the brightness of the candidate region of the collected picture exceeds the preset brightness a. The regions whose brightness exceeds the preset brightness a by two degrees are taken as target regions.
[0071] If the brightness of the candidate region is less than or equal to a, the transmittance of the electrochromic lens is not adjusted, and the high transmittance is maintained. If there is a target region with brightness greater than a, the transmittance of the target lens region on the electrochromic lens corresponding to the target region needs to be changed, and the transmittance T1 of the electrochromic lens is reduced by X and becomes T2.
[0072] If the target object is detected in the collected picture, the transmittance T2 of the target lens region of the electrochromic lens is increased by X*(5-10%), and becomes T3. The relationship between the brightness of the target region and the preset brightness is detected.
[0073] If the brightness of the target region exceeds the preset brightness, the transmittance T3 is reduced by X*(5-10%) and becomes T2.
[0074] If the brightness of the target region is less than the preset brightness, the transmittance change amount Y is reset as (T1-current transmittance)*(5-10%), the current transmittance is increased by Y, and the process is repeated. When the brightness of the target region is greater than the preset brightness, the last adjustment operation is restored.
[0075] If the brightness of the target region is equal to the preset brightness, the light transmittance is not adjusted.
[0076] The scheme provided by the embodiments of the present application has the same beneficial effects as the above embodiments.
[0077] Figure 9 A structural schematic diagram of an image acquisition device is provided for an embodiment of the present application. The device can be applied to the case of image acquisition by an image acquisition device. Typically, the embodiments of the present application are applied to the case of adaptively adjusting the light transmittance of an electrochromic lens according to the brightness of an acquired image to improve the quality of the acquired image. The device can be realized in the form of software and / or hardware, and the device can be integrated in an electronic device. Referring to Figure 9 , the device specifically comprises:
[0078] The initial increasing module 410 is configured to increase the first light transmittance of the target lens region in the electrochromic lens to the second light transmittance if a target object is detected in the acquired image; wherein the target lens region is a region in the electrochromic lens corresponding to a target region in the acquired image, and the target region is a region in the acquired image in which the brightness is greater than the preset brightness.
[0079] The light transmittance adjusting module 420 is configured to adjust the second light transmittance of the target lens region according to the detection result of the brightness of the target region in the acquired image.
[0080] The image acquisition module 430 is configured to acquire the image of the acquired image according to the quality detection result of the acquired image during or after the adjustment of the second light transmittance of the target lens region.
[0081] In the embodiments of the present application, the device further comprises an initial decreasing module configured to decrease the initial light transmittance of the target lens region to the first light transmittance if it is detected that the brightness of the target region in the acquired image is greater than the preset brightness.
[0082] In the embodiments of the present application, the light transmittance adjusting module 420 comprises:
[0083] The first adjusting unit is configured to decrease the second light transmittance of the target lens region according to the difference between the second light transmittance and the first light transmittance if the brightness of the target region is greater than the preset brightness.
[0084] In the embodiments of the present application, the light transmittance adjusting module 420 comprises:
[0085] The second adjusting unit is configured to gradually increase the second light transmittance of the target lens region until the brightness of the target region is greater than or equal to the preset brightness if the brightness of the target region is less than the preset brightness.
[0086] The revoking operation unit is configured to revoke the last operation of increasing the second transmittance if the brightness of the target area is greater than the preset brightness.
[0087] In the embodiment of the present application, the second adjusting unit comprises:
[0088] The first increasing amount determining subunit is configured to take the product of the difference between the initial transmittance and the current transmittance of the target lens area and the first preset ratio as the first increasing amount of the transmittance of the target lens area.
[0089] The second transmittance increasing subunit is configured to increase the second transmittance of the target lens area based on the first increasing amount.
[0090] In the embodiment of the present application, the initial increasing module 410 comprises:
[0091] The second increasing amount determining unit is configured to take the product of the difference between the initial transmittance and the first transmittance of the target lens area and the second preset ratio as the second increasing amount of the transmittance of the target lens area.
[0092] The first transmittance increasing unit is configured to increase the first transmittance of the target lens area to the second transmittance based on the second increasing amount.
[0093] In the embodiment of the present application, the image acquisition module 430 comprises:
[0094] The score comparing unit is configured to perform image acquisition on the captured image if the quality score of the captured image is greater than the preset score during the adjustment of the second transmittance of the target lens area or after the adjustment.
[0095] In the embodiment of the present application, the device further comprises:
[0096] The area to be adjusted determining module is configured to determine the rows to be adjusted and the columns to be adjusted of the array of electro-optic units in the electro-optic lens according to the target lens area.
[0097] The first target voltage delivering module is configured to sequentially connect the rows to be adjusted through the row-column driver and deliver the first target voltage.
[0098] The second target voltage delivering module is configured to sequentially connect the columns to be adjusted through the row-column driver and deliver the second target voltage when the row-column driver connects each row to be adjusted.
[0099] The image acquisition device provided in the embodiment of the present application can execute the image acquisition method provided in any embodiment of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0100] Figure 10A structural schematic diagram of an electronic device is provided for an embodiment of the present application. Figure 10 A block diagram of an exemplary electronic device 512 suitable for implementing embodiments of the present application is shown. Figure 10 The electronic device 512 shown is merely an example and should not be taken as limiting the functionality or applicability of embodiments of the present application.
[0101] As shown in Figure 10 The electronic device 512 can include one or more processors 516, memory 528 storing one or more programs that, when executed by the one or more processors 516, cause the one or more processors 516 to implement an image acquisition method provided by embodiments of the present application, including:
[0102] If a target object is detected in the acquisition image, the first light transmittance of a target lens region in the electrochromic lens is increased to a second light transmittance; wherein the target lens region is a region in the electrochromic lens corresponding to a target region in the acquisition image, and the target region is a region in the acquisition image in which the brightness is greater than a preset brightness;
[0103] According to the brightness detection result of the target region in the acquisition image, the second light transmittance of the target lens region is adjusted;
[0104] After the second light transmittance of the target lens region is adjusted, or after the adjustment is completed, the acquisition image is acquired according to the quality detection result of the acquisition image.
[0105] The components of electronic device 512 can include, but are not limited to, one or more processors 516, memory 528, and a bus 518 that connects different device components, including memory 528 and processor 516.
[0106] Bus 518 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or local bus using any of a variety of bus architectures including an industry standard architecture (ISA), micro-channel architecture (MAC), peripheral component interconnect (PCI), video electronics standards group (VESA), and expansion industry standard architecture (EISA) bus.
[0107] Electronic device 512 typically includes a variety of computer device readable media. Such media can be any available media that is localized or remote to electronic device 512, and includes both volatile and nonvolatile media, removable and non-removable media.
[0108] Memory 528 can include computer device readable storage media in the form of volatile memory, such as random access memory (RAM) 530 and / or cache memory 532. Electronic device 512 can further include other removable / non-removable, volatile / non-volatile computer device storage media. By way of example only, storage system 534 can be provided for reading from and writing to a non-removable, non-volatile magnetic media (not shown and typically called a "hard drive"). Figure 10 Although not shown, a magnetic disk drive can also be utilized in some embodiments of electronic device 512 for reading from and writing to a removable, non-volatile magnetic media (e.g., a "floppy disk"), and an optical disk drive can be used in some embodiments for reading from and writing to a removable, non-volatile optical media (e.g., a CD-ROM, DVD-ROM or other optical media). Figure 10 In some embodiments, disk drives and optical disk drives can be included in electronic device 512 for reading from or writing to a computer device readable medium, such as a removable, non-volatile magnetic or optical disk (e.g., a "floppy disk," a "flexible disk," a hard disk, or a Blu-ray disk). In some embodiments, such drives can be external to electronic device 512. In such instances, at least a portion of memory 528 can be used to provide temporary storage of data during download from external drives. Storage media 528 can include one or more program products 536, which are stored in the memory 528, that can include an operating system 538, one or more applications 540, other program modules 542, and program data 544.
[0109] Program / utility 540 having a set (at least one) of program modules 542 can be stored in memory 528 by way of example, and not limitation, as well as an operating system, one or more application programs, other program modules, and program data, and a user interface program, etc. Each of the operating systems, one or more application programs, other program modules, and program data or some combination thereof, can include an implementation of a networking environment.
[0110] Electronic device 512 can also communicate with one or more external devices 514 and / or with one or more display devices 524, such as a display screen or monitor for example. Also, electronic device 512 can communicate with one or more devices that enable a user to interact with electronic device 512 (for example, a keyboard, a mouse, a pen, a microphone, a touch screen, a touch pad, etc.). Further, electronic device 512 can communicate with one or more devices that enable electronic device 512 to interact with one or more other electronic devices (for example, a modem, a sensor, a Web browser, etc.). Figure 10 As shown, network adapter 520 communicates with the other components of electronic device 512 via bus 518. It should be understood that although not shown, other hardware and / or software components that are used in conjunction with electronic device 512 can also be utilized. For example, electronic device 512 can be communicatively coupled to a network using a wireless communication protocol, such as Bluetooth, Wi-Fi, or the like. Figure 10 It is to be appreciated that the software modules described herein can be initially downloaded from an external source (for example, a server or a network) or can be installed prior to
[0111] The one or more processors 516 perform various function applications and data processing by running at least one of other programs in the plurality of programs stored in the memory 528, such as implementing the image acquisition method provided in the embodiments of the present application.
[0112] An embodiment of the present application provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to perform an image acquisition method, comprising:
[0113] If a target object is detected in the acquisition picture, the first light transmittance of a target lens area in the electrochromic lens is increased to a second light transmittance; wherein the target lens area is an area in the electrochromic lens corresponding to a target area in the acquisition picture, and the target area is an area in the acquisition picture in which a luminance greater than a preset luminance occurs;
[0114] According to a luminance detection result of the target area in the acquisition picture, the second light transmittance of the target lens area is adjusted;
[0115] In the process of adjusting the second light transmittance of the target lens area or after the adjustment is completed, the acquisition picture is subjected to image acquisition according to a quality detection result of the acquisition picture.
[0116] The computer storage medium of the embodiments of the present application can adopt any combination of one or more computer readable storage media. The computer readable storage medium can be a computer readable signal storage medium or a computer readable storage medium. The computer readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer readable storage media include: electrical connections with one or more conductive wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the embodiments of the present application, the computer readable storage medium can be any tangible storage medium containing or storing a program that can be used by or in conjunction with an instruction execution device, device or device.
[0117] Computer readable signal media can include a propagated data signal with computer readable program code embodied therein. For example, a propagated signal can be an electromagnetic signal, an optical signal, and / or the like. Such a propagated signal can take a variety of forms, including, but not limited to, electro-magnetic signals, optical signals, and / or the like. Computer readable signal media can be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate or transport programming for use by or in connection with an instruction execution system, apparatus, or device.
[0118] Program code embodied on a computer readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0119] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0120] Note that the foregoing are merely preferred embodiments of the present application and the principles of the application are applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, reconfigurations and substitutions can be made by those skilled in the art without departing from the scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. An image acquisition method, characterized in that, The method is performed by an image collector, the image collector comprising a lens and an electrochromic lens arranged in front of the lens, and the method comprises: If a target object is detected in the collected image, increasing a first transmittance of a target lens region in the electrochromic lens to a second transmittance; wherein the target lens region is a region in the electrochromic lens corresponding to a target region in the collected image, and the target region is a region in the collected image in which a luminance greater than a preset luminance occurs; adjusting the second transmittance of the target lens region according to a detection result of the luminance of the target region in the collected image; during or after the adjustment of the second transmittance of the target lens region, collecting the image according to a quality detection result of the collected image; If a target object is detected in the collected image, before the first transmittance of the target lens region in the electrochromic lens is increased to the second transmittance, the method further comprises: if it is detected that the luminance of the target region in the collected image is greater than the preset luminance, reducing an initial transmittance of the target lens region in the electrochromic lens to the first transmittance.
2. The method of claim 1, wherein, The adjusting of the second transmittance of the target lens region according to the detection result of the luminance of the target region in the collected image comprises: if the luminance of the target region is greater than the preset luminance, reducing the second transmittance of the target lens region according to a difference between the second transmittance and the first transmittance.
3. The method of claim 1, wherein, The adjusting of the second transmittance of the target lens region according to the detection result of the luminance of the target region in the collected image comprises: if the luminance of the target region is less than the preset luminance, gradually increasing the second transmittance of the target lens region until the luminance of the target region is greater than or equal to the preset luminance; if the luminance of the target region is greater than the preset luminance, undoing the last operation of increasing the second transmittance.
4. The method of claim 3, wherein, The gradually increasing of the second transmittance of the target lens region comprises: multiplying a difference between the initial transmittance of the target lens region and a current transmittance by a first preset ratio to obtain a first increasing amount of the transmittance of the target lens region; increasing the second transmittance of the target lens region based on the first increasing amount.
5. The method of claim 1, wherein, The increasing of the first transmittance of the target lens region to the second transmittance comprises: multiplying a difference between the initial transmittance of the target lens region and the first transmittance by a second preset ratio to obtain a second increasing amount of the transmittance of the target lens region; increasing the first transmittance of the target lens region to the second transmittance based on the second increasing amount.
6. The method of claim 1, wherein, The process of adjusting the transmittance of the target lens region in the electrochromic lens comprises: determining a to-be-adjusted row and a to-be-adjusted column of an electrochromic cell array in the electrochromic lens according to the target lens region; connecting the to-be-adjusted rows in sequence by the row-column driver and delivering a first target voltage; when the row-column driver connects each to-be-adjusted row, connecting the to-be-adjusted columns in sequence by the row-column driver and delivering a second target voltage.
7. An image acquisition device, characterized in that The device comprises: The initial increasing module is configured to increase the first light transmittance of the target lens area in the electrochromic lens to the second light transmittance if the target object is detected in the captured image; wherein the target lens area is an area in the electrochromic lens corresponding to the target area in the captured image, and the target area is an area in the captured image in which the brightness is greater than the preset brightness; The light transmittance adjusting module is configured to adjust the second light transmittance of the target lens area according to the brightness detection result of the target area in the captured image; The image capturing module is configured to capture the image according to the quality detection result of the captured image during or after the adjustment of the second light transmittance of the target lens area. The device further comprises an initial decreasing module configured to decrease the initial light transmittance of the target lens area in the electrochromic lens to the first light transmittance if it is detected that the brightness of the target area in the captured image is greater than the preset brightness.
8. An electronic device, comprising: The electronic device includes: one or more processors; memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the image capturing method of any one of claims 1-6.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the image capturing method of any one of claims 1-6.
Citation Information
Patent Citations
Video image brightness adjusting method, device and equipment and readable storage medium
CN110248141A
Photographing method and device, storage medium and electronic equipment
CN111294523A