Automatic Exposure Method, Device, Electronic Device and Storage Medium of a Shooting Device
Through the multi-object tracking algorithm, the target person that meets the preset conditions is selected as the metering target, and the exposure parameters are determined based on the target metering area, which solves the problem of unstable exposure parameters in the prior art in multiple faces or long-distance shooting scenes, and improves the stability and accuracy of exposure.
Patent Information
- Application Number
- CN202211201344.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2042-09-29
AI Technical Summary
In the prior art, it is difficult to maintain the stability and accuracy of exposure parameters in multiple faces or long-distance shooting scenarios, resulting in unstable changes in picture brightness.
Multi-objective tracking algorithm is used to track multiple characters targets, select the target person corresponding to the detection box that meets the preset conditions as the metering target, and determine the exposure parameters based on the target metering area.
By avoiding frequent switching between different characters of the metering target, the continuity, stability and accuracy of the target metering area are ensured, thereby improving the stability and accuracy of the exposure of the shooting equipment.
Smart Images

Figure CN115550558B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image shooting, and particularly to an automatic exposure method, device, electronic device, and storage medium for a shooting device. Background Art
[0002] With the development of image shooting technology, electronic devices have penetrated into our lives, and more and more people use the cameras of electronic devices to take pictures to record their lives. Currently, the cameras on electronic devices all have an automatic exposure function, and determine the exposure parameters of the shooting scene through an automatic light measurement mode to achieve automatic adjustment of the exposure parameters. Common automatic light measurement modes include evaluative metering, spot metering, center-weighted average metering, and so on.
[0003] However, in the related art, only the exposure accuracy problem of a single face scene at a short distance can be solved. However, when there are multiple faces in the scene, it is easy to cause frequent jumps in the light measurement area; or, when the face is far from the electronic device or the shooting scene has poor light, it is easy to miss the face that wants to be detected; in these cases, there will be frequent adjustments of the exposure parameters, and the change of the picture brightness is unstable and inaccurate, which is not conducive to the stable shooting of images and is also not conducive to obtaining images with better exposure effects. Therefore, how to improve the exposure stability and accuracy to improve the stability of the image imaging effect has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide an automatic exposure method, device, electronic device, and storage medium for a shooting device that can improve the exposure stability and accuracy.
[0005] In a first aspect, the present application provides an automatic exposure method for a shooting device. The method includes:
[0006] Performing target tracking on multiple persons based on a multi-target tracking algorithm to obtain multiple target tracking results; the multiple target tracking results include detection frames corresponding to the multiple persons in a video frame sequence;
[0007] When there is a detection frame in the multiple target tracking results that meets a preset condition, using the target person corresponding to the detection frame as a light measurement target; the preset condition is that multiple consecutive detection frames in the detection frames corresponding to the same person are all larger than the light measurement area corresponding to the current video frame, or the detection frame corresponding to the current video frame is r times the light measurement area corresponding to the current video frame; where r > 1;
[0008] Using the area framed by the current detection frame of the light measurement target as the target light measurement area;
[0009] Determine the exposure parameter corresponding to the current video frame according to the target photometric region.
[0010] In one embodiment, the method further includes:
[0011] Among the multiple target tracking results, find a detection box that is larger than the photometric region corresponding to the current video frame and belongs to the same person;
[0012] Determine whether the detection boxes of the same person are larger than the photometric region corresponding to the current video frame for multiple consecutive frames;
[0013] If so, determine that there is a detection box in the multiple target tracking results that meets the preset conditions, and then perform the step of using the target person corresponding to the detection box as the photometric target; the target person belongs to one of the same persons;
[0014] If not, determine that there is no detection box in the multiple target tracking results that meets the preset conditions, and then keep the original photometric target.
[0015] In one embodiment, the method further includes:
[0016] Determine whether there is a detection box in the multiple target tracking results that is larger than r times the photometric region corresponding to the current video frame;
[0017] If so, determine that there is a detection box in the multiple target tracking results that meets the preset conditions, and then perform the step of using the target person corresponding to the detection box as the photometric target;
[0018] If not, determine that there is no detection box in the multiple target tracking results that meets the preset conditions, and then keep the original photometric target.
[0019] In one embodiment, determining whether there is a detection box in the multiple target tracking results that is larger than r times the photometric region corresponding to the current video frame includes:
[0020] Among the multiple target tracking results, find a detection box that is larger than r times the photometric region corresponding to the current video frame and belongs to the same person; wherein, the target person belongs to one of the same persons;
[0021] Determine whether the detection boxes of the same person are larger than r times the photometric region corresponding to the current video frame for multiple consecutive frames..
[0022] In one embodiment, the determining the exposure parameter corresponding to the current video frame according to the target photometric region includes:
[0023] Perform photometry on the target photometric region to obtain the exposure parameter corresponding to the current video frame.
[0024] In one embodiment, determining the exposure parameter corresponding to the current video frame according to the target metering area includes:
[0025] Performing metering on the target metering area to obtain a first exposure parameter;
[0026] Performing center-weighted average metering on the current video frame to obtain a second exposure parameter;
[0027] Calculating the exposure parameter corresponding to the current video frame according to the first exposure parameter and the second exposure parameter.
[0028] In a second aspect, the present application also provides an automatic exposure device for a photographing device. The device includes:
[0029] A target tracking module, configured to perform target tracking on multiple persons based on a multi-target tracking algorithm to obtain multiple target tracking results; the multiple target tracking results include detection frames corresponding to the multiple persons in the video frame sequence;
[0030] A metering target determination module, configured to use the target person corresponding to the detection frame as the metering target when there is a detection frame in the multiple target tracking results that meets a preset condition; the preset condition is that multiple consecutive detection frames among the detection frames corresponding to the same person are larger than the metering area corresponding to the current video frame, or the detection frame corresponding to the current video frame is r times the metering area corresponding to the current video frame; where r > 1;
[0031] A target metering area determination module, configured to use the area framed by the current detection frame of the metering target as the target metering area;
[0032] An exposure parameter determination module, configured to determine the exposure parameter corresponding to the current video frame according to the target metering area.
[0033] In a third aspect, the present application also provides an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps of the automatic exposure method of the photographing device in the first aspect embodiment are implemented.
[0034] In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the automatic exposure method of the photographing device in the first aspect embodiment are implemented.
[0035] In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program which, when executed by a processor, implements the steps of the automatic exposure method of the photographing device in the first aspect embodiments.
[0036] For the above-mentioned automatic exposure method, device, electronic device and storage medium of the photographing device, based on a multi-target tracking algorithm, multi-person target tracking is performed to obtain multiple target tracking results. The multiple target tracking results include detection frames corresponding to multiple persons in the video frame sequence. When there are detection frames in the multiple target tracking results that meet the preset conditions, the target person corresponding to the detection frame is used as the metering target. The preset condition is that multiple consecutive detection frames among the detection frames corresponding to the same person are larger than the metering area corresponding to the current video frame, or the detection frame corresponding to the current video frame is r times the metering area corresponding to the current video frame. Then, the area framed by the current detection frame of the metering target is used as the target metering area, and finally, the exposure parameter corresponding to the current video frame is determined according to the target metering area. In the technical solution of the present application, by tracking multiple targets with a multi-target tracking algorithm and selecting the target person corresponding to the detection frame that meets the preset conditions among the multiple tracking results as the metering target, and then using the area framed by the current detection frame of the metering target as the target metering area, and determining the exposure parameter according to the target metering area, it avoids the frequent switching of the metering target among different persons, ensures the continuity, stability and accuracy of the target metering area, thereby improving the stability and accuracy of the exposure of the photographing device, solving the problems of frequent adjustment of exposure parameters and unstable and inaccurate change of picture brightness in the prior art, improving the stability of the imaging effect, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a schematic flowchart of the automatic exposure method of the photographing device in one embodiment;
[0038] Figure 2 It is a schematic flowchart of the automatic exposure method of the photographing device in another embodiment;
[0039] Figure 3 It is a schematic flowchart of the automatic exposure method of the photographing device in another embodiment;
[0040] Figure 4 It is a schematic flowchart of the automatic exposure method of the photographing device in another embodiment;
[0041] Figure 5 It is a schematic structural diagram of the automatic exposure device of the photographing device in one embodiment;
[0042] Figure 6 It is an internal structural diagram of an electronic device in one embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0043] In order to make the objectives, technical solutions, and advantages of this application more clear and understandable, the following further details this application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely used to explain this application and are not used to limit this application.
[0044] In one embodiment, as Figure 1 shown, an automatic exposure method for a photographing device is provided. In this embodiment, this method is exemplified by being applied to a terminal, where the terminal includes but is not limited to electronic devices capable of photographing such as cameras, smartphones, tablets, and PC computers. In this embodiment, the method includes the following steps:
[0045] Step 102, perform object tracking on multiple persons based on a multi-object tracking algorithm to obtain multiple object tracking results; the multiple object tracking results include detection frames corresponding to multiple persons in the video frame sequence.
[0046] Among them, the multi-object tracking algorithm may refer to an algorithm for simultaneously performing object tracking on multiple persons. The multi-object tracking algorithm includes but is not limited to algorithms such as Simple Online Real-time Tracking (SORT) algorithm and Deep Simple Online Real-time Tracking (Deep SORT) algorithm, etc.
[0047] The multiple object tracking results may refer to the results of performing object tracking on multiple persons using the multi-object tracking algorithm. The multiple object tracking results include detection frames corresponding to multiple persons in the video frame sequence. The detection frame may be an external rectangle frame of the face region of a person.
[0048] The video frame sequence may refer to a sequence composed of the current video frame and all the video frames before the current video frame.
[0049] Exemplarily, use the Deep SORT algorithm to perform object tracking on multiple persons in the current video frame to obtain multiple object tracking results corresponding to the current video frame. Among them, the multiple object tracking results include detection frames corresponding to multiple persons in the video frame sequence.
[0050] For example, assume that the current video frame is the t-th video frame and the current video frame contains n persons. Then the multiple object tracking results corresponding to the current video frame can be expressed as: T = {T1, T2, …, T n}, where, where, t0 represents the frame number when the n-th person first appears in the video frame, represents the detection frame of this person in the t-th video frame.
[0051] In some embodiments, the following steps may be taken to obtain the detection box of each person in the current video frame:
[0052] Perform object detection on the current video frame to obtain the detection box corresponding to each person in the current video frame.
[0053] Among them, the methods for performing object detection on the current video frame may include: common detection methods, detection methods based on handcrafted features, or detection methods based on convolutional neural network technology. Among them, the detection methods based on handcrafted features include, but are not limited to, template matching method, key point matching method, and key feature method. The detection methods based on convolutional neural network technology include, but are not limited to, YOLO (You Only Look Once Detector), SSD (Single Shot MultiBox Detector), R-CNN (Region-based Convolutional Neural Networks), Mask R-CNN (Mask Region-based Convolutional Neural Networks).
[0054] Exemplarily, use the YOLO algorithm to perform object detection on the current video frame to obtain the detection box corresponding to each person in the current video frame.
[0055] Assume that the current video frame contains n persons. Then, when performing object detection on the current video frame, the detection boxes corresponding to the n persons in the current video frame are obtained. After obtaining the detection boxes corresponding to the n persons in the current video frame, use a multi-object tracking algorithm for object tracking, and the association between the detection boxes corresponding to the multiple persons in the current video frame and the detection boxes corresponding to the multiple persons in the video frames before the current video frame can be realized, and multiple object tracking results corresponding to the current video frame are obtained. The multiple object tracking results corresponding to the current video frame can be expressed as: T = {T1, T2,..., T n}, where where t0 represents the frame number when the nth person first appears in the video frame, represents the detection box of this person in the tth video frame.
[0056] Step 104, when there is a detection box that meets the preset condition among multiple target tracking results, use the target person corresponding to the detection box as the photometric target; the preset condition is that multiple consecutive detection boxes among the detection boxes corresponding to the same person are larger than the photometric region corresponding to the current video frame, or the detection box corresponding to the current video frame is r times the photometric region corresponding to the current video frame; where r > 1.
[0057] Among them, the preset condition can refer to a pre-set condition. This preset condition can be pre-set by the user in the processor of the shooting device, or pre-set by the user in a terminal (such as a PC, personal computer, tablet computer, etc.) that is communicatively connected to the shooting device and used to process the data in the shooting device; it can also be automatically pre-set by the shooting device or the terminal (such as a PC, personal computer, tablet computer, etc.). For this, the present application does not make specific restrictions. To ensure the continuity, accuracy, and stability of the photometric target, this preset condition tends to use a larger detection box and / or tends to use the detection box corresponding to the same person as the previous video frame when setting. Therefore, the preset condition can be that multiple consecutive detection boxes among the detection boxes corresponding to the same person are larger than the photometric region corresponding to the current video frame, or the detection box corresponding to the current video frame is r times the photometric region corresponding to the current video frame; where r > 1.
[0058] Exemplarily, according to the foregoing steps, multiple target tracking results are obtained. When there is a detection box that meets the preset condition among the multiple target tracking results, the target person corresponding to the detection box is used as the photometric target, thus ensuring the accuracy, continuity, and stability of the photometric target.
[0059] It should be noted that if there are multiple detection boxes that meet the preset condition, then select the person corresponding to the detection box with the largest framed area among the multiple detection boxes that meet the preset condition as the photometric target.
[0060] Step 106, use the area framed by the current detection box of the photometric target as the target photometric region.
[0061] Among them, the target photometric region can refer to the region used for photometry. This region can be the face region of the photometric target.
[0062] Exemplarily, assume the photometric target is T k , where t0 represents the frame number when this photometric target first appears in the video frame, represents the detection box of this photometric target in the t-th video frame (this detection box can be an external rectangular box), then use the area framed by as the target photometric region corresponding to the photometric target.
[0063] Step 108: Determine the exposure parameter corresponding to the current video frame according to the target metering area.
[0064] Among them, the exposure parameter can refer to the parameter for adjusting the shooting device to change the overall brightness value of the picture or video frame captured by the shooting device. The exposure parameters include, but are not limited to, aperture, shutter speed, and ISO. Among them, the larger the aperture, the more exposure the captured picture has, and the smaller the aperture, the less exposure the captured picture has. The shutter speed can refer to the exposure time, and the exposure amount can be adjusted by adjusting the exposure time. The ISO is often set to the lowest value, and its common gears are 100, 200, 400, 800, 1600, 3200, 6400, etc. The adjacent gears differ by a factor of two in value, and the corresponding exposure amounts also differ by a factor of two.
[0065] Exemplarily, metering can be performed on the target metering area to obtain the exposure parameter corresponding to the current video frame, and then the exposure parameter is used to adjust the overall brightness value of the picture or video frame captured by the shooting device.
[0066] In the automatic exposure method of the shooting device according to the embodiment of the present application, multiple people are target-tracked based on the multi-object tracking algorithm to obtain multiple target tracking results. The multiple target tracking results include detection frames corresponding to multiple people in the video frame sequence. When there is a detection frame that meets the preset condition among the multiple target tracking results, the target person corresponding to the detection frame is used as the metering target. The preset condition is that multiple consecutive detection frames among the detection frames corresponding to the same person are all larger than the metering area corresponding to the current video frame, or the detection frame corresponding to the current video frame is r times the metering area corresponding to the current video frame. Then, the area framed by the current detection frame of the metering target is used as the target metering area, and finally, the exposure parameter corresponding to the current video frame is determined according to the target metering area. The technical solution of the present application tracks multiple targets through the multi-object tracking algorithm, selects the target person corresponding to the detection frame that meets the preset condition among the multiple target tracking results as the metering target, then uses the area framed by the current detection frame of the metering target as the target metering area, and determines the exposure parameter according to the target metering area, avoiding frequent switching of the metering target among different people, ensuring the continuity, stability, and accuracy of the target metering area, thereby improving the stability and accuracy of the exposure of the shooting device, solving the problems of frequent adjustment of exposure parameters and unstable and inaccurate change of picture brightness in the prior art, improving the stability of the imaging effect, and improving the user experience.
[0067] As Figure 2 shown, in some embodiments, the automatic exposure method of the shooting device further includes the following steps:
[0068] Step 202: Among multiple target tracking results, search for detection frames that are larger than the photometric region corresponding to the current video frame and belong to the same person.
[0069] Step 204: Determine whether the detection frames of the same person are larger than the photometric region corresponding to the current video frame for multiple consecutive frames.
[0070] Step 206: If so, it is determined that there is a detection frame in the multiple target tracking results that meets the preset conditions, and then perform the step of taking the target person corresponding to the detection frame as the photometric target; the target person belongs to one of the same persons.
[0071] Step 208: If not, it is determined that there is no detection frame in the multiple target tracking results that meets the preset conditions, and then keep the original photometric target.
[0072] Among them, the original photometric target can refer to the photometric target of the current video frame before replacing the photometric target, and the photometric region corresponding to the original photometric target is the photometric region corresponding to the current video frame.
[0073] Exemplarily, use T a to represent the detection frame corresponding to the original photometric target, and use T b to represent the detection frame corresponding to a person in the multiple target tracking results. If the area of the region framed by T b (the photometric region corresponding to T b ) is greater than the area of the region framed by T a (the photometric region corresponding to the original photometric target) for K consecutive frames (K is greater than or equal to 2), it indicates that there is a detection frame in the multiple target tracking results that meets the preset conditions. In this case, take the person corresponding to T b as the photometric target, and take the region framed by T b as the target photometric region. If the area of the region framed by T b (the photometric region corresponding to T b ) does not meet the condition that it is greater than the area of the photometric region corresponding to T a for K consecutive frames (K is greater than or equal to 2), it indicates that there is no detection frame in the multiple target tracking results that meets the preset conditions. In this case, keep T a as the photometric target, and take the region framed by T a as the target photometric region.
[0074] It should be noted that if there are multiple T b that meet the preset conditions (that is, there are multiple T b whose framed regions have an area greater than the area of the region framed by T a for K consecutive frames (K is greater than or equal to 2), then among the multiple T b that meet the preset conditions, select the T with the largest framed region area.b The corresponding person is used as the metering target, and the T with the largest framed area b The framed area is used as the target metering area.
[0075] In the technical solution of the embodiment of the present application, by searching for detection frames that are larger than the metering area corresponding to the current video frame and belong to the same person among multiple target tracking results, when the detection frames of the same person are larger than the metering area corresponding to the current video frame for multiple consecutive frames, it is determined that there is a detection frame that meets the preset conditions among the multiple target tracking results, ensuring the continuity, stability, and accuracy of the metering target, thereby improving the accuracy and stability of exposure.
[0076] Such as Figure 3 As shown, in some embodiments, the automatic exposure method of the shooting device includes the following steps:
[0077] Step 302, determine whether there is a detection frame in the multiple target tracking results that is larger than r times the metering area corresponding to the current video frame.
[0078] Step 304, if so, determine that there is a detection frame that meets the preset conditions among the multiple target tracking results, and then execute the step of using the target person corresponding to the detection frame as the metering target.
[0079] Step 306, if not, determine that there is no detection frame that meets the preset conditions among the multiple target tracking results, and then keep the original metering target.
[0080] Among them, the original metering target may refer to the metering target of the current video frame before replacing the metering target, and the metering area corresponding to the original metering target is the metering area corresponding to the current video frame.
[0081] Exemplarily, use T a to represent the detection frame corresponding to the original metering target, and use T b to represent the detection frame corresponding to a person among the multiple target tracking results. If the area of the region framed by T b is larger than r times the area of the region framed by T a , it means that there is a detection frame that meets the preset conditions among the multiple target tracking results. In this case, the person corresponding to T b is used as the metering target, and the region framed by T b is used as the target metering area. If the area of the region framed by T b is not larger than r times the area of the region framed by T a , it means that there is no detection frame that meets the preset conditions among the multiple target tracking results. In this case, T a is used as the metering target, and the region framed by T a is used as the target metering area.
[0082] It should be noted that if there are multiple Ts that meet the preset conditions b (that is, there are multiple Ts b whose framed area is greater than r times the area of the region framed by T a ), then among the multiple Ts that meet the preset conditions b select the T with the largest framed area b and use the corresponding person as the photometric target, and use the region framed by the T with the largest framed area b as the target photometric region.
[0083] The technical solution of the embodiment of the present application ensures the continuity, stability and accuracy of the photometric target by searching for detection frames greater than r times the photometric region corresponding to the current video frame among multiple target tracking results, thereby improving the accuracy and stability of exposure.
[0084] In some embodiments, step 302 includes but is not limited to the following steps: searching for detection frames that are greater than r times the photometric region corresponding to the current video frame and belong to the same person among multiple target tracking results; wherein, the target person belongs to one of the same persons; determining whether the detection frames of the same person are greater than r times the photometric region corresponding to the current video frame for multiple consecutive frames.
[0085] Exemplarily, let T a represent the detection frame corresponding to the original photometric target, and let T b represent the detection frame corresponding to a person among multiple target tracking results. If the area of the region framed by T b is greater than r times the area of the region framed by T a for K consecutive frames (K is greater than or equal to 2), it indicates that there are detection frames that meet the preset conditions among multiple target tracking results. In this case, use the person corresponding to T b as the photometric target, and use the region framed by T b as the target photometric region. If the area of the region framed by T b does not meet the condition of being greater than r times the area of the region framed by T a for K consecutive frames (K is greater than or equal to 2), then use the person corresponding to T a as the photometric target, and use the region framed by T a as the target photometric region.
[0086] It should be noted that if there are multiple Ts that meet the conditions b (that is, there are multiple Ts b whose framed area is greater than r times the area of the region framed by T ar times the area of the framed region), then among multiple Ts that meet the preset conditions b select the T with the largest framed region area b The corresponding person as the metering target, and use the T with the largest framed region area b The framed region as the target metering area.
[0087] The technical solution of the embodiment of the present application searches for consecutive multiple frames in multiple target tracking results that are greater than r times the metering area corresponding to the current video frame and belong to the detection frames corresponding to the same person, ensuring the continuity, stability, and accuracy of the metering target, thereby improving the accuracy and stability of exposure.
[0088] In some embodiments, step 108 includes but is not limited to the following steps: Meter the target metering area to obtain the exposure parameters corresponding to the current video frame.
[0089] Exemplarily, local metering can be used to meter the target metering area in the current video frame to obtain the exposure parameters corresponding to the current video frame.
[0090] Among them, local metering can refer to metering a preset area in the image. In this embodiment, local metering can refer to metering the target metering area in the current video frame. Exemplarily, local metering is used to meter the target metering area in the current video frame to determine the exposure parameters of the current video frame, and then the brightness of the shooting device is adjusted according to the exposure parameters, so as to adjust the brightness of the picture captured by the shooting device, so that the target metering area is in the target brightness.
[0091] In some embodiments, step 108 includes but is not limited to the following steps: Meter the target metering area to obtain the first exposure parameter; perform center-weighted average metering on the current video frame to obtain the second exposure parameter; calculate the exposure parameter corresponding to the current video frame according to the first exposure parameter and the second exposure parameter.
[0092] Among them, center-weighted average metering can refer to a metering method that takes the central area of the picture as the focus and other parts as secondary. In other words, center-weighted average metering can refer to a metering method that meters the central part of the picture and the remaining part (non-central part) of the picture separately, and then takes the corresponding weighted average.
[0093] Exemplarily, the local metering method is used to meter the target metering area in the current video frame to obtain the first exposure parameter, perform center-weighted average metering on the current video frame to obtain the second exposure parameter, and then perform weighted processing on the first exposure parameter and the second exposure parameter to obtain the exposure parameter corresponding to the current video frame.
[0094] In the embodiments of the present application, the method for obtaining the exposure parameter corresponding to the current video frame not only enhances the imaging effect of the target metering area, but also takes into account the overall imaging effect of the video frames captured by the imaging device.
[0095] As Figure 4 shown, in some embodiments, the automatic exposure method of the imaging device includes but is not limited to the following steps:
[0096] Step 402, perform target tracking on multiple characters based on a multi-target tracking algorithm to obtain multiple target tracking results; the multiple target tracking results include the detection frames corresponding to multiple characters in the video frame sequence.
[0097] Step 404, when there is a detection frame in the multiple target tracking results that meets the preset condition, use the target person corresponding to the detection frame as the metering target; the preset condition is that multiple consecutive detection frames among the detection frames corresponding to the same person are all larger than the metering area corresponding to the current video frame, or the detection frame corresponding to the current video frame is r times the metering area corresponding to the current video frame; where r > 1.
[0098] Step 406, use the area framed by the current detection frame of the metering target as the target metering area.
[0099] Step 408, perform metering on the target metering area to obtain a first exposure parameter.
[0100] Step 410, perform center-weighted average metering on the current video frame to obtain a second exposure parameter.
[0101] Step 412, calculate the exposure parameter corresponding to the current video frame according to the first exposure parameter and the second exposure parameter.
[0102] It should be noted that the steps of steps 402 to 412 please refer to the foregoing embodiments.
[0103] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages do not necessarily need to be executed at the same time, but can be executed at different times, and the execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0104] Based on the same inventive concept, an embodiment of the present application further provides an automatic exposure device for a shooting device involved above. The solution for solving the problem provided by this device is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the automatic exposure device of the shooting device provided below can refer to the limitations on the automatic exposure method of the shooting device in the above text, and will not be repeated here.
[0105] In one embodiment, as Figure 5 shown, an automatic exposure device for a shooting device is provided, including: a target tracking module 502, a photometric target determination module 504, a target photometric region determination module 506, and an exposure parameter determination module 508, where:
[0106] The target tracking module 502 is configured to perform target tracking on multiple people based on a multi-target tracking algorithm to obtain multiple target tracking results; the multiple target tracking results include detection frames corresponding to multiple people in the video frame sequence;
[0107] The photometric target determination module 504 is configured to, when there is a detection frame in the multiple target tracking results that meets a preset condition, use the target person corresponding to the detection frame as the photometric target; the preset condition is that multiple consecutive detection frames in the detection frames corresponding to the same person are all larger than the photometric region corresponding to the current video frame, or the detection frame corresponding to the current video frame is r times the photometric region corresponding to the current video frame; where r > 1.
[0108] The target photometric region determination module 506 is configured to use the region framed by the current detection frame of the photometric target as the target photometric region;
[0109] The exposure parameter determination module 508 is configured to determine the exposure parameter corresponding to the current video frame according to the target photometric region.
[0110] In some embodiments, the automatic exposure device of the shooting device further includes:
[0111] A search module, configured to search, in the multiple target tracking results, for detection frames that are larger than the photometric region corresponding to the current video frame and belong to the same person.
[0112] A first judgment module, configured to judge whether the detection frames of the same person are larger than the photometric region corresponding to the current video frame for multiple consecutive frames.
[0113] A first processing module, configured to, if so, determine that there is a detection frame in the multiple target tracking results that meets the preset condition, and then perform the step of using the target person corresponding to the detection frame as the photometric target; the target person belongs to one of the same people.
[0114] A second processing module, configured to, if not, determine that there is no detection box satisfying a preset condition among multiple target tracking results, and then keep the original photometric target.
[0115] In some embodiments, the automatic exposure device of the photographing device further includes:
[0116] A second judgment module, configured to judge whether there is a detection box larger than r times the photometric region corresponding to the current video frame among multiple target tracking results.
[0117] A third processing module, configured to, if so, determine that there is a detection box satisfying a preset condition among multiple target tracking results, and then perform the step of using the target person corresponding to the detection box as the photometric target.
[0118] A fourth processing module, configured to, if not, determine that there is no detection box satisfying a preset condition among multiple target tracking results, and then keep the original photometric target.
[0119] In some embodiments, the second judgment module includes:
[0120] A search unit, configured to search, among multiple target tracking results, for detection boxes larger than r times the photometric region corresponding to the current video frame and belonging to the same person; wherein the target person belongs to one of the same persons.
[0121] A judgment unit, configured to judge whether the detection boxes of the same person are larger than r times the photometric region corresponding to the current video frame for multiple consecutive frames.
[0122] In some embodiments, the exposure parameter determination module 508 includes:
[0123] A first photometric unit, configured to perform photometry on the target photometric region to obtain the exposure parameter corresponding to the current video frame.
[0124] In some embodiments, the exposure parameter determination module 508 includes:
[0125] A second photometric unit, configured to perform photometry on the target photometric region to obtain a first exposure parameter.
[0126] A third photometric unit, configured to perform center-weighted average photometry on the current video frame to obtain a second exposure parameter.
[0127] An exposure parameter calculation unit, configured to calculate the exposure parameter corresponding to the current video frame according to the first exposure parameter and the second exposure parameter.
[0128] Each module in the automatic exposure device of the above-mentioned photographing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of the electronic device in hardware form or independent of the processor, or stored in the memory of the electronic device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0129] In one embodiment, an electronic device is provided. The electronic device can be a terminal, and its internal structure diagram can be as Figure 6 shown. The electronic device includes a processor, a memory, a communication interface, a display unit, and an input device connected through a system bus. Among them, the input device, communication interface, and display screen of the electronic device are connected to the system bus through an I / O interface. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an automatic exposure method for a photographing device. The display unit of the electronic device can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer covering the display unit, or a button, a trackball, or a touchpad provided on the housing of the electronic device, or an external keyboard, a touchpad, or a mouse, etc.
[0130] Those skilled in the art can understand that Figure 6 the structure shown in
[0131] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0132] In one embodiment, an electronic device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, it implements the steps of the above-mentioned automatic exposure method for a photographing device.
[0133] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, it implements the steps of the above-mentioned automatic exposure method for a photographing device.
[0134] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0135] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0136] The above embodiments only represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the patent of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. An automatic exposure method for a photographing device, characterized in that, The method includes: Performing object tracking on multiple persons based on a multi-object tracking algorithm to obtain multiple object tracking results; the multiple object tracking results include detection frames corresponding to the multiple persons in the video frame sequence; When there is a single detection frame in the multiple object tracking results that meets a preset condition, using the target person corresponding to the single detection frame as the photometric target; the preset condition is that multiple consecutive detection frames among the detection frames corresponding to the same person are all larger than the photometric region corresponding to the current video frame; When there are multiple detection frames in the multiple object tracking results that meet the preset condition, using the target person corresponding to the detection frame with the largest area among the multiple detection frames as the photometric target; Using the region framed by the current detection frame of the photometric target as the target photometric region; Determining the exposure parameter corresponding to the current video frame according to the target photometric region.
2. The method according to claim 1, characterized in that, The method further includes: In the multiple object tracking results, searching for detection frames that are larger than the photometric region corresponding to the current video frame and belong to the same person; Determining whether the detection frames of the same person are larger than the photometric region corresponding to the current video frame for multiple consecutive frames; If so, determining that there is a detection frame in the multiple object tracking results that meets the preset condition, and then performing the step of using the target person corresponding to the detection frame as the photometric target; the target person belongs to one of the same persons; If not, determining that there is no detection frame in the multiple object tracking results that meets the preset condition, and then maintaining the original photometric target.
3. The method according to claim 1 or 2, characterized in that, The determining the exposure parameter corresponding to the current video frame according to the target photometric region includes: Performing photometry on the target photometric region to obtain the exposure parameter corresponding to the current video frame.
4. The method according to claim 1 or 2, characterized in that, The determining the exposure parameter corresponding to the current video frame according to the target photometric region includes: Performing photometry on the target photometric region to obtain a first exposure parameter; Performing center-weighted average photometry on the current video frame to obtain a second exposure parameter; Calculating the exposure parameter corresponding to the current video frame according to the first exposure parameter and the second exposure parameter.
5. An automatic exposure device for a photographing device, characterized in that, The apparatus includes: An object tracking module, configured to perform object tracking on multiple persons based on a multi-object tracking algorithm to obtain multiple object tracking results; the multiple object tracking results include detection frames corresponding to the multiple persons in the video frame sequence; A photometric target determination module, configured to, when there is a single detection frame in the multiple object tracking results that meets a preset condition, use the target person corresponding to the single detection frame as the photometric target; the preset condition is that multiple consecutive detection frames among the detection frames corresponding to the same person are all larger than the photometric region corresponding to the current video frame; when there are multiple detection frames in the multiple object tracking results that meet the preset condition, use the target person corresponding to the detection frame with the largest area among the multiple detection frames as the photometric target; A target photometric region determination module, configured to use the region framed by the current detection frame of the photometric target as the target photometric region; An exposure parameter determination module, configured to determine the exposure parameter corresponding to the current video frame according to the target photometric region.
6. The device according to claim 5, characterized in that, The photometric target determination module includes: a search module configured to search, among the multiple target tracking results, for a detection box that is larger than the photometric region corresponding to the current video frame and belongs to the same person; a first determination module configured to determine whether the detection boxes of the same person are larger than the photometric region corresponding to the current video frame for multiple consecutive frames; a first processing module configured to, if so, determine that there is a detection box in the multiple target tracking results that meets a preset condition, and then perform the step of using the target person corresponding to the detection box as the photometric target; the target person is one of the same person; a second processing module configured to, if not, determine that there is no detection box in the multiple target tracking results that meets the preset condition, and then maintain the original photometric target.
7. The device according to claim 5 or 6, characterized in that, The exposure parameter determination module is further configured to perform photometry on the target photometric region to obtain the exposure parameter corresponding to the current video frame.
8. An electronic device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 4.
10. A computer program product, comprising a computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Exposure adjusting method and device, and electronic equipment
CN110913147A
Exposure parameter adjusting method and device
CN112822409A