Exposure adjustment method and device
By finding the preset exposure parameter table based on the current value output by the photosensitive device, and obtaining and updating the exposure parameters, the problem that traditional exposure technology cannot quickly adjust the camera exposure is solved, and the image brightness and ambient light brightness are matched, avoiding overexposure or insufficient exposure.
Patent Information
- Application Number
- CN202211124796.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-15
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2042-09-15
AI Technical Summary
Traditional exposure technology cannot quickly adjust the exposure brightness of the camera in a short period of time, resulting in the brightness of the captured image inconsistent with the brightness of the ambient light, and it is easy to overexpose or insufficient exposure.
By looking up the preset exposure parameter table based on the current value output by the photosensitive device under the current brightness condition, obtaining the exposure parameters corresponding to the current value, and updating the exposure parameter table according to the current brightness of the image, the camera can quickly obtain appropriate exposure parameters.
The image brightness captured by the camera is matched with the ambient light brightness, avoiding the occurrence of overexposure or insufficient exposure, and meeting the monitoring requirements.
Smart Images

Figure CN115550557B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of camera image technology, and in particular to an exposure adjustment method and device. Background Art
[0002] Cameras are now more and more widely used. According to different application scenarios, a large number of products with different structural forms and technical solutions have been derived. Some monitoring scenarios need to detect human intrusion, but there is no power supply to connect, and the camera is expected to work for a long time. Human body sensing cameras came into being. Human body sensing cameras are powered by batteries and are usually in a power-off state. Only when human intrusion is detected will the camera be powered on again and quickly capture images in a short time. However, traditional exposure technology cannot quickly adjust the exposure brightness of the camera in a short time, and thus cannot make the brightness of the image captured by the camera match the brightness of the ambient light, which easily leads to overexposure or underexposure of the captured image.
[0003] At the same time, when the brightness of the camera installation location is inconsistent with the actual brightness of the environment, the camera's initial exposure may be too bright or too dark, causing the first frame of the image captured when the camera is powered on to be too bright or too dark, which cannot meet the monitoring requirements. Summary of the invention
[0004] The embodiments of the present application provide an exposure adjustment method and device for updating the exposure parameter table according to the ambient brightness, so that the camera can quickly obtain appropriate exposure parameters, thereby making the brightness of the image captured by the camera consistent with the ambient light brightness, meeting the monitoring requirements, and avoiding overexposure or underexposure.
[0005] An exposure adjustment method provided in an embodiment of the present application includes:
[0006] According to the current value output by the photosensitive device under the current ambient light brightness condition, the exposure parameter corresponding to the current value is obtained by searching a preset exposure parameter table;
[0007] Acquire an image according to the exposure parameters and determine the current image brightness;
[0008] If the current image brightness is not within the preset target brightness range, the exposure parameter corresponding to the current value in the exposure parameter table is updated.
[0009] Through this method, according to the current value output by the photosensitive device under the current ambient light brightness condition, the exposure parameters corresponding to the current value are obtained by searching the preset exposure parameter table; the image is captured according to the exposure parameters, and the current image brightness is determined; if the current image brightness is not within the preset target brightness range, the exposure parameters corresponding to the current value in the exposure parameter table are updated, so that the exposure parameter table can be updated according to the ambient light brightness condition, so that the brightness of the image captured by the camera is consistent with the ambient light brightness, meeting the monitoring requirements, and avoiding overexposure or underexposure.
[0010] In some embodiments, if the current image brightness is not within a preset target brightness range, updating the exposure parameter corresponding to the current value in the exposure parameter table includes:
[0011] If the current image brightness is higher than the maximum value of the preset target brightness range, the exposure parameter corresponding to the current value in the exposure parameter table is adjusted lower;
[0012] If the current image brightness is lower than the minimum value of the preset target brightness range, the exposure parameter corresponding to the current value in the exposure parameter table is adjusted higher.
[0013] Through this method, the exposure parameter can be adjusted up or down according to the current image brightness, so that the brightness of the image captured by the camera meets the monitoring requirements.
[0014] In some embodiments, if the current image brightness is not within a preset target brightness range, updating the exposure parameter corresponding to the current value in the exposure parameter table includes:
[0015] Determining an adjustment step size according to the current image brightness;
[0016] The exposure parameter corresponding to the current value in the exposure parameter table is updated according to the adjustment step size.
[0017] Through this method, it is possible to determine the adjustment step length according to the current image brightness, and then update the preset exposure parameter table according to the adjustment step length.
[0018] In some embodiments, the exposure parameters include a shutter value and a gain value of a camera.
[0019] In some embodiments, determining the adjustment step size according to the current image brightness includes:
[0020] According to the brightness difference value, a proportional coefficient corresponding to the brightness difference value is obtained by searching a preset proportional coefficient table corresponding to the brightness difference value; wherein, if the brightness of the current image is higher than the maximum value of the preset target brightness range, the brightness difference value is the value obtained by subtracting the maximum value of the preset target brightness range from the brightness of the current image; if the brightness of the current image is lower than the minimum value of the preset target brightness range, the brightness difference value is the value obtained by subtracting the brightness of the current image from the minimum value of the preset target brightness range;
[0021] Determine an initial value of the step length using the current image brightness, an exposure parameter corresponding to the current value, and a proportional coefficient of one;
[0022] Obtaining a second proportional coefficient corresponding to the current value by searching a preset proportional coefficient table corresponding to the current value;
[0023] Comparing the frame number of the image with a preset threshold value to determine a proportional coefficient three corresponding to the frame number;
[0024] The adjustment step length is determined by using the proportional coefficient 2, the proportional coefficient 3 and the initial value of the step length.
[0025] Through this method, the initial value of the step length is determined according to the current image brightness, and then the adjustment step length is determined according to the initial value of the step length, which is convenient for subsequent exposure parameter adjustment.
[0026] In some embodiments, comparing the frame number of the image with a preset threshold to determine a third proportionality factor corresponding to the frame number includes:
[0027] If the frame number of the image is less than or equal to a preset threshold, searching a preset proportional coefficient table corresponding to the frame number according to the frame number to obtain a proportional coefficient three corresponding to the frame number;
[0028] If the frame number of the image is greater than the preset threshold, the proportional coefficient three takes a value of 1.
[0029] Through this method, the value of proportional coefficient three is determined according to the frame number of the captured image.
[0030] In some embodiments, updating the exposure parameter corresponding to the current value in the exposure parameter table according to the adjustment step size includes:
[0031] According to the adjustment step and the exposure parameter corresponding to the current value, the adjusted exposure parameter is determined, and the difference between the exposure parameter corresponding to the current value and the adjusted exposure parameter is determined; when the difference is greater than a preset value, the exposure parameter corresponding to the current value in the exposure parameter table is updated using the adjusted exposure parameter.
[0032] Through this method, a difference is calculated using the adjusted exposure parameter and the exposure parameter before adjustment, and the difference is used to determine whether to update the exposure parameter table.
[0033] Another embodiment of the present application provides an exposure adjustment device, which includes a memory and a processor, wherein the memory is used to store program instructions, and the processor is used to call the program instructions stored in the memory and execute any of the above methods according to the obtained program.
[0034] Furthermore, according to an embodiment, for example, a computer program product for a computer is provided, which includes software code portions, and when the product is run on the computer, these software code portions are used to perform the steps of the method defined above. The computer program product may include a computer-readable medium having the software code portions stored thereon. Furthermore, the computer program product may be directly loaded into the internal memory of the computer and / or sent via a network through at least one of an upload process, a download process, and a push process.
[0035] Another embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute any of the above methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 A schematic diagram of the structure of a camera exposure adjustment device provided in an embodiment of the present application;
[0038] Figure 2 A schematic diagram of a specific process of adjusting exposure parameters by a brightness adjustment module provided in an embodiment of the present application;
[0039] Figure 3 A schematic diagram of a specific process of updating an exposure parameter table by an adaptive feedback module provided in an embodiment of the present application;
[0040] Figure 4 A schematic diagram of a specific process of an exposure adjustment method provided in an embodiment of the present application;
[0041] Figure 5 A schematic diagram of the overall process of an exposure adjustment method provided in an embodiment of the present application;
[0042] Figure 6 A schematic structural diagram of an exposure adjustment device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] The embodiments of the present application provide an exposure adjustment method and device for updating the exposure parameter table according to the ambient brightness, so that the camera can quickly obtain appropriate exposure parameters, thereby making the brightness of the image captured by the camera consistent with the ambient light brightness, meeting the monitoring requirements, and avoiding overexposure or underexposure.
[0045] Among them, the method and the device are based on the same application concept. Since the method and the device solve the problem in a similar principle, the implementation of the device and the method can refer to each other, and the repeated parts will not be repeated.
[0046] The terms "first", "second", etc. (if any) in the specification and claims of the embodiments of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than the content illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0047] The following examples and embodiments are to be understood as illustrative examples only. Although this specification may refer to "one", "an" or "some" examples or embodiments in several places, this does not mean that each such reference relates to the same example or embodiment, nor does it mean that the feature applies only to a single example or embodiment. Individual features of different embodiments may also be combined to provide other embodiments. In addition, terms such as "including" and "comprising" should be understood as not limiting the described embodiments to only those features that have been mentioned; such examples and embodiments may also include features, structures, units, modules, etc. that are not specifically mentioned.
[0048] The following is a detailed description of each embodiment of the present application in conjunction with the accompanying drawings. It should be noted that the display order of the embodiments of the present application only represents the order of the embodiments, and does not represent the advantages and disadvantages of the technical solutions provided by the embodiments.
[0049] It should be noted that, in the technical solution provided in the embodiment of the present application, the example of quickly adjusting the exposure brightness of a human body sensing camera under different monitoring environment brightness is used for explanation, but it is not limited to this.
[0050] The following is an explanation of some of the nouns that appear in the text:
[0051] 1. The term "photosensitive device" in the embodiments of the present application refers to a photoresistor, which is a component of the camera's photosensitive imaging, and can convert light into electric charge, which is converted into a digital signal through an analog-to-digital converter chip. In other words, the photosensitive device can convert the light it senses, i.e., the ambient brightness, into a current value output. For different ambient brightnesses, the photosensitive device outputs different current values, i.e., the photosensitive device can determine the current brightness of the environment. The specific implementation can adopt the existing method, which will not be repeated in the embodiments of the present application.
[0052] 2. The term "exposure parameter" in the embodiment of the present application refers to the parameter used by the camera when capturing an image. The exposure parameter in the embodiment of the present application includes the shutter value and gain value of the camera.
[0053] The shutter value of the camera (abbreviated as shutter value) is the value of the camera shutter, that is, the duration of the camera exposure, a parameter of the camera; the shutter is a device in front of the camera lens that blocks the light from entering, that is, the shutter controls the length of the exposure time. The larger the shutter value, the shorter the exposure time.
[0054] The gain value of the camera can adjust the brightness of the image captured by the camera. The larger the gain value, the brighter the image captured by the camera.
[0055] 3. In the embodiments of the present application, the term "shutter step" is the unit for adjusting the shutter value; and the term "gain step" is the unit for adjusting the gain value.
[0056] 4. In the embodiments of the present application, the term "current image brightness" may be, for example, the average brightness value of the current image captured by the camera in real time.
[0057] 5. In the embodiments of the present application, the term "stable exposure" means that when the brightness of the image captured by the camera is within a preset target brightness range, the camera exposure is considered to be stable.
[0058] 6. In the embodiments of the present application, the term "sensor" refers to an image collector, which is a component used by a camera to collect images. By setting different shutter values and gain values for the sensor, the image collected by the sensor can obtain different brightness values.
[0059] 7. In the embodiments of the present application, the term "AE" refers to automatic exposure, that is, automatic adjustment of image brightness. The automatic exposure module can be divided into an exposure initialization module, a brightness adjustment module and an adaptive feedback module. Its main function is to automatically adjust the shutter value and gain value according to the ambient brightness through an algorithm to adjust the brightness of the image taken by the camera, so that the brightness of the image is within the preset target brightness range to obtain an ideal imaging effect.
[0060] See also Figure 1 An exposure adjustment device (ie, the automatic exposure module mentioned above) provided in an embodiment of the present application includes an exposure initialization module, a brightness adjustment module and an adaptive feedback module.
[0061] After the camera is started, the photosensitive device converts the ambient light it senses into an output current value and sends it to the exposure initialization module. The exposure initialization module searches the preset initialization exposure parameter table based on the current value, obtains the shutter value and gain value corresponding to the current value, and uses the shutter value and gain value to initialize the exposure parameter configuration of the camera sensor (the specific process is explained in examples later), and the sensor uses the initialized exposure parameters to capture images.
[0062] The fields of the initialization exposure parameter table include current value, shutter value and gain value, and each current value corresponds to a shutter value and a gain value, such as Table 1:
[0063] Current value (mA) Shutter value (milliseconds) Gain value (db) a A A1 b B B1 c C C1 d D D1
[0064] Table 1
[0065] For example, if the current value is a, the shutter value corresponding to the current value is A, and the gain value is A1;
[0066] For example, if the current value output by the photosensitive device is not in the preset initialization exposure parameter table, that is, it is impossible to directly look up the table to obtain the corresponding shutter value and gain value based on the current value. For example, if the current value is x and x is not in Table 1, the linear interpolation method in the existing method can be used to calculate the corresponding shutter value and gain value using Table 1, which will not be repeated here.
[0067] Alternatively, the corresponding relationship between the current value range and the shutter value and the gain value may be set in Table 1 to determine the current value range corresponding to the current current value, thereby determining the shutter value and the gain value corresponding to the current current value.
[0068] The brightness adjustment module determines the brightness value of the current image, and compares the current image brightness with the preset target brightness range to determine whether the current image brightness is within the preset target brightness range. If the current image brightness is within the preset target brightness range, there is no need to adjust the exposure parameters of the camera; if the current image brightness is not within the preset target brightness range, the exposure parameter value of the camera is adjusted so that the brightness of the image captured by the camera using the adjusted exposure parameter value is within the preset target brightness range, so that the camera exposure is stable.
[0069] Among them, the preset target brightness range can be a preset fixed range or a range determined according to the preset target brightness value. For example, if the preset target brightness value is 100, the preset target brightness range can be (100-10) to (100+10), that is, 90 to 110.
[0070] The adaptive feedback module, when the exposure parameter value of the camera is adjusted as described above so that the brightness of the current image captured by the camera using the adjusted exposure parameter value is within the preset target brightness range, obtains the current shutter value and the current gain value, then:
[0071] The shutter difference is obtained by calculating the absolute value of the difference between the current shutter value and the initial value of the shutter value (i.e. the shutter value configured by the exposure initialization module);
[0072] The absolute value of the difference between the current gain value and the initial value of the gain value (i.e., the gain value configured by the exposure initialization module) is calculated to obtain a gain difference;
[0073] The shutter difference is compared with a first preset value, and the gain difference is compared with a second preset value. When the shutter difference is greater than the first preset value and the gain difference is greater than the second preset value, the initial value of the shutter value corresponding to the current current value output by the photosensitive device in the initialization exposure parameter table is replaced by the current shutter value, and the initial value of the gain value corresponding to the current current value output by the photosensitive device in the initialization exposure parameter table is replaced by the current gain value, thereby updating the initialization exposure parameter table. This ensures that the camera uses appropriate exposure parameters for shooting when it is triggered to power on, and the first frame of the captured image can obtain appropriate brightness.
[0074] The process of setting the initialization exposure parameter table includes:
[0075] Place the camera in an environment with adjustable brightness, and traverse the ambient brightness from bright to dark. Initialize the exposure module to configure different exposure parameters for the camera according to the ambient brightness. Record the current value output by the photosensitive device under different ambient brightness (the brighter the environment, the larger the current value) and the brightness of the image collected by the sensor in real time. Compare whether the image brightness is within the preset target brightness range. If the image brightness is within the preset target brightness range, it is considered that the camera exposure parameter configuration is appropriate. Record the current value, shutter value and gain value of the camera at this time, and add them to the preset initialization exposure parameter table, such as Table 2:
[0076] Current value / mA Shutter value / millisecond Gain value / db a m1 n1 b m2 n2 c m3 n3 d m4 n4 e m5 n5 f m6 n6 g m7 n7
[0077] Table 2
[0078] Table 2 shows an initialization exposure parameter table of a sensor, where the letters in the table represent values. By configuring different exposure parameters for the sensor, the sensor can obtain different initialization exposure brightness. It should be noted that the values in the initialization exposure parameter table are different for different sensors, that is, the shutter value and gain value in Table 2 represent the initialization exposure parameters configured for a sensor.
[0079] Each time the camera is triggered to power on, the exposure initialization module will look up the above-mentioned initialization exposure parameter table according to the current value output by the photosensitive device, obtain the shutter value and gain value corresponding to the current value and set them in the sensor, configure the exposure parameters for the sensor, and enable the sensor to obtain the appropriate initialization exposure brightness, so that the first frame image captured by the camera can obtain the appropriate brightness.
[0080] By configuring the sensor exposure parameters according to the above initialization exposure parameter table, the brightness of the first frame image captured by the camera in most environments is relatively appropriate. However, in actual applications, the brightness of the camera installation location may be inconsistent with the actual brightness of the environment. For example, the camera is installed in the corner of the room. Due to the lack of light, the light sensed by the camera's photosensitive device is weak, so the output current value is relatively small, causing the camera to think that the ambient brightness at this time is very dark. However, other scenes in the actual room are relatively bright, resulting in the exposure initialization module configuring the exposure parameters according to the current value output by the photosensitive device and referring to the initialization exposure parameter table. The exposure brightness obtained by the sensor is inappropriate, resulting in overexposure, which in turn causes the first frame image captured by the camera to appear too bright. Similarly, it may also cause the first frame image captured by the camera to appear too dark.
[0081] To solve the above problems, an embodiment of the present application provides a method for adjusting camera exposure parameters, which can adjust the camera exposure parameters in real time according to the ambient brightness, so that the current image brightness of the camera monitoring screen is within the preset target brightness range to meet the monitoring requirements.
[0082] See also Figure 2 The specific process of adjusting the camera exposure parameters includes:
[0083] Step S201, when the camera is triggered to power on, the preset initialization exposure parameter table is searched according to the current value output by the photosensitive device, the shutter value and gain value corresponding to the current value are obtained to configure the exposure parameters, and the configured exposure parameters are used to capture the image to determine the current image brightness of the captured image.
[0084] Step S202, comparing whether the brightness of the current image is within the preset target brightness range, if the brightness of the current image is not within the preset target brightness range, proceeding to step S203; if the brightness of the current image is within the preset target brightness range, there is no need to adjust the exposure parameters of the camera;
[0085] If the current image brightness is higher than the maximum value of the preset target brightness range, that is to say, the exposure parameter value of the camera is too large (i.e., the exposure brightness is too bright), the exposure parameter value of the camera needs to be lowered;
[0086] Similarly, if the current image brightness is lower than the minimum value of the preset target brightness range, that is, the exposure parameter value of the camera is too small (ie, the exposure brightness is too dark), the exposure parameter value of the camera needs to be increased.
[0087] Step S203, according to the current shutter value of the camera (i.e. the shutter value configured by the exposure initialization module), calculate the initial value of the shutter step length according to the following formula 1;
[0088]
[0089] Among them, Shut_StepInit represents the initial value of the shutter step; ShutCurrent represents the current shutter value; ev_diff represents the difference between the current image brightness and the preset target brightness range. If the current image brightness is greater than the maximum value of the preset target brightness range, the difference is the value obtained by subtracting the maximum value of the preset target brightness range from the current image brightness; if the current image brightness is less than the minimum value of the preset target brightness range, the difference is the value obtained by subtracting the current image brightness from the minimum value of the preset target brightness range; evCurrent represents the current image brightness; shut_evDiffRation represents the preset shutter proportional coefficient corresponding to the brightness difference (ie, ev_diff), such as Table 3, multiple shut_evDiffRation can be pre-set, wherein the larger the brightness difference, the larger the proportional coefficient, and vice versa, the smaller the brightness difference, the smaller the proportional coefficient;
[0090] The difference between the current image brightness and the preset target brightness range (the difference is expressed in multiples) Shutter ratio factor a1 A1 a2 A2 a3 A3
[0091] Table 3
[0092] For example, if the difference is not in the preset table (i.e., Table 3), that is, it is impossible to directly look up the table to obtain the corresponding shutter ratio coefficient according to the difference between the current image brightness and the preset target brightness range. For example, if the difference is y, and y is not in Table 3, the linear interpolation method in the existing method can be used to calculate the corresponding shutter ratio coefficient according to Table 3, which will not be repeated here;
[0093] Alternatively, the correspondence between the difference range between the current image brightness and the preset target brightness range and the shutter ratio coefficient can be set in Table 3 to determine the difference range between the current image brightness and the preset target brightness range corresponding to the difference between the current image brightness and the preset target brightness range, thereby determining the shutter ratio coefficient corresponding to the difference between the current image brightness and the preset target brightness range.
[0094] According to the current gain value of the camera, the initial value of the gain step is calculated according to the following formula 2;
[0095]
[0096] Wherein, gain_StepInit represents the initial value of the gain step; evDef represents the preset target brightness value, such as 100; evCur represents the current image brightness; A and B represent preset empirical values, such as A is 4 and B is 2; gain_evDiffRation represents the preset gain proportional coefficient corresponding to the brightness difference (ie, ev_diff), such as Table 4, multiple gain_evDiffRation can be preset, the larger the brightness difference, the larger the proportional coefficient, and vice versa, the smaller the brightness difference, the smaller the proportional coefficient;
[0097] The difference between the current image brightness and the preset target brightness range (the difference is expressed in multiples) Gain proportionality factor m1 M1 m2 M2 m3 M3
[0098] Table 4
[0099] For example, if the difference is not in the preset table (i.e., Table 4), that is, it is impossible to directly look up the table to obtain the corresponding gain proportional coefficient according to the difference between the current image brightness and the preset target brightness range. For example, if the difference is x1, and x1 is not in Table 4, the linear interpolation method in the existing method can be used to calculate the corresponding gain proportional coefficient according to Table 4, which will not be repeated here;
[0100] Alternatively, the correspondence between the difference range between the current image brightness and the preset target brightness range and the gain proportional coefficient can be set in Table 4 to determine the difference range between the current image brightness and the preset target brightness range corresponding to the difference between the current image brightness and the preset target brightness range, thereby determining the gain proportional coefficient corresponding to the difference between the current image brightness and the preset target brightness range.
[0101] in, and The calculation is based on the following formula three:
[0102] gainStep[X,Y]=gainStepTable[X]+(gainStepTable[X+1]-gainStepTable[X])*Y Formula 3
[0103] That is, when calculating When As X, As Y, we can calculate it using the above formula 3. The value of . Same reason.
[0104] Wherein, gainStepTable represents a gain step reference table, and gainStepTable[X] represents searching a preset gain step reference table corresponding to variable X (e.g., Table 5) according to variable X to obtain the gain step corresponding to variable X;
[0105] X Gain step size n1 N1 n2 N2 n3 N3
[0106] Table 5
[0107] For example, if X is not in the preset table (i.e., Table 5), that is, it is impossible to directly look up the table according to X to obtain the corresponding gain step size. For example, if X is x2, and x2 is not in Table 5, the linear interpolation method in the existing method can be used to calculate the corresponding gain step size according to Table 5, which will not be repeated here;
[0108] Alternatively, the correspondence between the X range and the gain step may be set in Table 5 to determine the X range corresponding to X, thereby determining the gain step corresponding to X;
[0109] In summary, substituting X=evDef / A, Y=evDef / B into Formula 3 yields Substituting X=evCur / A, Y=evCur / B into formula 3, we get Then get and Substituting into formula 2, the initial value of the gain step can be calculated;
[0110] It should be noted that the initial values of the shutter step length and the gain step length of the camera may also be calculated in other ways, which are only used as examples here without any limitation.
[0111] Step S204: according to the current value output by the photosensitive device, search for a preset shutter proportional coefficient table and a gain proportional coefficient table corresponding to the current value, obtain the shutter proportional coefficient shutAdcRation and the gain proportional coefficient gainAdcRation corresponding to the current value, and then multiply the initial value of the shutter step calculated in step S203 by the shutter proportional coefficient, i.e., Shut_StepInit*shutAdcRation, and multiply the initial value of the gain step by the gain proportional coefficient, i.e., gain_StepInit*gainAdcRation;
[0112] Under different ambient brightness, the shutter ratio shutAdcRation and gain ratio gainAdcRation used by the camera are different, so that the camera can use the most appropriate shutter step size and gain step size.
[0113] Therefore, a shutter proportional coefficient table corresponding to the current value is preset, such as Table 6, and multiple shutter proportional coefficients can be preset; similarly, a gain proportional coefficient corresponding to the current value is preset, such as Table 7, and multiple gain proportional coefficients can be preset;
[0114] Current value Shutter ratio factor b1 B1 b2 B2 b3 B3
[0115] Table 6
[0116] Current value Gain proportionality factor c1 C1 c2 C2 c3 C3
[0117] Table 7
[0118] For example, if the current value is not in the preset table (i.e., Table 6 and / or Table 7), that is, it is impossible to directly look up the table according to the current value to obtain the corresponding shutter proportional coefficient and gain proportional coefficient. For example, if the current value is z and z is not in Table 6 and / or Table 7, the linear interpolation method in the existing method can be used to calculate the corresponding shutter proportional coefficient and gain proportional coefficient according to Table 6 and / or Table 7, which will not be repeated here;
[0119] Alternatively, the correspondence between the current value range and the shutter proportional coefficient and the gain proportional coefficient may be set in Table 6 and / or Table 7 to determine the current value range corresponding to the current value, thereby determining the shutter proportional coefficient and / or gain proportional coefficient corresponding to the current value.
[0120] Step S205: Shut_StepInit*shutAdcRation calculated in step S204 is multiplied by shutfpsRation using the following formula 4 to obtain the shutter step length (ie, Shut_Step); and gain_StepInit*gainAdcRation is multiplied by gainfpsRation using the following formula 5 to obtain the gain step length (ie, gain_Step):
[0121] Shut_Step=Shut_StepInit*shutAdcRation*shutfpsRation Formula 4
[0122] gain_Step=gain_StepInit*gainAdcRation*gainfpsRation Formula 5
[0123] Among them, shutfpsRation represents the shutter ratio coefficient corresponding to the frame number of the current captured image, and gainfpsRation represents the gain ratio coefficient corresponding to the frame number of the current captured image.
[0124] If the shutter step size and gain step size of the camera are too small, when the camera is triggered and powered on, it captures the first frame of the image. If the actual brightness differs too much from the preset target brightness range, the camera will capture the image before it has time to adjust the exposure parameters, resulting in the first frame of the image not meeting the brightness requirements. Therefore, it is necessary to multiply Shut_StepInit*shutAdcRation by shutfpsRation and gain_StepInit*gainAdcRation by gainfpsRation, so that the camera can use the most appropriate shutter step size and gain step size.
[0125] Among them, the frame number of the current captured image reflects the frame number of the image from the time the camera is triggered and powered on to the current captured image. In the embodiment of the present application, a shutter ratio coefficient table corresponding to the frame number of the current captured image is preset, such as Table 8, and multiple shutfpsRation can be preset; similarly, a gain ratio coefficient table corresponding to the frame number of the current captured image is also set, such as Table 9, and multiple gainfpsRation can be preset; shutfpsRation and gainfpsRation are cleared after the camera is powered off;
[0126] The frame number of the current captured image shutfpsRation 1 C1 2 C2 3 C3 4 C4 5 C5 N <![CDATA[C N ]]>
[0127] Table 8
[0128] The frame number of the current captured image gainfpsRation 1 D1 2 D2 3 D3 4 D4 5 D5 N <![CDATA[D N ]]>
[0129] Table 9
[0130] In some embodiments, when taking values for shutfpsRation and gainfpsRation, it is necessary to first determine whether the image captured in step S201 is the first N frames captured when the camera is triggered and powered on. If it is the first N frames, shutfpsRation refers to, for example, Table 8 and gainfpsRation refers to, for example, Table 9 to take values; if it is not the first N frames, shutfpsRation and gainfpsRation both take values of 1; wherein, N takes a value of 5, for example; that is, the frame number of the current captured image is compared with N, and shutfpsRation takes different values when the frame number of the current captured image is greater than N and less than or equal to N. Similarly, gainfpsRation takes different values when the frame number of the current captured image is greater than N and less than or equal to N.
[0131] Among them, when shutfpsRation refers to Table 8 and gainfpsRation refers to Table 9 for value acquisition, if the frame number of the current captured image is not in the preset table (for example, the frame number of the current captured image is m), that is, it is impossible to directly look up the table according to the frame number of the current captured image to obtain the corresponding shutfpsRation and gainfpsRation, the linear interpolation method in the existing method can be used to calculate the corresponding shutfpsRation and gainfpsRation according to Table 8 and / or Table 9, which will not be repeated here;
[0132] Alternatively, the correspondence between the frame number range of the current captured image and shutfpsRation, gainfpsRation may be set in Table 8 and / or Table 9 to determine the frame number range corresponding to the frame number of the current captured image, thereby determining shutfpsRation and / or gainfpsRation corresponding to the frame number of the current captured image.
[0133] Step S206: According to the shutter step and gain step calculated in step S205, adjust the shutter step and gain step of the camera, increase or decrease the exposure parameter value of the camera, and then perform step S202 and subsequent steps until the current image brightness is within the preset target brightness range.
[0134] If the exposure parameter value initialized by the camera is too large (i.e. the exposure brightness is too bright), the shutter step length and gain step length are calculated according to the above shutter step length and gain step length calculation formulas, and the shutter step length and gain step length of the camera are adjusted to lower the exposure parameter value of the camera so that the image brightness quickly approaches the preset target brightness range; similarly, if the exposure parameter value initialized by the camera is too small (i.e. the exposure brightness is too dark), the shutter step length and gain step length are calculated according to the above shutter step length and gain step length calculation formulas, and the shutter step length and gain step length of the camera are adjusted to increase the exposure parameter value of the camera so that the image brightness quickly approaches the preset target brightness range to meet the monitoring requirements.
[0135] After the exposure parameters of the camera are adjusted by the exposure initialization module and the brightness adjustment module, the exposure brightness of the camera can meet the monitoring requirements. However, if the brightness of the camera installation location is inconsistent with the brightness of the actual monitoring screen, that is, the initial exposure of the camera is too bright or too dark, even if the camera exposure parameters can be adjusted to a suitable value through the brightness adjustment module, it is still impossible to avoid the first frame of the image captured each time the camera is triggered and powered on being too bright or underexposed, resulting in the first frame of the image captured not meeting the actual monitoring requirements.
[0136] Therefore, in order to solve the above problem, when the exposure parameter value of the camera is adjusted so that the brightness of the current image captured by the camera using the adjusted exposure parameter value is within the preset target brightness range, the adaptive feedback module obtains the current shutter value and the current gain value;
[0137] The shutter difference is obtained by calculating the absolute value of the difference between the current shutter value and the initial shutter value;
[0138] The gain difference is obtained by calculating the absolute value of the difference between the current gain value and the initial value of the gain value;
[0139] The shutter difference is compared with a first preset value, and the gain difference is compared with a second preset value. When the shutter difference is greater than the first preset value and the gain difference is greater than the second preset value, the initial value of the shutter value corresponding to the current current value output by the photosensitive device in the initialization exposure parameter table is replaced by the current shutter value, and the initial value of the gain value corresponding to the current current value output by the photosensitive device in the initialization exposure parameter table is replaced by the current gain value, thereby updating the initialization exposure parameter table. This ensures that the camera uses appropriate exposure parameters for shooting when it is triggered to power on, and the first frame of the captured image can obtain appropriate brightness.
[0140] See also Figure 3 The specific process of the adaptive feedback module updating the initialization exposure parameter table includes:
[0141] Step S301, the camera is started, and it is determined whether the camera is triggered to power on for the first time after power failure. If so, the preset initialization exposure parameter table is searched when performing step S302; if not, the new initialization exposure parameter table obtained in step S308 is searched when performing step S302;
[0142] Step S302, according to the current value output by the photosensitive device, search the initialization exposure parameter table to obtain the shutter value and gain value corresponding to the current value, that is, the initial value of the camera shutter value shut_Init and the initial value of the gain value gain_Init;
[0143] Step S303: setting the initial values of the shutter value and the gain value to the sensor, and the sensor obtains an initial exposure brightness for image acquisition;
[0144] Step S304: the brightness adjustment module adjusts the sensor exposure parameters according to the ambient brightness until the current image brightness of the image captured by the sensor is within the preset target brightness range, that is, the camera reaches exposure stability;
[0145] Step S305, obtaining the shutter value shut_final and the gain value gain_final when the camera exposure is stable;
[0146] Step S306, calculating the absolute value of the difference between the shutter value when stable and the initial value of the shutter value to obtain the shutter difference (i.e. |shut_final-shut_Init|); calculating the absolute value of the difference between the gain value when stable and the initial value of the gain value to obtain the gain difference (i.e. |gain_final-gain_Init|);
[0147] The shutter difference is compared with a first preset value, and the gain difference is compared with a second preset value. If the shutter difference is greater than the first preset value and the gain difference is greater than the second preset value, then step S307 is performed; if less than, then the process ends;
[0148] Step S307, recording the shutter value and gain value when the camera exposure is stable;
[0149] Step S308, searching the initialization exposure parameter table according to the current value obtained in step S302, and replacing the shutter value and gain value corresponding to the current value in the initialization exposure parameter table (i.e., the initial values of the shutter value and the gain value) with the shutter value and the gain value when the exposure is stable, to obtain a new initialization exposure parameter table.
[0150] After the initialization exposure parameter table is updated, the next time the camera is triggered to power on, the exposure initialization module can use the new initialization exposure parameter table to configure the exposure parameters so that the camera can obtain the appropriate exposure brightness, so that the brightness of the first frame image captured by the camera is within the preset target brightness range, meeting the monitoring requirements.
[0151] See also Figure 4 The specific process of an exposure adjustment method provided in an embodiment of the present application includes:
[0152] Step S101, obtaining the current value output by the camera photosensitive device;
[0153] Step S102, determining whether the camera is powered on for the first time after being powered off, if so, searching for a preset initialization exposure parameter table when performing step S103; if not, searching for a new initialization exposure parameter table obtained in step S113 when performing step S103;
[0154] Step S103, searching the initialization exposure parameter table according to the current value output by the photosensitive device, and obtaining the shutter value and gain value corresponding to the current value, that is, the initial value of the shutter value shut_Init and the initial value of the gain value gain_Init;
[0155] Step S104: setting the initial values of the shutter value and the gain value to the sensor, and the sensor obtains an initial exposure brightness for image acquisition;
[0156] Step S105: determine whether the current image brightness of the image captured in step S104 is within the preset target brightness range. If the current image brightness is not within the preset target brightness range, proceed to step S106; if the current image brightness is within the preset target brightness range, proceed to step S109.
[0157] Step S106, calculating the difference between the current image brightness and the preset target brightness range, and calculating the initial values of the shutter step length and the gain step length using the current image brightness, the difference and other parameters;
[0158] Step S107, according to the current value output by the photosensitive device, multiply the initial value of the shutter step length by the shutter proportional coefficient corresponding to the current value, namely Shut_StepInit*shutAdcRation, and multiply the initial value of the gain step length by the gain proportional coefficient corresponding to the current value, namely gain_StepInit*gainAdcRation;
[0159] Step S108, multiplying Shut_StepInit*shutAdcRation calculated in step S107 by shutfpsRation to obtain the shutter step length, and multiplying gain_StepInit*gainAdcRation by gainfpsRation to obtain the gain step length; wherein, when taking values for shutfpsRation and gainfpsRation, it is necessary to first determine whether the image captured in step S104 is the first N frames captured when the camera is triggered and powered on. If it is the first N frames, shutfpsRation refers to, for example, Table 8, and gainfpsRation refers to, for example, Table 9 to take values; if it is not the first N frames, shutfpsRation and gainfpsRation both take values of 1;
[0160] Step S109, adjusting the shutter step length and gain step length of the camera according to the shutter step length and gain step length calculated in step S108, raising or lowering the exposure parameter value of the camera, and then performing step S105 and subsequent steps until the current image brightness is within the preset target brightness range;
[0161] Step S110, obtaining a shutter value shut_final and a gain value gain_final when the exposure of the camera is stable;
[0162] Step S111, calculating the absolute value of the difference between the shutter value when stable and the initial value of the shutter value to obtain the shutter difference (i.e., |shut_final-shut_Init|); calculating the absolute value of the difference between the gain value when stable and the initial value of the gain value to obtain the gain difference (i.e., |gain_final-gain_Init|);
[0163] The shutter difference is compared with a first preset value, and the gain difference is compared with a second preset value. If the shutter difference is greater than the first preset value and the gain difference is greater than the second preset value, then step S112 is performed; if less than, then the process ends;
[0164] Step S112, recording the shutter value and gain value when the camera exposure is stable;
[0165] Step S113, searching the initialization exposure parameter table according to the current value obtained in step S103, and replacing the shutter value and gain value corresponding to the current value in the initialization exposure parameter table with the shutter value and gain value when the exposure is stable, to obtain a new initialization exposure parameter table.
[0166] In summary, the present invention provides an exposure adjustment method, see Figure 5 ,include:
[0167] Step S11, according to the current value output by the photosensitive device under the current ambient light brightness condition, by searching a preset exposure parameter table, obtaining an exposure parameter corresponding to the current value;
[0168] The exposure parameters include, for example, a shutter value and a gain value; the exposure parameter table, such as Table 1 and Table 2, includes a correspondence between current values, shutter values, and gain values, that is, each current value corresponds to a shutter value and a gain value;
[0169] Step S12, capturing an image according to the exposure parameters, and determining the current image brightness;
[0170] The current image brightness is the average brightness value of the current image captured by the camera using the exposure parameters in step S11;
[0171] Step S13: if the current image brightness is not within the preset target brightness range, updating the exposure parameter corresponding to the current value in the exposure parameter table;
[0172] The preset target brightness range may be a preset fixed range, such as a range of (90, 110); or a range determined according to a preset target brightness value. For example, if the preset target brightness value is 100, the preset target brightness range may be (100-10) to (100+10), i.e., 90 to 110.
[0173] Through step S13, the exposure parameter table is updated according to the current image brightness, so that the camera can quickly obtain appropriate exposure parameters when it is triggered and powered on next time.
[0174] To adjust the exposure parameter according to the current image brightness, in some embodiments, if the current image brightness is not within the preset target brightness range, updating the exposure parameter corresponding to the current value in the exposure parameter table includes:
[0175] If the current image brightness is higher than the maximum value of the preset target brightness range, the exposure parameter corresponding to the current value in the exposure parameter table is adjusted lower;
[0176] If the current image brightness is lower than the minimum value of the preset target brightness range, the exposure parameter corresponding to the current value in the exposure parameter table is adjusted higher.
[0177] In order to update the preset exposure parameter table according to the current image brightness so that the camera obtains appropriate exposure parameters, in some embodiments, if the current image brightness is not within the preset target brightness range, updating the exposure parameter corresponding to the current value in the exposure parameter table includes:
[0178] Determining an adjustment step size according to the current image brightness;
[0179] updating the exposure parameter corresponding to the current value in the exposure parameter table according to the adjustment step size;
[0180] The step length, for example, includes the shutter step length and gain step length mentioned above.
[0181] In some embodiments, the exposure parameters include a shutter value and a gain value of a camera.
[0182] To facilitate subsequent exposure parameter adjustment, in some embodiments, the adjustment step size is determined according to the current image brightness, including:
[0183] According to the brightness difference value, a proportional coefficient corresponding to the brightness difference value is obtained by searching a preset proportional coefficient table corresponding to the brightness difference value; wherein, if the brightness of the current image is higher than the maximum value of the preset target brightness range, the brightness difference value is the value obtained by subtracting the maximum value of the preset target brightness range from the brightness of the current image; if the brightness of the current image is lower than the minimum value of the preset target brightness range, the brightness difference value is the value obtained by subtracting the brightness of the current image from the minimum value of the preset target brightness range;
[0184] Determine an initial value of the step length using the current image brightness, an exposure parameter corresponding to the current value, and a proportional coefficient of one (for example, using the above formulas one, two, and three to determine);
[0185] Obtaining a second proportional coefficient corresponding to the current value by searching a preset proportional coefficient table corresponding to the current value;
[0186] Comparing the frame number of the image with a preset threshold value to determine a proportional coefficient three corresponding to the frame number;
[0187] Using the proportional coefficient 2, the proportional coefficient 3, and the initial value of the step length, the adjustment step length is determined (for example, using the above formulas 4 and 5);
[0188] Among them, the proportional coefficient table corresponding to the brightness difference, for example, includes the above-mentioned shutter proportional coefficient table and gain proportional coefficient table corresponding to the brightness difference; the proportional coefficient one, for example, includes the above-mentioned shutter proportional coefficient and gain proportional coefficient corresponding to the brightness difference; the initial value of the step, for example, includes the above-mentioned initial value of the shutter step and the initial value of the gain step; the proportional coefficient table corresponding to the current value, for example, includes the above-mentioned shutter proportional coefficient table and gain proportional coefficient table corresponding to the current value; the proportional coefficient two, for example, includes the above-mentioned shutter proportional coefficient and gain proportional coefficient corresponding to the current value; the proportional coefficient three, for example, includes the above-mentioned shutter proportional coefficient and gain proportional coefficient corresponding to the frame number of the current captured image; the frame number, that is, the number of frames of the image captured from the time the camera is triggered and powered on.
[0189] In order to determine the value of the proportional coefficient three according to the frame number of the captured image, in some embodiments, the frame number of the image is compared with a preset threshold value to determine the proportional coefficient three corresponding to the frame number, including:
[0190] If the frame number of the image is less than or equal to a preset threshold, searching a preset proportional coefficient table corresponding to the frame number according to the frame number to obtain a proportional coefficient three corresponding to the frame number;
[0191] If the frame number of the image is greater than the preset threshold, the proportional coefficient 3 takes a value of 1;
[0192] The preset threshold is, for example, 5; the proportional coefficient table corresponding to the frame number includes, for example, the shutter proportional coefficient table and the gain proportional coefficient table corresponding to the frame number of the current captured image. That is, when the image captured by the camera is the first N frames, the preset shutter proportional coefficient table and the gain proportional coefficient table corresponding to the frame number of the captured image are searched to obtain the shutter proportional coefficient and the gain proportional coefficient corresponding to the frame number of the captured image; when the image captured by the camera is not the first N frames, the shutter proportional coefficient and the gain proportional coefficient corresponding to the frame number of the captured image are both 1.
[0193] To determine whether to update the exposure parameter table, in some embodiments, updating the exposure parameter corresponding to the current value in the exposure parameter table according to the adjustment step size includes:
[0194] Determine an adjusted exposure parameter according to the adjustment step and the exposure parameter corresponding to the current value, and determine a difference between the exposure parameter corresponding to the current value and the adjusted exposure parameter;
[0195] When the difference is greater than a preset value, updating the exposure parameter corresponding to the current value in the exposure parameter table using the adjusted exposure parameter;
[0196] Among them, the difference, namely the shutter difference and gain difference mentioned above, the shutter difference is the absolute value of the difference between the shutter value when the exposure is stable and the initial value of the shutter value, and the gain difference is the absolute value of the difference between the gain value when the exposure is stable and the initial value of the gain value; two values are preset, namely the first preset value and the second preset value mentioned above, when the shutter difference is greater than the first preset value and the gain difference is greater than the second preset value, the adjusted shutter value replaces the initial value of the shutter value corresponding to the current value in the initialization exposure parameter table, and the adjusted gain value replaces the initial value of the gain value corresponding to the current value in the initialization exposure parameter table.
[0197] The following is an introduction to the equipment or device provided in the embodiments of the present application, in which the explanations or examples of technical features that are the same or corresponding to those described in the above method will not be repeated later.
[0198] See also Figure 6 An exposure adjustment device provided in an embodiment of the present application may be a module in a camera for executing the above method, or may be an independent device outside a camera for executing the above method, and the device includes:
[0199] The processor 600 is used to read the program in the memory 620 and execute the following process:
[0200] According to the current value output by the photosensitive device under the current ambient light brightness condition, the exposure parameter corresponding to the current value is obtained by searching a preset exposure parameter table;
[0201] Acquire an image according to the exposure parameters and determine the current image brightness;
[0202] If the current image brightness is not within the preset target brightness range, the exposure parameter corresponding to the current value in the exposure parameter table is updated.
[0203] In some embodiments, if the current image brightness is not within a preset target brightness range, updating the exposure parameter corresponding to the current value in the exposure parameter table includes:
[0204] If the current image brightness is higher than the maximum value of the preset target brightness range, the exposure parameter corresponding to the current value in the exposure parameter table is adjusted lower;
[0205] If the current image brightness is lower than the minimum value of the preset target brightness range, the exposure parameter corresponding to the current value in the exposure parameter table is adjusted higher.
[0206] In some embodiments, if the current image brightness is not within a preset target brightness range, updating the exposure parameter corresponding to the current value in the exposure parameter table includes:
[0207] Determining an adjustment step size according to the current image brightness;
[0208] The exposure parameter corresponding to the current value in the exposure parameter table is updated according to the adjustment step size.
[0209] In some embodiments, the exposure parameters include a shutter value and a gain value of a camera.
[0210] In some embodiments, determining the adjustment step size according to the current image brightness includes:
[0211] According to the brightness difference value, a proportional coefficient corresponding to the brightness difference value is obtained by searching a preset proportional coefficient table corresponding to the brightness difference value; wherein, if the brightness of the current image is higher than the maximum value of the preset target brightness range, the brightness difference value is the value obtained by subtracting the maximum value of the preset target brightness range from the brightness of the current image; if the brightness of the current image is lower than the minimum value of the preset target brightness range, the brightness difference value is the value obtained by subtracting the brightness of the current image from the minimum value of the preset target brightness range;
[0212] Determine an initial value of the step length using the current image brightness, an exposure parameter corresponding to the current value, and a proportional coefficient of one;
[0213] Obtaining a second proportional coefficient corresponding to the current value by searching a preset proportional coefficient table corresponding to the current value;
[0214] Comparing the frame number of the image with a preset threshold value to determine a proportional coefficient three corresponding to the frame number;
[0215] The adjustment step length is determined by using the proportional coefficient 2, the proportional coefficient 3 and the initial value of the step length.
[0216] In some embodiments, comparing the frame number of the image with a preset threshold to determine a third proportionality factor corresponding to the frame number includes:
[0217] If the frame number of the image is less than or equal to a preset threshold, searching a preset proportional coefficient table corresponding to the frame number according to the frame number to obtain a proportional coefficient three corresponding to the frame number;
[0218] If the frame number of the image is greater than the preset threshold, the proportional coefficient three takes a value of 1.
[0219] In some embodiments, updating the exposure parameter corresponding to the current value in the exposure parameter table according to the adjustment step size includes:
[0220] According to the adjustment step and the exposure parameter corresponding to the current value, the adjusted exposure parameter is determined, and the difference between the exposure parameter corresponding to the current value and the adjusted exposure parameter is determined; when the difference is greater than a preset value, the exposure parameter corresponding to the current value in the exposure parameter table is updated using the adjusted exposure parameter.
[0221] In some embodiments, the exposure adjustment device provided by the embodiments of the present application also includes a transceiver 610 for receiving and sending data under the control of the processor 600.
[0222] Among them, Figure 6 In the embodiment of the present invention, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 600 and memory represented by memory 620. The bus architecture may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are not further described herein. The bus interface provides an interface. The transceiver 610 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices over a transmission medium.
[0223] In some embodiments, the exposure adjustment device provided in the embodiment of the present application also includes a user interface 630, which can be an interface that can be connected to required devices externally or internally. The connected devices include but are not limited to a keypad, display, speaker, microphone, joystick, etc.
[0224] The processor 600 is responsible for managing the bus architecture and general processing, and the memory 620 can store data used by the processor 600 when performing operations.
[0225] In some embodiments, the processor 600 may be a CPU (central processing unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or a CPLD (Complex Programmable Logic Device).
[0226] The embodiment of the present application provides a computing device, which may be a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (PDA), etc. The computing device may include a central processing unit (CPU), a memory, an input / output device, etc. The input device may include a keyboard, a mouse, a touch screen, etc. The output device may include a display device, such as a liquid crystal display (LCD), a cathode ray tube (CRT), etc.
[0227] The memory may include a read-only memory (ROM) and a random access memory (RAM), and provides the processor with program instructions and data stored in the memory. In an embodiment of the present application, the memory may be used to store the program of any of the methods provided in the embodiments of the present application.
[0228] The processor calls the program instructions stored in the memory, and the processor is used to execute any of the methods provided in the embodiments of the present application according to the obtained program instructions.
[0229] The present application embodiment also provides a computer program product or computer program, which includes a computer instruction, which is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction so that the computer device executes any of the methods described in the above embodiments. The program product can use any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0230] The embodiment of the present application provides a computer-readable storage medium for storing computer program instructions used by the apparatus provided in the embodiment of the present application, which includes a program for executing any of the methods provided in the embodiment of the present application. The computer-readable storage medium may be a non-transitory computer-readable medium.
[0231] The computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.
[0232] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0233] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0234] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0235] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0236] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. An exposure adjustment method, characterized in that: The method comprises: According to the current value output by the photosensitive device under the current ambient light brightness condition, the exposure parameter corresponding to the current value is obtained by searching a preset exposure parameter table; Acquire an image according to the exposure parameters and determine the current image brightness; If the current image brightness is not within the preset target brightness range, updating the exposure parameter corresponding to the current value in the exposure parameter table; If the current image brightness is not within the preset target brightness range, updating the exposure parameter corresponding to the current value in the exposure parameter table includes: Determining an adjustment step size according to the current image brightness; updating the exposure parameter corresponding to the current value in the exposure parameter table according to the adjustment step size; The step of determining the adjustment step size according to the current image brightness includes: According to the brightness difference value, a proportional coefficient corresponding to the brightness difference value is obtained by searching a preset proportional coefficient table corresponding to the brightness difference value; wherein, if the brightness of the current image is higher than the maximum value of the preset target brightness range, the brightness difference value is the value obtained by subtracting the maximum value of the preset target brightness range from the brightness of the current image; if the brightness of the current image is lower than the minimum value of the preset target brightness range, the brightness difference value is the value obtained by subtracting the brightness of the current image from the minimum value of the preset target brightness range; Determine an initial value of the step length using the current image brightness, an exposure parameter corresponding to the current value, and a proportional coefficient of one; Obtaining a second proportional coefficient corresponding to the current value by searching a preset proportional coefficient table corresponding to the current value; Comparing the frame number of the image with a preset threshold value to determine a proportional coefficient three corresponding to the frame number; The adjustment step length is determined by using the proportional coefficient 2, the proportional coefficient 3 and the initial value of the step length.
2. The method according to claim 1, characterized in that The exposure parameters include a shutter value and a gain value of the camera.
3. The method according to claim 1, characterized in that Comparing the frame number of the image with a preset threshold, and determining a third proportional coefficient corresponding to the frame number, comprising: If the frame number of the image is less than or equal to a preset threshold, searching a preset proportional coefficient table corresponding to the frame number according to the frame number to obtain a proportional coefficient three corresponding to the frame number; If the frame number of the image is greater than the preset threshold, the proportional coefficient three takes a value of 1.
4. The method according to claim 1, characterized in that: Updating the exposure parameter corresponding to the current value in the exposure parameter table according to the adjustment step size includes: Determine an adjusted exposure parameter according to the adjustment step and the exposure parameter corresponding to the current value, and determine a difference between the exposure parameter corresponding to the current value and the adjusted exposure parameter; When the difference is greater than a preset value, the exposure parameter corresponding to the current value in the exposure parameter table is updated using the adjusted exposure parameter.
5. An exposure adjustment device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program stored in the memory to implement the method according to any one of claims 1 to 4.
6. A computer program product for a computer, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 4 when being executed by a processor.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Automatic exposure control method and system
CN109361866A
Automatic exposure method and device, electronic equipment and storage medium
CN114095667A