CN115665556A - Automatic exposure method, device, equipment and storage medium - Google Patents

Automatic exposure method, device, equipment and storage medium Download PDF

Info

Publication number
CN115665556A
CN115665556A CN202211588206.1A CN202211588206A CN115665556A CN 115665556 A CN115665556 A CN 115665556A CN 202211588206 A CN202211588206 A CN 202211588206A CN 115665556 A CN115665556 A CN 115665556A
Authority
CN
China
Prior art keywords
frame image
current frame
exposure
threshold
average brightness
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211588206.1A
Other languages
Chinese (zh)
Other versions
CN115665556B (en
Inventor
杨俊杰
沈小勇
吕江波
胡思行
蒋念娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Smartmore Technology Co Ltd
Original Assignee
Shenzhen Smartmore Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Smartmore Technology Co Ltd filed Critical Shenzhen Smartmore Technology Co Ltd
Priority to CN202211588206.1A priority Critical patent/CN115665556B/en
Publication of CN115665556A publication Critical patent/CN115665556A/en
Application granted granted Critical
Publication of CN115665556B publication Critical patent/CN115665556B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The application discloses an automatic exposure method, a device, equipment and a storage medium, wherein a camera is used for collecting a current frame image, the current frame image is partitioned, the average brightness of each current frame image block is calculated, the image block with the average brightness lower than an absolute underexposure threshold value is marked as an underexposure block, the image block with the average brightness higher than an absolute overexposure threshold value is marked as an overexposure block, the current frame image block with the average brightness higher than a relative overexposure threshold value, the average brightness lower than or equal to the absolute overexposure threshold value and opposite to the average brightness change trend and the information entropy change trend of the previous frame image block at the same position is marked as the overexposure block, a more accurate exposure state is marked for each image block, a more accurate adjustment basis is provided for adjusting the exposure parameters of the camera, so that the adjustment of the exposure parameters can be realized under different shooting scenes, and an image with an appropriate exposure state is collected.

Description

Automatic exposure method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of camera imaging technologies, and in particular, to an automatic exposure method, apparatus, device, and storage medium.
Background
In order to acquire an image with a proper exposure state, the exposure parameters of the camera can be adjusted. Currently, an automatic exposure method based on a highlight priority strategy can realize automatic adjustment of camera exposure parameters, and the method identifies a highlight area with image brightness exceeding a brightness threshold as an interested area so as to automatically adjust the camera exposure parameters for the purposes of reducing the image brightness of the interested area and preventing overexposure of the area.
However, the automatic exposure method based on the highlight priority policy sets a fixed image brightness threshold value, and uses the image brightness as a unique index for determining the exposure state, and the exposure state determination criterion and the automatic exposure method based on the criterion are poor in applicability to different shooting scenes. For example, when a scene contains a reflective material and a region containing the reflective material is not a key region that needs to be focused on, since the image brightness of the region containing the reflective material is greater than that of the key region, if the method is applied to adjust the exposure parameters of the camera, the normal exposure of the key region is suppressed while the image brightness of the region containing the reflective material is reduced, and an image with a proper exposure state of the key region cannot be acquired, and the method has poor applicability in different shooting scenes.
Disclosure of Invention
In view of the above problems, the present application is proposed to provide an automatic exposure method, apparatus, device and storage medium for achieving the purpose of acquiring images with appropriate exposure states in different shooting scenes.
The specific scheme is as follows:
in a first aspect, an automatic exposure method is provided, including:
acquiring an image by using a camera to obtain a current frame image;
partitioning the current frame image, and calculating the average brightness of each current frame image block;
marking a current frame image block with average brightness smaller than an absolute under-exposure threshold as an under-exposure block, marking a current frame image block with average brightness larger than an absolute over-exposure threshold as an over-exposure block, and marking a current frame image block with average brightness larger than a relative over-exposure threshold, average brightness smaller than or equal to the absolute over-exposure threshold and relative to the previous frame image block at the same position, wherein the average brightness change trend of the previous frame image block is opposite to the information entropy change trend, as an over-exposure block, wherein the relative over-exposure threshold is larger than the absolute under-exposure threshold;
counting the number of over-exposed blocks and the number of under-exposed blocks of the current frame image to obtain a statistical result of the current frame image;
and adjusting the exposure parameters of the camera according to the statistical result of the current frame image.
In a second aspect, there is provided an automatic exposure apparatus comprising:
the image acquisition unit is used for acquiring an image by using a camera to obtain a current frame image;
the image block average brightness calculation unit is used for partitioning the current frame image and calculating the average brightness of each current frame image block;
the exposure state marking unit is used for marking a current frame image block with average brightness smaller than an absolute underexposure threshold as an underexposure block, marking a current frame image block with average brightness larger than an absolute overexposure threshold as an overexposure block, and marking a current frame image block with average brightness larger than a relative overexposure threshold, average brightness smaller than or equal to the absolute overexposure threshold and relative to the same position, wherein the average brightness change trend of the previous frame image block is opposite to the information entropy change trend, and the relative overexposure threshold is larger than the absolute underexposure threshold;
the quantity counting unit is used for counting the quantity of the over-exposure blocks and the quantity of the under-exposure blocks of the current frame image to obtain a counting result of the current frame image;
and the exposure parameter adjusting unit is used for adjusting the exposure parameters of the camera according to the statistical result of the current frame image.
In a third aspect, there is provided an automatic exposure apparatus comprising: a memory and a processor;
the memory is used for storing programs;
the processor is used for executing the program and realizing the steps of the automatic exposure method.
In a fourth aspect, a storage medium is provided, on which a computer program is stored, which, when executed by a processor, carries out the steps of the above-described automatic exposure method.
By means of the technical scheme, the method includes the steps that an image is collected by a camera, a current frame image is obtained, the current frame image is partitioned, the average brightness of each current frame image block is obtained through calculation, when an exposure state is marked for each current frame image block, the image block with the average brightness lower than an absolute underexposure threshold is determined as an underexposure block, the image block with the average brightness higher than an absolute overexposure threshold is determined as an overexposure block, the information entropy of the image block is used as an index for judging whether the image block is overexposed or not under the condition that the average brightness of the image block is between a relative overexposure threshold and an absolute overexposure threshold, time sequence analysis is conducted on image characteristics of the image block on a time dimension, specifically, the average brightness and the information entropy of the current frame image block and the average brightness and the information entropy of a previous frame image block at the same position as the image block are obtained, the average brightness change trend and the information entropy change trend of the current frame image block are determined as overexposure blocks, the image block is increased relative to the average brightness and the exposure information of the current frame image block is marked as an overexposure block, and the exposure block is increased, and the exposure parameter is counted if the average brightness of the exposure block is increased. According to the automatic exposure scheme, a more accurate exposure state is marked for each current frame image block, and a more accurate adjustment basis is provided for adjusting the exposure parameters of the camera, so that the exposure parameters can be adjusted under different shooting scenes, and an image with a proper exposure state is acquired. For example, assuming that an image to be acquired includes a region containing a reflective material, and the region is a non-key region, and as the average brightness of the region decreases, the probability of increasing the information entropy of the region is relatively low, the probability of marking the region as an over-exposure region is also relatively low, and based on this, the probability of taking measures to reduce exposure parameters is also reduced, so that the exposure of the key region in the image is not excessively inhibited, and an image with a proper exposure state of the key region can be acquired.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a schematic flowchart of an automatic exposure method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating a process for labeling a current frame image block;
FIG. 3 illustrates another process for labeling a current frame image block;
FIG. 4 is a diagram illustrating a process of determining according to a statistical result of a current frame image;
FIG. 5 is a schematic flow chart illustrating another automatic exposure method according to an embodiment of the present disclosure;
FIG. 6 is a schematic flow chart illustrating another automatic exposure method according to an embodiment of the present disclosure;
FIG. 7 illustrates a schematic diagram of a process for determining exposure parameters to be configured;
fig. 8 is a schematic structural diagram of an automatic exposure apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an automatic exposure apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The application provides an automatic exposure method, an automatic exposure device, automatic exposure equipment and a storage medium, which can be suitable for different shooting scenes and achieve the purpose of acquiring images with proper exposure states in different shooting scenes.
Next, referring to fig. 1, the automatic exposure method provided by the present application may include the following steps:
and S101, acquiring an image by using a camera to obtain a current frame image.
It should be noted that the exposure parameter of the camera when the first current frame image is acquired may be an initial exposure parameter configured to the camera before the automatic exposure method is performed, where the initial exposure parameter may include an initial exposure time and an initial exposure gain that are configured in advance by a user and satisfy a preset parameter valid range, where the parameter valid range is determined by the camera to be used and represents a maximum value and a minimum value of the exposure parameter that can be configured to the camera.
And step S102, partitioning the current frame image, and calculating the average brightness of each current frame image block.
Specifically, the blocking the current frame image may include averagely dividing the current frame image into M rows and N columns, and counting M × N current frame image blocks, where parameters M and N are preset positive integers. It should be noted that the average luminance of the image block of the current frame is a main basis for determining the exposure state of the image block.
And step S103, marking the current frame image blocks meeting the corresponding preset conditions.
Specifically, as shown in fig. 2, for each current frame image block:
under the condition that the average brightness pb of the current frame image block is less than an absolute underexposure threshold ue, marking the current frame image block as an underexposure block;
under the condition that the average brightness pb of the current frame image block is greater than a relative overexposure threshold oe1 and less than or equal to the absolute overexposure threshold oe, calculating an average brightness variation D _ pb and an information entropy variation D _ pe of the current frame image block relative to a previous frame image block at the same position, and if D _ pb >0 and D _ pe <0, or D _ pb <0 and D _ pe >0, namely, if the average brightness variation trend of the current frame image block relative to the previous frame image block at the same position is opposite to the information entropy variation trend, marking the current frame of the image block as an overexposure block;
if the average luminance pb of the current frame image block is greater than the absolute overexposure threshold oe, it is marked as an overexposed block.
It should be noted that the information entropy of an image is a parameter that characterizes the average information amount in the image, for example, the one-dimensional entropy may represent the aggregation characteristic of the image gray level distribution. For example, the average brightness variation D _ pb <0 and the information entropy variation D _ pe >0 may represent that the average brightness of the current frame image block is reduced and the average information amount of the previous frame image block at the same position is increased, and for the image block, taking the measure of reducing the average brightness is beneficial to obtaining an image block with more information and being clearer, so that the image block is marked as an overexposed block to increase the possibility of taking the measure of reducing the average brightness; in addition, when the current frame image is a first frame image, the average brightness and the information entropy of the previous frame image block located at the same position as any current frame image block are all zero, and the absolute underexposure threshold, the relative overexposure threshold, and the absolute overexposure threshold may all be determined values pre-configured by a user before the automatic exposure method provided by the present application is executed.
And step S104, counting the marking result of the current frame image.
Specifically, the number cur _ no of the over-exposure blocks and the number cur _ nu of the under-exposure blocks of the current frame image are counted to obtain a statistical result of the current frame image.
And S105, adjusting exposure parameters of the camera according to the statistical result of the current frame image.
Specifically, the adjusting the exposure parameter of the camera according to the statistical result of the current frame image may include: and determining whether to adjust the exposure parameter of the camera according to a judgment basis based on the statistical result of the current frame image, and determining the direction and the step length of the exposure parameter adjustment according to the statistical result of the current frame image.
The method comprises the steps of acquiring an image by using a camera, obtaining a current frame image, blocking the current frame image, calculating to obtain the average brightness of each current frame image block, determining the image block with the average brightness lower than an absolute underexposure threshold as an underexposure block when an exposure state is marked for each current frame image block, determining the image block with the average brightness higher than the absolute overexposure threshold as an overexposure block, and taking the information entropy of the image block as an index for assisting in judging whether the image block is overexposed or not under the condition that the average brightness of the image block is between a relative overexposure threshold and an absolute overexposure threshold, specifically, obtaining the average brightness and the information entropy of the current frame image block and the average brightness and the information entropy of a previous frame image block at the same position as the image block to determine the average brightness change trend and the information entropy change trend of the current frame image block, and determining the image block as the overexposure block under the condition that the average brightness change trend and the information entropy change trend are opposite, wherein the image block is determined as the overexposure block if the average brightness of the image block is increased and the information entropy change trend is increased relative to the previous frame image block, and the exposure block is marked as an overexposure block, so that the exposure parameter is increased. According to the automatic exposure scheme, a more accurate exposure state is marked for each current frame image block, and a more accurate adjustment basis is provided for adjusting the exposure parameters of the camera, so that the exposure parameters can be adjusted under different shooting scenes, and an image with a proper exposure state is acquired.
For example, if the image to be acquired includes a region of a reflective material, and the region is a non-emphasized region, if the average brightness of the region is too high, that is, exceeds an absolute exposure threshold, the exposure state of the region is marked as overexposure, and the possibility of reducing the exposure parameter is high, the average brightness of the region may be reduced to a certain extent, and if the average brightness of the region is reduced between the relative overexposure threshold and the absolute overexposure threshold, since the region is a non-emphasized region and contains a small amount of average information, the possibility of increasing the information entropy of the region is small as the average brightness of the region is reduced, the possibility of marking the region as an overexposed region is also small, and based on this, the possibility of reducing the exposure parameter is also reduced, and the exposure of the emphasized region in the image is not excessively suppressed in order to obtain an image in which the exposure state of the region is appropriate, so that an image in which the exposure state of the emphasized region is acquired.
In order to improve the applicability of the automatic exposure method provided in the embodiment of the present application in a low exposure scene, as shown in fig. 3, before counting the number of under-exposed blocks of the current frame image, the method may further include:
for each current frame image block: under the condition that the average brightness pb of the current frame image block is greater than or equal to the absolute underexposure threshold ue and smaller than a relative underexposure threshold ue1, calculating an average brightness variation D _ pb and an information entropy variation D _ pe of the current frame image block relative to a previous frame image block at the same position, and if D _ pb and D _ pe are the same, that is, if an average brightness variation trend of the current frame image block relative to the previous frame image block at the same position is the same as an information entropy variation trend, marking the current frame image block as an underexposed block, wherein the relative underexposure threshold ue1 is smaller than the relative overexposure threshold oe1.
In the automatic exposure method provided by the present application, on the basis described above, a more accurate exposure state is marked for an image block with a lower average luminance, specifically, under the condition that the average luminance of the image block is between a preset absolute under-exposure threshold and a preset relative under-exposure threshold, the information entropy of the image block is used as an index for assisting in determining whether the image block is under-exposed, and for example, with respect to a corresponding image block of a previous frame, if the average luminance of the image block of the current frame is increased and the information entropy is increased or the average luminance is decreased and the information entropy is decreased, the image block is marked as an over-exposed block to increase the number of under-exposed blocks in a statistical result of the image of the current frame obtained by statistics, thereby increasing the possibility of taking measures for increasing exposure parameters. For example, assuming that an image to be acquired includes a region of a reflective material, and the region is a non-emphasized region, for an emphasized region, if the average brightness of the region is too low, that is, smaller than an absolute underexposure threshold, the exposure state of the region is marked as underexposed, so as to increase the possibility of increasing exposure parameters, thereby increasing the average brightness of the region, and in a case where the average brightness of the region is increased to a value between the absolute underexposure threshold and a relative underexposure threshold, since the region is an emphasized region and contains a larger amount of average information, as the average brightness of the region increases, the possibility of increasing the information entropy of the region is higher, the scheme marks the region as an underexposed region is also higher, and based on this, the possibility of taking measures for increasing the exposure parameters is also increased, thereby acquiring an image with an appropriate exposure state of the emphasized region.
In order to reduce the amount of operation and increase the operation speed, the change amount threshold of the information entropy may be considered when marking the current frame image block whose average brightness pb is greater than the relative overexposure threshold oe1 and is less than or equal to the absolute overexposure threshold oe, or whose average brightness pb is greater than or equal to the absolute underexposure threshold ue and is less than the relative underexposure threshold ue 1.
In a possible implementation manner, the marking that the average luminance is greater than the relative overexposure threshold, the average luminance is less than or equal to the absolute overexposure threshold, and a current frame image block, in which a trend of change in average luminance of a previous frame image block at the same position is opposite to a trend of change in information entropy, is an overexposure block may include:
for each current frame image block with average luminance greater than a relative overexposure threshold and less than or equal to the absolute overexposure threshold:
if the average brightness of the current frame image block is in an increasing trend relative to the average brightness of the previous frame image block at the same position, and the variation of the information entropy of the current frame image block relative to the information entropy of the previous frame image block at the same position is smaller than a first variation threshold, marking the current frame image block as an overexposed block, wherein the first variation threshold is smaller than zero;
if the average brightness of the current frame image block is in a decreasing trend relative to the average brightness of the previous frame image block at the same position, and the variation of the information entropy of the current frame image block relative to the information entropy of the previous frame image block at the same position is greater than a second variation threshold, marking the current frame image block as an overexposed block, wherein the second variation threshold is greater than zero.
Optionally, the first variation threshold and the second variation threshold may be opposite numbers to each other. The first variation threshold and the second variation threshold may be used as sensitivities when marking an overexposed block, for example, the preset information entropy variation threshold approaches zero, and in a case that the average luminance increases, a current frame image block with slight information loss may be marked as an overexposed block, specifically, for a current frame image block with an average luminance greater than a relative overexposed threshold and less than or equal to the absolute overexposed threshold, if the absolute values of the first variation threshold and the second variation threshold are smaller, the information entropy of the image block is slightly decreased in a case that the average luminance of the current frame image block is greater than that of a previous frame image block at the same position, or in a case that the average luminance of the current frame image block is less than that of the previous frame image block at the same position, the information entropy of the image block is slightly increased, and the image block may be marked as an overexposed block, so as to increase the possibility of taking measures for reducing exposure parameters, thereby reducing the average luminance of the image, so that the image may have higher information and include more image information.
In a possible implementation manner, the marking that the average luminance is greater than or equal to the absolute underexposure threshold, the average luminance is less than the relative underexposure threshold, and a current frame image block with the same average luminance variation trend as the information entropy variation trend relative to a previous frame image block at the same position is an underexposed block may include:
for each current frame image block having an average luminance greater than or equal to the absolute underexposure threshold and less than a relative underexposure threshold:
if the average brightness of the current frame image block is in an increasing trend relative to the average brightness of the previous frame image block at the same position, and the variation of the information entropy of the current frame image block relative to the information entropy of the previous frame image block at the same position is greater than a third variation threshold, marking the current frame image block as an under-exposed block, wherein the third variation threshold is greater than zero;
if the average brightness of the current frame image block is in a decreasing trend relative to the average brightness of the previous frame image block at the same position, and the variation of the information entropy of the current frame image block relative to the information entropy of the previous frame image block at the same position is smaller than a fourth variation threshold, marking the current frame image block as an under-exposed block, wherein the fourth variation threshold is smaller than zero.
Optionally, the third variation threshold and the fourth variation threshold may be opposite numbers to each other. The third variance threshold and the fourth variance threshold may be used as sensitivities for marking an under-exposed block, for example, the preset information entropy variance threshold approaches zero, and in a case that an average luminance is reduced, a current frame image block with slight information loss may be marked as an under-exposed block, specifically, for a current frame image block with an average luminance greater than or equal to the absolute under-exposed threshold and smaller than the relative under-exposed threshold, if absolute values of the third variance threshold and the fourth variance threshold are smaller, in a case that the average luminance of the current frame image block is greater than that of a previous frame image block at the same position, an information entropy of the image block is slightly increased, or in a case that the average luminance of the current frame image block is smaller than that of the previous frame image block at the same position, the information entropy of the image block is slightly decreased, and the image block may be marked as an under-exposed block, so as to increase the average luminance of the image, so that the image may have higher information and include more image information.
Various implementation manners of step S105 and adjusting the exposure parameter of the camera according to the statistical result of the current frame image are explained below, which mainly include two aspects: on the first hand, whether to adjust the exposure parameter of the camera is determined according to the judgment basis based on the statistical result of the current frame image; in the second aspect, the specific manner of adjusting the exposure parameter according to the statistical result of the current frame image may include an adjustment direction and an adjustment step size.
Fig. 4 is a schematic diagram illustrating a possible process of determining according to a statistical result, and with reference to fig. 4, in some embodiments provided in the present application, the adjusting an exposure parameter of a camera according to the statistical result of the current frame image may include:
and S01, determining exposure parameters as target exposure parameters when the current frame image is acquired under the condition that the statistical result of the current frame image meets a first preset condition or a second preset condition.
Specifically, when the number cur _ no of over-exposed blocks of the current frame image is not greater than a first number threshold N1 and the number cur _ nu of under-exposed blocks of the current frame image is not greater than a second number threshold N2, that is, a first preset condition is met, determining an exposure parameter when the current frame image is acquired as a target exposure parameter, that is, without adjusting an exposure parameter of a camera; under the condition that the number cur _ no =0 of the overexposure blocks of the current frame image and the number cur _ nu of the underexposure blocks of the current frame image are greater than a second number threshold value N2, judging the average brightness cur _ pb of the current frame image, and if the average brightness cur _ pb of the current frame image is greater than a preset average brightness threshold value N3, namely a second preset condition is met, determining that the exposure parameter when the current frame image is collected is a target exposure parameter.
And S02, under the condition that the statistical result of the current frame image does not meet a first preset condition or a second preset condition, adjusting the exposure parameter of the camera at least according to the image characteristic of the current frame image.
Specifically, under the condition that the number cur _ no =0 of overexposure blocks of the current frame image and the number cur _ nu of underexposure blocks of the current frame image are greater than a second number threshold N2, the average brightness cur _ pb of the current frame image is judged, and if the average brightness cur _ pb of the current frame image is not greater than a preset average brightness threshold N3, the exposure parameters of the camera are adjusted at least according to the image characteristics of the current frame image; under the condition that the number cur _ no of the over-exposed blocks of the current frame image is not larger than a first number threshold value N1 and cur _ no is not equal to 0 and the number cur _ nu of the under-exposed blocks of the current frame image is larger than a second number threshold value N2 or the number cur _ no of the over-exposed blocks of the current frame image is larger than a first number threshold value N1, adjusting exposure parameters of a camera at least according to image characteristics of the current frame image.
The specific implementation of adjusting the exposure parameters is explained next.
Fig. 5 is a schematic flowchart illustrating another automatic exposure method according to an embodiment of the present application, and in conjunction with fig. 5, the method may include:
steps S201 to S204 are identical to steps S101 to S104 described above, and are not described herein again.
Step S205, determining whether the statistical result of the current frame image satisfies a first preset condition or a second preset condition, if yes, performing step S206, and if no, performing step S207.
And step S206, determining the exposure parameter when the current frame image is acquired as a target exposure parameter.
Step S207, determining the exposure parameter to be configured according to the image feature of the current frame image.
Step S208, determining the exposure parameter to be configured next _ Y, if the exposure parameter to be configured next _ Y is in the effective parameter range, configuring the exposure parameter to be configured to the camera, and executing step S201, if the exposure parameter to be configured next _ Y is not in the effective parameter range, determining the exposure parameter cur _ Y when acquiring the current frame image, if cur _ Y is equal to the boundary value of the effective parameter range, determining the exposure parameter when acquiring the current frame image as the target exposure parameter, otherwise, adjusting the exposure parameter to be configured as the corresponding boundary value of the effective parameter range, configuring the adjusted exposure parameter to be configured to the camera, and executing step S201.
Specifically, for the exposure parameter to be configured next _ Y:
under the condition that the exposure parameter next _ Y to be configured is larger than the preset maximum value Max of the exposure parameter to be configured, judging whether the exposure parameter cur _ Y when the current frame image is acquired is the preset maximum value Max of the exposure parameter to be configured, if not, adjusting the exposure parameter next _ Y to be configured to be the preset maximum value Max of the exposure parameter to be configured, configuring the adjusted exposure parameter next _ Y' to be configured to the camera, returning to the step of executing the step S201 to acquire the image by using the camera to obtain the current frame image, and if so, determining the exposure parameter when the current frame image is acquired to be the target exposure parameter;
when the exposure parameter next _ Y to be configured is smaller than the preset minimum value Min of the exposure parameter to be configured, judging whether the exposure parameter cur _ Y when the current frame image is acquired is the preset minimum value Min of the exposure parameter to be configured, if not, adjusting the exposure parameter next _ Y to be configured to be the preset minimum value Min of the exposure parameter to be configured, configuring the adjusted exposure parameter next _ Y' to be configured to the camera, returning to the step S201 of acquiring the image by using the camera to obtain the current frame image, and if so, determining the exposure parameter when the current frame image is acquired to be the target exposure parameter;
and under the condition that the exposure parameter next _ Y to be configured is not less than the preset minimum Min of the exposure parameter to be configured and not more than the preset maximum Max of the exposure parameter to be configured, configuring the exposure parameter next _ Y to be configured to the camera, and returning to the step of acquiring an image by using the camera in the step S201 to obtain the current frame image.
According to the automatic exposure method, under the condition that the statistical result of the collected current frame image does not meet the preset condition, the exposure parameters can be continuously adjusted by using the image characteristics of the current frame image in an iterative optimization mode until the current frame image meeting the preset condition is collected; in addition, the effective range of the exposure parameter which can be configured to the camera is also considered, the exposure parameter when the current frame image is acquired is judged under the condition that the effective range of the exposure parameter is exceeded, specifically, whether the exposure parameter when the current frame image is acquired is a preset maximum value is judged when the exposure parameter configured to the camera is to be increased, whether the exposure parameter when the current frame image is acquired is a preset minimum value is judged when the exposure parameter configured to the camera is to be reduced, if the current exposure parameter is a boundary value of the effective parameter, the target exposure parameter which can be configured to the camera under the current scene is represented, a threshold interruption condition is reached, the adjustment of the exposure parameter is stopped to reduce unnecessary calculation power waste, if the current exposure parameter is not the boundary value of the effective parameter, the exposure parameter which is to be configured is adjusted to be a corresponding boundary value, so that the adjusted exposure parameter which is to be configured can be configured to the camera, and the exposure state of the next frame image is improved to a certain extent.
It should be noted that the exposure parameter may be an exposure time, and/or an exposure gain. In some embodiments provided by the present application, the exposure time may be preferentially adjusted, and the exposure gain is adjusted when the exposure time to be configured exceeds a preset effective range of exposure parameters and the exposure state of the current frame image does not meet a preset condition. The reason is that if the brightness of the image to be acquired is supposed to be improved, the exposure time can be increased to improve the light incoming quantity of the photosensitive element, so that the aim of improving the image brightness is fulfilled; it is also possible to increase the exposure gain to increase the image brightness by amplifying the electrical signal before digital-to-analog conversion, but increasing the exposure gain amplifies the quantization noise of the image, while increasing the exposure time does not increase the image noise.
Specifically, before the step S201, capturing an image by using a camera, the method may further include:
setting an exposure parameter adjusting mode as a time priority mode, wherein in the time priority mode, the exposure parameter to be configured is the exposure time to be configured.
On the basis, when the exposure parameter to be configured is greater than or equal to the preset maximum value of the exposure parameter to be configured, or the exposure parameter to be configured is less than or equal to the preset minimum value of the exposure parameter to be configured, between the step of configuring the adjusted exposure parameter to be configured to the camera and the step of returning to execute the step of acquiring the image by using the camera to obtain the current frame image, the method may further include:
and setting the exposure parameter adjusting mode as a gain priority mode, wherein the exposure parameter to be configured is the exposure gain to be configured in the gain priority mode.
It should be noted that, the initial exposure parameter adjustment mode is a time-first mode, and in the time-first mode, the exposure parameter to be configured is the exposure time to be configured, and in a case that the exposure time to be configured is greater than or equal to a preset maximum value of the exposure time to be configured or the exposure time to be configured is less than or equal to a preset minimum value of the exposure time to be configured, between the step of configuring the adjusted exposure parameter to be configured to the camera and the step of returning to execute image acquisition by the camera to obtain the current frame image, the exposure parameter adjustment mode is set as a gain-first mode, that is, the exposure parameter to be configured is the exposure gain to be configured, that is, there is no case that the exposure time to be configured is not in an effective exposure time range, but the current exposure time is a boundary value of the effective exposure time range; in the gain priority mode, the exposure gain to be configured may not be in the effective exposure gain range, but the current exposure gain is the boundary value of the effective exposure gain range, that is, the threshold interruption may not occur in the time priority mode, and the threshold interruption may be implemented in the gain priority mode, so as to save the calculation power.
Fig. 6 is a schematic flow chart illustrating another automatic exposure method according to an embodiment of the present application, and in conjunction with fig. 6, the method may include:
step S301 is the same as step S201, and will not be described herein again.
And step S302, marking the exposure parameter variation trend of the current frame image.
Specifically, the step S302 may include: and marking the exposure parameter variation trend of the image for the current frame image, wherein the exposure parameter variation trend of the current frame image is used for representing the size relation between the exposure parameter when the current frame image is acquired and the exposure parameter when the previous frame image is acquired.
Step S303, determining whether the exposure parameter variation trend meets a preset condition, if so, performing step S308, and if not, performing step S304.
Specifically, the preset condition may be that, in the current frame image and a plurality of consecutive frames adjacent to the current frame image, the exposure parameter variation trends of each two adjacent images are opposite.
Steps S304-S310 are identical to steps S202-S208 described above and will not be described herein.
In the above automatic exposure method, in the process of iteratively optimizing the exposure parameter, a variation trend of the exposure parameter of the current frame image relative to the exposure parameter of the previous frame image is recorded, for example, the adjacent frames of continuous images may be adjacent four frames of continuous images, and then in the five continuous frames of images, and the current frame image is acquired latest in the five continuous frames of images, if the variation trends of the exposure parameters of each two adjacent images are opposite, that is, in any group of adjacent image pairs, one image takes a measure to increase the image brightness, and the other image takes a measure to decrease the image brightness, which is equivalent to that the current exposure parameter fluctuates around the optimal exposure parameter, four foldback occurs, and a preset fluctuation interruption requirement is satisfied, the exposure parameter when the current frame image is acquired can be determined as the target exposure parameter, and iteration is stopped in advance, thereby increasing the speed of implementing automatic exposure.
It should be noted that, in some embodiments provided in the present application, in the time-first mode, the exposure parameter variation trend of the current frame image is used to represent a size relationship between the exposure time when the current frame image is acquired and the exposure time when the previous frame image is acquired, and in the gain-first mode, the exposure parameter variation trend of the current frame image is used to represent a size relationship between the exposure gain when the current frame image is acquired and the exposure gain when the previous frame image is acquired.
The following describes a specific implementation of determining the exposure parameters to be configured. In some embodiments provided by the present application, the step S208 of determining the exposure parameter to be configured according to at least the image feature of the current frame image may include:
and S10, judging whether the current frame image is a first frame image, if so, executing S11, and if not, executing S12.
S11, determining exposure parameters to be configured according to the image characteristics of the current frame image and the exposure parameters when the current frame image is collected.
Specifically, the adjustment multiple k of the exposure parameter to be configured relative to the exposure parameter when the current frame image is acquired may be determined according to the average brightness of the current frame image. Illustratively, the exposure parameter to be configured next _ Y = k × cur _ Y, where k =2 in the case that the average brightness of the current frame image is smaller than a first preset value; when the average brightness of the current frame image is greater than or equal to the first preset value and smaller than a second preset value, k =1.25; when the average brightness of the current frame image is greater than or equal to the second preset value and smaller than a third preset value, k =0.75; when the average brightness of the current frame image is greater than or equal to the third preset value, k =0.5, the first preset value, the second preset value, and the third preset value increase sequentially, for example, the first preset value may be 64, the second preset value may be 128, and the third preset value may be 192.
S12, determining exposure parameters to be configured according to the image characteristics of the current frame image, the image characteristics of the previous frame image, a preset threshold corresponding to the image characteristics, the exposure parameters when the current frame image is collected and the exposure parameters when the previous frame image is collected.
In a possible implementation manner, the parameter estimation may be performed by using exposure parameters and image features of two adjacent frames of images through a local linear fitting manner, specifically, the step S12 of determining the exposure parameter to be configured according to the image feature of the current frame of image, the image feature of the previous frame of image, a preset threshold corresponding to the image feature, the exposure parameter when the current frame of image is acquired, and the exposure parameter when the previous frame of image is acquired may include:
s21, calculating a linear function Y = cur _ Y + (cur _ Y-pre _ Y)/(cur _ X-pre _ X) ((X-cur _ X)) with respect to the image feature X and the exposure parameter Y according to the image feature cur _ X of the current frame image, the image feature pre _ X of the previous frame image, the exposure parameter cur _ Y when the current frame image is collected, and the exposure parameter pre _ Y when the previous frame image is collected.
And S22, calculating the exposure parameter when the image characteristic is a preset threshold value corresponding to the image characteristic according to the linear function to obtain the exposure parameter to be configured.
The automatic exposure method carries out parameter estimation through a local linear fitting mode, can quickly predict exposure parameters to be configured, and improves the speed of realizing automatic exposure.
In addition, for the statistical results of different current frame images, different image features, such as the number of over-exposed blocks, the number of under-exposed blocks, or the average brightness, may be used to calculate the exposure parameters to be configured.
Fig. 7 illustrates a schematic diagram of a possible process for determining an exposure parameter to be configured, wherein the exposure parameter to be configured next _ Y may be an exposure gain to be configured or an exposure time to be configured, as shown in fig. 7:
when the number of overexposure blocks of the current frame image is greater than the first number threshold N1, the image feature is the number no of overexposure blocks, and a preset threshold corresponding to the image feature is the first number threshold N1, specifically, it is first determined whether the current frame is the first frame, if so, a parameter adjustment multiple k is determined according to the image feature (average brightness cur _ pb, the number cur _ no of overexposure blocks, or the number cur _ nu of underexposure blocks) of the current frame, if not, an exposure parameter cur _ Y to be configured is k times of an exposure parameter during acquisition of the current frame image, and if not, an exposure parameter cur _ Y to be configured is calculated according to the number cur _ no of overexposure blocks of the current frame image, the number prex _ no of an overexposure block of a previous frame image, an exposure parameter cur _ Y during acquisition of the current frame image, and an exposure parameter prex _ no)/(Y _ no of the previous frame image feature)/(Y = Y — Y), and a first exposure parameter (exposure parameter Y _ no = Y _ 1 — Y — cur — Y — N + pre —) is calculated.
When the number cur _ no of the overexposed blocks of the current frame image is not equal to zero and is not greater than the first number threshold N1, and the number cur _ nu of the underexposed blocks of the current frame image is greater than the second number threshold N2, the image feature is the number nu of the underexposed blocks, the preset threshold corresponding to the image feature is the second number threshold N2, if the current frame is the first frame, the exposure parameter next _ Y = k × (cur _ Y)/(cur _ Y-pre _ Y)/(cur _ nu-pre _ nu) (N2-cur _ nu), and a specific calculation process is consistent with the above and is not repeated;
when the number cur _ no of the overexposed blocks of the current frame image is equal to zero, the number cur _ nu of the underexposed blocks of the current frame image is greater than the second number threshold N2, and the average brightness cur _ pb of the current frame image is not greater than the average brightness threshold N3, the image feature is an average brightness, the preset threshold corresponding to the image feature is the average brightness threshold N3, if the current frame is a first frame, the exposure parameter next _ Y = k × cur _ Y to be configured, otherwise, the next _ Y = cur _ Y + (cur _ Y-pre _ Y)/(cur _ pb-pre _ pb) (N3-cur _ pb), and the specific calculation process is consistent with the above description and is not repeated.
In some embodiments, in order to improve the applicability of the automatic exposure method in a low-exposure-level scene, in a case that the number of under-exposed blocks of the current frame image is greater than the second number threshold or the average brightness of the current frame image is not greater than the average brightness threshold, before returning to the step of performing step S201, capturing an image with a camera, and obtaining a current frame image, the method may further include:
and modifying the absolute underexposure threshold value to be the minimum value of the absolute underexposure threshold value when the current frame image is acquired and the average brightness of each current frame image block.
It should be noted that, under the condition that there is no overexposed region in the image, a certain degree of underexposure or low image brightness may be acceptable, so that under the condition that the number of overexposed blocks of the current frame image is equal to zero, the number of underexposed blocks of the current frame image is greater than the second number threshold, and the average brightness of the current frame image is not greater than the average brightness threshold, the absolute underexposure threshold may be modified to reduce the amount of calculation and increase the iteration speed.
The following describes an automatic exposure apparatus provided in an embodiment of the present application, and the automatic exposure apparatus described below and the automatic exposure method described above may be referred to correspondingly.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an automatic exposure apparatus disclosed in the embodiment of the present application.
As shown in fig. 8, the apparatus may include:
the image acquisition unit 101 is used for acquiring an image by using a camera to obtain a current frame image;
the image block average brightness calculation unit 102 is configured to perform blocking on the current frame image and calculate an average brightness of each current frame image block;
an exposure state marking unit 103, configured to mark a current frame image block with average luminance smaller than an absolute under-exposure threshold as an under-exposure block, mark a current frame image block with average luminance larger than an absolute over-exposure threshold as an over-exposure block, and mark a current frame image block with average luminance larger than a relative over-exposure threshold, average luminance smaller than or equal to the absolute over-exposure threshold, and an average luminance change trend of a previous frame image block relative to the same position, which is opposite to an information entropy change trend, as an over-exposure block, where the relative over-exposure threshold is larger than the absolute under-exposure threshold;
a number counting unit 104, configured to count the number of overexposed blocks and the number of underexposed blocks of the current frame image, so as to obtain a statistical result of the current frame image;
and an exposure parameter adjusting unit 105, configured to adjust an exposure parameter of the camera according to the statistical result of the current frame image.
In some embodiments provided by the application, the automatic exposure apparatus may further include an exposure parameter adjustment mode configuration unit, configured to set an exposure parameter adjustment mode of the camera to a time-first mode, where in the time-first mode, the exposure parameter to be configured is the exposure time to be configured.
On the basis of the above, the process of adjusting the exposure parameter of the camera by the exposure parameter adjusting unit 105 according to the statistical result of the current frame image may include:
judging whether the statistical result of the current frame image meets a first preset condition or a second preset condition, if so, determining that the exposure parameter when the current frame image is collected is a target exposure parameter, otherwise, executing:
determining an exposure parameter to be configured at least according to the image characteristics of the current frame image;
judging whether the exposure parameter to be configured is smaller than a preset maximum value and larger than a preset minimum value;
if so, configuring the exposure parameters to be configured to the camera, and returning to the step of acquiring images by using the camera to obtain the current frame image;
if not, judging whether the exposure parameter when acquiring the current frame image is a corresponding preset value, if not, adjusting the exposure parameter to be configured to be the corresponding preset value, configuring the adjusted exposure parameter to be configured to the camera, sending the mode modification instruction to the exposure parameter adjustment mode configuration unit, and returning to execute the step of acquiring the image by using the camera to obtain the current frame image, wherein the mode modification instruction is used for setting the exposure parameter adjustment mode to be a gain priority mode, and the exposure parameter to be configured is the exposure gain to be configured in the gain priority mode; and if so, determining the exposure parameter when the current frame image is acquired as a target exposure parameter. It should be noted that, if the exposure parameter to be configured is not greater than the preset minimum value, the preset value corresponding to the exposure parameter of the current frame is the preset minimum value, and if the exposure parameter to be configured is not less than the preset maximum value, the preset value corresponding to the exposure parameter of the current frame is the preset maximum value.
In some embodiments provided by the present application, the automatic exposure apparatus may further include a threshold adjustment unit, configured to modify, when the number of under-exposed blocks of the current frame image is greater than the second number threshold or the average luminance of the current frame image is not greater than the average luminance threshold, the absolute under-exposure threshold to be a minimum value of an absolute under-exposure threshold and an average luminance of each current frame image block when the current frame image is acquired, before the current frame image is acquired by using a camera.
In some embodiments provided by the present application, the automatic exposure apparatus may further include a fluctuation monitoring unit, configured to mark an exposure parameter variation trend for the current frame image, where the exposure parameter variation trend is used to represent a size relationship between an exposure parameter when the current frame image is acquired and an exposure parameter when a previous frame image is acquired, and if the exposure parameter variation trends of every two adjacent images in the current frame image and a plurality of consecutive images adjacent to the current frame image are opposite, send an instruction for determining that the exposure parameter when the current frame image is acquired is a target exposure parameter to the exposure parameter adjusting unit 105, otherwise send an instruction for performing a blocking step on the current frame image to the exposure parameter adjusting unit 105.
The detailed function and the extended function of the automatic exposure apparatus described above can be referred to the related description of the above method section.
The automatic exposure device provided by the embodiment of the application can be applied to automatic exposure equipment, such as digital cameras, mobile phones and the like with data processing capacity. Alternatively, fig. 9 shows a block diagram of a hardware structure of the automatic exposure apparatus, and referring to fig. 9, the hardware structure of the automatic exposure apparatus may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
in the embodiment of the application, the number of the processor 1, the communication interface 2, the memory 3 and the communication bus 4 is at least one, and the processor 1, the communication interface 2 and the memory 3 complete mutual communication through the communication bus 4;
the processor 1 may be a central processing unit CPU, or an Application Specific Integrated Circuit ASIC (Application Specific Integrated Circuit), or one or more Integrated circuits or the like configured to implement an embodiment of the present invention;
the memory 3 may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory) or the like, such as at least one disk memory;
wherein the memory stores a program and the processor can call the program stored in the memory, the program for:
acquiring an image by using a camera to obtain a current frame image;
partitioning the current frame image, and calculating the average brightness of each current frame image block;
marking a current frame image block with average brightness smaller than an absolute under-exposure threshold as an under-exposure block, marking a current frame image block with average brightness larger than an absolute over-exposure threshold as an over-exposure block, and marking a current frame image block with average brightness larger than a relative over-exposure threshold, average brightness smaller than or equal to the absolute over-exposure threshold and relative to the previous frame image block at the same position, wherein the average brightness change trend of the previous frame image block is opposite to the information entropy change trend, as an over-exposure block, wherein the relative over-exposure threshold is larger than the absolute under-exposure threshold;
counting the number of over-exposed blocks and the number of under-exposed blocks of the current frame image to obtain a statistical result of the current frame image;
and adjusting the exposure parameters of the camera according to the statistical result of the current frame image.
Alternatively, the detailed function and the extended function of the program may be as described above.
Embodiments of the present application further provide a storage medium, where a program suitable for execution by a processor may be stored, where the program is configured to:
acquiring an image by using a camera to obtain a current frame image;
partitioning the current frame image, and calculating the average brightness of each current frame image block;
marking a current frame image block with average brightness smaller than an absolute underexposure threshold as an underexposure block, marking a current frame image block with average brightness larger than an absolute overexposure threshold as an overexposure block, and marking a current frame image block with average brightness larger than a relative overexposure threshold, average brightness smaller than or equal to the absolute overexposure threshold and relative to the previous frame image block at the same position, wherein the average brightness change trend is opposite to the information entropy change trend, as an overexposure block, wherein the relative overexposure threshold is larger than the absolute underexposure threshold;
counting the number of over-exposed blocks and the number of under-exposed blocks of the current frame image to obtain a statistical result of the current frame image;
and adjusting the exposure parameters of the camera according to the statistical result of the current frame image.
Alternatively, the detailed function and the extended function of the program may refer to the above description.
Finally, it should also be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, the embodiments may be combined as needed, and the same and similar parts may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (15)

1. An automatic exposure method, comprising:
acquiring an image by using a camera to obtain a current frame image;
partitioning the current frame image, and calculating the average brightness of each current frame image block;
marking a current frame image block with average brightness smaller than an absolute under-exposure threshold as an under-exposure block, marking a current frame image block with average brightness larger than an absolute over-exposure threshold as an over-exposure block, and marking a current frame image block with average brightness larger than a relative over-exposure threshold, average brightness smaller than or equal to the absolute over-exposure threshold and relative to the previous frame image block at the same position, wherein the average brightness change trend of the previous frame image block is opposite to the information entropy change trend, as an over-exposure block, wherein the relative over-exposure threshold is larger than the absolute under-exposure threshold;
counting the number of over-exposed blocks and the number of under-exposed blocks of the current frame image to obtain a statistical result of the current frame image;
and adjusting the exposure parameters of the camera according to the statistical result of the current frame image.
2. The method according to claim 1, wherein the marking that the current frame image block with the average brightness greater than the relative overexposure threshold, the average brightness less than or equal to the absolute overexposure threshold and the average brightness having a trend of changing opposite to the trend of changing information entropy relative to the previous frame image block at the same position is an overexposure block comprises:
for each current frame image block with average luminance greater than a relative overexposure threshold and less than or equal to the absolute overexposure threshold:
if the average brightness of the current frame image block is in an increasing trend relative to the average brightness of the previous frame image block at the same position, and the variation of the information entropy of the current frame image block relative to the information entropy of the previous frame image block at the same position is smaller than a first variation threshold, marking the current frame image block as an overexposed block, wherein the first variation threshold is smaller than zero;
if the average brightness of the current frame image block is in a decreasing trend relative to the average brightness of the previous frame image block at the same position, and the variation of the information entropy of the current frame image block relative to the information entropy of the previous frame image block at the same position is greater than a second variation threshold, marking the current frame image block as an overexposed block, wherein the second variation threshold is greater than zero.
3. The method of claim 1, further comprising, before counting the number of under-exposed blocks of the current frame image:
marking the current frame image block with the average brightness more than or equal to the absolute underexposure threshold, the average brightness less than the relative underexposure threshold and the same average brightness change trend and information entropy change trend relative to the previous frame image block at the same position as an underexposure block, wherein the relative underexposure threshold is less than the absolute overexposure threshold.
4. The method according to claim 3, wherein the marking that the current frame image block whose average brightness is equal to or greater than the absolute underexposure threshold, whose average brightness is less than the relative underexposure threshold and whose average brightness variation trend with respect to the previous frame image block at the same position is the same as the information entropy variation trend, is an underexposure block comprises:
for each current frame image block having an average luminance greater than or equal to the absolute underexposure threshold and less than a relative underexposure threshold:
if the average brightness of the current frame image block is in an increasing trend relative to the average brightness of the previous frame image block at the same position, and the variation of the information entropy of the current frame image block relative to the information entropy of the previous frame image block at the same position is greater than a third variation threshold, marking the current frame image block as an under-exposed block, wherein the third variation threshold is greater than zero;
if the average brightness of the current frame image block is in a decreasing trend relative to the average brightness of the previous frame image block at the same position, and the variation of the information entropy of the current frame image block relative to the information entropy of the previous frame image block at the same position is smaller than a fourth variation threshold, marking the current frame image block as an under-exposed block, wherein the fourth variation threshold is smaller than zero.
5. The method of claim 1, wherein adjusting exposure parameters of a camera according to the statistics of the current frame image comprises:
if the statistical result of the current frame image meets a first preset condition or a second preset condition, determining the exposure parameter when the current frame image is collected as a target exposure parameter, otherwise, adjusting the exposure parameter of the camera at least according to the image characteristics of the current frame image;
the first preset condition is that the number of over-exposed blocks of the current frame image is not greater than a first number threshold, and the number of under-exposed blocks of the current frame image is not greater than a second number threshold; the second preset condition is that the number of over-exposed blocks of the current frame image is zero, the number of under-exposed blocks of the current frame image is greater than the second number threshold, and the average brightness of the current frame image is greater than the average brightness threshold.
6. The method of claim 5, wherein adjusting the exposure parameter of the camera according to at least the image feature of the current frame image comprises:
determining exposure parameters to be configured at least according to the image characteristics of the current frame image;
under the condition that the exposure parameter to be configured is larger than the preset maximum value of the exposure parameter to be configured, judging whether the exposure parameter when the current frame image is acquired is the preset maximum value of the exposure parameter to be configured, if not, adjusting the exposure parameter to be configured to be the preset maximum value of the exposure parameter to be configured, configuring the adjusted exposure parameter to be configured to the camera, returning to the step of acquiring the image by using the camera to obtain the current frame image, and if so, determining the exposure parameter when the current frame image is acquired to be the target exposure parameter;
under the condition that the exposure parameter to be configured is smaller than the preset minimum value of the exposure parameter to be configured, judging whether the exposure parameter when the current frame image is acquired is the preset minimum value of the exposure parameter to be configured, if not, adjusting the exposure parameter to be configured to be the preset minimum value of the exposure parameter to be configured, configuring the adjusted exposure parameter to be configured to the camera, returning to the step of acquiring the image by using the camera to obtain the current frame image, and if so, determining the exposure parameter when the current frame image is acquired to be the target exposure parameter;
and under the condition that the exposure parameter to be configured is not less than the preset minimum value of the exposure parameter to be configured and not more than the preset maximum value of the exposure parameter to be configured, configuring the exposure parameter to be configured to the camera, and returning to execute the step of acquiring an image by using the camera to obtain the current frame image.
7. The method of claim 6, further comprising setting an exposure parameter adjustment mode to a time-first mode before capturing an image with the camera, wherein the exposure parameter to be configured is an exposure time to be configured in the time-first mode;
when the exposure parameter to be configured is greater than or equal to the preset maximum value of the exposure parameter to be configured, or the exposure parameter to be configured is less than or equal to the preset minimum value of the exposure parameter to be configured, between the step of configuring the adjusted exposure parameter to be configured to the camera and the step of returning to execute the step of acquiring the image by using the camera to obtain the current frame image, the method further comprises the following steps:
and setting the exposure parameter adjusting mode as a gain priority mode, wherein the exposure parameter to be configured is the exposure gain to be configured in the gain priority mode.
8. The method of claim 6, wherein the determining the exposure parameter to be configured according to at least the image feature of the current frame image comprises:
under the condition that the current frame image is a first frame image, determining exposure parameters to be configured according to the image characteristics of the current frame image and the exposure parameters when the current frame image is collected;
and under the condition that the current frame image is not the first frame image, determining the exposure parameter to be configured according to the image feature of the current frame image, the image feature of the previous frame image, the preset threshold corresponding to the image feature, the exposure parameter when the current frame image is collected and the exposure parameter when the previous frame image is collected.
9. The method of claim 8, wherein determining the exposure parameter to be configured according to the image feature of the current frame image, the image feature of the previous frame image, the preset threshold corresponding to the image feature, the exposure parameter when the current frame image is collected, and the exposure parameter when the previous frame image is collected comprises:
calculating a linear function related to the image characteristics and the exposure parameters according to the image characteristics of the current frame image, the image characteristics of the previous frame image, the exposure parameters when the current frame image is collected and the exposure parameters when the previous frame image is collected;
and calculating the exposure parameter when the image characteristic is a preset threshold value corresponding to the image characteristic according to the linear function to obtain the exposure parameter to be configured.
10. The method according to claim 8, wherein in a case that the number of over-exposed blocks of the current frame image is greater than the first number threshold, the image feature is the number of over-exposed blocks, and the preset threshold corresponding to the image feature is the first number threshold;
under the condition that the number of over-exposed blocks of the current frame image is not equal to zero and is not greater than the first number threshold, and the number of under-exposed blocks of the current frame image is greater than the second number threshold, the image feature is the number of under-exposed blocks, and the preset threshold corresponding to the image feature is the second number threshold;
and under the condition that the number of the over-exposed blocks of the current frame image is equal to zero, the number of the under-exposed blocks of the current frame image is greater than the second number threshold, and the average brightness of the current frame image is not greater than the average brightness threshold, the image feature is the average brightness, and the preset threshold corresponding to the image feature is the average brightness threshold.
11. The method according to any one of claims 6 to 10, wherein in a case that the number of the under-exposed blocks of the current frame image is greater than the second number threshold or the average brightness of the current frame image is not greater than the average brightness threshold, before returning to the step of capturing an image with a camera to obtain the current frame image, the method further comprises:
and modifying the absolute underexposure threshold value to be the minimum value of the absolute underexposure threshold value when the current frame image is acquired and the average brightness of each current frame image block.
12. The method according to any one of claims 6-10, wherein between capturing images with a camera, obtaining current frame images and blocking the current frame images, and calculating an average luminance of each current frame image block, the method further comprises:
marking the exposure parameter variation trend of the image for the current frame image, wherein the exposure parameter variation trend of the current frame image is used for representing the size relationship between the exposure parameter when the current frame image is collected and the exposure parameter when the previous frame image is collected;
if the exposure parameter variation trends of every two adjacent images in the current frame image and a plurality of adjacent continuous images are opposite, determining the exposure parameter when the current frame image is collected as a target exposure parameter, otherwise, executing the steps of partitioning the current frame image and calculating the average brightness of each current frame image block.
13. An automatic exposure apparatus, characterized by comprising:
the image acquisition unit is used for acquiring an image by using a camera to obtain a current frame image;
the image block average brightness calculation unit is used for partitioning the current frame image and calculating the average brightness of each current frame image block;
the exposure state marking unit is used for marking a current frame image block with average brightness smaller than an absolute underexposure threshold as an underexposure block, marking a current frame image block with average brightness larger than an absolute overexposure threshold as an overexposure block, and marking a current frame image block with average brightness larger than a relative overexposure threshold, average brightness smaller than or equal to the absolute overexposure threshold and relative to the same position, wherein the average brightness change trend of the previous frame image block is opposite to the information entropy change trend, and the relative overexposure threshold is larger than the absolute underexposure threshold;
the quantity counting unit is used for counting the quantity of the over-exposure blocks and the quantity of the under-exposure blocks of the current frame image to obtain a counting result of the current frame image;
and the exposure parameter adjusting unit is used for adjusting the exposure parameters of the camera according to the statistical result of the current frame image.
14. An automatic exposure apparatus characterized by comprising: a memory and a processor;
the memory is used for storing programs;
the processor, which executes the program, realizes the respective steps of the automatic exposure method according to any one of claims 1 to 12.
15. A storage medium having stored thereon a computer program for implementing the steps of the automatic exposure method according to any one of claims 1 to 12 when executed by a processor.
CN202211588206.1A 2022-12-12 2022-12-12 Automatic exposure method, device, equipment and storage medium Active CN115665556B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211588206.1A CN115665556B (en) 2022-12-12 2022-12-12 Automatic exposure method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211588206.1A CN115665556B (en) 2022-12-12 2022-12-12 Automatic exposure method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115665556A true CN115665556A (en) 2023-01-31
CN115665556B CN115665556B (en) 2023-04-14

Family

ID=85018141

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211588206.1A Active CN115665556B (en) 2022-12-12 2022-12-12 Automatic exposure method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115665556B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116503369A (en) * 2023-05-06 2023-07-28 北京思莫特科技有限公司 Deformation monitoring method of structure and image exposure parameter adjusting method

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399924A (en) * 2007-09-25 2009-04-01 展讯通信(上海)有限公司 Automatic exposure method and device based on brightness histogram
CN102081275A (en) * 2010-12-24 2011-06-01 中国科学院长春光学精密机械与物理研究所 Full-automatic real-time dimming method for transit instrument based on digital images
US20130027581A1 (en) * 2011-07-29 2013-01-31 Apple Inc. Adaptive auto exposure adjustment
US20160127655A1 (en) * 2014-10-30 2016-05-05 Hisense Mobile Communications Technology Co., Ltd. Method and device for image taking brightness control and computer readable storage medium
US10593007B1 (en) * 2015-06-11 2020-03-17 Digimarc Corporation Methods and arrangements for configuring industrial inspection systems
WO2020162949A1 (en) * 2019-02-08 2020-08-13 Hewlett-Packard Development Company, L.P. Imaging device calibration
CN112330689A (en) * 2020-11-02 2021-02-05 鲁腊福 Photovoltaic camera exposure parameter adjusting method and device based on artificial intelligence
CN112788250A (en) * 2021-02-01 2021-05-11 青岛海泰新光科技股份有限公司 Automatic exposure control method based on FPGA
CN113395457A (en) * 2020-03-11 2021-09-14 浙江宇视科技有限公司 Parameter adjusting method, device and equipment of image collector and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399924A (en) * 2007-09-25 2009-04-01 展讯通信(上海)有限公司 Automatic exposure method and device based on brightness histogram
CN102081275A (en) * 2010-12-24 2011-06-01 中国科学院长春光学精密机械与物理研究所 Full-automatic real-time dimming method for transit instrument based on digital images
US20130027581A1 (en) * 2011-07-29 2013-01-31 Apple Inc. Adaptive auto exposure adjustment
US20160127655A1 (en) * 2014-10-30 2016-05-05 Hisense Mobile Communications Technology Co., Ltd. Method and device for image taking brightness control and computer readable storage medium
US10593007B1 (en) * 2015-06-11 2020-03-17 Digimarc Corporation Methods and arrangements for configuring industrial inspection systems
WO2020162949A1 (en) * 2019-02-08 2020-08-13 Hewlett-Packard Development Company, L.P. Imaging device calibration
CN113395457A (en) * 2020-03-11 2021-09-14 浙江宇视科技有限公司 Parameter adjusting method, device and equipment of image collector and storage medium
CN112330689A (en) * 2020-11-02 2021-02-05 鲁腊福 Photovoltaic camera exposure parameter adjusting method and device based on artificial intelligence
CN112788250A (en) * 2021-02-01 2021-05-11 青岛海泰新光科技股份有限公司 Automatic exposure control method based on FPGA

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116503369A (en) * 2023-05-06 2023-07-28 北京思莫特科技有限公司 Deformation monitoring method of structure and image exposure parameter adjusting method
CN116503369B (en) * 2023-05-06 2024-01-26 北京思莫特科技有限公司 Deformation monitoring method of structure and image exposure parameter adjusting method

Also Published As

Publication number Publication date
CN115665556B (en) 2023-04-14

Similar Documents

Publication Publication Date Title
CN110099222B (en) Exposure adjusting method and device for shooting equipment, storage medium and equipment
JP6005915B2 (en) Adaptive automatic exposure control method
TWI682664B (en) Method for generating an hdr image of a scene based on a tradeoff between brightness distribution and motion
JP3758452B2 (en) RECORDING MEDIUM, IMAGE PROCESSING DEVICE, AND IMAGE PROCESSING METHOD
CN108769542B (en) Exposure parameter determination method and device and readable medium
KR100992367B1 (en) Method for controlling auto exposure
CN115665556B (en) Automatic exposure method, device, equipment and storage medium
EP3611914A1 (en) Method and apparatus for photographing image
CN110493539B (en) Automatic exposure processing method, processing device and electronic equipment
JP2008526149A (en) Digital imaging exposure
CN111711767B (en) Automatic exposure control method and electronic equipment
CN112565621B (en) Endoscope light source brightness and exposure adjusting method and device and readable storage medium
EP3226547B1 (en) Controlling signal-to-noise ratio in high dynamic range automatic exposure control imaging
CN110223244B (en) Image processing method and device, electronic equipment and storage medium
CN112738411A (en) Exposure adjusting method, exposure adjusting device, electronic equipment and storage medium
CN115767260A (en) Anti-overexposure processing method and device, image acquisition equipment and storage medium
CN115767282A (en) Fill light brightness control method, terminal device and computer readable storage medium
KR101225060B1 (en) Method and apparatus for estimating criterion of determination of noise
CN110868549B (en) Exposure control method and device and electronic equipment
US10726523B2 (en) Image processing apparatus, image processing method, and storage medium
WO2006109703A1 (en) Imaging system and video signal processing program
CN112153296B (en) Automatic exposure control method and device and camera with FPGA
CN113747062B (en) HDR scene detection method and device, terminal and readable storage medium
CN108470059B (en) Picture compression control method of mobile terminal
CN115209058B (en) Method, controller and medium for controlling exposure time variable of camera

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant