Exposure adjustment method and device, electronic equipment and storage medium
By identifying the type of point light source area in the camera device and adjusting the exposure parameters, the problem of poor image quality in nighttime long-focus light source scenes was solved, achieving higher image quality and visibility.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIVIEW TECH CO LTD
- Filing Date
- 2023-04-24
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, the global exposure method causes overexposure or underexposure in areas containing detailed information when the camera is shooting in a nighttime long-focal-length light source scene, which reduces image quality and visibility.
By determining the type of point light source area in the camera device and adjusting the exposure parameters based on the type, different exposure modes are used to adjust the exposure parameters of the camera device to ensure that the area containing detailed information is at the optimal exposure brightness.
It improves the image quality and visibility of camera equipment in nighttime point light source scenarios, and avoids overexposure or underexposure problems caused by global exposure mode.
Smart Images

Figure CN116668844B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image imaging technology, and in particular to an exposure adjustment method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, various types of camera equipment are widely used in various fields. However, due to problems such as overexposure and uneven brightness in nighttime long-focus light source scenes, the visibility of the acquired images is poor. To address this, existing technologies employ global exposure to adjust the exposure parameters of the camera equipment. Specifically, the entire area of the image captured by the camera in various scenes can be used as a source of brightness statistics to adjust the camera's exposure parameters, thereby improving the visibility of the captured images.
[0003] However, using the above-mentioned global exposure method often results in overexposure or underexposure in areas containing detailed information in the captured image, thereby reducing the image quality of the image captured by the camera. Summary of the Invention
[0004] This invention provides an exposure adjustment method, apparatus, electronic device, and storage medium to solve the defect of poor image quality caused by global exposure in the prior art, thereby achieving the goal of improving the image quality of images captured by the camera.
[0005] This invention provides an exposure adjustment method, comprising:
[0006] If the first target image being captured contains a point light source area, control the camera device to focus;
[0007] After focusing is completed, a first sharpness evaluation value for the currently captured second target image and a second sharpness evaluation value for the point light source region in the second target image are determined.
[0008] The type of the point light source region is determined based on the first sharpness evaluation value and the second sharpness evaluation value;
[0009] The exposure parameters of the camera device are adjusted based on the type of the point light source area.
[0010] According to an exposure adjustment method provided by the present invention, determining the type of the point light source region based on a first sharpness evaluation value and a second sharpness evaluation value includes:
[0011] The first target sharpness evaluation value is determined based on the first preset coefficient and the first sharpness evaluation value;
[0012] If the second sharpness evaluation value is greater than or equal to the first target sharpness evaluation value, the type of the point light source region is determined to be the first type;
[0013] If the second sharpness evaluation value is less than the first target sharpness evaluation value, the type of the point light source region is determined to be the second type; the amount of information contained in the point light source region corresponding to the first type is greater than the amount of information contained in the point light source region corresponding to the second type.
[0014] According to an exposure adjustment method provided by the present invention, the method for controlling the camera device to focus includes:
[0015] Lower the current exposure target value;
[0016] The camera device is controlled to focus based on the reduced current exposure target value;
[0017] Adjusting the exposure parameters of the camera device based on the type of the point light source region includes:
[0018] Restore the reduced current exposure target value to the original current exposure target value;
[0019] Capture a third target image based on the current exposure target value;
[0020] The first target region in the third target image is determined based on the type of the point light source region;
[0021] The exposure parameters are adjusted based on the brightness of the first target area.
[0022] According to an exposure adjustment method provided by the present invention, determining the first target region in the third target image based on the type of the point light source region includes:
[0023] If the type of the point light source region is the first type, then the point light source region in the third target image is determined to be the first target region;
[0024] When the type of the point light source region is the second type, a third sharpness evaluation value of the non-point light source region in the third target image is determined. A second target sharpness evaluation value is determined based on the second preset coefficient and the first sharpness evaluation value. When the third sharpness evaluation value is greater than or equal to the second target sharpness evaluation value, the non-point light source region in the third target image is determined as the first target region.
[0025] According to an exposure adjustment method provided by the present invention, adjusting the exposure parameters based on the image brightness of the first target area includes:
[0026] If the brightness of the first target area is not within the preset brightness range, determine the brightness adjustment range of the first target area.
[0027] The exposure parameters are adjusted based on the brightness adjustment range until the image brightness of the first target area is within the preset brightness range; the exposure parameters are the values of the exposure control factors corresponding to the brightness adjustment range.
[0028] According to an exposure adjustment method provided by the present invention, adjusting the exposure parameters based on the brightness adjustment range until the image brightness of the first target area is within the preset brightness range includes:
[0029] Adjust the exposure parameters based on the brightness adjustment range;
[0030] If the screen brightness corresponding to the adjusted exposure parameters is the limit brightness of the brightness adjustment range, and the limit brightness is not within the preset brightness range, a new brightness adjustment range is determined based on the screen brightness corresponding to the adjusted exposure parameters.
[0031] The new exposure parameters are adjusted based on the new brightness adjustment range until the image brightness of the first target area is within the preset brightness range; the new exposure parameters are the values of the exposure control factors corresponding to the new brightness adjustment range.
[0032] According to an exposure adjustment method provided by the present invention, after adjusting the exposure parameters of the imaging device based on the type of the point light source region, the method further includes:
[0033] Determine the image brightness of at least two fourth target images captured within a preset time period and the image brightness of the second target region in each of the fourth target images;
[0034] When the difference between the brightness of each of the fourth target images and the brightness of the corresponding second target area is less than the preset brightness, the exposure parameters of the camera device are adjusted based on the brightness of the fourth target images.
[0035] The present invention also provides an exposure adjustment device, comprising:
[0036] The control module is used to control the camera device to focus when it is determined that the first target image being captured includes a point light source area;
[0037] The determination module is used to determine, after focusing is completed, a first sharpness evaluation value of the currently captured second target image and a second sharpness evaluation value of the point light source region in the second target image;
[0038] The determining module is further configured to determine the type of the point light source region based on the first sharpness evaluation value and the second sharpness evaluation value;
[0039] An adjustment module is used to adjust the exposure parameters of the camera device based on the type of the point light source area.
[0040] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the exposure adjustment method as described above.
[0041] The exposure adjustment method, apparatus, electronic device, and storage medium provided by this invention, when it is determined that the captured first target image includes a point light source region, focuses the camera device so that after focusing, the camera device can capture a second target image with higher clarity. Then, a first clarity evaluation value of the second target image and a second clarity evaluation value of the point light source region in the second target image are calculated. The first clarity evaluation value characterizes the richness of detail information included in the entire image, and the second clarity evaluation value characterizes the richness of detail information included in the point light source region of the image. Therefore, based on the first and second clarity evaluation values, it can be determined whether the point light source region includes relatively rich detail information, that is, the type of point light source region included in the current scene is determined, and the exposure parameters of the camera device are adjusted based on the type of point light source region. Because the exposure parameters of the camera can be adjusted specifically based on the different types of point light source areas, it can effectively avoid the problem of overexposure or underexposure in areas containing detailed information in the captured image caused by the use of global exposure to adjust the exposure parameters for different types of point light source areas in the existing technology. This improves the image quality and visibility of the captured image containing point light source areas. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0043] Figure 1 This is one of the flowcharts illustrating the exposure adjustment method provided in this embodiment of the invention;
[0044] Figure 2 This is a schematic diagram of a conventional point light source scene provided in an embodiment of the present invention;
[0045] Figure 3This is a schematic diagram of a light source character scene provided in an embodiment of the present invention;
[0046] Figure 4 This is a schematic diagram of the focusing method provided in an embodiment of the present invention;
[0047] Figure 5 This is a schematic diagram illustrating the determination of the type of point light source region provided in an embodiment of the present invention;
[0048] Figure 6 This is a second schematic flowchart of the exposure adjustment method provided in the embodiments of the present invention;
[0049] Figure 7 This is the third flowchart illustrating the exposure adjustment method provided in this embodiment of the invention;
[0050] Figure 8 This is one of the schematic diagrams of the exposure adjustment method provided in the embodiments of the present invention;
[0051] Figure 9 This is the second schematic diagram of the exposure adjustment method provided in the embodiment of the present invention;
[0052] Figure 10 This is a schematic diagram of the exposure adjustment device provided in an embodiment of the present invention;
[0053] Figure 11 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0055] Image brightness is one of the key factors affecting image quality. It often determines whether an image will be overexposed or underexposed, thus determining the quality and visibility of the image.
[0056] In existing technologies, global exposure is typically used to adjust the brightness of an image. Specifically, the entire captured image can be used as a source of brightness statistics to adjust the exposure parameters of the camera device, thereby obtaining a more suitable image brightness.
[0057] However, in nighttime point light source scenarios, adjusting the camera's exposure parameters solely by using the entire image captured by the camera as the source of brightness statistics will result in a large difference between the brightness and darkness of the captured image. This will cause the brightness of areas containing detailed information in the captured image to be too high or too low, resulting in overexposure or underexposure. Consequently, the image quality of the captured image containing point light source areas will be poor and the visibility will be low.
[0058] To address the aforementioned problems, this invention provides an exposure adjustment method. This method utilizes the different areas containing detailed information in different types of point light source scenes and employs different exposure modes to adjust the exposure parameters of the camera device. This ensures that the areas containing detailed information in the captured image are always at optimal exposure brightness, thereby solving the problem of excessively high or low brightness in areas containing detailed information in the captured image due to large differences between light and dark areas. In other words, it improves the image quality and visibility of the captured image containing point light source areas.
[0059] The following is combined Figures 1-9 The exposure adjustment method provided in this embodiment of the invention is described below. This method can be applied to scenarios where images of point light sources are captured at night, especially in scenarios where images of point light sources are captured at night with a telephoto lens, that is, in scenarios where the magnification of the camera device is greater than a preset magnification when capturing images of point light sources at night. Furthermore, the subject executing this method can be a camera, video camera, or other imaging device, or a terminal device such as a mobile phone or computer connected to the imaging device; no specific limitations are imposed.
[0060] Figure 1 This is one of the flowcharts illustrating the exposure adjustment method provided in this embodiment of the invention, such as... Figure 1 As shown, the method includes:
[0061] Step 101: If the first target image being captured contains a point light source area, control the camera device to focus.
[0062] Specifically, before controlling the camera equipment to focus, it is necessary to determine whether the first target image captured by the camera equipment includes a point light source area in the following way:
[0063] The current ambient brightness can be obtained through an ambient light sensor or a photosensitive device built into the camera. Based on this current ambient brightness, bright area and dark area judgment thresholds can be determined. For example, the bright area and dark area judgment thresholds corresponding to the current ambient brightness can be determined based on a pre-set correspondence between ambient brightness, bright area judgment thresholds, and dark area judgment thresholds. For instance, when the current ambient brightness is 10 cd / m²... 2 At that time, the brightness judgment threshold can be 20 cd / m².2 The threshold for dark area detection can be 5 cd / m 2 Alternatively, the bright area and dark area determination thresholds can be obtained by using a fixed difference or a proportional difference from the current ambient brightness. This application does not impose specific restrictions on the method for determining the bright area and dark area determination thresholds.
[0064] Furthermore, the first target image captured by the camera device can be divided into M*N image blocks, and the brightness statistics of each image block can be obtained, that is, the average brightness of each image block. The average brightness of each image block is compared with the bright area judgment threshold and dark area judgment threshold determined above. Thus, when each image block is greater than the bright area judgment threshold and less than the dark area judgment threshold, the bright area image block and the dark area image block are determined respectively, and the proportion of bright area image blocks and the proportion of dark area image blocks in the first target image are calculated.
[0065] In one possible implementation, when the proportion of bright area image blocks is greater than a first proportion and the proportion of dark area image blocks is less than a second proportion, the region corresponding to each bright area image block in the first target image is determined to be a point light source region, that is, the first target image includes point light source regions; otherwise, the first target image is determined not to include point light source regions. Wherein, when the first proportion is 30%, the second proportion can be 70%, and this application does not impose specific limitations on this.
[0066] In another possible implementation, when the proportion of bright area image blocks is within a first proportion range and the proportion of dark area image blocks is within a second proportion range, the region corresponding to each bright area image block in the first target image is determined to be a point light source region. For example, the upper limit of the first proportion range can be less than or equal to the lower limit of the second proportion range, or the upper limit of the first proportion range can also be within the second proportion range, as long as the proportion of dark area image blocks is greater than the proportion of bright area image blocks. This application does not limit the specific values of the first and second proportion ranges.
[0067] In another possible implementation, the size and number of bright connected regions included in the first target image can be used to determine whether the first target image includes a point light source region. For example, when the number of bright connected regions is at least two and the size of the bright connected regions is within a preset size range, it is determined that the first target image includes a point light source region; otherwise, it does not include a point light source region.
[0068] Optionally, when determining whether the first target image includes a point light source region, if the proportion of bright area image blocks is greater than the first proportion and the proportion of dark area image blocks is less than the second proportion, the size and number of bright area connected components can be combined to determine whether the first target image includes a point light source region, thereby improving the accuracy of the determination.
[0069] Furthermore, after determining that the first target image includes a point light source area, the camera device will be controlled to focus in order to improve the clarity of the image captured by the camera device. Based on the clearer image, more detailed information in the image can be obtained.
[0070] In addition, if the first target image does not include a point light source area, the camera can be controlled to focus first, and then the exposure parameters of the camera can be adjusted by using global exposure.
[0071] Step 102: After focusing is completed, determine the first sharpness evaluation value of the currently captured second target image and the second sharpness evaluation value of the point light source area in the second target image.
[0072] The second sharpness rating value can characterize the richness of detail information contained in the point light source region of the image. The higher the second sharpness rating value, the higher the richness of detail information contained in the point light source region.
[0073] Specifically, after focusing is complete, the currently captured image of the second target has relatively high sharpness. At this point, the first sharpness evaluation value FV_Avg of the second target image and the second sharpness evaluation value HLFV_Avg of the point light source region in the second target image can be calculated using the Focus Value (FV) calculation formula. This focus value characterizes the sharpness of the current image and is therefore also called the sharpness evaluation value. The sharpness evaluation value can be obtained using curve fitting or other methods, as long as the image sharpness evaluation value can be obtained; this application does not impose specific limitations on this.
[0074] Step 103: Determine the type of point light source region based on the first sharpness evaluation value and the second sharpness evaluation value.
[0075] In practical applications, nighttime point light source scenarios can be roughly divided into two categories, namely Figure 2 The typical point light source scene shown and Figure 3 The scene shown is a light source character.
[0076] Specifically, Figure 2 This is a schematic diagram of a conventional point light source scene provided in an embodiment of the present invention, such as... Figure 2As shown, this point light source scene is a street lamp-type point light source scene used for illumination. In this scene, the point light source typically serves an illumination purpose and is not part of the region of interest (ROI) of the image. Therefore, it is necessary to focus on the non-point light source areas, i.e., the dark areas of the image. When the dark areas contain relatively rich detail information, the point light source scene is called a point light source scene with detail information; otherwise, it is called a point light source scene without detail information. Typically, the brightness and sharpness of the dark areas in a conventional point light source scene are low.
[0077] Furthermore, Figure 3 This is a schematic diagram of a light source character scene provided in an embodiment of the present invention, such as... Figure 3 As shown, this scene depicts illuminated building signage with directional functionality. In this scene, the illuminated lettering area is quite bright, and the characters appear excessively bloated, indicating overexposure in the bright areas of the image. This results in excessive brightness and low clarity in the bright areas of the illuminated lettering scene. However, since the illuminated lettering itself has a directional function and belongs to the region of interest in the image, it is necessary to use the illuminated lettering area as a source of brightness statistics to adjust the exposure parameters of the camera equipment. The illuminated lettering area is also referred to as the point light source area.
[0078] Therefore, the main difference between the two types of point light source scenes lies in the different regions of interest in the images, that is, the different levels of detail information contained in the point light source regions.
[0079] Therefore, the type of a point light source region can be determined by the sharpness evaluation value, which characterizes the richness of detail information included in the image. For example, when the second sharpness evaluation value of a point light source region is greater than the first preset value, the type of the point light source region can be determined to be a light source character scene type; when the second sharpness evaluation value of a point light source region is less than the second preset value, the type of the point light source region can be determined to be a regular point light source scene type. The first and second preset values can be the same or different.
[0080] Step 104: Adjust the exposure parameters of the camera device based on the type of point light source area.
[0081] Specifically, after determining the type of point light source area, the area containing more detailed information in the second target image can be identified first; and based on the brightness statistics of the corresponding area, the exposure parameters of the camera device can be adjusted so that the brightness of the area containing detailed information in the image captured by the camera device is more appropriate, thereby obtaining an image with more detailed information, which improves the image quality of the image acquired by the camera device.
[0082] The exposure adjustment method provided in this invention, when determining that a first target image includes a point light source region, focuses the camera device so that after focusing, the camera device can capture a second target image with higher clarity. Then, a first clarity evaluation value of the second target image and a second clarity evaluation value of the point light source region in the second target image are calculated. The first clarity evaluation value characterizes the richness of detail information included in the entire image; the second clarity evaluation value characterizes the richness of detail information included in the point light source region of the image. Therefore, based on the first and second clarity evaluation values, it can be determined whether the point light source region includes relatively rich detail information, that is, to determine the type of point light source region included in the current scene, and the exposure parameters of the camera device are adjusted based on the type of point light source region. Since the exposure parameters of the camera device can be adjusted specifically based on different types of point light source regions, it can effectively avoid the problem of overexposure or underexposure in areas containing detail information in the captured image, which is caused by using a global exposure method to adjust the exposure parameters for different types of point light source regions in the prior art. This improves the image quality and visibility of the captured image containing point light source regions.
[0083] Furthermore, based on the above embodiments, when controlling the camera device to focus, the current exposure target value can be reduced first, and then the camera device can be controlled to focus based on the reduced current exposure target value.
[0084] Specifically, in nighttime point light source scenes, the brightness of the point light source area is relatively high, resulting in uneven brightness in the image captured by the camera. Consequently, it becomes impossible to effectively distinguish whether the point light source area in the first target image contains rich detail information. Therefore, in such scenarios, it is necessary to first establish a communication connection between the automatic focus (AF) module and the automatic exposure (AE) module in the camera device to reduce the current exposure target value and suppress the image brightness.
[0085] For example, Figure 4 This is a schematic diagram of the focusing method provided in an embodiment of the present invention, such as... Figure 4 As shown, in this method, after obtaining the current exposure target value AETargetCur of the camera device, the exposure compensation value is dynamically adjusted according to the brightness level of the current shooting scene, and the exposure target value AETarget is determined based on the exposure compensation value. For example, the exposure compensation value AEComp can be calculated using the following formula (1), and then the final exposure target value AETarget, i.e., the reduced current exposure target value, can be calculated using the following formula (2).
[0086] AEComp = γ * AETargetCur (1)
[0087] AETarget = AETargetCur - AEComp (2)
[0088] Where γ is the proportionality coefficient.
[0089] Furthermore, for point light source scenes, the clearer the image, the lower the overall brightness information. Therefore, the brightness information of the entire image changes relatively flat near the clear point. Based on this, after adjusting the brightness of the image captured by the camera according to the final exposure target value AETarget, the following point light source focusing algorithm can be used for focusing: determine the regional brightness variance information of the current image, which is calculated based on the value of each pixel; move the focusing motor in the camera in a preset direction; determine the changing trend of the regional brightness variance of the current image. If the current changing trend is increasing and the change value exceeds a set threshold, then move the focusing motor in the opposite direction of the original direction; otherwise, continue to move along the original direction until the focusing motor moves to the motor position corresponding to the minimum regional brightness variance, and then stop focusing.
[0090] By reducing the current exposure target value and then controlling the camera to focus based on the reduced current exposure value, the brightness of the point light source area in the point light source scene can be suppressed, making the brightness of the image captured by the camera more uniform, thereby obtaining an image containing more detailed information.
[0091] In one possible implementation, based on the above embodiments, when determining the type of a point light source region based on a first sharpness evaluation value and a second sharpness evaluation value, the determination can be made as follows: a first target sharpness evaluation value is determined based on a first preset coefficient and the first sharpness evaluation value; if the second sharpness evaluation value is greater than or equal to the first target sharpness evaluation value, the type of the point light source region is determined to be a first type; if the second sharpness evaluation value is less than the first target sharpness evaluation value, the type of the point light source region is determined to be a second type; the amount of information contained in the point light source region corresponding to the first type is greater than the amount of information contained in the point light source region corresponding to the second type.
[0092] For example, Figure 5 This is a schematic diagram illustrating the determination of the type of point light source region provided in an embodiment of the present invention, such as... Figure 5 As shown, after focusing is completed, the first sharpness evaluation value FV_Avg of the currently captured second target image and the second sharpness evaluation value HLFV_Avg of the point light source region in the second target image are calculated. The first target sharpness evaluation value FV_Avg_α of the second target image is calculated using the following formula (3).
[0093] FV_Avg_α = α*FV_Avg (3)
[0094] Where α is the first preset coefficient.
[0095] Furthermore, when the second sharpness evaluation value HLFV_Avg of the point light source region in the second target image is greater than or equal to the first target sharpness evaluation value FV_Avg_α of the second target image, the type of the point light source region is determined to be the first type, i.e., the current scene is determined to be a light source character scene; otherwise, the type of the point light source region is determined to be the second type, i.e., the current scene is determined to be a regular point light source scene. The amount of information contained in the point light source region in the light source character scene is greater than the amount of information contained in the point light source region corresponding to the regular point light source scene. It should be noted that this amount of information refers to the amount of detailed or effective information contained in the region.
[0096] In this embodiment, the sharpness evaluation value can characterize the richness of detail information included in the image. Therefore, a first target sharpness evaluation value can be determined using a first preset coefficient and the first sharpness evaluation value. Thus, if the second sharpness evaluation value corresponding to the point light source region is greater than or equal to the first target sharpness evaluation value, the type of the point light source region can be determined to be a first type, i.e., the current scene is a light source character scene. Conversely, if the second sharpness evaluation value is less than the first target sharpness evaluation value, the type of the point light source region can be determined to be a second type, i.e., the current scene is a conventional point light source scene. Therefore, the type of the point light source region can be accurately determined when the amount of information contained in the point light source region corresponding to the first type is greater than the amount of information contained in the point light source region corresponding to the second type.
[0097] Furthermore, the following is about Figure 1 The specific process of adjusting the exposure parameters of the camera device based on the type of point light source area in the illustrated embodiment is described in detail.
[0098] Figure 6 This is a second schematic flowchart of the exposure adjustment method provided in an embodiment of the present invention, as shown below. Figure 6 As shown, the method includes:
[0099] Step 601: Restore the reduced current exposure target value to the current exposure target value.
[0100] Specifically, because the current exposure target value was lowered during focusing, the image of the second target captured at that time is darker, making it difficult to distinguish the first target area containing rich details. Therefore, it is necessary to first restore the reduced current exposure target value to the current exposure target value before focusing to improve the brightness of the image captured by the camera.
[0101] It should be noted that the reduced current exposure target value can also be increased. The increased exposure target value can be less than, equal to, or greater than the current exposure target value, as long as it can increase the brightness of the image captured by the camera.
[0102] Step 602: Capture the image of the third target based on the current exposure target value.
[0103] Furthermore, after restoring the current exposure target value before focusing, the camera device will capture at least one image of the third target. This third target image can also be acquired manually, and this application does not impose any specific restrictions on this method.
[0104] Step 603: Determine the first target region in the third target image based on the type of point light source region.
[0105] For example, when determining the first target region in the third target image based on the type of point light source region, the determination can be made in the following way: if the type of point light source region is the first type, the point light source region in the third target image is determined as the first target region; if the type of point light source region is the second type, the third sharpness evaluation value of the non-point light source region in the third target image is determined, the second target sharpness evaluation value is determined based on the second preset coefficient and the first sharpness evaluation value, and if the third sharpness evaluation value is greater than or equal to the second target sharpness evaluation value, the non-point light source region in the third target image is determined as the first target region.
[0106] The first target area contains a wealth of detailed information.
[0107] Specifically, such as Figure 5 As shown, when the type of the point light source region is determined to be the first type, that is, when the current scene is a light source character scene, the point light source region of the third target image contains relatively rich detail information. Therefore, the point light source region of the third target image can be determined as the first target region.
[0108] Furthermore, after determining that the point light source region is of type two, it is also necessary to determine whether the non-point light source regions of this type contain detailed information or not. Specifically, in a typical point light source scene, it can be divided into two types: a point light source scene where neither the bright nor dark areas contain detailed information, and a point light source scene where the bright areas contain no detailed information but the dark areas contain detailed information. The main difference between the two lies in the richness of detailed information contained in the non-point light source regions. Therefore, it is also necessary to determine the richness of detailed information contained in the non-point light source regions corresponding to this type to determine the first target region.
[0109] Specifically, the third sharpness evaluation value NHLFV_Avg of the non-point light source region in the third target image can be calculated, and the second target sharpness evaluation value FV_Avg_β of the second target image can be calculated using the following formula (4).
[0110] FV_Avg_β = β*FV_Avg (4)
[0111] Wherein, β is the second preset coefficient.
[0112] Therefore, by comparing the third sharpness evaluation value NHLFV_Avg of the non-point light source region in the third target image with the second target sharpness evaluation value FV_Avg_β of the second target image, if the third sharpness evaluation value NHLFV_Avg is greater than or equal to the second target sharpness evaluation value FV_Avg_β, it can be determined that the second type is a second type with detailed information, that is, the current scene is a conventional point light source scene with detailed information. In this case, the non-point light source region in the third target image can be determined as the first target region. Conversely, if the third type is determined to be a second type without detailed information, that is, the current scene is a conventional point light source scene without detailed information, in this case, the entire region in the third target image can be determined as the first target region, and the exposure parameters of the camera device will be adjusted subsequently using a global exposure strategy.
[0113] like Figure 5 As shown, once the first target area is determined, each image block corresponding to the first target area is marked to serve as a source of brightness statistics to adjust the exposure parameters of the camera device. This results in the first target area in the image captured by the camera device having moderate brightness, thereby effectively reducing the risk of overexposure in the point light source area or underexposure in the non-point light source area, thus improving the image quality and visibility of the image captured by the camera device.
[0114] In this embodiment, when the point light source area is of the first type, i.e., the current scene is a light source character scene, the point light source area in the third target image is determined as the first target area. When the point light source area is of the second type, i.e., the current scene is a conventional point light source scene, a third sharpness evaluation value for the non-point light source area in the third target image is calculated. The sharpness evaluation value can characterize the richness of detail information contained in the image. Thus, a second target sharpness evaluation value is calculated using a second preset coefficient and the first sharpness evaluation value. If the third sharpness evaluation value is greater than or equal to the second target sharpness evaluation value, it can be determined that the non-point light source area contains more detail information, i.e., the current scene is a conventional point light source scene with detail information. Therefore, the non-point light source area in the third target image is determined as the first target area. This allows for adaptive determination of the area corresponding to the brightness statistics information, obtaining a more accurate first target area, thus providing a basis for subsequent precise adjustment of the camera device's exposure parameters.
[0115] Step 604: Adjust the exposure parameters based on the image brightness of the first target area.
[0116] Specifically, after determining the first target area of the third target image, the image blocks corresponding to the first target area can be used as brightness statistics to adjust the exposure parameters of the camera device. This ensures that the brightness of the first target area is moderate when the camera device takes subsequent images, avoiding overexposure or underexposure problems caused by point light source scenes during shooting.
[0117] In this embodiment, by first reducing the current exposure target value and then controlling the camera to focus based on the reduced current exposure target value, the brightness of the currently captured image can be suppressed, resulting in an image with a more uniform brightness distribution, and the camera can capture a clearer image. Furthermore, restoring the reduced current exposure target value to the current exposure target value can increase the brightness of the image captured by the camera, thereby capturing a third target image containing more detailed information. Additionally, after accurately determining the type of the point light source area, the first target area containing more detailed information in the third target image can be more accurately identified. Therefore, the exposure parameters of the camera can be more accurately adjusted based on the brightness of the first target area, keeping the brightness of the first target area within a reasonable range and avoiding overexposure or underexposure. This not only improves the image quality acquired by the camera but also allows the image to contain more detailed information.
[0118] The following is a detailed description of the specific process of adjusting the exposure parameters based on the image brightness of the first target area in step 604 of the above embodiment.
[0119] Figure 7 This is the third flowchart illustrating the exposure adjustment method provided in this embodiment of the invention, as shown below. Figure 7 As shown, the method includes:
[0120] Step 701: If the screen brightness of the first target area is not within the preset brightness range, determine the brightness adjustment range of the screen brightness of the first target area.
[0121] Specifically, Figure 8 This is one of the process diagrams of the exposure adjustment method provided in the embodiments of the present invention, such as... Figure 8 As shown, the brightness calculation module is used to obtain the image brightness of the first target area and obtain brightness statistics; the exposure factor control module is used to adjust the exposure parameters corresponding to the corresponding exposure control factors according to the preset exposure line sequence, so that the image brightness of the first target area is within the preset brightness range. Here, the exposure line includes the adjustment range of the exposure control factor to be adjusted and the corresponding exposure parameter, for example: aperture: I... min ~I max It's just an exposure line, where I min and I max The lower and upper bounds represent the adjustment range of the aperture size, i.e., the maximum brightness of the current exposure line. Therefore, by dividing the adjustment range of the exposure parameters corresponding to each exposure control factor into multiple segments, multiple exposure lines can be obtained. In this embodiment, the exposure control factors can be aperture, shutter speed, gain, and fill light; this application does not impose specific limitations on these.
[0122] like Figure 8 As shown, after acquiring the brightness of the first target area, it is necessary to first determine whether the brightness is within the preset brightness range. If it is within the preset brightness range, it indicates that the current image brightness is good, and no adjustment of the exposure parameters is needed. The brightness of the first target area in the next frame is then continuously acquired to monitor its brightness. If it is not within the preset brightness range, it indicates that the current image brightness is poor, and the exposure parameters need to be adjusted. Since there are multiple exposure control factors, it is necessary to determine which exposure control factor needs to be adjusted. Specifically, the brightness adjustment range of the first target area can be determined, thereby determining the current exposure line. For example, if the brightness of the first target area is within the preset range... min ~I max If you enter the aperture, you can determine that the current exposure line is the exposure line corresponding to the aperture.
[0123] Step 702: Adjust the exposure parameters based on the brightness adjustment range until the image brightness of the first target area is within the preset brightness range.
[0124] The exposure parameters are the values of the exposure control factors corresponding to the brightness adjustment range, such as shutter speed and gain.
[0125] Specifically, when adjusting the exposure parameters based on the brightness adjustment range until the image brightness of the first target area is within the preset brightness range, the adjustment can be performed as follows: adjust the exposure parameters based on the brightness adjustment range; if the image brightness corresponding to the adjusted exposure parameters is the limit brightness of the brightness adjustment range and the limit brightness is not within the preset brightness range, determine a new brightness adjustment range based on the image brightness corresponding to the adjusted exposure parameters; adjust the new exposure parameters based on the new brightness adjustment range until the image brightness of the first target area is within the preset brightness range; the new exposure parameters are the values of the exposure control factors corresponding to the new brightness adjustment range.
[0126] like Figure 8 As shown, after obtaining the brightness adjustment range of the first target area, the adjustment step size and adjustment direction of the current exposure parameter can be determined by the difference between the brightness of the first target area and the limit value of the preset brightness range, thereby adjusting the exposure parameters corresponding to the exposure control factors in the obtained exposure line.
[0127] Furthermore, if the brightness of the image corresponding to the adjusted exposure parameters is the limit of the brightness adjustment range and the limit brightness is not within the preset brightness range, it indicates that adjusting only the exposure control factor corresponding to the current exposure line cannot achieve the preset brightness range. In this case, it is necessary to adjust the position of the current exposure line to determine the exposure control factor included in the next exposure line and the adjustment range of the exposure parameters corresponding to that exposure control factor, that is, to determine the new brightness adjustment range and the new exposure parameters. The new exposure parameters are then adjusted according to the new brightness adjustment range until the brightness of the image of the first target area can be within the preset brightness range. At this point, the adjustment is stopped to obtain the brightness of the image of the first target area corresponding to the next frame image.
[0128] The following uses a screen brightness of 10 cd / m² 2 The preset brightness range is 50 cd / m². 2 ~70cd / m 2 The brightness adjustment range corresponding to shutter speed in the exposure control factor in the exposure line is 20 cd / m². 2 ~40cd / m 2 The brightness adjustment range corresponding to the aperture in the exposure control factor in the exposure line is 40 cd / m. 2 ~80cd / m 2 Taking this as an example, the process of adjusting the above exposure parameters will be explained in detail.
[0129] Specifically, when adjusting the exposure parameters using the adjustment range of the exposure control factor shutter speed in the exposure line, the image brightness can only reach a maximum of 20 cd / m², which is the brightness adjustment range corresponding to the shutter speed in the exposure line. 2 ~40cd / m 2 Limiting brightness 40 cd / m 2 In other words, simply adjusting the shutter speed, the exposure control factor corresponding to the current exposure line, is not enough to bring the image brightness into the preset brightness range of 50 cd / m². 2 ~70cd / m 2 Therefore, it is necessary to adjust the current exposure line to a suitable exposure line, and then adjust the exposure parameters based on the adjustment range of the exposure parameters corresponding to the aperture, the exposure control factor in the exposure line, so that the image brightness can be within the preset brightness range of 50 cd / m². 2 ~70cd / m 2 between.
[0130] Therefore, by adjusting the exposure parameters through the brightness adjustment range, and when the brightness of the image corresponding to the adjusted exposure parameters is the limit brightness of the brightness adjustment range, and the limit brightness is not within the preset brightness range, that is, when the current exposure parameter adjustment cannot make the brightness of the first target area within the preset brightness range, a new brightness adjustment range is determined by the brightness of the image corresponding to the adjusted exposure parameters. In this way, the new exposure parameters are adjusted. That is, by changing the exposure parameters to be adjusted, the adjustment of the exposure parameters can be made more precise, so that the brightness of the first target area can always be within the preset brightness range. This can avoid overexposure or underexposure problems in the first target area, thereby improving the image quality and visibility of the image captured by the camera.
[0131] In this embodiment, when the brightness of the first target area is not within the preset brightness range, the brightness adjustment range of the first target area is determined so that the exposure parameters can be adjusted within the brightness adjustment range. The exposure parameters are the values of the exposure control factors corresponding to the brightness adjustment range. This allows for a more accurate adjustment direction and step size of the exposure parameters, enabling the brightness of the first target area to reach the preset brightness range more quickly, thereby improving the adjustment efficiency of the camera's exposure parameters.
[0132] Furthermore, after adjusting the exposure parameters using the methods described in the above embodiments, it is necessary to use the AE module to perform real-time detection of the current image captured by the camera. If the point light source in the image disappears, the exposure strategy needs to be restored to the global exposure mode. For example, based on the above embodiments, after adjusting the camera's exposure parameters according to the type of point light source area, the brightness of at least two fourth target images captured within a preset time period and the brightness of the second target area in each fourth target image can be determined. If the difference between the brightness of each fourth target image and the brightness of the corresponding second target area is less than a preset brightness, the camera's exposure parameters can be adjusted based on the brightness of the fourth target image to determine more accurate exposure parameters, thereby improving the image quality and visibility of the image captured by the camera.
[0133] Figure 9 This is a second schematic diagram of the exposure adjustment method provided in the embodiments of the present invention, as shown below. Figure 9 As shown, after adjusting the exposure parameters of the camera device based on the type of point light source area, it is necessary to continuously acquire at least two fourth target images within a preset time period using the camera device, and calculate the average brightness CurLuma of each fourth target image and the average brightness HighLightLuma of the bright area in each fourth target image. Then, the difference D between the image brightness of the fourth target image and the image brightness of the second target area in the fourth target image is calculated using the following formula (5).
[0134] D = HighLightLuma – CurLuma (5)
[0135] Furthermore, in order to avoid the effect of flickering light sources in the environment, when the number of times the calculated difference D corresponding to the fourth target image is less than the preset brightness LumaThre reaches N consecutive times, it is determined that the current image does not contain point light sources. At this time, a global exposure strategy can be adopted to adjust the exposure parameters of the camera device.
[0136] For example, in order to improve the accuracy of determining whether the current image contains a point light source, a global exposure strategy can be adopted to adjust the exposure parameters of the camera device when the difference between the brightness of each fourth target image and the brightness of the corresponding second target area is less than the preset brightness. That is, the brightness of the entire area of the fourth target image is used as brightness statistics to adjust the exposure parameters of the camera device.
[0137] In this embodiment, by determining the brightness of at least two fourth target images captured by the camera within a preset time period and the brightness of the second target region in each fourth target image, it can be determined that there is no point light source in the second target region when the difference between the brightness of each fourth target image and the brightness of the corresponding second target region is less than the preset brightness, that is, when the brightness of the second target region and the entire image is not significantly different. Thus, a global exposure method can be adopted, such as using the brightness of the entire region of the fourth target image as brightness statistics to adjust the exposure parameters of the camera, thereby obtaining more accurate exposure parameters and improving the image quality and visibility of the camera when the captured image does not contain point light sources.
[0138] The exposure adjustment device provided in the embodiments of the present invention is described below. The exposure adjustment device described below can be referred to in correspondence with the exposure adjustment method described above.
[0139] Figure 10 This is a schematic diagram of the exposure adjustment device provided in an embodiment of the present invention, as shown below. Figure 10 As shown, the device includes:
[0140] The control module 1010 is used to control the camera device to focus when it is determined that the first target image being captured includes a point light source area;
[0141] The determination module 1020 is used to determine, after focusing is completed, a first sharpness evaluation value of the currently captured second target image and a second sharpness evaluation value of the point light source region in the second target image;
[0142] The determining module 1020 is further configured to determine the type of the point light source region based on the first sharpness evaluation value and the second sharpness evaluation value;
[0143] The adjustment module 1030 is used to adjust the exposure parameters of the camera device based on the type of point light source area.
[0144] The exposure adjustment device provided in this embodiment of the invention, when determining that the captured first target image includes a point light source region, controls the camera device to focus via the control module 1010 so that after focusing, the camera device can capture a second target image with higher clarity. Then, the determination module 1020 determines a first clarity evaluation value of the second target image and a second clarity evaluation value of the point light source region in the second target image. The first clarity evaluation value can characterize the richness of detail information included in the entire image; the second clarity evaluation value can characterize the richness of detail information included in the point light source region in the image. Therefore, based on the first clarity evaluation value and the second clarity evaluation value, the determination module 1020 can determine whether the point light source region includes relatively rich detail information, that is, determine the type of point light source region included in the current scene, and adjust the exposure parameters of the camera device via the adjustment module 1030 based on the type of point light source region. Because the exposure parameters of the camera can be adjusted specifically based on the different types of point light source areas, it can effectively avoid the problem of overexposure or underexposure in areas containing detailed information in the captured image caused by the use of global exposure to adjust the exposure parameters for different types of point light source areas in the existing technology. This improves the image quality and visibility of the captured image containing point light source areas.
[0145] Optionally, the determining module 1020 is specifically used to: determine a first target sharpness evaluation value based on a first preset coefficient and a first sharpness evaluation value; if the second sharpness evaluation value is greater than or equal to the first target sharpness evaluation value, determine the type of the point light source region as a first type; if the second sharpness evaluation value is less than the first target sharpness evaluation value, determine the type of the point light source region as a second type; the amount of information contained in the point light source region corresponding to the first type is greater than the amount of information contained in the point light source region corresponding to the second type.
[0146] Optionally, the control module 1010 is specifically used to: reduce the current exposure target value; control the camera device to focus based on the reduced current exposure target value; the adjustment module 1030 is specifically used to: restore the reduced current exposure target value to the current exposure target value; capture a third target image based on the current exposure target value; determine a first target region in the third target image based on the type of point light source region; and adjust the exposure parameters based on the image brightness of the first target region.
[0147] Optionally, the adjustment module 1030 is specifically used to: determine the point light source region in the third target image as the first target region when the type of the point light source region is the first type; determine the third sharpness evaluation value of the non-point light source region in the third target image when the type of the point light source region is the second type; determine the second target sharpness evaluation value based on the second preset coefficient and the first sharpness evaluation value; and determine the non-point light source region in the third target image as the first target region when the third sharpness evaluation value is greater than or equal to the second target sharpness evaluation value.
[0148] Optionally, the adjustment module 1030 is specifically used to: determine the brightness adjustment range of the first target area when the brightness of the first target area is not within the preset brightness range; adjust the exposure parameters based on the brightness adjustment range until the brightness of the first target area is within the preset brightness range; the exposure parameters are the values of the exposure control factors corresponding to the brightness adjustment range.
[0149] Optionally, the adjustment module 1030 is specifically used for: adjusting the exposure parameters based on the brightness adjustment range; determining a new brightness adjustment range based on the image brightness corresponding to the adjusted exposure parameters when the image brightness corresponding to the adjusted exposure parameters is the limit brightness of the brightness adjustment range and the limit brightness is not within the preset brightness range; adjusting the new exposure parameters based on the new brightness adjustment range until the image brightness of the first target area is within the preset brightness range; the new exposure parameters are the values of the exposure control factors corresponding to the new brightness adjustment range.
[0150] Optionally, the determining module 1020 is further configured to determine the image brightness of at least two fourth target images captured within a preset time period and the image brightness of the second target region in each fourth target image; the adjusting module 1030 is further configured to adjust the exposure parameters of the camera device based on the image brightness of the fourth target images when the difference between the image brightness of each fourth target image and the image brightness of the corresponding second target region is less than the preset brightness.
[0151] The apparatus of this embodiment can be used to execute the method of any of the aforementioned exposure adjustment methods. Its specific implementation process and technical effects are similar to those in the exposure adjustment method embodiments. For details, please refer to the detailed description in the exposure adjustment method embodiments, which will not be repeated here.
[0152] Figure 11 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 11As shown, the electronic device may include a processor 1110, a communications interface 1120, a memory 1130, and a communication bus 1140, wherein the processor 1110, the communications interface 1120, and the memory 1130 communicate with each other via the communication bus 1140. The processor 1110 can call logical instructions in the memory 1130 to execute the exposure adjustment methods provided by the above methods. The method includes: when it is determined that the captured first target image includes a point light source region, controlling the camera device to focus; after focusing, determining a first sharpness evaluation value of the currently captured second target image and a second sharpness evaluation value of the point light source region in the second target image; determining the type of the point light source region based on the first sharpness evaluation value and the second sharpness evaluation value; and adjusting the exposure parameters of the camera device based on the type of the point light source region.
[0153] Furthermore, the logical instructions in the aforementioned memory 1130 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. An exposure adjustment method, characterized in that, include: If the first target image being captured contains a point light source area, control the camera device to focus; After focusing is completed, a first sharpness evaluation value for the currently captured second target image and a second sharpness evaluation value for the point light source region in the second target image are determined. The type of the point light source region is determined based on the first sharpness evaluation value and the second sharpness evaluation value; The types of point light source areas include conventional point light source scenes and light source word scenes; Adjusting the exposure parameters of the camera device based on the type of the point light source region includes: determining the region in the second target image that contains more detailed information, and adjusting the exposure parameters of the camera device based on the brightness statistics of the region. The region includes a non-point light source region in the conventional point light source scene or a point light source region in the light source character scene.
2. The exposure adjustment method according to claim 1, characterized in that, Determining the type of the point light source region based on the first sharpness evaluation value and the second sharpness evaluation value includes: The first target sharpness evaluation value is determined based on the first preset coefficient and the first sharpness evaluation value; If the second sharpness evaluation value is greater than or equal to the first target sharpness evaluation value, the type of the point light source region is determined to be the first type; If the second sharpness evaluation value is less than the first target sharpness evaluation value, the type of the point light source region is determined to be the second type; the amount of information contained in the point light source region corresponding to the first type is greater than the amount of information contained in the point light source region corresponding to the second type.
3. The exposure adjustment method according to claim 2, characterized in that, The control of the camera device to focus includes: Lower the current exposure target value; The camera device is controlled to focus based on the reduced current exposure target value; Adjusting the exposure parameters of the camera device based on the type of the point light source region includes: Restore the reduced current exposure target value to the original current exposure target value; Capture a third target image based on the current exposure target value; The first target region in the third target image is determined based on the type of the point light source region; The exposure parameters are adjusted based on the brightness of the first target area.
4. The exposure adjusting method according to claim 3, wherein Determining the first target region in the third target image based on the type of the point light source region includes: If the type of the point light source region is the first type, then the point light source region in the third target image is determined to be the first target region; When the type of the point light source region is the second type, a third sharpness evaluation value of the non-point light source region in the third target image is determined. A second target sharpness evaluation value is determined based on the second preset coefficient and the first sharpness evaluation value. When the third sharpness evaluation value is greater than or equal to the second target sharpness evaluation value, the non-point light source region in the third target image is determined as the first target region.
5. The exposure adjustment method according to claim 3, wherein The step of adjusting the exposure parameters based on the image brightness of the first target area includes: If the brightness of the first target area is not within the preset brightness range, determine the brightness adjustment range of the first target area. The exposure parameters are adjusted based on the brightness adjustment range until the image brightness of the first target area is within the preset brightness range; the exposure parameters are the values of the exposure control factors corresponding to the brightness adjustment range.
6. The exposure adjustment method according to claim 5, characterized in that, The step of adjusting the exposure parameters based on the brightness adjustment range until the image brightness of the first target area is within the preset brightness range includes: Adjust the exposure parameters based on the brightness adjustment range; If the screen brightness corresponding to the adjusted exposure parameters is the limit brightness of the brightness adjustment range, and the limit brightness is not within the preset brightness range, a new brightness adjustment range is determined based on the screen brightness corresponding to the adjusted exposure parameters. The new exposure parameters are adjusted based on the new brightness adjustment range until the image brightness of the first target area is within the preset brightness range; the new exposure parameters are the values of the exposure control factors corresponding to the new brightness adjustment range.
7. The exposure adjustment method according to any one of claims 1-6, wherein After adjusting the exposure parameters of the camera device based on the type of the point light source region, the method further includes: Determine the image brightness of at least two fourth target images captured within a preset time period and the image brightness of the second target region in each of the fourth target images; When the difference between the brightness of each of the fourth target images and the brightness of the corresponding second target area is less than the preset brightness, the exposure parameters of the camera device are adjusted based on the brightness of the fourth target images.
8. An exposure adjustment device, characterized in that, include: The control module is used to control the camera device to focus when it is determined that the first target image being captured includes a point light source area; The determination module is used to determine, after focusing is completed, a first sharpness evaluation value of the currently captured second target image and a second sharpness evaluation value of the point light source region in the second target image; The determining module is further configured to determine the type of the point light source region based on the first sharpness evaluation value and the second sharpness evaluation value; the type of the point light source region includes a conventional point light source scene and a light source word scene; An adjustment module is used to adjust the exposure parameters of the camera device based on the type of the point light source area, including: determining the area containing more detailed information in the second target image, and adjusting the exposure parameters of the camera device based on the brightness statistics information corresponding to the area, wherein the area includes a non-point light source area in the conventional point light source scene or a point light source area in the light source character scene.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the exposure adjustment method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by the processor, it implements the exposure adjustment method as described in any one of claims 1 to 7.