An automatic exposure method, device and electronic equipment for multiple scenes
By marking and counting the brightness of pixels in frames, the automatic exposure time is calculated, which solves the problem of flexible adjustment of image sensors in different scenarios and realizes efficient and real-time automatic exposure processing in multiple scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG SUNNY INTELLIGENT OPTICAL TECH CO LTD
- Filing Date
- 2021-12-17
- Publication Date
- 2026-08-04
AI Technical Summary
Existing automatic exposure methods for image sensors cannot be flexibly adjusted in different application scenarios, resulting in overly coarse ROI selection, large computational load, slow response speed, or overexposure leading to image data loss. Furthermore, traditional algorithms consume a large amount of logical resources.
By marking the pixels of the frame to generate a marking pattern, calculating the brightness value, and calculating the automatic exposure time based on the brightness reference ratio, flexible automatic exposure processing for multiple scenes can be achieved.
It improves the versatility and real-time performance of automatic exposure, reduces computational complexity, and adjusts the exposure effect through a pre-set brightness reference ratio.
Smart Images

Figure CN116320770B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing, and more specifically to an automatic exposure method, apparatus, and electronic device for multiple scenarios. Background Technology
[0002] Currently, due to the diversity of application scenarios and imaging purposes, the ROI (Region of Interest) and characteristics of automatic exposure for image sensors vary. For example, in obstacle avoidance applications, priority exposure processing is needed for images of nearby objects; in robotic vacuum cleaner applications, only the image of the adjacent area on the ground is considered; in facial recognition payment applications, it is necessary to ensure the exposure of the central face region of the image; and in target tracking applications, it is necessary to track and expose dynamically changing target areas. Therefore, to improve the versatility of image sensors for different application scenarios, a mechanism that can be flexibly adjusted according to application characteristics is needed to eliminate or reduce the impact of the brightness of irrelevant image areas on automatic exposure.
[0003] Traditional automatic exposure calculations for dividing the ROI region typically employ the following methods:
[0004] (1) Divide the image into multiple sub-regions and determine several of them as ROI regions based on certain image features (such as histogram statistics). Then perform average brightness statistics on the ROI regions. The disadvantage of this method is that the selection of ROI regions is too coarse, and it cannot take into account both bright and dark areas when the scene changes significantly.
[0005] (2) Divide the image into multiple sub-regions and assign different weights to different sub-regions based on certain image features (such as histogram statistics), and then perform weighted average brightness statistics on all regions. This operation method can adapt to scenes with large changes in brightness and take into account image details, but it will increase the amount of computation in terms of information analysis, weight allocation and weighted operation of multiple sub-regions, reduce the automatic exposure response speed, and occupy more computing and storage resources of FPGA / ASIC systems.
[0006] (3) Generate a local window image mask around the image feature points, and then remove overexposed points from the pixels within the image mask and calculate the average brightness. This operation method can fully guarantee the exposure quality of areas with abundant image feature points, and the operation and statistics of only local windows in small areas can reduce the amount of computation and improve the automatic exposure response speed. However, this method is not suitable for scenes with few image feature points, and taking the average brightness will lead to the loss of image data in some overexposed areas under overexposed conditions.
[0007] In addition, there is a method that uses image fusion on masked images containing overexposed point light source markers to preserve details in bright areas of the image. However, this method only performs post-processing optimization on the overexposed images that have already been acquired and does not involve a real-time automatic exposure process.
[0008] Furthermore, traditional automatic exposure algorithms generally require histogram statistics of all effective pixels in the image or division of average brightness values. Such operations consume a lot of logic resources for FPGA / ASIC systems, so a new solution is needed to solve the problems in traditional algorithms. Summary of the Invention
[0009] Based on this, this application provides an automatic exposure method, apparatus, and electronic device for multiple scenarios. Supporting applications in different scenarios, the method involves marking pixels in a frame image to obtain a marking pattern, then statistically analyzing the brightness values of the pixels in the marking pattern to obtain a brightness statistical result, subsequently obtaining an exposure brightness value through a pre-set brightness reference ratio, and further determining the automatic exposure time for automatic exposure processing of the image.
[0010] According to one aspect of this application, an automatic exposure method for multiple scenarios is proposed, comprising:
[0011] Marking patterns are obtained by marking pixels in frames based on different scenarios;
[0012] The brightness value of each pixel in the marked pattern is statistically analyzed to obtain the brightness statistics result;
[0013] The automatic exposure time is obtained based on the brightness statistics.
[0014] According to some embodiments, the aforementioned method further includes: marking the pixels of the initial frame to obtain an initial marking pattern; statistically analyzing the brightness value of each pixel in the initial marking pattern to obtain an initial brightness statistical result; obtaining an initial automatic exposure time based on the initial brightness statistical result; and exposing the initial frame based on the initial automatic exposure time to obtain the initial exposure frame.
[0015] According to some embodiments, the aforementioned method further includes: marking the pixels of the initial frame at pixel intervals in the row and / or column directions.
[0016] According to some embodiments, the aforementioned method further includes: starting from the center pixel of the initial frame, drawing marking rays at angular intervals towards the edge of the initial frame; and marking pixels on the marking rays at pixel intervals.
[0017] According to some embodiments, the aforementioned method further includes: in a scenario where target tracking function is enabled, obtaining the center pixel of the target tracking region; starting from the center pixel of the target tracking region, drawing marking rays at angular intervals towards the edge of the frame; and marking pixels on the marking rays at pixel intervals.
[0018] According to some embodiments, the aforementioned method further includes: in a scenario where target tracking function is enabled, cropping the frame based on the target tracking region; starting from the center pixel of the cropped frame, drawing marking rays at angular intervals towards the edge of the cropped frame; and marking pixels on the marking rays at pixel intervals.
[0019] According to some embodiments, the aforementioned method further includes: in a scenario where an infrared camera is used, pre-setting a target temperature range; identifying the target position of the frame based on the acquisition results of the infrared camera and the target temperature range; and marking the pixels of the frame based on the result of the target position identification.
[0020] According to some embodiments, the aforementioned method further includes: in a scenario using a depth camera, pre-setting a target distance range; identifying the target position of the frame based on the acquisition results of the depth camera and the target distance range; and marking the pixels of the frame based on the result of the target position identification.
[0021] According to some embodiments, the aforementioned method further includes: obtaining the brightness value of each pixel in the marked pattern; and counting the number of pixels according to the brightness value range as the brightness statistics result.
[0022] According to some embodiments, the aforementioned method further includes: obtaining an exposure brightness value based on the brightness statistics and a preset brightness reference ratio; and obtaining an automatic exposure time based on the exposure brightness value and a preset brightness reference value.
[0023] According to one aspect of this application, an automatic exposure device for multiple scenarios is proposed, comprising: a pixel marking module, which marks the pixels of a frame image based on different scenarios to obtain a marking pattern; a brightness statistics module, which counts the brightness value of each pixel in the marking pattern to obtain a brightness statistics result; and an exposure adjustment module, which obtains an automatic exposure time based on the brightness statistics result.
[0024] According to one aspect of this application, an electronic device is provided, characterized in that it comprises: one or more processors; a storage device for storing one or more programs; and when the one or more programs are executed by the one or more processors, the one or more processors perform the method as described in any of the foregoing descriptions.
[0025] The beneficial effects of this application are:
[0026] According to some embodiments, the solution of this application can be applied to multiple different scenarios, thereby improving its versatility.
[0027] According to some embodiments, the present application's solution processes images on a frame-by-frame basis, improving the real-time performance of automatic exposure processing.
[0028] According to some embodiments, the present application's solution partially marks and further processes the pixels of the frame, reducing computational complexity.
[0029] According to some embodiments, this application can adjust the effect of automatic exposure by using a preset brightness reference ratio. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings, without exceeding the scope of protection claimed by this application.
[0031] Figure 1 A flowchart illustrating an automatic exposure method for multiple scenarios according to an embodiment of this application is shown.
[0032] Figure 2 A schematic diagram of a marker pattern is shown for an automatic exposure method for multiple scenarios according to an embodiment of this application.
[0033] Figure 3 This diagram illustrates a flow chart of brightness statistics for an automatic exposure method for multiple scenarios according to an embodiment of this application.
[0034] Figure 4 This diagram illustrates the automatic exposure time update process of an automatic exposure method for multiple scenarios according to an embodiment of this application.
[0035] Figure 5 A block diagram of an automatic exposure device for multiple scenarios according to an embodiment of this application is shown.
[0036] Figure 6 A block diagram of an electronic device according to an exemplary embodiment is shown. Detailed Implementation
[0037] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this application will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.
[0038] The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of these specific details, or other methods, components, materials, devices, or the like. In these cases, well-known structures, methods, devices, implementations, materials, or operations will not be shown or described in detail.
[0039] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0040] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0041] Existing automatic exposure solutions are sometimes based on dividing the image into Regions of Interest (ROIs), which may lead to a problem where the selected ROIs are too coarse and fail to account for both bright and dark areas of the image. Other existing automatic exposure solutions further divide the image into multiple sub-regions and perform weight allocation and brightness statistics on each, resulting in high computational complexity and slow response times.
[0042] To address the above issues, this application proposes an automatic exposure method, apparatus, and electronic device for multiple scenarios. By designing multi-scenario support, setting marker patterns, and performing brightness statistics on the marker patterns, the automatic exposure solution is made more flexible and efficient. A detailed description follows.
[0043] Figure 1A flowchart illustrating an automatic exposure method for multiple scenarios according to an embodiment of this application is shown.
[0044] It should be noted that exposure processing in a general sense is achieved by adjusting two parameters: one is adjusting the aperture size of the optical capturing device, such as the lens, i.e., the aperture value—the larger the aperture value, the greater the light transmission, and the brighter the exposure result; the other is adjusting the exposure time—the longer the exposure time, the greater the light transmission, and the brighter the exposure result. Due to limitations such as the type of image acquisition hardware in the application scenario of this application, the automatic exposure here is only related to the exposure time.
[0045] like Figure 1 As shown, in S101, the pixels of the frame are marked based on different scenes to obtain a marking pattern.
[0046] According to the example embodiments, this application supports multiple application scenarios, including global exposure scenarios, scenarios with target tracking enabled, scenarios using infrared cameras, and scenarios using depth cameras. It should be noted that this application will use the above scenarios as examples for illustration, but is not limited to these scenarios. All technical solutions, principles, and methods applied to this application fall within the protection scope of this application.
[0047] According to one embodiment, the aforementioned global exposure scenario can be used to perform initial exposure processing on the captured image. In the initial state, the relevant parameters of automatic exposure are undetermined, so initial exposure processing is required. That is, the initial automatic exposure time is obtained based on the initial frame image captured by the image acquisition device, and then the initial frame image is exposed using the initial exposure time to obtain an initial exposure image adapted to the captured image.
[0048] According to the example embodiment, when performing initial exposure processing, firstly, the pixels of the initial frame are marked to obtain an initial marking pattern.
[0049] According to one embodiment, the initial frame can be the first frame captured after the image acquisition device is put into operation.
[0050] According to one embodiment, marking the pixels of a frame is equivalent to selecting and distinguishing pixels to be processed. For example, 0 and 1 can be used for marking; pixels marked as 1 are selected for processing, while pixels marked as 0 are skipped and do not need processing. Although marking is performed, the "marking" behavior here specifically refers to the marking behavior applied to subsequent pixels to be processed.
[0051] According to the example embodiment, in a global exposure scene, pixels in the initial frame are marked at pixel intervals along the row and / or column directions. The number of pixels at these intervals can remain consistent throughout or change during processing. For ease of understanding and processing, a consistent pixel interval will be used in the explanation.
[0052] According to one embodiment, processing can begin with the first row of pixels in the initial frame, marking the first pixel. Assuming an interval of 8 pixels, the 9th pixel in the same row is then marked, and so on. Similarly, this method is used to mark pixels in the same column at intervals.
[0053] Alternatively, a pixel marking method with pixel intervals can be used on both rows and columns. According to one embodiment, assuming the image size is 640×480 (pixels), when the interval pixel number is 8, the number of pixels obtained after marking on the rows and columns will be 80×60, or 4800.
[0054] According to one embodiment, the number of pixels spaced can be flexibly adjusted according to the accuracy requirements of the actual application. A smaller number of pixels spaced means a higher accuracy requirement, requiring more pixels to be marked for automatic exposure processing, but this increases the computational load, as seen in applications like face recognition. Conversely, a larger number of pixels spaced means a lower accuracy requirement, significantly reducing the computational burden and improving processing efficiency, as seen in applications like robotic vacuum cleaners.
[0055] According to the example embodiment, in a global exposure scenario, a marking ray can be drawn from the center pixel of the initial frame towards the edge of the initial frame at angular intervals, and pixels can be marked on the marking ray at intervals of pixel number.
[0056] In practical applications, the effective information in images captured by image acquisition devices is usually concentrated near the center of the image. Just like the human eye, which tends to place what it wants to see in the center of its field of vision. In other words, content near the image center is more important and has less reference value than content near the image edges. Therefore, the method for deriving the marking pattern in this embodiment aims to concentrate the marked pixels at the image center and disperse them at the image edges.
[0057] According to one embodiment, similar to the selection principle for the pixel number interval mentioned earlier, the interval angle here can be either an equal interval angle or a variable interval angle. For ease of understanding and computational processing, an equal interval angle will be used here. The interval angle is related to the required number of marker rays; that is, the larger the interval angle, the sparser the marker rays and the fewer the number of marker rays; the smaller the interval angle, the denser the marker rays and the more the number of marker rays. The density of the marker rays also depends on the requirements of the application scenario. For example, the higher the accuracy requirement of the application scenario, the denser the marker rays need to be, but this will increase the overall computational burden, and vice versa. Therefore, the interval angle can be derived based on the required number of marker rays. For example, when 12 marker rays are required, the interval angle is 360° / 12 = 30°.
[0058] refer to Figure 2 As shown in the schematic diagram, the highlighted dots represent the marked pixels. According to one embodiment, the image center point can be marked first, and then a ray can be drawn horizontally from this point towards the image edge. Subsequently, rays can be drawn from the image center point at equal angles towards the image edge until returning to the initial ray. The angle of each rotation can be calculated based on the planned number of rays to be drawn. Then, pixel markings can be selected on each ray at intervals similar to the previously described number of pixels. This method of selecting marking patterns will better suit general practical applications.
[0059] According to one embodiment, as described above, the angle of the interval can be adjusted according to the accuracy requirements of the application scenario. That is, the higher the accuracy requirement, the smaller the angle of the interval can be, and the lower the accuracy requirement, the larger the angle of the interval can be.
[0060] According to the example embodiment, after obtaining the initial marker pattern, the brightness value of each pixel in the initial marker pattern is statistically analyzed to obtain the initial brightness statistical result. Then, the initial automatic exposure time is obtained based on the initial brightness statistical result. This processing method is similar to the processing method for the marker pattern in different scenarios later, as detailed below.
[0061] According to the example embodiment, after obtaining the initial automatic exposure time, the initial frame image is exposed based on the initial automatic exposure time to obtain the initial exposure frame image. The initial exposure frame image is the starting processing frame image for the multi-scenario application described later.
[0062] According to the example embodiment, this application improves the real-time performance of automatic exposure by performing automatic exposure processing on each frame of the image acquisition device.
[0063] According to one embodiment, the marker pattern need not be an actual pattern. Rather, for ease of description and understanding, the set of pixels to be processed later, for example marked as 1, is referred to as the marker pattern. It is evident that the marker pattern is a subset of the original frame's pixels, with a smaller number of pixels than the total number of pixels in the frame, thus reducing the overall processing computation.
[0064] According to the example embodiment, if the target tracking function is enabled, the center pixel of the target tracking area can be selected as the starting point, and marking rays can be drawn towards the edge of the frame at angular intervals. Furthermore, pixels are marked on these marking rays at pixel intervals. The method is similar to the method described in the global exposure section, except that the starting point is changed from the center pixel of the frame to the center pixel of the target tracking area; this will not be elaborated further here.
[0065] According to another embodiment, the frame can be cropped based on the target tracking area, and then the cropped frame can be processed as described above for the global exposure scene.
[0066] According to one embodiment, if the target tracking region is rectangular, the rectangular region of the frame is directly cropped. If the target tracking region is irregularly shaped, the smallest rectangle that can cover the irregularly shaped target tracking region is cropped from the frame.
[0067] According to one embodiment, the user can actively choose whether to enable the target tracking function. Target tracking refers to tracking a specific target area or entity in the image. If the target tracking function is enabled, automatic exposure processing based on the target tracking area will yield more ideal automatic exposure results.
[0068] According to another embodiment, if a user chooses to disable the target tracking function while it is enabled, the aforementioned automatic exposure method for global exposure will be restored.
[0069] According to the example embodiment, in a scenario where an infrared camera is used, a target temperature range is preset; based on the acquisition results of the infrared camera and the target temperature range, the target position of the frame is identified; based on the result of the target position identification, the pixels of the frame are marked.
[0070] According to one embodiment, the results captured by the infrared camera can reflect the temperature of various parts of the captured image, specifically the temperature of each pixel. In applications such as facial recognition, the target temperature range can be set to the approximate temperature of the human body, such as 35-37 degrees Celsius. This allows for target location identification of the face portion in the frame. Based on the target location identification result, the pixels at the target location are marked for subsequent automatic exposure processing, thus ensuring that the automatic exposure result is optimized for the presentation of the face portion in the frame. This application scenario can adequately guarantee the exposure effect of image details in areas that conform to the predetermined temperature range.
[0071] According to the example embodiment, in a scenario using a depth camera, a target distance range is preset; based on the acquisition results of the depth camera and the target distance range, the target position of the frame is identified; based on the result of the target position identification, the pixels of the frame are marked.
[0072] According to one embodiment, the depth camera can be a Time-of-Flight (TOF) camera. By using a depth camera, the depth of objects in the image can be obtained, that is, the depth of each pixel, which is the distance from the shooting position. Similarly, a target distance range can be set, for example, within 1 meter. Then, objects within 1 meter in the frame will be identified. Based on the target location identification result, the pixels at the target location are marked to obtain a marker pattern. This automatic exposure processing can fully preserve image details in close-range areas within 1 meter and eliminate exposure interference from distant images beyond 1 meter.
[0073] In S103, the brightness value of each pixel in the marked pattern is statistically analyzed to obtain the brightness statistics result.
[0074] According to the example embodiment, firstly, the brightness value of each pixel in the marked pattern is obtained; then, the number of pixels is counted according to the brightness value range, which is used as the brightness statistics result. (See also...) Figure 3 A schematic diagram of the brightness statistics process is provided, and further explanation will follow.
[0075] According to some embodiments, the aforementioned brightness statistics can be represented as a brightness histogram.
[0076] According to one embodiment, the pixels of the frame can be traversed, the brightness value of the pixels marked as 1 can be counted and recorded, and the pixels marked as 0 can be skipped.
[0077] In image processing, the brightness value of each pixel typically ranges from 0 to 255, a total of 256 levels. 0 represents the darkest, 255 represents the brightest, and values between 0 and 255 represent the brightness variations between the brightest and darkest. By statistically analyzing the brightness values of the pixels marked as 1, a brightness histogram of the marked pattern can be obtained. In other words, this involves counting the number of pixels belonging to each brightness value among the marked pixels. This statistical result is the aforementioned brightness statistical result.
[0078] According to one embodiment, the brightness value range is a range of brightness values that is artificially divided based on the span of brightness values. Based on a total of 256 brightness levels, 16 brightness value ranges can be divided, with each range covering 16 brightness levels. For example, 0-15 can be divided as the first brightness value range, 16-31 as the second brightness value range, and so on.
[0079] According to another embodiment, each brightness level can also be considered as a brightness value range, resulting in a total of 256 brightness value ranges.
[0080] According to one embodiment, the brightness statistics record the number of pixels in the corresponding brightness value range of the marked pattern.
[0081] In S105, the automatic exposure time is obtained based on the brightness statistics.
[0082] According to the example embodiment, the exposure brightness value is first calculated based on the brightness statistics of the marked pattern and the brightness reference ratio.
[0083] According to one embodiment, the brightness reference ratio is an empirical value, typically set to 5%. A higher brightness reference ratio means that a larger proportion of the total number of frame data is taken, while a lower ratio means that a smaller proportion of the total number of frame data is taken.
[0084] According to one embodiment, the brightness reference ratio can be set and adjusted by the user.
[0085] The obtained exposure brightness value can reflect the exposure of the current frame, that is, the brightness of the overall frame.
[0086] According to the example embodiment, the automatic exposure time is obtained based on the exposure brightness value and a preset brightness reference value.
[0087] According to one embodiment, a preset brightness reference value can reflect the desired brightness of the image after exposure adjustment. It can also be understood as a benchmark for adjusting the exposure level of the current frame.
[0088] According to one embodiment, the brightness reference value can also be set and adjusted by the user according to the application scenario.
[0089] According to one embodiment, based on the aforementioned exposure brightness value and a preset brightness reference value, the difference between the exposure brightness value and the brightness reference value can be calculated, and the exposure parameters of the current frame are adjusted according to this difference. Generally speaking, if the brightness reflected by the exposure brightness value is brighter than the brightness reference value, then the exposure of the current frame needs to be reduced to bring it closer to the range of the brightness reference value; conversely, if the brightness reflected by the exposure brightness value is darker than the brightness reference value, then the exposure of the current frame needs to be increased.
[0090] According to one embodiment, the automatic exposure time can be calculated based on the difference between the aforementioned exposure brightness value and the brightness reference value. This process is common knowledge in the art and will not be described in detail here. It is worth mentioning that, generally speaking, increasing the exposure time will result in a brighter exposure, while shortening the exposure time will result in a darker exposure.
[0091] According to some embodiments, automatic exposure processing can be performed on the frame image after the automatic exposure time is obtained.
[0092] According to other embodiments, reference can be made to Figure 4 The diagram illustrating the automatic exposure time update process shows that for each frame after the initial frame, the automatic exposure time obtained from the previous frame is used to perform the initial exposure, and then the automatic exposure time for the current frame is calculated. For the initial frame, the initial automatic exposure time is obtained using the aforementioned method. The initial frame is the first frame.
[0093] Figure 5 A block diagram of an automatic exposure device for multiple scenarios according to an embodiment of this application is shown.
[0094] like Figure 5 As shown, the automatic exposure device for multiple scenes includes a pixel marking module 501, a brightness statistics module 503, and an exposure adjustment module 505, wherein:
[0095] The pixel marking module 501 marks the pixels of the frame based on different scenes to obtain marking patterns;
[0096] The brightness statistics module 503 counts the brightness value of each pixel in the marked pattern and obtains the brightness statistics result.
[0097] The exposure adjustment module 507 obtains the automatic exposure time based on the brightness statistics.
[0098] The automatic exposure device for multiple scenarios performs similar functions to the aforementioned method, as described above, and will not be repeated here.
[0099] Figure 6 A block diagram of an electronic device according to an exemplary embodiment is shown.
[0100] The following reference Figure 6 To describe an electronic device 600 according to this embodiment of the present application. Figure 6 The electronic device 600 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0101] like Figure 6 As shown, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including storage unit 620 and processing unit 610), a display unit 640, etc.
[0102] The storage unit stores program code, which can be executed by the processing unit 610 to perform the methods described in this specification according to various exemplary embodiments of this application. For example, the processing unit 610 can perform the methods described above.
[0103] Storage unit 620 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 6201 and / or cache memory 6202, and may further include a read-only memory (ROM) 6203.
[0104] Storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0105] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0106] Electronic device 600 can also communicate with one or more external devices 6001 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0107] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. The technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, or network device, etc.) to execute the methods described above according to the embodiments of this application.
[0108] Software products may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0109] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0110] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0111] The aforementioned computer-readable medium carries one or more programs, which, when executed by a device, cause the computer-readable medium to perform the aforementioned functions.
[0112] Those skilled in the art will understand that the above modules can be distributed in the device as described in the embodiments, or they can be modified accordingly and placed in one or more devices that are unique to this embodiment. The modules in the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.
[0113] Through the description of the above embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this application.
[0114] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. Furthermore, any changes or modifications made by those skilled in the art based on the ideas of this application, and on the specific implementation methods and application scope of this application, are all within the scope of protection of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. An automatic exposure method for multiple scenes, comprising: Marking patterns are obtained by marking the pixels of the initial exposure frame based on different scenarios. The marking of the pixels of the initial exposure frame is the selection and differentiation of pixels to be processed. The brightness value of each pixel in the marked pattern is statistically analyzed to obtain the brightness statistics results of the corresponding scene; The automatic exposure time for the corresponding scene is obtained based on the brightness statistics. The different scenarios include at least a global exposure scenario, a scenario with target tracking enabled, a scenario using an infrared camera, and a scenario using a depth camera. The process of marking pixels in the initial exposure frame based on different scenes to obtain a marking pattern includes: In scenarios where target tracking is enabled, obtain the center pixel of the target tracking area; Starting from the center pixel of the target tracking region, mark rays are drawn at angular intervals toward the edge of the initial exposure frame; Pixels are marked on the marking ray at intervals of pixel count; or The process of marking pixels in the initial exposure frame based on different scenes to obtain a marking pattern includes: In scenarios where target tracking is enabled, the initial exposure frame is captured based on the target tracking area; Starting from the center pixel of the cropped frame, mark rays are drawn at angular intervals towards the edge of the cropped frame; Pixels are marked on the marking ray at intervals of pixel number.
2. The method of claim 1, wherein, Before marking the pixels of the initial exposure frame based on different scenes to obtain the marking pattern, the method further includes: The pixels of the initial frame are marked to obtain the initial marking pattern; The brightness value of each pixel in the initial marking pattern is statistically analyzed to obtain the initial brightness statistics. The initial automatic exposure time is obtained based on the initial brightness statistics. The initial exposure frame is obtained by exposing the initial frame based on the initial automatic exposure time.
3. The method of claim 2, wherein, The step of marking the pixels of the initial frame to obtain the initial marking pattern includes: The pixels of the initial frame are marked at intervals of pixel count in the row and / or column directions.
4. The method of claim 2, wherein, The step of marking the pixels of the initial frame to obtain the initial marking pattern also includes: Starting from the center pixel of the initial frame, mark rays are drawn towards the edge of the initial frame at angular intervals. Pixels are marked on the marking ray at intervals of pixel number.
5. The method of claim 1, wherein, The step of marking pixels in the initial exposure frame based on different scenarios to obtain a marking pattern also includes: In scenarios where infrared cameras are used, the target temperature range is preset; Based on the data collected by the infrared camera and the target temperature range, the target position is identified in the initial exposure frame. Based on the result of the target location identification, the pixels of the initial exposure frame are marked.
6. The method of claim 1, wherein, The step of marking pixels in the initial exposure frame based on different scenarios to obtain a marking pattern also includes: In scenarios where a depth camera is used, the target distance range is preset; Based on the acquisition results of the depth camera and the target distance range, the target position is identified in the initial exposure frame. Based on the result of the target location identification, the pixels of the initial exposure frame are marked.
7. The method of claim 1, wherein, The step of statistically analyzing the brightness value of each pixel in the marked pattern to obtain the brightness statistics result for the corresponding scene includes: Obtain the brightness value of each pixel in the marked pattern; The number of pixels is counted according to the brightness value range, which is used as the brightness statistics result.
8. The method of claim 7, wherein, The automatic exposure time for the corresponding scene based on the brightness statistics includes: Based on the brightness statistics and the preset brightness reference ratio, the exposure brightness value is obtained; The automatic exposure time is obtained based on the exposure brightness value and the preset brightness reference value.
9. An automatic exposure device for multiple scenarios, comprising: The pixel marking module marks the pixels of the initial exposure frame image based on different scenarios to obtain marking patterns. The marking of the pixels of the initial exposure frame image is for the selection and differentiation of pixels to be processed. The brightness statistics module counts the brightness value of each pixel in the marked pattern to obtain the brightness statistics result of the corresponding scene. The exposure adjustment module obtains the automatic exposure time for the corresponding scene based on the brightness statistics. The different scenarios include at least a global exposure scenario, a scenario with target tracking enabled, a scenario using an infrared camera, and a scenario using a depth camera. The process of marking pixels in the initial exposure frame based on different scenes to obtain a marking pattern includes: In scenarios where target tracking is enabled, obtain the center pixel of the target tracking area; Starting from the center pixel of the target tracking region, mark rays are drawn at angular intervals toward the edge of the initial exposure frame; Pixels are marked on the marking ray at intervals of pixel count; or The process of marking pixels in the initial exposure frame based on different scenes to obtain a marking pattern includes: In scenarios where target tracking is enabled, the initial exposure frame is captured based on the target tracking area; Starting from the center pixel of the cropped frame, mark rays are drawn at angular intervals towards the edge of the cropped frame; Pixels are marked on the marking ray at intervals of pixel number.
10. An electronic device, comprising: include: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-9.