Exposure configuration method, storage medium and electronic equipment
By updating the count value and generating the exposure sequence set, and calculating the exposure parameters based on the reference image, the problem of automatic exposure technology not responding in time in complex scenes is solved, the stability and smoothness of exposure is achieved, the brightness abnormality is avoided, and the image is improved quality.
Patent Information
- Application Number
- CN202411067981.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-05
Smart Images

Figure CN119071645A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the field of image processing technology, and in particular relates to an exposure configuration method, a storage medium and an electronic device. Background Art
[0002] Auto Exposure (AE) refers to the process of optimizing the image brightness by controlling the exposure parameters of the image sensor based on the subjective visual feeling of human beings. The exposure parameters determine the image brightness output by the image sensor. With the increase in the application of image sensors, the application scenarios recorded by image sensors are becoming more diverse and complex. Taking security monitoring applications as an example, when the security monitoring image sensor shoots and records relatively spacious scenes, such as squares and outdoor streets, the brightness of the scene generally changes slowly and with a small amplitude, requiring the automatic exposure to respond slowly and the brightness to transition smoothly without obvious brightness flickering and sudden changes. When the security monitoring image sensor shoots and records scenes with smaller spaces, such as elevator rooms and indoor corridor lights, the brightness changes greatly due to the small space, requiring the automatic exposure to respond quickly to avoid large-area overexposure or underexposure, otherwise the details of the scene will be lost. Summary of the invention
[0003] The embodiments of the present disclosure provide an exposure configuration method, a storage medium, and an electronic device for improving the stability and smoothness of exposure.
[0004] A first aspect of an embodiment of the present disclosure provides an exposure configuration method. The exposure configuration method includes: updating a first count value according to an image frame header signal; when the first count value is updated and the first exposure sequence set includes exposure parameters, selecting exposure parameters from the first exposure sequence set and configuring the exposure parameters to an image sensor; updating a second count value according to an image frame end signal; when the second count value is updated, acquiring a reference image corresponding to the second count value, generating a second exposure sequence set according to the reference image; and when the second exposure sequence set includes exposure parameters, updating the first exposure sequence set using the second exposure sequence set.
[0005] In an implementation of the first aspect, updating the first count value according to the image frame header signal includes: when the image sensor outputs the first pixel of the image frame or the frame start short packet, a first counter of the image signal processor receives the image frame header signal from the image sensor to update the first count value.
[0006] In an implementation of the first aspect, updating the second count value according to the image frame end signal includes: after the image sensor completes pixel output of the image frame, a second counter of the image signal processor receives the image frame end signal from the image sensor to update the second count value.
[0007] In an implementation of the first aspect, updating the second count value according to the image frame end signal includes: when the number of pixels received by the image signal processor is less than the number of pixels output by the image sensor, updating the second count value by the second counter of the image signal processor according to the image frame end signal issued by the image signal processor.
[0008] In an implementation manner of the first aspect, the exposure configuration method further includes: when the first count value is updated and the first exposure sequence set does not include an exposure parameter, the exposure parameter of the image sensor remains unchanged.
[0009] In an implementation manner of the first aspect, the exposure configuration method further includes: arranging the exposure parameters in the first exposure sequence set in a monotonic order.
[0010] In an implementation of the first aspect, arranging the exposure parameters in the first exposure sequence set in a monotonic order includes: arranging the exposure parameters in the first exposure sequence set in a monotonically increasing order when the image is dark; and arranging the exposure parameters in the first exposure sequence set in a monotonically decreasing order when the image is bright.
[0011] In an implementation of the first aspect, selecting exposure parameters from the first exposure sequence set and configuring the exposure parameters to the image sensor includes: selecting the exposure parameter with the highest ranking from the first exposure sequence set and configuring it to the image sensor.
[0012] In an implementation of the first aspect, generating a second exposure sequence set based on the reference image includes: generating a photometric parameter based on the reference image; generating a comparison parameter and a first exposure parameter based on the photometric parameter; obtaining a first exposure coefficient based on the comparison parameter; obtaining a second exposure parameter from the first exposure sequence set; and generating the second exposure sequence set based on the first exposure parameter, the first exposure coefficient and the second exposure parameter.
[0013] In an implementation of the first aspect, obtaining the second exposure parameter from the first exposure sequence set includes: if the number of exposure parameters in the first exposure sequence set is not 0, obtaining a specific exposure parameter in the first exposure sequence set as the second exposure parameter, the second exposure parameter representing an exposure parameter to be configured; and if the number of exposure parameters in the first exposure sequence set is 0, obtaining a current exposure parameter of the image sensor as the second exposure parameter, the second exposure parameter representing an exposure parameter that has been configured.
[0014] In an implementation manner of the first aspect, generating the photometric parameters according to the reference image includes: generating the photometric parameters for characterizing a brightness condition of the reference image.
[0015] In an implementation of the first aspect, generating photometry parameters based on the reference image includes: acquiring brightness parameters of the reference image, the brightness parameters including a weighted block brightness mean, a weighted histogram brightness mean, a bright area mean and / or a dark area mean of the reference image; and performing a linear transformation on the brightness parameters of the reference image to obtain the photometry parameters.
[0016] In an implementation manner of the first aspect, generating a comparison parameter according to the photometric parameter includes: generating the comparison parameter for characterizing a deviation between image brightness of the reference image and target brightness.
[0017] In an implementation manner of the first aspect, the comparison parameter r is obtained by the following formula:
[0018] r=b×f(cg-pre1)+a
[0019] Wherein b represents a proportional coefficient, a represents an offset parameter, cg represents a photometric parameter, pre1 represents a first preset value, f is a correlation function of the difference between the photometric parameter and the first preset value, and the proportional coefficient is determined according to the frame rate.
[0020] In an implementation of the first aspect, acquiring the first exposure coefficient according to the comparison parameter includes: determining the first exposure coefficient according to a preset interval in which the comparison parameter is located, wherein different preset intervals correspond to different first exposure coefficients.
[0021] In an implementation of the first aspect, acquiring the first exposure coefficient according to the comparison parameter includes: generating the first exposure coefficient for characterizing the step of the exposure parameter in the second exposure sequence set, the first exposure coefficient being positively correlated with the comparison parameter.
[0022] In an implementation of the first aspect, generating the second exposure sequence set according to the first exposure parameter, the first exposure coefficient, and the second exposure parameter includes: obtaining the number K of exposure parameters in the second exposure sequence set by the following formula:
[0023] K = floor (ABS | first exposure parameter - second exposure parameter |) / first exposure coefficient
[0024] The exposure parameters in the second exposure sequence set are obtained by the following formula:
[0025]
[0026] where expk represents the kth exposure parameter in the second exposure sequence set, k=0, 1, ..., K-1.
[0027] In an implementation of the first aspect, acquiring the first exposure coefficient according to the comparison parameter includes: generating the first exposure coefficient for characterizing the number of exposure parameters in the second exposure sequence set, the first exposure coefficient being negatively correlated with the comparison parameter.
[0028] In an implementation manner of the first aspect, generating the second exposure sequence set according to the first exposure parameter, the first exposure coefficient, and the second exposure parameter includes:
[0029] The exposure parameters in the second exposure sequence set are obtained by the following formula:
[0030]
[0031] or,
[0032]
[0033] where exp k represents the kth exposure parameter in the second exposure sequence set, k=0, 1, ..., K-1.
[0034] In a second aspect, an embodiment of the present disclosure provides another exposure configuration method. The exposure configuration method includes: an image sensor acquires an image according to configured exposure parameters; a first counter of an image signal processor updates a first count value when receiving an image frame header signal; when the first count value is updated and the first exposure sequence set contains exposure parameters, the image signal processor selects exposure parameters from the first exposure sequence set and configures the exposure parameters to the image sensor; a second counter of the image signal processor updates a second count value when receiving an image frame end signal; when the second count value is updated, the image signal processor acquires a reference image corresponding to the second count value and generates a second exposure sequence set based on the reference image; and when the second exposure sequence set contains exposure parameters, the image signal processor updates the first exposure sequence set using the second exposure sequence set.
[0035] In a third aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the exposure configuration method according to any one of the first aspect of the embodiments of the present disclosure or the exposure configuration method according to the second aspect of the embodiments of the present disclosure is implemented.
[0036] In a fourth aspect, an embodiment of the present disclosure provides an electronic device. The electronic device includes: a memory configured to store an executable program; and a processor configured to call the program so that the electronic device executes the exposure configuration method according to any one of the first aspect of the embodiment of the present disclosure, or the exposure configuration method according to the second aspect of the embodiment of the present disclosure.
[0037] The exposure configuration method provided by the embodiment of the present disclosure can prevent abnormal brightness or flickering during the exposure adjustment process, which is beneficial to improving the stability and smoothness of exposure.
[0038] In the disclosed embodiment, exposure parameter sequence sets of different lengths or steps can be set for different scene brightnesses, so that it can be applicable to various and complex scene brightness changes, making the captured images more suitable for the human eye senses and avoiding overexposure, overexposure or underexposure. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 Shown is a schematic diagram of the overall environment of image acquisition and processing according to an embodiment of the present disclosure.
[0040] Figure 2 A flowchart of an exposure configuration method provided in an embodiment of the present disclosure is shown.
[0041] Figure 3 A flowchart of generating a second exposure sequence set in an embodiment of the present disclosure is shown.
[0042] Figure 4 Shown is a flow chart of obtaining light metering parameters in an embodiment of the present disclosure.
[0043] Figure 5A and Figure 5B A flowchart and a schematic diagram of an exposure configuration method provided in an embodiment of the present disclosure are respectively shown.
[0044] Figure 6 Shown is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0045] The following is an explanation of the embodiments of the present disclosure by specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0046] It should be noted that the illustrations provided in the following embodiments are only used to illustrate the basic concept of the present disclosure in a schematic manner, and thus the illustrations only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0047] Figure 1 Schematic diagram showing the overall environment of the embodiment of the present disclosure. Figure 1 As shown, as an overall environment, the image acquisition and processing system 10 includes a lens 12, an image sensor (Image Sensor) 14, an image signal processor (Image Signal Processor, ISP) 16, and a post-processing unit 18.
[0048] The lens 12 is used for optical imaging and focusing light onto the image sensor 14. Specifically, the lens 12 focuses light from the subject onto the photosensitive surface of the image sensor 14 through its optical design. The optical structure of the lens 12 determines the clarity and focusing ability of the imaging. The lens 12 is, for example, a fixed-focus lens or a zoom lens, but the present disclosure is not limited thereto.
[0049] The image sensor 14 is used to capture light and convert it into raw image data, which is sent to the image signal processor 16 for further processing. Specifically, the image sensor 14 includes a large number of tiny photoreceptors, and the density and arrangement of these photoreceptors determine the resolution of the image sensor 14, that is, the level of detail and clarity of the image that the image sensor 14 can capture. These photoreceptors can convert the light signal passing through the lens 12 into corresponding electrical signals, which include multiple pixels, each pixel corresponding to a point in the image, and its size and intensity represent the light intensity of the point. The image sensor 14 is, for example, a CMOS (Complementary Metal-Oxide Semiconductor) sensor or a CCD (Charge-Coupled Device) sensor, but the present disclosure is not limited thereto.
[0050] The image signal processor 16 is used to further process the raw image data to obtain a visible image. In some embodiments, the functions of the image signal processor 16 include linear correction, noise removal, bad pixel removal, interpolation, white balance, automatic exposure control, etc. The image signal processor 16 may include firmware and hardware. Firmware refers to a software program embedded in the hardware, which is responsible for controlling and optimizing the operation of the image signal processor 16. The firmware can set corresponding functional modules according to user requirements, such as a counter module, an automatic exposure module, etc.
[0051] In some implementations, the image signal processor 16 may be communicatively connected to the image sensor 14 via an I2C (Inter-Integrated Circuit) or an SPI (Serial Peripheral Interface), but the present disclosure is not limited thereto.
[0052] The post-processing unit 18 is used to further process the signal output by the image signal processor 16. The post-processing unit 18 may include an image quality assessment and optimization unit and a video input unit. The image quality assessment and optimization unit is used to assist developers and engineers in adjusting and improving the visual performance of the image to ensure that the end user obtains a high-quality visual experience. The video input unit is used to receive, decode and pre-process the image data, and then pass it to the image signal processor 16 for further processing and display.
[0053] The image acquisition and processing system 10 has different requirements for automatic exposure when applied to different scenes. For example, when shooting a scene with a smaller space, since the brightness of a scene with a smaller space usually changes greatly, this requires the automatic exposure to respond quickly to avoid large-area overexposure or underexposure, otherwise the details of the scene will be lost. When shooting a scene with a larger space, since the brightness of a scene with a larger space usually changes slowly and the change amplitude is small, this requires the automatic exposure to respond slowly and transition smoothly without obvious brightness flickering or sudden changes. However, the automatic exposure adjustment method adopted by some technical solutions cannot adaptively adjust the exposure parameters according to the brightness of the environment, which may cause problems such as excessive fluctuations in image brightness, flickering overshoot, or slow response.
[0054] At least for the above-mentioned problems, the embodiments of the present disclosure provide an exposure configuration method. In the exposure configuration method, an exposure setting method, an exposure parameter calculation method, and an exposure sequence set update method of an exposure sequence set are established, so that the exposure parameter values in the exposure sequence set change monotonically or stably according to a certain rule according to the scene or image brightness, and flickering phenomena such as abnormal brightness are prevented during the exposure adjustment process, thereby improving the stability and smoothness of the exposure. For the generation of each exposure parameter in the exposure sequence set, by calculating comparison parameters, setting a preset interval, and generating a corresponding first exposure coefficient, exposure sequence sets of different lengths or steps are set for different scenes or image brightness. Through each exposure parameter in the exposure sequence set, the image brightness can be continuously and monotonically adjusted, which is suitable for various and complex scene brightness changes, more suitable for the human eye senses, and improves the smoothness of the brightness, avoiding exposure overshoot, flicker, or overexposure and underexposure.
[0055] The technical solutions in the embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings in the embodiments of the present disclosure.
[0056] Figure 2 is a flowchart showing an exposure configuration method provided according to an embodiment of the present disclosure, the exposure configuration method can be applied Figure 1 The image signal processor 16 shown in the figure. The image signal processor 16 includes a first counter and a second counter, the first counter is used to record a first count value, and the second counter is used to record a second count value. The first counter updates the first count value when receiving an image frame header signal, and the second counter updates the second count value when receiving an image frame end signal. The image frame header signal is a signal used to identify the beginning of an image frame in an image data stream, and the image frame end signal is a signal used to identify the end of an image frame. Figure 2 As shown, the exposure configuration method provided by the embodiment of the present disclosure includes the following steps S21 to S25.
[0057] In step S21, the first count value is updated according to the image frame header signal. In some embodiments, when the image sensor outputs the first pixel of the image frame or the frame start short packet, an interrupt is triggered, and the interrupt can be used as the image frame header signal.
[0058] In step S22, when the first count value is updated and the first exposure sequence set includes exposure parameters, an exposure parameter is selected from the first exposure sequence set and configured to the image sensor 14. The image sensor 14 performs image acquisition based on the received exposure parameter to obtain an image corresponding to the first count value N.
[0059] The first exposure sequence set is used to store exposure parameters, and the number of exposure parameters stored in the first exposure sequence set is I, where I=0, 1, 2, ... After an exposure parameter is selected from the first exposure sequence set and sent to the image sensor 14, the exposure parameter is deleted from the first exposure sequence set, and the number of exposure parameters in the first exposure sequence set is I-1.
[0060] In some implementations, when the first count value is updated and the first exposure sequence set does not include exposure parameters, the image signal processor 16 does not send the exposure parameters to the image sensor 14. The exposure parameters of the image sensor 14 remain unchanged, that is, the previously configured exposure parameters are used to continue to capture new image frames.
[0061] In step S23, the second count value is updated according to the image frame end signal. In some embodiments, after the image sensor completes the pixel output of the image frame, an interrupt is triggered, and the interrupt can be used as the image frame end signal. In other embodiments, when there is a need for ISP front-end cropping, the number of pixels received by the ISP is less than the number of pixels output by the image sensor. At this time, the ISP is used to send an image frame end signal, so that subsequent processes can be performed earlier.
[0062] In step S24, a reference image corresponding to the second count value is acquired when the second count value is updated, and a second exposure sequence set is generated according to the reference image. Specifically, in step S24, an image corresponding to the second count value M can be acquired from the image captured by the image sensor 14. In the process of acquiring the reference image and generating the second exposure sequence set according to the reference image, the image sensor 14 may continue to send an image frame header signal, causing the first count value N to be updated accordingly, so the exposure parameter generation process and the exposure parameter setting process are asynchronous, and the relationship between the first count value N and the second count value M is N≥M.
[0063] In step S25, when the second exposure sequence set includes exposure parameters, the first exposure sequence set is updated using the second exposure sequence set. The specific updating method is: all exposure parameters in the first exposure sequence set are replaced with the exposure parameters in the second exposure sequence set. When the second exposure sequence set does not include exposure parameters, the first exposure sequence set is not updated.
[0064] It should be noted that the above reference numerals S21 to S25 are only used to identify different steps, rather than to limit the execution order of these steps. For example, steps S21 and S23 may be executed successively or in parallel, or step S23 may be executed first and then step S21.
[0065] In some implementations, the first exposure sequence set and the second exposure sequence set are stored in an internal buffer of image signal processor 16 .
[0066] In some implementations, updating the first count value according to the image frame header signal includes: when the image sensor 14 outputs the first pixel of the image frame or the frame start short packet, the first counter of the image signal processor 16 receives the image frame header signal from the image sensor 14 to update the first count value.
[0067] In some implementations, updating the second count value according to the image frame end signal includes: after the image sensor 14 completes pixel output of the image frame, the second counter of the image signal processor 16 receives the image frame end signal from the image sensor 14 to update the second count value.
[0068] In some implementations, updating the second count value based on the image frame end signal includes: when there is a front-end cropping requirement of the image signal processor 16, the number of pixels received by the image signal processor 16 is less than the number of pixels output by the image sensor 14, and at this time, the second counter of the image signal processor 16 receives the image frame end signal issued by the image signal processor 16 to update the second count value.
[0069] In some implementations, the exposure parameter includes a combination of one or more exposure components such as analog gain, digital gain, shutter time, aperture, image signal processor digital gain, etc. The value of each exposure parameter is related to the exposure components it is composed of.
[0070] In some implementations, the exposure configuration method may further include: arranging the exposure parameters in the first exposure sequence set in a monotonic order.
[0071] In some implementations, arranging the exposure parameters in the first exposure sequence set in a monotonic order includes: arranging the exposure parameters in the first exposure sequence set in a monotonic increasing order when the image is dark; arranging the exposure parameters in the first exposure sequence set in a monotonic decreasing order when the image is bright. Whether the image is dark or bright can be determined based on actual needs or experience.
[0072] In some implementations, selecting exposure parameters from the first exposure sequence set and configuring the exposure parameters to the image sensor 14 includes: selecting the top-ranked exposure parameters from the first exposure sequence set and sending them to the image sensor 14, and the image sensor 14 performs image acquisition according to the received exposure parameters.
[0073] Figure 3 FIG. 1 is a flow chart showing how a second exposure sequence set is generated according to a reference image in an embodiment of the present disclosure. Figure 3 As shown, in the embodiment of the present disclosure, generating a second exposure sequence set according to a reference image includes the following steps S31 to S35.
[0074] In step S31, photometry parameters are generated according to a reference image.
[0075] In some implementations, generating photometric parameters according to the reference image includes: generating photometric parameters for characterizing a brightness condition of the reference image.
[0076] In step S32, a comparison parameter and a first exposure parameter are generated according to the light metering parameter.
[0077] In some implementations, generating the comparison parameter according to the photometric parameter includes: generating the comparison parameter for characterizing the deviation between the image brightness of the reference image and the target brightness. The target brightness can be set according to actual needs or experience.
[0078] In some implementations, the comparison parameter and the first exposure parameter may be generated by calculating the light metering parameter and the first preset value.
[0079] In step S33, a first exposure coefficient is obtained according to the comparison parameter. The first exposure coefficient can be used to determine the number of exposure parameters in the second exposure sequence set.
[0080] In step S34, second exposure parameters are obtained from the first exposure sequence set.
[0081] In step S35, a second exposure sequence set is generated according to the first exposure parameter, the first exposure coefficient and the second exposure parameter. The second exposure sequence set is used to store the exposure parameters, wherein the number of the exposure parameters is K, K=0, 1, 2, . . .
[0082] In some implementations, obtaining the second exposure parameter from the first exposure sequence set includes: if the number of exposure parameters in the first exposure sequence set is not 0, obtaining a specific exposure parameter in the first exposure sequence set as the second exposure parameter, the second exposure parameter representing the exposure parameter to be configured; if the number of exposure parameters in the first exposure sequence set is 0, obtaining the current exposure parameter of the image sensor as the second exposure parameter, the second exposure parameter representing the exposure parameter that has been configured.
[0083] Figure 4 FIG. 4 is a flow chart showing the generation of light metering parameters according to a reference image in an embodiment of the present disclosure. Figure 4 As shown, in the embodiment of the present disclosure, generating light metering parameters according to the reference image includes the following steps S41 and S42.
[0084] S41, obtaining brightness parameters of the reference image. Exemplarily, the brightness parameters may include weighted block brightness mean, weighted histogram brightness mean, bright area mean, and / or dark area mean of the reference image, but the present disclosure is not limited thereto, and any parameter used to characterize the brightness of the reference image may be used as the above brightness parameters.
[0085] S42, performing linear transformation on the brightness parameter of the reference image to obtain the light measurement parameter.
[0086] In some implementations, the comparison parameter r is obtained by the following formula 1:
[0087] r = b × f (cg-pre1) + a, formula 1;
[0088] Where b represents a proportionality coefficient, a represents an offset parameter, cg represents a photometric parameter, pre1 represents a first preset value, and f is a correlation function of the difference between the photometric parameter and the first preset value. When the difference between the photometric parameter cg and the first preset value pre1 is greater, the comparison parameter r is greater, and the deviation between the image brightness of the reference image and the target brightness is greater. When the difference between the photometric parameter cg and the first preset value pre1 is smaller, the comparison parameter r is smaller, and the image brightness of the reference image is closer to the target brightness.
[0089] In some implementations, the proportionality coefficient b can be determined according to the frame rate. At this time, by adjusting the value of the comparison parameter r, it is possible to make the adjustment duration of the exposure parameter perceived by the human eye close regardless of the frame rate condition.
[0090] In some implementations, f(x) = e x + e -x , where x represents cg - pre1.
[0091] In some implementations, f(x) = ABS|cg - pre1| / pre1, where ABS represents the absolute value function.
[0092] In some implementations, generating the first exposure coefficient according to the comparison parameter includes: determining the first exposure coefficient according to the preset interval where the comparison parameter is located, where different preset intervals correspond to different first exposure coefficients. Exemplarily, the preset intervals are shown in Table 1 below.
[0093] Table 1. Example table of the relationship between preset intervals and the first exposure coefficient
[0094] Preset interval First exposure factor r<a1 n1 a1≤r<a2 n2 a2≤r<a3 n3 r≥a3 n4
[0095] In Table 1, the preset intervals are divided into four segments, which are divided by three threshold parameters a1, a2, and a3. The corresponding first exposure coefficient can be determined by querying the preset interval where the comparison parameter r is located. For example, if the comparison parameter r is less than a1, the first exposure coefficient is n1. Another example is that if r ≥ a2 and r < a3, the first exposure coefficient is n3.
[0096] In some implementations, if the number of exposure parameters in the first exposure sequence set is not 0, a specific exposure parameter in the first exposure sequence set is obtained as the second exposure parameter, and the second exposure parameter represents the exposure parameter to be issued. For example, the first exposure parameter in the first exposure sequence set can be obtained as the second exposure parameter. If the number of exposure parameters in the first exposure sequence set is 0, the current exposure parameter of the image sensor 14 is obtained as the second exposure parameter, and the second exposure parameter represents the exposure parameter that has been issued. When the exposure parameters in the first exposure sequence set are arranged in a monotonic order, the second exposure parameter obtained in the above manner can ensure that the exposure parameters in the second exposure sequence set show monotonic changes with the current exposure parameters to be effective or effective, thereby preventing flickering.
[0097] In some implementations, obtaining the first exposure coefficient according to the comparison parameter includes: generating a first exposure coefficient for representing the step of the exposure parameters in the second exposure sequence set, the first exposure coefficient being positively correlated with the comparison parameter r. Specifically, the smaller the comparison parameter r is, the closer the image brightness of the reference image is to the target brightness. At this time, the smaller the value of the first exposure coefficient is, the more the number of exposure parameters in the second exposure sequence set is, the smaller the value change between adjacent exposure parameters is, and the corresponding image brightness changes more slowly, thereby preventing the overshoot flicker problem. The larger the comparison parameter r is, the greater the deviation between the image brightness of the reference image and the target brightness is. At this time, the larger the value of the first exposure coefficient is, the fewer the number of exposure parameters in the second exposure sequence set is, the greater the value change between adjacent exposure parameters is, and the corresponding image brightness changes faster, thereby preventing the problem of slow exposure response or long-term overexposure or underexposure.
[0098] Exemplarily, generating the second exposure sequence set according to the first exposure parameter, the first exposure coefficient, and the second exposure parameter includes:
[0099] The number K of exposure parameters in the second exposure sequence set is obtained by the following formula 2:
[0100] K=floor(ABS|first exposure parameter−second exposure parameter|) / first exposure coefficient, Formula 2.
[0101] Where floor is the floor function and ABS is the absolute value function.
[0102] The exposure parameters in the second exposure sequence set are obtained by the following formula 3:
[0103]
[0104] where exp k represents the kth exposure parameter in the second exposure sequence set, k=0, 1, ..., K-1.
[0105] In some other implementations, obtaining the first exposure coefficient according to the comparison parameter includes: generating a first exposure coefficient for representing the number of exposure parameters in the second exposure sequence set, the first exposure coefficient being negatively correlated with the comparison parameter r. Specifically, the smaller the comparison parameter r is, the closer the image brightness of the reference image is to the target brightness. At this time, the larger the value of the first exposure coefficient is, the smaller the change between adjacent exposure parameters in the second exposure sequence set is, and the corresponding image brightness changes more slowly, thereby preventing the overshoot flicker problem. The larger the comparison parameter r is, the greater the deviation between the image brightness of the reference image and the target brightness is. At this time, the smaller the value of the first exposure coefficient is, the greater the change between the values of adjacent exposure parameters in the second exposure sequence set is, and the corresponding image brightness changes faster, thereby preventing the problem of slow exposure response or long-term overexposure or underexposure.
[0106] Exemplarily, generating the second exposure sequence set according to the first exposure parameter, the first exposure coefficient, and the second exposure parameter includes:
[0107] The exposure parameters in the second exposure sequence set are obtained by the following formula 4 or formula 5:
[0108]
[0109] where exp k represents the kth exposure parameter in the second exposure sequence set, k=0, 1, ..., K-1.
[0110] It should be noted that the above only exemplarily illustrates two methods of calculating the exposure parameters in the second exposure sequence set, but the present disclosure is not limited thereto.
[0111] In summary, the embodiments of the present disclosure provide an exposure configuration method. In the exposure configuration method, an exposure setting method, an exposure parameter calculation method, and an exposure sequence set update method of an exposure sequence set are established, so that the exposure parameter values in the exposure sequence set change monotonically or stably according to a certain rule according to the scene or image brightness, and flickering phenomena such as abnormal brightness are prevented during the exposure adjustment process, thereby improving the stability and smoothness of the exposure. For the generation of each exposure parameter in the exposure sequence set, by calculating comparison parameters, setting a preset interval, and generating a corresponding first exposure coefficient, exposure sequence sets of different lengths or steps are set for different scenes or image brightness. Through each exposure parameter in the exposure sequence set, the image brightness can be continuously and monotonically adjusted, which is suitable for various and complex scene brightness changes, more suitable for the human eye senses, and improves the smoothness of the brightness, avoiding exposure overshoot, flickering, or overexposure and underexposure.
[0112] The present disclosure also provides another exposure configuration method. For example, the method is applicable to Figure 1 The image acquisition and processing system shown. Figure 5A and Figure 5BThe flowchart and schematic diagram of the exposure configuration method are shown respectively. Figure 5A and 5B As shown, the exposure configuration method includes the following steps S51 to S56.
[0113] In step S51, an image sensor captures an image according to configured exposure parameters.
[0114] In step S52, a first counter of the image signal processor updates a first count value when receiving the image frame header signal.
[0115] In step S53, when the first count value is updated and the first exposure sequence set contains exposure parameters, the image signal processor selects exposure parameters from the first exposure sequence set and configures the exposure parameters to the image sensor, wherein the first exposure sequence set is stored in an exposure parameter storage module of the image signal processor.
[0116] In step S54, the second counter of the image signal processor updates the second count value when receiving the image frame end signal. Figure 5B The example in which the image sensor sends an image frame end signal is used for illustration, but the present disclosure is not limited thereto.
[0117] In step S55, the exposure sequence set calculation module of the image signal processor obtains a reference image corresponding to the second count value when the second count value is updated, and generates a second exposure sequence set according to the reference image.
[0118] In step S56, the image signal processor updates the first exposure sequence set using the second exposure sequence set when the second exposure sequence set includes the exposure parameters.
[0119] It should be noted that the above steps S52 to S56 are Figure 2 The steps S21 to S25 are similar and will not be described in detail here.
[0120] The protection scope of the exposure configuration method provided by the present disclosure is not limited to the execution order of the steps listed in the embodiments of the present disclosure. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present disclosure are included in the protection scope of the present disclosure.
[0121] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices or methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules or units, which can be electrical, mechanical or other forms.
[0122] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure. For example, the functional modules / units in the various embodiments of the present disclosure may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0123] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.
[0124] The present disclosure also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any exposure configuration method provided according to the present disclosure is implemented. A person skilled in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by instructing the processor through a program. The program can be stored in a computer-readable storage medium. The storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state disk (SSD)).
[0125] The embodiments of the present disclosure may also provide an electronic device. Figure 6 Schematic diagram showing the structure of the electronic device 6 according to an embodiment of the present disclosure. Figure 6 As shown, in this embodiment, the electronic device 6 includes a memory 61 and a processor 62 .
[0126] The memory 61 is configured to store executable programs. In some implementations, the memory 61 may include: ROM, RAM, disk, USB flash drive, memory card, or optical disk, etc., various media that can store program codes.
[0127] Exemplarily, the memory 61 may include a computer system readable medium in the form of a volatile memory, such as a RAM and / or a cache memory. The electronic device 6 may further include other removable / non-removable, volatile / non-volatile computer system storage media. The memory 61 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the various embodiments of the present disclosure.
[0128] The processor 62 is connected to the memory 61 and is configured to call the executable program to enable the electronic device 6 to execute any exposure configuration method provided according to the embodiments of the present disclosure.
[0129] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0130] The above embodiments are merely illustrative of the principles and effects of the present disclosure, and are not intended to limit the present disclosure. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present disclosure. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present disclosure shall still be covered by the claims of the present disclosure.
Claims
1. An exposure configuration method, characterized in that: include: Update the first count value according to the image frame header signal; When the first count value is updated and the first exposure sequence set includes exposure parameters, selecting exposure parameters from the first exposure sequence set and configuring the exposure parameters to the image sensor; Update the second count value according to the image frame end signal; acquiring a reference image corresponding to the second count value when the second count value is updated, and generating a second exposure sequence set according to the reference image; as well as When the second exposure sequence set includes exposure parameters, the first exposure sequence set is updated by using the second exposure sequence set.
2. The exposure configuration method according to claim 1, characterized in that: Updating the first count value according to the image frame header signal includes: When the image sensor outputs the first pixel of an image frame or a frame start short packet, a first counter of an image signal processor receives the image frame header signal from the image sensor to update the first count value.
3. The exposure configuration method according to claim 1, characterized in that: Updating the second count value according to the image frame end signal includes: After the image sensor completes pixel output of the image frame, the second counter of the image signal processor receives the image frame end signal from the image sensor to update the second count value.
4. The exposure configuration method according to claim 1, characterized in that: Updating the second count value according to the image frame end signal includes: When the number of pixels received by the image signal processor is less than the number of pixels output by the image sensor, the second counter of the image signal processor updates the second count value according to the image frame end signal sent by the image signal processor.
5. The exposure configuration method according to claim 1, characterized in that: Also includes: When the first count value is updated and the first exposure sequence set does not include exposure parameters, the exposure parameters of the image sensor remain unchanged.
6. The exposure configuration method according to claim 1, characterized in that: Also includes: The exposure parameters in the first exposure sequence set are arranged in a monotonic order.
7. The exposure configuration method according to claim 6, characterized in that: Arranging the exposure parameters in the first exposure sequence set in a monotonic order comprises: When the image is dark, arranging the exposure parameters in the first exposure sequence set in a monotonically increasing order; and When the image is bright, the exposure parameters in the first exposure sequence set are arranged in a monotonically decreasing order.
8. The exposure configuration method according to claim 7, characterized in that: Selecting exposure parameters from the first exposure sequence set and configuring the exposure parameters to the image sensor comprises: The exposure parameter with the highest ranking is selected from the first exposure sequence set and configured to the image sensor.
9. The exposure configuration method according to claim 1, characterized in that: Generating a second exposure sequence set according to the reference image comprises: generating photometry parameters according to the reference image; generating a comparison parameter and a first exposure parameter according to the light metering parameter; Acquire a first exposure coefficient according to the comparison parameter; Acquire second exposure parameters from the first exposure sequence set; and The second exposure sequence set is generated according to the first exposure parameter, the first exposure coefficient and the second exposure parameter.
10. The exposure configuration method according to claim 9, characterized in that: Acquiring the second exposure parameter from the first exposure sequence set includes: If the number of exposure parameters in the first exposure sequence set is not 0, obtaining a specific exposure parameter in the first exposure sequence set as the second exposure parameter, where the second exposure parameter represents an exposure parameter to be configured and sent down; and If the number of exposure parameters in the first exposure sequence set is 0, the current exposure parameter of the image sensor is obtained as the second exposure parameter, and the second exposure parameter represents the exposure parameter that has been issued and configured.
11. The exposure configuration method according to claim 9, characterized in that: Generating photometry parameters according to the reference image includes: The photometric parameters for characterizing the brightness condition of the reference image are generated.
12. The exposure configuration method according to claim 9, characterized in that: Generating photometry parameters according to the reference image includes: Acquiring brightness parameters of the reference image, the brightness parameters including a weighted block brightness mean, a weighted histogram brightness mean, a bright area mean, and / or a dark area mean of the reference image; and The brightness parameter of the reference image is linearly transformed to obtain the photometric parameter.
13. The exposure configuration method according to claim 9, characterized in that: Generating comparison parameters according to the light measurement parameters includes: The comparison parameter for characterizing a deviation between the image brightness of the reference image and the target brightness is generated.
14. The exposure configuration method according to claim 13, characterized in that: The comparison parameter r is obtained by the following formula: r=b×f(cg-pre1)+a Wherein b represents a proportional coefficient, a represents an offset parameter, cg represents a photometric parameter, pre1 represents a first preset value, f is a correlation function of the difference between the photometric parameter and the first preset value, and the proportional coefficient is determined according to the frame rate.
15. The exposure configuration method according to claim 9, characterized in that: Acquiring a first exposure coefficient according to the comparison parameter includes: The first exposure coefficient is determined according to a preset interval in which the comparison parameter is located, wherein different preset intervals correspond to different first exposure coefficients.
16. The exposure configuration method according to claim 9, characterized in that: Acquiring a first exposure coefficient according to the comparison parameter includes: The first exposure coefficient is generated to characterize a step of an exposure parameter in the second exposure sequence set, the first exposure coefficient being positively correlated with the comparison parameter.
17. The exposure configuration method according to claim 16, characterized in that: Generating the second exposure sequence set according to the first exposure parameter, the first exposure coefficient and the second exposure parameter comprises: The number K of exposure parameters in the second exposure sequence set is obtained by the following formula: K = floor (ABS | first exposure parameter - second exposure parameter |) / first exposure coefficient The exposure parameters in the second exposure sequence set are obtained by the following formula: where exp k represents the kth exposure parameter in the second exposure sequence set, k=0, 1, ..., K-1.
18. The exposure configuration method according to claim 9, characterized in that: Acquiring a first exposure coefficient according to the comparison parameter includes: The first exposure coefficient is generated to characterize the quantity of exposure parameters in the second exposure sequence set, and the first exposure coefficient is negatively correlated with the comparison parameter.
19. The exposure configuration method according to claim 18, characterized in that: Generating the second exposure sequence set according to the first exposure parameter, the first exposure coefficient and the second exposure parameter comprises: The exposure parameters in the second exposure sequence set are obtained by the following formula: or, where exp k represents the kth exposure parameter in the second exposure sequence set, k=0, 1, ..., K-1.
20. An exposure configuration method, characterized in that: include: The image sensor acquires an image according to the configured exposure parameters; The first counter of the image signal processor updates the first count value when receiving the image frame header signal; When the first count value is updated and the first exposure sequence set includes exposure parameters, the image signal processor selects exposure parameters from the first exposure sequence set and configures the exposure parameters to the image sensor; The second counter of the image signal processor updates the second count value when receiving the image frame end signal; acquiring, by the image signal processor, a reference image corresponding to the second count value when the second count value is updated, and generating a second exposure sequence set according to the reference image; as well as When the second exposure sequence set includes exposure parameters, the image signal processor updates the first exposure sequence set using the second exposure sequence set.
21. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the exposure configuration method according to any one of claims 1 to 19 or the exposure configuration method according to claim 20 is implemented.
22. An electronic device, characterized in that: include: a memory configured to store an executable program; as well as The processor is configured to call the program so that the electronic device executes the exposure configuration method according to any one of claims 1 to 19, or the exposure configuration method according to claim 20.
Citation Information
Patent Citations
Multi-exposure image fusion method for removing ghosting in dynamic scene
CN112785534A
Image shooting exposure method and related device
CN115914849A
Device and method for acquiring image with any exposure duration under dual-processor architecture
CN115942072A
Scene-adaptive rapid automatic exposure control method, equipment and medium
CN118158537A
Image pickup apparatus that periodically changes exposure condition, a method of controlling image pickup apparatus, and storage medium
US20140063330A1
