Exposure control method, electronic device and computer readable storage medium
By adjusting the exposure range of each category of objects in the image and performing exposure processing based on category priority and ambient brightness, the problem that traditional methods cannot meet the requirements for multi-target detail recognition is solved, and the exposure effect and detail recognition of the image are improved.
Patent Information
- Application Number
- CN202411006721.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-07-25
AI Technical Summary
When dealing with multiple targets and overall brightness balance, the traditional multi-target exposure algorithm cannot fully meet the detail identification requirements of all targets, resulting in overexposure or underexposure in some areas of the image.
By obtaining the average brightness value and environmental brightness adjustment ratio of each category of objects in the collected image, adjust the environmental adjustment ratio range of the preset exposure range according to the category priority of each category of objects, and then perform exposure processing to ensure the exposure requirements of different categories of objects. Get both.
It improves the exposure effect of the image, ensures that the details of different categories of objects can be identified, reduces the flicker of the image, and improves the precision and effect of the exposure processing.
Smart Images

Figure CN118524291B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an exposure control method, an electronic device and a computer-readable storage medium. Background Art
[0002] With the development of camera technology, taking images has gradually become the best choice to record a moment. However, due to problems such as camera parameters and light when taking images, the images taken may be overexposed or underexposed, and the details of the image cannot be recognized. To solve this problem, the exposure value of the image can be adjusted later to improve the brightness of the image and restore the image details.
[0003] The way to adjust the exposure value of an image includes using an exposure algorithm to adjust the exposure value of the image. Images usually contain rich target information, and different targets have different detail recognition requirements. When dealing with the balance between multiple targets and overall brightness, traditional multi-target exposure algorithms usually use a full-image weighted strategy to adjust the overall exposure of the image. This method cannot fully meet the detail recognition requirements of all targets, resulting in overexposure or underexposure problems in some areas of the image. Summary of the invention
[0004] The main technical problem solved by the present application is to provide an exposure control method, an electronic device and a computer-readable storage medium, which can improve the exposure effect of an image.
[0005] In order to solve the above technical problems, a technical solution adopted in the present application is: an exposure control method is provided, and the exposure control method includes: obtaining the average brightness value of each category of objects in the acquired image and the environmental brightness adjustment ratio of the acquired image; determining the environmental adjustment ratio range of the preset exposure range corresponding to each category of objects according to the average brightness value of each category of objects in the acquired image and the preset exposure range of each category of objects; adjusting the environmental adjustment ratio range corresponding to the preset exposure range of each category of objects according to the category priority of each category of objects and the preset environmental ratio adjustment rule to obtain the target environmental adjustment ratio range of the target category object; exposing the acquired image according to the size relationship between the environmental brightness adjustment ratio and the target environmental adjustment ratio range.
[0006] In some embodiments, the step of adjusting the environmental adjustment ratio range corresponding to the preset exposure range of each category of objects according to the category priority of each category of objects and the preset environmental adjustment ratio rule to obtain the target environmental adjustment ratio range of the target category object includes: adjusting the environmental adjustment ratio range of the preset exposure range corresponding to each category of objects according to the preset environmental adjustment ratio rule according to the category priority of each category of objects to obtain the adjusted environmental adjustment ratio range of each category of objects; determining the category object whose category priority is greater than the preset priority as the target category object, and determining the target environmental adjustment ratio range based on the adjusted environmental adjustment ratio range corresponding to the target category object.
[0007] In some embodiments, the environment adjustment ratio range of the preset exposure range corresponding to the category object includes an available environment adjustment ratio range and a preferred environment adjustment ratio range; the step of adjusting the environment adjustment ratio range of the preset exposure range corresponding to the category object according to the category priority of each category object according to the preset environment ratio adjustment rule to obtain the adjusted environment adjustment ratio range of each category object includes: according to the category priority of each category object from high to low, starting from the category object corresponding to the highest category priority, in sequence, according to the available environment adjustment ratio range and / or preferred environment adjustment ratio range of the first category object in the adjacent category priority, performing a first adjustment processing on the available environment adjustment ratio range and / or preferred environment adjustment ratio range of the second category object, to obtain the available environment adjustment ratio range and / or preferred environment adjustment ratio range of each category object after the first adjustment processing, the category priority of the first category object is higher than that of the second category object. According to the category priority of each category object, the preferred environment adjustment ratio range of each category object is within the available environment adjustment ratio range; according to the available environment adjustment ratio range of each category object after the first adjustment processing, a second adjustment processing is performed on the preferred environment adjustment ratio range of the corresponding category object after the first adjustment processing, so as to obtain the preferred environment adjustment ratio range and the available environment adjustment ratio range of each category object after the second adjustment processing; according to the interval endpoint value of the available environment adjustment ratio range of each category object after the second adjustment processing, a target available environment adjustment ratio range is selected from the available environment adjustment ratio range of each category object after the second adjustment processing; according to the interval endpoint value of the target available environment adjustment ratio range, a third adjustment processing is performed on the interval endpoint value of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority, so as to obtain the preferred environment adjustment ratio range of the category object corresponding to the highest category priority after the third adjustment processing.
[0008] In some embodiments, the step of performing a first adjustment processing on the available environment adjustment ratio range and / or preferred environment adjustment ratio range of the second category object according to the available environment adjustment ratio range and / or preferred environment adjustment ratio range of the first category object in the adjacent category priority, and obtaining the available environment adjustment ratio range and / or preferred environment adjustment ratio range of each category object after the first adjustment processing, includes: in response to the left endpoint value of the interval of the available environment adjustment ratio range of the second category object not being in the available environment adjustment ratio range of the first category object, adjusting the left endpoint value of the interval of the available environment adjustment ratio range of the second category object until the second category object is within the available environment adjustment ratio range of the first category object. The left endpoint value of the interval of the available environment adjustment ratio range of the category object is greater than or equal to the left endpoint value of the interval of the available environment adjustment ratio range of the first category object, and is less than or equal to the right endpoint value of the interval of the available environment adjustment ratio range of the first category object; and / or, in response to the left endpoint value of the interval of the preferred environment adjustment ratio range of the second category object not being within the preferred environment adjustment ratio range of the first category object, the left endpoint value of the interval of the preferred environment adjustment ratio range of the second category object is adjusted until the left endpoint value of the interval of the preferred environment adjustment ratio range of the second category object is greater than or equal to the left endpoint value of the interval of the preferred environment adjustment ratio range of the first category object, and is less than or equal to the right endpoint value of the interval of the preferred environment adjustment ratio range of the first category object.
[0009] In some embodiments, the step of performing a second adjustment process on the preferred environment adjustment ratio range of the corresponding category object after the first adjustment process according to the available environment adjustment ratio range of each category object after the first adjustment process to obtain the preferred environment adjustment ratio range and the available environment adjustment ratio range of each category object after the second adjustment process includes: in response to the left endpoint value of the interval of the preferred adjustment ratio range of each category object after the first adjustment process not being in the available adjustment ratio range of the corresponding category object after the first adjustment process, adjusting the left endpoint value of the interval of the preferred adjustment ratio range of the category object after the first adjustment process until the adjusted left endpoint value of the interval of the preferred adjustment ratio range of the category object is greater than or equal to the left endpoint value of the interval of the preferred adjustment ratio range of the corresponding category object after the first adjustment process The left endpoint value of the interval of the available adjustment ratio range after the first adjustment processing is less than or equal to the right endpoint value of the interval of the available environment adjustment ratio range after the first adjustment processing of the corresponding category object; and / or, in response to the right endpoint value of the interval of the preferred adjustment ratio range of each category object after the first adjustment processing is not in the available adjustment ratio range after the first adjustment processing of the corresponding category object, the right endpoint value of the interval of the preferred adjustment ratio range after the first adjustment processing of the category object is adjusted until the right endpoint value of the interval of the preferred adjustment ratio range of the category object after the adjustment is greater than or equal to the left endpoint value of the interval of the available adjustment ratio range after the first adjustment processing of the corresponding category object, and less than or equal to the right endpoint value of the interval of the available environment adjustment ratio range after the first adjustment processing of the corresponding category object.
[0010] In some embodiments, the step of performing a third adjustment process on the interval endpoint value of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority according to the interval endpoint value of the target available environment adjustment ratio range to obtain the preferred environment adjustment ratio range of the category object corresponding to the highest category priority after the third adjustment process includes: in response to the interval left endpoint value of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority being less than the interval left endpoint value of the target available environment adjustment ratio range, adjusting the interval left endpoint value of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority until the adjusted interval left endpoint value of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is greater than or equal to the interval left endpoint value of the target available environment adjustment ratio range; and / or, in response to the interval right endpoint value of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority being greater than the interval right endpoint value of the target available environment adjustment ratio range, adjusting the interval right endpoint value of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority until the adjusted interval right endpoint value of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is less than or equal to the interval right endpoint value of the target available environment adjustment ratio range.
[0011] In some embodiments, the step of exposing the acquired image according to the size relationship between the ambient brightness adjustment ratio and the target ambient adjustment ratio range includes: in response to the ambient brightness adjustment ratio being within the target ambient adjustment ratio range, determining the ambient brightness adjustment ratio as a target exposure adjustment value, and the target exposure adjustment value is used to perform exposure processing on the acquired image; in response to the ambient brightness adjustment ratio not being within the target ambient adjustment ratio range, adjusting the ambient brightness adjustment ratio to within the target ambient adjustment ratio range to obtain the target exposure adjustment value.
[0012] In some embodiments, the preset exposure range corresponding to the category object includes a preferred exposure range; the environmental adjustment ratio range of the preset exposure range of the category object includes a preferred environmental adjustment ratio range; the step of determining the environmental adjustment ratio range of the preset exposure range corresponding to each category object according to the average brightness value of each category object in the acquired image and the preset exposure range of each category object includes: calculating the ratio between the left endpoint value of the interval of the preferred exposure range of each category object and the average brightness value of the corresponding category object to obtain the left endpoint value of the interval of the preferred environmental adjustment ratio range corresponding to each category object; calculating the ratio between the right endpoint value of the interval of the preferred exposure range of each category object and the average brightness value of the corresponding category object to obtain the right endpoint value of the interval of the preferred environmental adjustment ratio range corresponding to each category object; determining the preferred environmental adjustment ratio range corresponding to each category object based on the left endpoint value of the interval and the right endpoint value of the interval of the preferred environmental adjustment ratio range.
[0013] In order to solve the above technical problem, another technical solution adopted by the present application is: an electronic device is provided, including a memory and a processor, and the processor is used to execute program instructions stored in the memory to implement the above exposure control method.
[0014] In order to solve the above technical problem, another technical solution adopted by the present application is: providing a computer-readable storage medium on which program instructions are stored, and the above exposure control method is implemented when the program instructions are executed by a processor.
[0015] Beneficial effects of the present application: The exposure control method of the embodiment of the present application obtains the average brightness value of each category of objects in the collected image and the environmental brightness adjustment ratio of the collected image; determines the environmental adjustment ratio range of the preset exposure range corresponding to each category of objects according to the average brightness value of each category of objects in the collected image and the preset exposure range of each category of objects; adjusts the environmental adjustment ratio range corresponding to the preset exposure range of each category of objects according to the category priority of each category of objects and the preset environmental ratio adjustment rule to obtain the target environmental adjustment ratio range of the target category object; and exposes the collected image according to the size relationship between the environmental brightness adjustment ratio and the target environmental adjustment ratio range. In this way, the environmental brightness adjustment ratio of the collected image is adjusted according to the category priority of each category of objects in the collected image and the corresponding environmental adjustment ratio range, taking into account the exposure requirements of objects of different categories and improving the exposure effect of the collected image. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which:
[0017] Figure 1 is a flowchart of an exemplary embodiment of an exposure control method shown in the present application;
[0018] Figure 2 yes Figure 1 A flow chart of an exemplary embodiment of step S130 in the exposure control method is shown;
[0019] Figure 3 yes Figure 2 A schematic flow chart of an exemplary embodiment of step S210 in the exposure control method is shown;
[0020] Figure 4 yes Figure 1 A flow chart of an exemplary embodiment of step S140 in the exposure control method is shown;
[0021] Figure 5 is a schematic diagram of the adjustment process corresponding to the ambient brightness adjustment ratio shown in the present application;
[0022] Figure 6 yes Figure 1 A schematic flow chart of an exemplary embodiment of step S120 in the exposure control method is shown;
[0023] Figure 7is a specific flow chart of an exemplary embodiment of the exposure control method shown in the present application;
[0024] Figure 8 It is a schematic diagram of the adjustment process corresponding to the environmental adjustment ratio range of each category of objects shown in this application;
[0025] Fig. 9 is a schematic structural diagram of an exemplary embodiment of an exposure control device shown in the present application;
[0026] Fig.10 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application;
[0027] Fig.11 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0028] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It will be appreciated that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of the present application.
[0029] First of all, it should be noted that the exposure of an image determines the brightness of the image, which directly affects the visual effect of the image. There are often diverse categories of objects in an image. When adjusting the image exposure, it is necessary to consider multiple categories of objects at the same time, such as license plates, animals, etc., to ensure that different categories of objects can be properly exposed. Different types of objects have different brightness accuracy requirements; for example, the problem of black and white clothes, if the same target brightness is used, it will cause a huge change in the picture and lead to abnormal effects.
[0030] Traditional multi-target exposure control methods usually adjust the exposure by weighting the entire image or adding high weights to specific locations when dealing with the balance between multiple categories of objects and ambient brightness in an image. However, this approach often fails to achieve fine brightness control and category priority distinction between category objects.
[0031] Based on this, the present application proposes an exposure control method, an electronic device and a computer-readable storage medium. Figure 1 , Figure 1 It is a flowchart of an exemplary embodiment of the exposure control method shown in the present application.
[0032] The execution subject of the exposure control method may be a terminal device or a server or other processing device, wherein the terminal device may be a user equipment (UE), a computer, a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The execution subject of the exposure control method may also be an exposure control device. In some possible implementations, the exposure control method may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0033] Specifically, the exposure control method of this embodiment includes the following steps:
[0034] S110: Obtaining the average brightness value of each category of objects in the captured image and the ambient brightness adjustment ratio of the captured image.
[0035] The captured image refers to an image that needs to be adjusted for exposure. For example, an original image captured by a camera or other shooting device may be used as the captured image, or an image that has been processed may be used as the captured image.
[0036] The category object may be an object of interest in the captured image. Exemplarily, the captured image may be identified by an intelligent recognition algorithm to obtain objects of each category in the captured image. It should be noted that the category object refers to a general term for all objects of a certain category, and a category object may contain multiple objects under the category. As an example, the captured image includes the license plate of car A, the license plate of car B, and the license plate of car C. Then the license plate of car A, the license plate of car B, and the license plate of car C all belong to the category object of license plate, and the license plate of car A, the license plate of car B, and the license plate of car C are objects under the category object of license plate respectively.
[0037] The average brightness value refers to the brightness value of each category object in the captured image. Exemplarily, the step of determining the average brightness value of the category object includes: obtaining the brightness value of each object under the category object; performing weighted averaging processing on the brightness value of each object under the category object to obtain the average brightness value of the category object. The brightness value of each object under the category object can be obtained by calculating the average brightness of the pixel area where each object is located in the captured image. When performing weighted averaging processing on the brightness values of each object under the category object, the weight of each object can be determined based on the area size of the pixel area where each object is located or the depth information of each object in the captured image. For example, the larger the area of the pixel area, the greater the weight of the corresponding object.
[0038] The ambient brightness adjustment ratio refers to the adjustment ratio of adjusting the brightness value of the captured image to the ambient target brightness. The ambient target brightness is the brightness adjusted for the captured image as a whole, and can be pre-set to use the optimal background value in the captured image as the ambient target brightness. Exemplarily, the process of obtaining the ambient brightness adjustment ratio includes: obtaining the average brightness value of the captured image; determining the ratio between the ambient target brightness and the brightness value of the captured image as the ambient brightness adjustment ratio. In other embodiments, the difference between the ambient target brightness and the brightness value of the captured image can also be determined as the ambient brightness adjustment ratio. The brightness value of the captured image can be obtained by calculating the average brightness of all pixel areas in the entire captured image.
[0039] The exposure control device performs weighted averaging on the brightness values of objects of the same category in the captured image to obtain the average brightness value of objects of each category; calculates the average brightness value of all pixel areas in the captured image to obtain the brightness value of the captured image, and determines the ratio between the brightness of the environmental target and the brightness value of the captured image as the environmental brightness adjustment ratio of the captured image.
[0040] S120: Determine the environment adjustment ratio of the preset exposure range corresponding to each category of objects according to the average brightness value of each category of objects in the collected image and the preset exposure range of each category of objects.
[0041] The preset exposure range refers to a preset exposure range in which each category of objects presents different clarity. Exemplarily, the preset exposure range includes a preferred exposure range and an available exposure range. The preferred exposure range refers to a brightness range in which the details of the category objects are sufficiently easy to recognize without causing discomfort, and the available exposure range refers to a brightness range in which the category objects and the details on the category objects can be recognized, but the effect is not good.
[0042] The environment adjustment ratio range refers to the adjustment ratio range for adjusting the average brightness value of each category of objects to a preset exposure range. Exemplarily, the environment adjustment ratio range includes a preferred environment adjustment ratio range and an available environment adjustment ratio range, wherein the preferred environment adjustment ratio range is used to adjust the average brightness value of the category objects to the preferred exposure range, and the available environment adjustment ratio range is used to adjust the average brightness value of the category objects to the available exposure range.
[0043] The exposure control device determines the preset exposure range of each category of objects according to different categories of objects, determines the preferred environment adjustment ratio range corresponding to each category of comparative objects according to the average brightness value of each category of objects and the preferred exposure range of the corresponding category of objects, and determines the available environment adjustment ratio range corresponding to each category of comparative objects according to the average brightness value of each category of objects and the available exposure range of the corresponding category of objects.
[0044] S130: adjusting the environment adjustment ratio range corresponding to the preset exposure range of each category of objects according to the category priority of each category of objects and the preset environment adjustment rule to obtain the target environment adjustment ratio range of the target category of objects.
[0045] Category priority refers to the priority ranking of each category of objects in the pre-set captured image. For example, the category priority can be determined according to the purpose of the captured image. For example, when performing traffic flow detection, the highest category priority can be set for the category of license plate objects, and the remaining category objects can be ranked as needed.
[0046] The preset environment ratio adjustment rule is used to adjust the environment adjustment ratio range of each category of objects. Exemplarily, the corresponding preset environment ratio adjustment rule can be determined according to the category priority of each category of objects.
[0047] The target category object is selected according to the category priority of each category object, and the environment brightness adjustment ratio of the captured image is limited by the target environment adjustment ratio range of the target category object. Exemplarily, the category object corresponding to the highest category priority can be used as the target category object.
[0048] The target environment adjustment ratio range refers to the environment adjustment ratio range of the target object after adjustment according to the preset environment adjustment ratio rule, which is used to limit the environment brightness adjustment ratio of the captured image. When the environment brightness adjustment ratio of the captured image is limited to the target environment adjustment ratio range, each category of objects in the captured image presents different clarity according to priority, and the details of each category of objects can be identified.
[0049] The exposure control device determines the preset environment ratio adjustment rules and the target category objects according to the pre-set category priorities of each category object, and adjusts the preferred environment adjustment ratio range and the available environment adjustment ratio range of each category object according to the preset environment ratio adjustment rules to obtain the target environment adjustment ratio range of the target category object.
[0050] S140: performing exposure processing on the collected image according to the size relationship between the environment brightness adjustment ratio and the target environment adjustment ratio range.
[0051] The exposure control device obtains the ambient brightness adjustment ratio and the target ambient adjustment ratio range of the target category object; then adjusts the ambient brightness adjustment ratio according to the target ambient adjustment ratio range to obtain the adjusted ambient brightness adjustment ratio; the automatic exposure module uses the adjusted ambient brightness adjustment ratio as a guide to control the exposure value of the collected image. Automatic exposure means that the camera automatically adjusts the shutter gain aperture according to the light conditions to obtain the correct exposure.
[0052] It can be seen that the exposure control method of the embodiment of the present application obtains the average brightness value of each category of objects in the collected image and the environmental brightness adjustment ratio of the collected image; determines the environmental adjustment ratio range of the preset exposure range corresponding to each category of objects according to the average brightness value of each category of objects in the collected image and the preset exposure range of each category of objects; adjusts the environmental adjustment ratio range corresponding to the preset exposure range of each category of objects according to the category priority of each category of objects and the preset environmental ratio adjustment rule to obtain the target environmental adjustment ratio range of the target category object; and exposes the collected image according to the size relationship between the environmental brightness adjustment ratio and the target environmental adjustment ratio range. In this way, the environmental brightness adjustment ratio of the collected image is adjusted according to the category priority of each category of objects in the collected image and the corresponding environmental adjustment ratio range, taking into account the exposure requirements of objects of different categories and improving the exposure effect of the collected image.
[0053] Based on the above embodiments, the embodiments of the present application adopt Figure 2 The flowchart details how to obtain the target environment adjustment ratio range for the target category object. Figure 2 , Figure 2 yes Figure 1 The flowchart of an exemplary embodiment of step S130 in the exposure control method is shown. Specifically, in step S130, the environment adjustment ratio range corresponding to the preset exposure range of each category of objects is adjusted according to the category priority of each category of objects with the preset environment ratio adjustment rule, and the process of obtaining the target environment adjustment ratio range of the target category object includes the following steps:
[0054] S210: adjusting the environment adjustment ratio range of the preset exposure range corresponding to each category of objects according to the category priority of each category of objects and the preset environment adjustment ratio rule to obtain the adjusted environment adjustment ratio range of each category of objects.
[0055] The exposure control device selects a corresponding preset environmental ratio adjustment rule according to the category priority of each category object, and adjusts the environmental adjustment ratio range of the preset exposure range corresponding to the category object according to the corresponding preset environmental ratio adjustment rule to obtain the adjusted environmental adjustment ratio range of each category object.
[0056] S220: Determine a category object whose category priority is greater than a preset priority as a target category object, and determine a target environment adjustment ratio range based on the adjusted environment adjustment ratio range corresponding to the target category object.
[0057] The preset priority can be preset. Exemplarily, the preset priority can be set to the second level, and the category objects with a category priority greater than the second level belong to the highest category priority, and the category objects corresponding to the highest category priority are determined as the target category objects. The preset priority can also be set to the third level, and the category objects with a category priority greater than the third level are the category objects of the first level and the category objects of the second level, and then the target category objects are determined based on the environmental adjustment ratio range after the adjustment of the category objects of the first level and the category objects of the second level, for example, the category objects with a smaller range can be determined as the target category objects.
[0058] In other embodiments, after obtaining the adjusted environment adjustment ratio ranges of the objects of each category, the exposure control device may also determine the target category object according to the adjusted environment adjustment ratio ranges of the objects of each category, and determine the adjusted environment adjustment ratio range corresponding to the target category object as the target environment adjustment ratio range. Exemplarily, the category object with the smallest range may be selected from the adjusted environment adjustment ratio ranges of the objects of each category as the target category object.
[0059] It can be seen that the exposure control method of the embodiment of the present application adjusts the environment adjustment ratio range of the preset exposure range corresponding to each category of objects according to the category priority of each category of objects and the preset environment adjustment ratio adjustment rule to obtain the adjusted environment adjustment ratio range of each category of objects; the category object whose category priority is greater than the preset priority is determined as the target category object, and the target environment adjustment ratio range is determined based on the adjusted environment adjustment ratio range corresponding to the target category object. In this way, the target environment adjustment ratio range is determined according to the category priority of each category of objects, and the different requirements of different category priorities for brightness accuracy are fully considered, and exposure resources are effectively allocated.
[0060] Based on the above embodiments, the embodiments of the present application adopt Figure 3 The flowchart explains in detail how to obtain the environmental adjustment ratio range after each category of object is adjusted. Figure 3 , Figure 3 yes Figure 2 The flowchart of an exemplary embodiment of step S210 in the exposure control method is shown. Specifically, in step S210, the environment adjustment ratio of the preset exposure range corresponding to each category of objects is adjusted according to the category priority of each category of objects according to the preset environment ratio adjustment rule, and the process of obtaining the adjusted environment adjustment ratio range of each category of objects includes the following steps:
[0061] First of all, it should be noted that the environment adjustment ratio range of the preset exposure range corresponding to the category object includes an available environment adjustment ratio range and a preferred environment adjustment ratio range. The preferred environment adjustment ratio range means that the brightness of the category object after adjusting this range ratio can be sufficiently easy to identify details without causing discomfort, and the available environment adjustment ratio range means that the brightness of the category object after adjusting this range ratio can identify the category object and the details on the category object, but the effect is not good. The category priority of the first category object below is higher than the category priority of the second category object.
[0062] S310: According to the category priorities of each category object from high to low, starting from the category object corresponding to the highest category priority, the available environment adjustment ratio range and / or the preferred environment adjustment ratio range of the second category object are adjusted for the first time according to the available environment adjustment ratio range and / or the preferred environment adjustment ratio range of the first category object in the adjacent category priority, to obtain the available environment adjustment ratio range and / or the preferred environment adjustment ratio range of each category object after the first adjustment processing, and the preferred environment adjustment ratio range of each category object is within the available environment adjustment ratio range.
[0063] First, a first adjustment process is performed on the available environment adjustment ratio range and / or preferred environment adjustment ratio range of the category object corresponding to the second highest category priority according to the available environment adjustment ratio range and / or preferred environment adjustment ratio range of the category object corresponding to the highest category priority, so as to obtain the available environment adjustment ratio range and / or preferred environment adjustment ratio range of the category object corresponding to the second highest category priority after the first adjustment process; then, a first adjustment process is performed on the available environment adjustment ratio range and / or preferred environment adjustment ratio range of the category object corresponding to the second highest category priority according to the available environment adjustment ratio range and / or preferred environment adjustment ratio range of the category object corresponding to the second highest category priority after the first adjustment process, so as to obtain the available environment adjustment ratio range and / or preferred environment adjustment ratio range of the category object corresponding to the second highest category priority after the first adjustment process, and so on.
[0064] As an example, the exposure control device performs a first adjustment process on the available environment adjustment ratio range of the second category objects according to the available environment adjustment ratio range of the first category objects to obtain the available environment adjustment ratio range of each category of objects after the first adjustment process.
[0065] As another example, the exposure control device performs a first adjustment process on the preferred environment adjustment ratio range of the second category objects according to the preferred environment adjustment ratio range of the first category objects to obtain the preferred environment adjustment ratio range of each category object after the first adjustment process.
[0066] As another example, the exposure control device performs a first adjustment process on the available environmental adjustment ratio range of the second category objects according to the available environmental adjustment ratio range of the first category objects, and performs a first adjustment process on the preferred environmental adjustment ratio range of the second category objects according to the preferred environmental adjustment ratio range of the first category objects, to respectively obtain the available environmental adjustment ratio range and the preferred environmental adjustment ratio range of each category of objects after the first adjustment process.
[0067] In other embodiments, the exposure control device may also perform a first adjustment processing on the available environment adjustment ratio ranges and / or preferred environment adjustment ratio ranges of the remaining category objects according to the available environment adjustment ratio ranges and / or preferred environment adjustment ratio ranges of the category objects corresponding to the highest category priority, to obtain the available environment adjustment ratio ranges and / or preferred environment adjustment ratio ranges of the category objects after the first adjustment processing.
[0068] Specifically, the first adjustment processing step includes: in response to the interval left endpoint value of the available environment adjustment ratio range of the second category object not being within the available environment adjustment ratio range of the first category object, adjusting the interval left endpoint value of the available environment adjustment ratio range of the second category object until the interval left endpoint value of the available environment adjustment ratio range of the second category object is greater than or equal to the interval left endpoint value of the available environment adjustment ratio range of the first category object, and less than or equal to the interval right endpoint value of the available environment adjustment ratio range of the first category object; and / or, in response to the interval left endpoint value of the preferred environment adjustment ratio range of the second category object not being within the preferred environment adjustment ratio range of the first category object, adjusting the interval left endpoint value of the preferred environment adjustment ratio range of the second category object until the interval left endpoint value of the preferred environment adjustment ratio range of the second category object is greater than or equal to the interval left endpoint value of the preferred environment adjustment ratio range of the first category object, and less than or equal to the interval right endpoint value of the preferred environment adjustment ratio range of the first category object. In this way, the environment adjustment ratio range of the second category object can be ensured to be within the environment adjustment ratio range of the first category object.
[0069] The left endpoint value and the right endpoint value of the interval usually refer to the minimum and maximum values of the adjustment ratio range of each environment, respectively.
[0070] As an example, if the interval left endpoint value of the available environment adjustment ratio range of the second category object is less than the interval left endpoint value of the available environment adjustment ratio of the first category object, the interval left endpoint value of the available environment adjustment ratio of the second category object is adjusted to be greater than or equal to the interval left endpoint value of the available environment adjustment ratio range of the first category object and less than or equal to the interval right endpoint value of the available environment adjustment ratio range of the first category object. Exemplarily, the interval left endpoint value of the available environment adjustment ratio range of the second category object can be adjusted to be equal to the interval left endpoint value of the available environment adjustment ratio range of the first category object. For example, the interval left endpoint value of the available environment adjustment ratio range of the first category object is 0.7 times, and the interval left endpoint value of the available environment adjustment ratio range of the second category object is 0.2 times, then the interval left endpoint value of the available environment adjustment ratio range of the second category object can be adjusted from 0.2 times to 0.7 times.
[0071] As another example, if the right endpoint value of the interval of the available environment adjustment ratio range of the second category object is greater than the right endpoint value of the interval of the available environment adjustment ratio range of the first category object, then adjust the right endpoint value of the interval of the available environment adjustment ratio range of the second category object until the right endpoint value of the interval of the available environment adjustment ratio range of the second category object is less than or equal to the right endpoint value of the interval of the available environment adjustment ratio range of the first category object, and greater than or equal to the left endpoint value of the interval of the available environment adjustment ratio range of the first category object. For example, if the right endpoint value of the interval of the available environment adjustment ratio range of the first category object is 9 times, and the right endpoint value of the interval of the available environment adjustment ratio range of the second category object is 10 times, then the right endpoint value of the interval of the available environment adjustment ratio range of the second category object can be adjusted from 10 times to 9 times.
[0072] As another example, if the right endpoint value of the interval of the available environment adjustment ratio range of the second category object is less than the left endpoint value of the interval of the available environment adjustment ratio range of the first category object, the left endpoint value and the right endpoint value of the interval of the available environment adjustment ratio range of the second category object are adjusted at the same time, until the left endpoint value and the right endpoint value of the interval of the available environment adjustment ratio range of the second category object are both greater than or equal to the left endpoint value of the interval of the available environment adjustment ratio range of the first category object and less than or equal to the right endpoint value of the interval of the available environment adjustment ratio range of the first category object. Exemplarily, the left endpoint value and the right endpoint value of the interval of the available environment adjustment ratio range of the second category object can be adjusted to the left endpoint value of the interval of the available environment adjustment ratio range of the first category object. For example, if the left endpoint value of the interval of the available environment adjustment ratio range of the first category object is 2 times, the right endpoint value of the interval of the available environment adjustment ratio range of the second category object is 0.8 times, and the left endpoint value of the interval of the available environment adjustment ratio range of the second category object is 0.5 times, then the right endpoint value of the interval of the available environment adjustment ratio range of the second category object can be adjusted from 0.8 times to 2 times, and the left endpoint value of the interval of the available environment adjustment ratio range of the second category object can be adjusted from 0.5 times to 2 times.
[0073] As another example, if the interval left endpoint value of the available environment adjustment ratio range of the second category object is greater than the interval right endpoint value of the available environment adjustment ratio range of the first category object, the interval left endpoint value and the interval right endpoint value of the available environment adjustment ratio range of the second category object are adjusted at the same time, until the interval left endpoint value and the interval right endpoint value of the available environment adjustment ratio range of the second category object are both greater than or equal to the interval left endpoint value of the available environment adjustment ratio range of the first category object and less than or equal to the interval right endpoint value of the available environment adjustment ratio range of the first category object. Exemplarily, the interval left endpoint value and the interval right endpoint value of the available environment adjustment ratio range of the second category object can be adjusted to the interval right endpoint value of the available environment adjustment ratio range of the first category object.
[0074] The method for adjusting the preferred environment adjustment ratio range of the second category object according to the preferred environment adjustment ratio range of the first category object can refer to the above-mentioned adjustment method for adjusting the available environment adjustment ratio range of the second category object according to the available environment adjustment ratio range of the first category object. It is only necessary to adjust the interval endpoint value of the available environment adjustment ratio range of the second category object to the available environment adjustment ratio range of the second category object, and adjust the interval endpoint value of the preferred environment adjustment ratio range of the second category object to the preferred environment adjustment ratio range of the second category object.
[0075] In some embodiments, only when the left endpoint value of the interval of the available environment adjustment ratio range of the second category object is not in the available environment adjustment ratio range of the first category object, the left endpoint value of the interval of the available environment adjustment ratio range of the second category object can be adjusted until the left endpoint value of the interval of the available environment adjustment ratio range of the second category object is greater than or equal to the left endpoint value of the interval of the available environment adjustment ratio range of the first category object, and is less than or equal to the right endpoint value of the interval of the available environment adjustment ratio range of the first category object.
[0076] In other embodiments, only when the left endpoint value of the interval of the preferred environment adjustment ratio range of the second category object is not in the preferred environment adjustment ratio range of the first category object, the left endpoint value of the interval of the preferred environment adjustment ratio range of the second category object may be adjusted until the left endpoint value of the interval of the preferred environment adjustment ratio range of the second category object is greater than or equal to the left endpoint value of the interval of the preferred environment adjustment ratio range of the first category object, and is less than or equal to the right endpoint value of the interval of the preferred environment adjustment ratio range of the first category object.
[0077] In other embodiments, if the left endpoint value of the interval of the available environment adjustment ratio range of the second category object is not within the available environment adjustment ratio range of the first category object, the left endpoint value of the interval of the available environment adjustment ratio range of the second category object may be adjusted until the left endpoint value of the interval of the available environment adjustment ratio range of the second category object is greater than or equal to the left endpoint value of the interval of the available environment adjustment ratio range of the first category object, and less than or equal to the right endpoint value of the interval of the available environment adjustment ratio range of the first category object; and if the left endpoint value of the interval of the preferred environment adjustment ratio range of the second category object is not within the preferred environment adjustment ratio range of the first category object, the left endpoint value of the interval of the preferred environment adjustment ratio range of the second category object may be adjusted until the left endpoint value of the interval of the preferred environment adjustment ratio range of the second category object is greater than or equal to the left endpoint value of the interval of the preferred environment adjustment ratio range of the first category object, and less than or equal to the right endpoint value of the interval of the preferred environment adjustment ratio range of the first category object.
[0078] In other embodiments, the first adjustment processing step may also include: adjusting the interval endpoint values of the available environment adjustment ratio ranges of the remaining category objects according to the interval endpoint values of the available environment adjustment ratio range of the category object corresponding to the highest category priority, until the interval left endpoint values and the interval right endpoint values of the available environment adjustment ratio ranges of the remaining category objects are within the available environment adjustment ratio range of the category object corresponding to the highest category priority; and / or, adjusting the interval endpoint values of the preferred environment adjustment ratio ranges of the remaining category objects according to the interval endpoint values of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority, until the interval left endpoint values and the interval right endpoint values of the preferred environment adjustment ratio ranges of the remaining category objects are within the preferred environment adjustment ratio range of the category object corresponding to the highest category priority.
[0079] S320: Perform a second adjustment process on the preferred environment adjustment ratio range of the corresponding category object after the first adjustment process according to the available environment adjustment ratio range of each category object after the first adjustment process, to obtain the preferred environment adjustment ratio range and available environment adjustment ratio range of each category object after the second adjustment process.
[0080] The exposure control device performs a second adjustment process on the interval endpoint values of the preferred environment adjustment ratio range of the corresponding category object after the first adjustment process according to the interval endpoint values of the available environment adjustment ratio range of each category object after the first adjustment process, and obtains the preferred environment adjustment ratio range and the available environment adjustment ratio range of each category object after the second adjustment process.
[0081] Specifically, the second adjustment process includes: in response to the left endpoint value of the interval of the preferred adjustment ratio range of each category object after the first adjustment process not being in the available adjustment ratio range of the corresponding category object after the first adjustment process, adjusting the left endpoint value of the interval of the preferred adjustment ratio range of the category object after the first adjustment process until the left endpoint value of the interval of the preferred adjustment ratio range of the adjusted category object is greater than or equal to the left endpoint value of the interval of the available adjustment ratio range of the corresponding category object after the first adjustment process, and less than or equal to the right endpoint value of the interval of the available environment adjustment ratio range of the corresponding category object after the first adjustment process; and / or, in response to the right endpoint value of the interval of the preferred adjustment ratio range of each category object after the first adjustment process not being in the available adjustment ratio range of the corresponding category object after the first adjustment process, adjusting the right endpoint value of the interval of the preferred adjustment ratio range of the category object after the first adjustment process until the right endpoint value of the interval of the preferred adjustment ratio range of the adjusted category object is greater than or equal to the left endpoint value of the interval of the available adjustment ratio range of the corresponding category object after the first adjustment process, and less than or equal to the right endpoint value of the interval of the available environment adjustment ratio range of the corresponding category object after the first adjustment process. In this way, the preferred environment adjustment ratio range of each category object is ensured to be within the available environment adjustment ratio range.
[0082] As an example, if the interval left endpoint value of the preferred adjustment ratio range of each category object after the first adjustment process is less than the interval left endpoint value of the available adjustment ratio range of the corresponding category object after the first adjustment process, and the interval right endpoint value of the preferred adjustment ratio range of each category object after the first adjustment process is within the available adjustment ratio range of the corresponding category object after the first adjustment process, then the interval left endpoint value of the preferred adjustment ratio range of the category object is adjusted to within the available adjustment ratio range of the corresponding category object after the first adjustment process. Exemplarily, if the interval left endpoint value of the preferred adjustment ratio range of the license plate category object after the first adjustment process is 0.1 times, and the interval left endpoint value of the available adjustment ratio range of the license plate category object after the first adjustment process is 0.5 times, then the interval left endpoint value of the preferred adjustment ratio range of the license plate category object after the first adjustment process can be adjusted from 0.1 times to 0.5 times.
[0083] As another example, if the right endpoint value of the interval of the preferred adjustment ratio range of each category object after the first adjustment process is greater than the right endpoint value of the interval of the available adjustment ratio range of the corresponding category object after the first adjustment process, and the left endpoint value of the interval of the preferred adjustment ratio range of each category object after the first adjustment process is within the available adjustment ratio range of the corresponding category object after the first adjustment process, then the right endpoint value of the interval of the preferred adjustment ratio range of the category object is adjusted to within the available adjustment ratio range of the corresponding category object after the first adjustment process. Exemplarily, if the right endpoint value of the interval of the preferred adjustment ratio range of the license plate category object after the first adjustment process is 9 times, and the right endpoint value of the interval of the available adjustment ratio range of the license plate category object after the first adjustment process is 2 times, then the right endpoint value of the interval of the preferred adjustment ratio range of the license plate category object after the first adjustment process can be adjusted from 9 times to 2 times.
[0084] As another example, if the right endpoint value of the interval of the preferred adjustment ratio range of each category object after the first adjustment process is less than the left endpoint value of the interval of the available adjustment ratio range of the corresponding category object after the first adjustment process, and of course the left endpoint value of the interval of the preferred adjustment ratio range of each category object after the first adjustment process is also less than the left endpoint value of the interval of the available adjustment ratio range of the corresponding category object after the first adjustment process, then the right endpoint value and the left endpoint value of the interval of the preferred adjustment ratio range of the category object are adjusted to within the available adjustment ratio range of the corresponding category object after the first adjustment process. Exemplarily, if the right endpoint value of the interval of the preferred adjustment ratio range of the license plate category object after the first adjustment process is 0.8 times, and the left endpoint value of the interval of the available adjustment ratio range of the license plate category object after the first adjustment process is 2 times, then the right endpoint value and the left endpoint value of the interval of the preferred adjustment ratio range of the license plate category object after the first adjustment process can be adjusted to 2 times.
[0085] As another example, if the interval left endpoint value of the preferred adjustment ratio range of each category object after the first adjustment process is greater than the interval right endpoint value of the available adjustment ratio range of the corresponding category object after the first adjustment process, and of course the interval right endpoint value of the preferred adjustment ratio range of each category object after the first adjustment process is also greater than the interval right endpoint value of the available adjustment ratio range of the corresponding category object after the first adjustment process, then the interval right endpoint value and left endpoint value of the preferred adjustment ratio range of the category object are adjusted to within the available adjustment ratio range of the corresponding category object after the first adjustment process. Exemplarily, if the interval left endpoint value of the preferred adjustment ratio range of the license plate category object after the first adjustment process is 8 times, and the interval right endpoint value of the available adjustment ratio range of the license plate category object after the first adjustment process is 5 times, then the interval right endpoint value and interval left endpoint value of the preferred adjustment ratio range of the license plate category object after the first adjustment process can be adjusted to 5 times.
[0086] S330: selecting a target available environment adjustment ratio range from the available environment adjustment ratio ranges after the second adjustment processing for each category of objects according to the interval endpoint values of the available environment adjustment ratio ranges after the second adjustment processing for each category of objects.
[0087] The target available environment adjustment ratio range is used to limit the preferred environment adjustment ratio range of the category object corresponding to the highest category priority. Exemplarily, the interval left endpoint value and the interval right endpoint value in the available environment adjustment ratio range after the second adjustment processing of each category object can be first obtained, and the maximum interval left endpoint value and the minimum interval right endpoint value are selected therefrom, and the maximum interval left endpoint value and the minimum interval right endpoint value are respectively used as the left endpoint value and the right endpoint value of the target available environment adjustment ratio range.
[0088] The exposure control device selects the maximum interval left endpoint value and the minimum interval right endpoint value of the available environment adjustment ratio range of each category of objects after the second adjustment process as the interval left endpoint value and interval right endpoint value of the target available environment adjustment ratio range respectively.
[0089] S340: Perform a third adjustment process on the interval endpoint value of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority according to the interval endpoint value of the target available environment adjustment ratio range, and obtain the preferred environment adjustment ratio range of the category object corresponding to the highest category priority after the third adjustment process.
[0090] The exposure control device performs a third adjustment process based on the size relationship between the interval endpoint value of the target available environment adjustment ratio range and the interval endpoint value of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority, and obtains the preferred environment adjustment ratio range of the category object corresponding to the highest category priority after the third adjustment process.
[0091] Specifically, in response to the left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority being less than the left endpoint value of the interval of the target available environment adjustment ratio range, the left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is adjusted until the adjusted left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is greater than or equal to the left endpoint value of the interval of the target available environment adjustment ratio range; and / or, in response to the right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority being greater than the right endpoint value of the interval of the target available environment adjustment ratio range, the right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is adjusted until the adjusted right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is less than or equal to the right endpoint value of the interval of the target available environment adjustment ratio range. In this way, the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is ensured to be within the available environment adjustment ratio range of the other category objects, so that the clarity of the category object corresponding to the highest category priority can be guaranteed while taking into account the clarity of the other category objects.
[0092] As an example, if the left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is smaller than the left endpoint value of the interval of the target available environment adjustment ratio range, and the right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is less than or equal to the right endpoint value of the interval of the target available environment adjustment ratio range, then the left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is adjusted until the adjusted left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is greater than or equal to the left endpoint value of the interval of the target available environment adjustment ratio range.
[0093] As another example, if the right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is greater than the left endpoint value of the interval of the target available environment adjustment ratio range, and the left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is greater than or equal to the right endpoint value of the interval of the target available environment adjustment ratio range, then the right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is adjusted until the adjusted right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is less than or equal to the right endpoint value of the interval of the target available environment adjustment ratio range.
[0094] As another example, if the right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is greater than the left endpoint value of the interval of the target available environment adjustment ratio range, and the left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is less than the right endpoint value of the interval of the target available environment adjustment ratio range, then the left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is adjusted until the adjusted left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is greater than or equal to the left endpoint value of the interval of the target available environment adjustment ratio range, and the right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is adjusted until the adjusted right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is less than or equal to the right endpoint value of the interval of the target available environment adjustment ratio range.
[0095] In other embodiments, the difference between the left endpoint value of the interval of the target available environment adjustment ratio range and the preset value is determined as the target minimum value; if the left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is less than the target minimum value, the left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is adjusted until the adjusted left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is greater than or equal to the target minimum value; and / or, the sum of the right endpoint value of the interval of the target available environment adjustment ratio range and the preset value is determined as the target maximum value; if the right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is greater than the target maximum value, the right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is adjusted until the adjusted right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is less than or equal to the target maximum value. In this way, the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is expanded to a certain extent.
[0096] Based on the above embodiments, the embodiments of the present application adopt Figure 4 The flowchart details how to adjust the ratio and target ratio range according to the ambient brightness to process the exposure of the captured image. Figure 4 , Figure 4 yes Figure 1 The flowchart of an exemplary embodiment of step S140 in the exposure control method is shown. Specifically, in step S140, the process of exposing the captured image according to the size relationship between the ambient brightness adjustment ratio and the target environment adjustment ratio range includes the following steps:
[0097] S410: In response to the environment brightness adjustment ratio being within a target environment brightness adjustment ratio range, determining the environment brightness adjustment ratio as a target exposure adjustment value, where the target exposure adjustment value is used to perform exposure processing on the captured image.
[0098] The target exposure adjustment value is used to perform exposure processing on the captured image. If the ambient brightness adjustment ratio is within the target ambient brightness adjustment ratio range, it means that the ambient brightness adjustment ratio meets the exposure requirements of each category of objects and no adjustment is required. The ambient brightness adjustment ratio is directly determined as the target exposure adjustment value.
[0099] S420: In response to the environment brightness adjustment ratio not being within the target environment adjustment ratio range, the environment brightness adjustment ratio is adjusted to be within the target environment adjustment ratio range to obtain a target exposure adjustment value.
[0100] If the ambient brightness adjustment ratio is not within the target ambient brightness adjustment ratio range, it means that the ambient brightness adjustment ratio does not meet the exposure requirements of each category of objects and needs to be adjusted to the target ambient brightness adjustment ratio range to obtain the target exposure adjustment value.
[0101] As an example, see Figure 5 , Figure 5 This is a schematic diagram of the adjustment process corresponding to the ambient brightness adjustment ratio shown in this application. First, the ratio between the ambient target brightness and the brightness value of the captured image is determined as the ambient brightness adjustment ratio. If the ambient brightness adjustment ratio is calculated to be 0.5x (0.5 times), the target environment adjustment ratio range is 1.2x (1.2 times) -5x (5 times), and the target environment adjustment ratio range can be the preferred environment adjustment ratio range of the license plate, then the ambient brightness adjustment ratio is adjusted from 0.5x (0.5 times) to 1.2x (1.2 times).
[0102] It can be seen that adjusting the ambient brightness adjustment ratio according to the target environment adjustment ratio range can ensure that the ambient brightness adjustment ratio is within the target environment adjustment ratio range. At the same time, the background and target environment adjustment ratio ranges are taken into consideration, and adaptive adjustment can be made in different backlight scenes. A larger tolerance range can prevent image flickering, thereby achieving the best exposure effect for the captured image.
[0103] Based on the above embodiments, the embodiments of the present application adopt Figure 6 The flowchart details how to adjust the ratio and target ratio range according to the ambient brightness to process the exposure of the captured image. Figure 6 , Figure 6 yes Figure 1The flowchart of an exemplary embodiment of step S120 in the exposure control method is shown. Specifically, in step S120, the process of determining the environment adjustment ratio range of the preset exposure range corresponding to each category of objects according to the average brightness value of each category of objects in the captured image and the preset exposure range of each category of objects includes the following steps:
[0104] S610: Calculate the ratio between the left endpoint value of the interval of the preferred exposure range of each category of objects and the average brightness value of the corresponding category of objects to obtain the left endpoint value of the interval of the preferred environment adjustment ratio range corresponding to each category of objects.
[0105] The preferred exposure range refers to a brightness range in which the details of the category object are sufficiently easy to recognize without causing discomfort. Exemplarily, the preferred exposure range can be preset based on experience.
[0106] The exposure control device obtains the left endpoint value of the interval of the preferred exposure range, calculates the ratio between the left endpoint value of the interval of the preferred exposure range of each category of objects and the average brightness value of the corresponding category of objects, and obtains the left endpoint value of the interval of the preferred environment adjustment ratio range corresponding to each category of objects.
[0107] S620: Calculate the ratio between the right endpoint value of the interval of the preferred exposure range of each category of objects and the average brightness value of the corresponding category of objects to obtain the right endpoint value of the interval of the preferred environment adjustment ratio range corresponding to each category of objects.
[0108] The exposure control device obtains the right endpoint value of the interval of the preferred exposure range, calculates the ratio between the right endpoint value of the interval of the preferred exposure range of each category of objects and the average brightness value of the corresponding category of objects, and obtains the right endpoint value of the interval of the preferred environment adjustment ratio range corresponding to each category of objects.
[0109] S630: Determine the preferred environment adjustment ratio range corresponding to each category of objects based on the left endpoint value of the preferred environment adjustment ratio range and the right endpoint value of the preferred environment adjustment ratio range.
[0110] The exposure control device uses the left endpoint value of the preferred environment adjustment ratio range as the minimum value and the right endpoint value of the preferred environment adjustment ratio range as the maximum value to obtain the preferred environment adjustment ratio range.
[0111] In other embodiments, the preset exposure range corresponding to the category object includes an available exposure range; the environment adjustment ratio range of the preset exposure range of the category object includes an available environment adjustment ratio range, and the available exposure range means that the category object can recognize the category object and the details on the category object under this brightness range, but the effect is not good. The exposure control device calculates the ratio between the interval left endpoint value of the available exposure range of each category object and the average brightness value of the corresponding category object to obtain the interval left endpoint value of the available environment adjustment ratio range corresponding to each category object; calculates the ratio between the interval right endpoint value of the available exposure range of each category object and the average brightness value of the corresponding category object to obtain the interval right endpoint value of the available environment adjustment ratio range corresponding to each category object; determines the available environment adjustment ratio range corresponding to each category object based on the interval left endpoint value and the interval right endpoint value of the available environment adjustment ratio range.
[0112] In other embodiments, the difference between the left endpoint value of the interval of the preferred exposure range of each category of objects and the average brightness value of the corresponding category of objects can be calculated to obtain the left endpoint value of the interval of the preferred environment adjustment ratio range corresponding to each category of objects, and the difference between the right endpoint value of the interval of the preferred exposure range of each category of objects and the average brightness value of the corresponding category of objects can be calculated to obtain the right endpoint value of the interval of the preferred environment adjustment ratio range corresponding to each category of objects, and the preferred environment adjustment ratio range corresponding to each category of objects can be determined based on the left endpoint value of the interval and the right endpoint value of the interval of the preferred environment adjustment ratio range.
[0113] It can be seen that the calculation method of determining the environmental adjustment ratio range corresponding to each category of objects is simple and easy to implement.
[0114] In order to explain the exposure control method of the present application in detail, Figure 7 The flowchart shown further illustrates it, and the details are as follows:
[0115] The exposure control device first obtains the brightness value of each category of objects and the preset exposure range of each category of objects, including the interval right endpoint value and the interval left endpoint value of the preferred exposure range, and the interval right endpoint value and the interval left endpoint value of the available exposure range of each category of objects; secondly, the ratio between the interval right endpoint value and the interval left endpoint value of the preferred exposure range of each category of objects and the brightness value of the corresponding category of objects is calculated respectively, so as to obtain the preferred environment adjustment ratio range of each category of objects, and the ratio between the interval right endpoint value and the interval left endpoint value of the available exposure range of each category of objects and the brightness value of the corresponding category of objects is calculated respectively, so as to obtain the available environment adjustment ratio range of each category of objects;
[0116] Limiting is performed based on the category priority requirements. The limiting process can be found in Figure 8First, starting from the highest category priority according to the category priority, perform a first adjustment processing on the available environment adjustment ratio range and / or preferred environment adjustment ratio range of the second category object according to the available environment adjustment ratio range and / or preferred environment adjustment ratio range of the first category object in the adjacent category priority, and obtain the available environment adjustment ratio range and / or preferred environment adjustment ratio range of each category object after the first adjustment processing. Specifically, the category priorities are license plate, body, and environment from high to low. First, according to the preferred environment adjustment ratio range and the available environment adjustment ratio range of the license plate, the preferred environment adjustment ratio range and the available environment adjustment ratio range of the vehicle body are adjusted respectively (the preferred environment adjustment ratio range of the vehicle body is limited to the preferred environment adjustment ratio range of the license plate, the same below), and then according to the preferred environment adjustment ratio range and the available environment adjustment ratio range of the vehicle body after the first adjustment, the preferred environment adjustment ratio range and the available environment adjustment ratio range of the environment are adjusted respectively, and so on; secondly, according to the available environment adjustment ratio range of each category of objects after the first adjustment, the preferred environment adjustment ratio range of the corresponding category of objects after the first adjustment is adjusted for the second time, and the preferred environment adjustment ratio range and the available environment adjustment ratio range of each category of objects after the second adjustment are obtained, so as to ensure that the preferred environment adjustment ratio range of each category of objects is within the corresponding Within the available environment adjustment ratio range of the category object, taking the license plate as an example, the maximum value in the available environment adjustment ratio range after the first adjustment processing of the license plate is greater than or equal to the maximum value in the preferred environment adjustment ratio range after the first adjustment processing of the license plate; thirdly, according to the interval endpoint value of the available environment adjustment ratio range of each category object after the second adjustment processing, the target available environment adjustment ratio range is selected from the available environment adjustment ratio range after the second adjustment processing of each category object; according to the interval endpoint value of the target available environment adjustment ratio range, the interval endpoint value of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is adjusted for the third time to obtain the preferred environment adjustment ratio range of the category object corresponding to the highest category priority after the third adjustment processing, and the preferred environment adjustment ratio range of the license plate is adjusted to the available environment adjustment ratio range of the license plate, the vehicle body and the environment. Ensure that the interval left endpoint value of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is greater than or equal to the interval left endpoint value of the target available environment adjustment ratio range; and ensure that the interval right endpoint value of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is less than or equal to the interval right endpoint value of the target available environment adjustment ratio range.
[0117] Finally, the preferred environment adjustment ratio range of the category object corresponding to the highest category priority after the third adjustment process is used as the target environment adjustment ratio range; the environment brightness adjustment ratio is limited according to the target environment adjustment ratio range to obtain the target exposure adjustment value; the automatic exposure module uses the target exposure adjustment value as a guide to adjust the exposure of the captured image. Through this solution, if the number of category objects in the captured image changes, the exposure adjustment amount is smaller than the traditional solution, the screen flickers less, and the experience is better.
[0118] See also Fig. 9 , Fig. 9 It is a structural schematic diagram of an exemplary embodiment of an exposure control device shown in the present application. The exposure control device 900 includes an acquisition module 910, a determination module 920, an adjustment module 930 and an exposure module 940. The acquisition module 910 is used to acquire the average brightness value of each category of objects in the collected image and the environmental brightness adjustment ratio of the collected image; the determination module 920 is used to determine the environmental adjustment ratio range of the preset exposure range corresponding to each category of objects according to the average brightness value of each category of objects in the collected image and the preset exposure range of each category of objects; the adjustment module 930 is used to adjust the environmental adjustment ratio range corresponding to the preset exposure range of each category of objects according to the category priority of each category of objects and the preset environmental ratio adjustment rule to obtain the target environmental adjustment ratio range of the target category object; the exposure module 940 is used to expose the collected image according to the size relationship between the environmental brightness adjustment ratio and the target environmental adjustment ratio range.
[0119] In the above scheme, the exposure control device of the embodiment of the present application obtains the average brightness value of each category of objects in the collected image and the environmental brightness adjustment ratio of the collected image; determines the environmental adjustment ratio range of the preset exposure range corresponding to each category of objects according to the average brightness value of each category of objects in the collected image and the preset exposure range of each category of objects; adjusts the environmental adjustment ratio range corresponding to the preset exposure range of each category of objects according to the category priority of each category of objects and the preset environmental ratio adjustment rule to obtain the target environmental adjustment ratio range of the target category object; and exposes the collected image according to the size relationship between the environmental brightness adjustment ratio and the target environmental adjustment ratio range. In this way, the environmental brightness adjustment ratio of the collected image is adjusted according to the category priority of each category of objects in the collected image and the corresponding environmental adjustment ratio range, taking into account the exposure requirements of objects of different categories and improving the exposure effect of the collected image.
[0120] The functions of each module can be found in the embodiment of the exposure control method, which will not be described in detail here.
[0121] In order to implement the exposure control method of the above embodiment, the present application proposes another electronic device, which is specifically referred to as Fig.10 , Fig.10 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application.
[0122] The electronic device 1000 includes a memory 1001 and a processor 1002 , wherein the memory 1001 and the processor 1002 are coupled.
[0123] The memory 1001 is used to store program data, and the processor 1002 is used to execute the program data to implement the exposure control method of the above embodiment.
[0124] In this embodiment, the processor 1002 may also be referred to as a CPU (Central Processing Unit). The processor 1002 may be an integrated circuit chip having signal processing capabilities. The processor 1002 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor 1002 may also be any conventional processor, etc.
[0125] The present application also provides a computer-readable storage medium, such as Fig.11 As shown, the computer-readable storage medium 1100 is used to store program data 1101. When the program data 1101 is executed by the processor, it is used to implement the exposure control method in the method embodiment of the present application.
[0126] The method involved in the embodiment of the exposure control method of the present application, when implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0127] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An exposure control method, characterized in that: The exposure control method comprises: Obtaining an average brightness value of each category of objects in a captured image and an adjustment ratio of an ambient brightness of the captured image, wherein the ambient brightness adjustment ratio represents an adjustment ratio for adjusting the brightness value of the captured image to an ambient target brightness, wherein the ambient target brightness is a preset brightness; Determine the environment adjustment ratio range of the preset exposure range corresponding to each category of objects according to the average brightness value of each category of objects in the collected image and the preset exposure range of each category of objects; According to the category priority of each category of objects, the environment adjustment ratio range corresponding to the preset exposure range of each category of objects is adjusted according to the preset environment ratio adjustment rule to obtain the target environment adjustment ratio range of the target category object; The collected image is exposed according to the size relationship between the environment brightness adjustment ratio and the target environment adjustment ratio range.
2. The exposure control method according to claim 1, characterized in that: The step of adjusting the environment adjustment ratio range corresponding to the preset exposure range of each category of objects according to the category priority of each category of objects and the preset environment ratio adjustment rule to obtain the target environment adjustment ratio range of the target category object includes: According to the category priority of each category of objects, the environment adjustment ratio range of the preset exposure range corresponding to each category of objects is adjusted according to the preset environment ratio adjustment rule to obtain the adjusted environment adjustment ratio range of each category of objects; The category object whose category priority is greater than the preset priority is determined as the target category object, and the target environment adjustment ratio range is determined based on the adjusted environment adjustment ratio range corresponding to the target category object.
3. The exposure control method according to claim 2, characterized in that: The environment adjustment ratio range of the preset exposure range corresponding to the category object includes an available environment adjustment ratio range and a preferred environment adjustment ratio range; The step of adjusting the environment adjustment ratio range of the preset exposure range corresponding to each category of objects according to the category priority of each category of objects and the preset environment adjustment ratio adjustment rule to obtain the adjusted environment adjustment ratio range of each category of objects includes: According to the category priorities of the objects of each category from high to low, starting from the category object corresponding to the highest category priority, the available environment adjustment ratio range and / or the preferred environment adjustment ratio range of the second category object are adjusted for the first time according to the available environment adjustment ratio range and / or the preferred environment adjustment ratio range of the first category object in the adjacent category priorities, to obtain the available environment adjustment ratio range and / or the preferred environment adjustment ratio range of the objects of each category after the first adjustment processing, the category priority of the first category object is higher than the category priority of the second category object, and the preferred environment adjustment ratio range of the objects of each category is within the available environment adjustment ratio range; According to the available environment adjustment ratio range of each category of objects after the first adjustment processing, a second adjustment processing is performed on the preferred environment adjustment ratio range of the corresponding category of objects after the first adjustment processing, to obtain the preferred environment adjustment ratio range and the available environment adjustment ratio range of each category of objects after the second adjustment processing; Selecting a target available environment adjustment ratio range from the available environment adjustment ratio range after the second adjustment processing of each category of objects according to the interval endpoint value of the available environment adjustment ratio range of each category of objects after the second adjustment processing; A third adjustment process is performed on the interval endpoint value of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority according to the interval endpoint value of the target available environment adjustment ratio range, to obtain the preferred environment adjustment ratio range of the category object corresponding to the highest category priority after the third adjustment process.
4. The exposure control method according to claim 3, characterized in that: The step of performing a first adjustment process on the available environment adjustment ratio range and / or the preferred environment adjustment ratio range of the second category object according to the available environment adjustment ratio range and / or the preferred environment adjustment ratio range of the first category object in the adjacent category priorities from high to low category priorities, and obtaining the available environment adjustment ratio range and / or the preferred environment adjustment ratio range of the category objects after the first adjustment process includes: In response to the left endpoint value of the interval of the available environment adjustment ratio range of the second category object not being within the available environment adjustment ratio range of the first category object, adjusting the left endpoint value of the interval of the available environment adjustment ratio range of the second category object until the left endpoint value of the interval of the available environment adjustment ratio range of the second category object is greater than or equal to the left endpoint value of the interval of the available environment adjustment ratio range of the first category object, and less than or equal to the right endpoint value of the interval of the available environment adjustment ratio range of the first category object; and / or, In response to the fact that the left endpoint value of the interval of the preferred environment adjustment ratio range of the second category object is not within the preferred environment adjustment ratio range of the first category object, the left endpoint value of the interval of the preferred environment adjustment ratio range of the second category object is adjusted until the left endpoint value of the interval of the preferred environment adjustment ratio range of the second category object is greater than or equal to the left endpoint value of the interval of the preferred environment adjustment ratio range of the first category object, and less than or equal to the right endpoint value of the interval of the preferred environment adjustment ratio range of the first category object.
5. The exposure control method according to claim 3, characterized in that: The step of performing a second adjustment process on the preferred environment adjustment ratio range of the corresponding category object after the first adjustment process according to the available environment adjustment ratio range of each category object after the first adjustment process to obtain the preferred environment adjustment ratio range and the available environment adjustment ratio range of each category object after the second adjustment process includes: In response to the fact that the left endpoint value of the interval of the preferred adjustment ratio range of each category object after the first adjustment processing is not within the available adjustment ratio range of the corresponding category object after the first adjustment processing, the left endpoint value of the interval of the preferred adjustment ratio range of the category object after the first adjustment processing is adjusted until the adjusted left endpoint value of the interval of the preferred adjustment ratio range of the category object is greater than or equal to the left endpoint value of the interval of the available adjustment ratio range after the first adjustment processing of the corresponding category object, and is less than or equal to the right endpoint value of the interval of the available environment adjustment ratio range after the first adjustment processing of the corresponding category object; and / or, In response to the fact that the right endpoint value of the interval of the preferred adjustment ratio range of each category object after the first adjustment processing is not within the available adjustment ratio range of the corresponding category object after the first adjustment processing, the right endpoint value of the interval of the preferred adjustment ratio range of the category object after the first adjustment processing is adjusted until the adjusted right endpoint value of the interval of the preferred adjustment ratio range of the category object is greater than or equal to the left endpoint value of the interval of the available adjustment ratio range of the corresponding category object after the first adjustment processing, and is less than or equal to the right endpoint value of the interval of the available environment adjustment ratio range of the corresponding category object after the first adjustment processing.
6. The exposure control method according to claim 3, characterized in that: The step of performing a third adjustment process on the interval endpoint value of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority according to the interval endpoint value of the target available environment adjustment ratio range to obtain the preferred environment adjustment ratio range of the category object corresponding to the highest category priority after the third adjustment process comprises: In response to the left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority being less than the left endpoint value of the interval of the target available environment adjustment ratio range, the left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority being adjusted until the adjusted left endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority being greater than or equal to the left endpoint value of the interval of the target available environment adjustment ratio range; and / or, In response to the right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority being greater than the right endpoint value of the interval of the target available environment adjustment ratio range, the right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is adjusted until the adjusted right endpoint value of the interval of the preferred environment adjustment ratio range of the category object corresponding to the highest category priority is less than or equal to the right endpoint value of the interval of the target available environment adjustment ratio range.
7. The exposure control method according to claim 1, characterized in that: The step of performing exposure processing on the collected image according to the size relationship between the ambient brightness adjustment ratio and the target environment adjustment ratio range comprises: In response to the environment brightness adjustment ratio being within the target environment adjustment ratio range, determining the environment brightness adjustment ratio as a target exposure adjustment value, wherein the target exposure adjustment value is used to perform exposure processing on the captured image; In response to the environment brightness adjustment ratio not being within the target environment adjustment ratio range, the environment brightness adjustment ratio is adjusted to be within the target environment adjustment ratio range to obtain the target exposure adjustment value.
8. The exposure control method according to claim 1, characterized in that: The preset exposure range corresponding to the category object includes a preferred exposure range; the environment adjustment ratio range of the preset exposure range of the category object includes a preferred environment adjustment ratio range; The step of determining the environment adjustment ratio range of the preset exposure range corresponding to each category of objects according to the average brightness value of each category of objects in the collected image and the preset exposure range of each category of objects comprises: Calculate the ratio between the left endpoint value of the interval of the preferred exposure range of each category of objects and the average brightness value of the corresponding category of objects to obtain the left endpoint value of the interval of the preferred environment adjustment ratio range corresponding to each category of objects; Calculate the ratio between the right endpoint value of the interval of the preferred exposure range of each category of objects and the average brightness value of the corresponding category of objects to obtain the right endpoint value of the interval of the preferred environment adjustment ratio range corresponding to each category of objects; The preferred environment adjustment ratio range corresponding to each category of objects is determined based on the left endpoint value of the interval of the preferred environment adjustment ratio range and the right endpoint value of the interval of the preferred environment adjustment ratio range.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the exposure control method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: include: Program data is stored, and when the program data is executed by a processor, it is used to implement the exposure control method according to any one of claims 1 to 8.
