WO2021175211A1 - Exposure control-based video capture method and apparatus - Google Patents

Exposure control-based video capture method and apparatus Download PDF

Info

Publication number
WO2021175211A1
WO2021175211A1 PCT/CN2021/078677 CN2021078677W WO2021175211A1 WO 2021175211 A1 WO2021175211 A1 WO 2021175211A1 CN 2021078677 W CN2021078677 W CN 2021078677W WO 2021175211 A1 WO2021175211 A1 WO 2021175211A1
Authority
WO
WIPO (PCT)
Prior art keywords
parameter
video
parameters
automatic exposure
video stream
Prior art date
Application number
PCT/CN2021/078677
Other languages
French (fr)
Chinese (zh)
Inventor
胡彬林
刘俊
唐娜
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021175211A1 publication Critical patent/WO2021175211A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B7/00Control of exposure by setting shutters, diaphragms or filters, separately or conjointly
    • G06T5/90
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/75Circuitry for compensating brightness variation in the scene by influencing optical camera components
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Definitions

  • This application relates to the field of image acquisition technology, and in particular to a video acquisition method and video acquisition device based on exposure control.
  • the light is weak when working at night and it is difficult to collect high-quality color images. Therefore, the method of supplement light is often used to increase the brightness of the image collected by the camera, but the additional light is currently unable to The sunlight can fill light evenly.
  • the automatic exposure method to shoot because the exposure parameters are calculated by considering the brightness of the overall scene, it is inevitable that some areas of the scene will be overexposed or underexposed. Status, resulting in a decrease in the accuracy of video analysis (also known as: intelligent video analysis, video content analysis, such as: video target detection, recognition and/or analysis).
  • video analysis also known as: intelligent video analysis, video content analysis, such as: video target detection, recognition and/or analysis.
  • This application provides a video capture method and device based on exposure control, which alternately performs automatic exposure and manual exposure during the process of video frame capture, so that the obtained video stream can not only meet the needs of users for viewing, but also ensure subsequent video analysis When you can find a suitable exposure video frame.
  • the first aspect of the present application provides a video acquisition method based on exposure control.
  • the method includes: determining automatic exposure parameters of a camera module according to environmental data, and then generating manual exposure parameters according to the automatic exposure parameters.
  • the camera module collects video frames based on automatic exposure parameters to obtain a first video stream, and collects video frames based on manual exposure parameters to obtain a second video stream.
  • the video frames constituting the first video stream and the video frames constituting the second video stream are video streams that are alternately collected by the camera module at the same time period.
  • the first video stream is composed of odd-numbered frames among all video frames collected by the camera module
  • the second video stream is composed of even-numbered frames among all video frames collected by the camera module, and vice versa.
  • the first video stream is composed of 1, 2, 4, 5, 7, and 8 of all the video frames collected by the camera module (take the first 9 video frames as an example), and the second video stream is composed of the camera module.
  • the 3, 6, and 9 frames of all the video frames collected in the group constitute the video frame that constitutes the second video stream at an interval of 2 frames, and the subsequent video frames can be deduced by analogy.
  • the present invention does not specifically limit the alternate collection method. It depends on the actual situation.
  • the above-mentioned video acquisition method based on exposure control can obtain two video streams exposed by different methods.
  • the video frames collected by the automatic exposure can be used for video display;
  • the manual exposure parameters are adjustable, so that the video frames collected by the manual exposure can respond to the brightness changes in the scene to be shot in time. Improve the quality of video capture.
  • the automatic exposure parameters include: shutter time, aperture size, and gain size
  • obtaining manual exposure parameters according to the automatic exposure parameters includes: for each parameter of the first part of the automatic exposure parameters, according to The parameter generates a set of sequences and periodically expands to obtain the parameter expansion sequence, which is used as the corresponding parameter in the first part of the manual exposure parameter; keeps the second part of the automatic exposure parameter unchanged, as the manual The second part of the exposure parameters.
  • a set of exposure parameter sequences is generated for each parameter of the first part of the automatic exposure parameters, and each value in the exposure parameter sequence is determined by a certain area of the scene to be shot. Optimal exposure parameters required.
  • the first part of the parameters includes the shutter time and/or the gain size in the automatic exposure parameters
  • the second part of the parameters includes the aperture size in the automatic exposure parameters
  • the first part of the automatic exposure parameter includes the shutter time
  • a set of sequences is generated according to the parameter and periodically expanded to obtain the parameter expansion
  • the corresponding parameters in the first part of the parameters as the manual exposure parameters include: acquiring the shutter time in the automatic exposure parameters and generating a set of shutter time sequences according to the shutter time, and then repeating the shutter time sequence cyclically to obtain the shutter time extended sequence as The shutter time in the manual exposure parameters.
  • the two parameters in the manual exposure parameters: the aperture size and the gain size are consistent with the parameters corresponding to the automatic exposure parameters.
  • the shutter time in the manual exposure parameters is based on the shutter time included in the automatic exposure parameters.
  • a set of shutter time sequences included in the manual exposure parameter is composed of at least 3 shutter time values.
  • a set of shutter time series included in the manual exposure parameter includes [1/500 second, 1/250 second, 1/125 second , 1/250 second, 1/500 second], according to the parameter expansion sequence of the periodically expanded shutter time, including [1/500 second, 1/250 second, 1/125 second, 1/250 second, 1/500 second , 1/250 second, 1/125 second, 1/250 second, 1/500 second,...].
  • the first part of the automatic exposure parameters includes the shutter time and the gain size.
  • a set of sequences is generated according to the parameters and periodically expanded to obtain the The parameter expansion sequence, as the corresponding parameter in the first part of the manual exposure parameter, also includes: obtaining the gain size in the automatic exposure parameter and generating a set of gain size sequence according to the gain size; loop repeating the gain size sequence to obtain the gain
  • the size expansion sequence is used as the gain size in the manual exposure parameter.
  • Linking the two parameters of manual exposure with shutter time and gain size and automatic exposure in addition to improving the camera's ability to adapt to scenes with gradual brightness changes, it also increases the signal-to-noise ratio of the second video stream and improves image quality.
  • the gain size in the manual exposure parameter can also be expanded into a set of gain size sequence according to the gain size in the automatic exposure parameter, and it is periodically expanded to obtain the gain size in the manual exposure parameter. The size of the gain.
  • the shutter time in the manual exposure parameter and/or the gain in the manual exposure parameter changes periodically, and includes rising and falling changes in one cycle.
  • the change rule of the manual exposure parameter conforms to the brightness distribution of the scene shot by the video capture device.
  • the second part of the automatic exposure parameters includes: aperture size.
  • the aperture size of the manual exposure parameter should be consistent with the aperture size of the automatic exposure.
  • the first video stream is used for video display
  • the second video stream is used for video analysis.
  • the first video stream uses automatic exposure, and its exposure parameters can only change slowly in order to adapt to the visual ability of the human eye, so it can be used for video display.
  • the second video stream uses manual exposure. In order to make each light and dark area in the scene have a better exposure frame, manual exposure parameters need to be greatly changed, which is not suitable for human viewing, but can be sent to the intelligent analysis module for identification Analyze various light and dark areas in the scene.
  • the video frames constituting the first video stream and the video frames constituting the second video stream are fused to obtain the third video stream. That is, the third video stream contains video frames obtained by two exposure methods: automatic exposure and manual exposure.
  • the third video stream will be used for video analysis. Compared with only analyzing the video stream under manual exposure, this implementation provides more video frames for video analysis, which greatly improves the accuracy of identification and analysis.
  • the present application provides a video capture device, which includes a camera module, a first image signal processing module, and a second image signal processing module.
  • the first image signal processing module is used to determine the automatic exposure parameters of the camera module according to environmental data;
  • the second image signal processing module is used to obtain manual exposure parameters according to the automatic exposure parameters;
  • the camera module includes The lens and the image sensor are used to collect video frames based on the automatic exposure parameters to form a first video stream; and are also used to collect video frames based on the manual exposure parameters to form a second video stream, where the first video is formed
  • the video frames of the stream and the video frames constituting the second video stream are alternately collected by the camera module.
  • the automatic exposure parameters include: shutter time, aperture size, and gain
  • the second image signal processing module is used to: for each parameter of the first part of the automatic exposure parameter, generate a parameter based on the parameter Group sequences and perform periodic expansion to obtain the parameter expansion sequence as the corresponding parameter in the first part of the manual exposure parameter; keep the second part of the automatic exposure parameter unchanged as the second part of the manual exposure parameter.
  • the first part of the automatic exposure parameter includes the shutter time
  • the second image signal processing module is used to: obtain the shutter time in the automatic exposure parameter; and generate a set of shutter time series according to the shutter time ,
  • the shutter time extended sequence obtained by cyclically repeating the shutter time sequence is used as the shutter time in the manual exposure parameter.
  • the first part of the automatic exposure parameters further includes a gain size
  • the second image signal processing module is further used to: obtain the gain size in the automatic exposure parameter; and generate a set of gains according to the gain size
  • the size sequence, the gain size expansion sequence obtained by cyclically repeating the gain size sequence is used as the gain size in the manual exposure parameter.
  • the shutter time in the manual exposure parameter and the gain in the manual exposure parameter change periodically, and include rising and falling changes in one cycle.
  • the second part of the automatic exposure parameters includes: aperture size.
  • the first video stream is used for video display
  • the second video stream is used for video analysis
  • the device further includes a fusion module, configured to perform fusion processing on the video frames constituting the first video stream and the video frames constituting the second video stream to obtain the third video stream.
  • a fusion module configured to perform fusion processing on the video frames constituting the first video stream and the video frames constituting the second video stream to obtain the third video stream.
  • the third video stream is used for video analysis.
  • the present application provides a video surveillance system, the system includes the video capture device described in the second aspect; a video display module for displaying the first video stream; a video analysis module for analyzing the second and/ Or the third video stream.
  • this application provides a computer program product that contains computer-readable code instructions.
  • the computer can configure the video capture device so that the device can execute The method described in the first aspect and any of the various possible implementation manners of the first aspect.
  • the present application provides a non-transitory computer-readable storage medium, which contains computer program code instructions, which can be executed when the computer-readable code instructions are executed by a computer
  • the configuration of the video capture device by the computer is implemented, so that the device can execute the method described in the first aspect and any of the various possible implementation manners of the first aspect.
  • the non-transitory computer-readable storage medium includes one or more of the following options: Read-Only Memory (ROM), Programmable ROM (Programmable ROM), Erasable PROM (Erasable PROM, EPROM) ), flash memory (Flash Memory), electrical EPROM (Electrically EPROM, EEPROM) and hard drive (Hard Drive).
  • FIG. 1 is a schematic diagram of the application architecture of a video capture method based on exposure control provided by an embodiment of the application.
  • FIG. 2 is a schematic diagram of a scene with uneven brightness distribution provided by an embodiment of the application.
  • FIG. 3 is a schematic diagram of shutter time required for different brightness areas in a scene provided by an embodiment of the application.
  • FIG. 4 is a schematic flowchart of an automatic exposure method provided by an embodiment of the application.
  • FIG. 5 is a schematic flowchart of steps of a video acquisition method based on exposure control provided by an embodiment of the application.
  • FIG. 6 is a schematic structural diagram of a video capture method based on exposure control provided by an embodiment of the application.
  • FIG. 7 is a schematic diagram of a flow of generating manual exposure parameters according to automatic exposure parameters according to an embodiment of the application.
  • FIG. 8 is a schematic diagram of a shutter cycle period provided by an embodiment of the application.
  • FIG. 9 is a schematic diagram of a parity frame fusion structure provided by an embodiment of the application.
  • FIG. 10 is a schematic structural diagram of a video capture device provided by an embodiment of the application.
  • Exposure parameters The exposure parameters during shooting determine the brightness of the image.
  • the exposure parameters include one or more of the shutter time, gain size, or aperture size.
  • Shutter Time also known as exposure time
  • shutter is a valve that controls the light-in time. The longer the shutter time, the more light entering, and the brighter the captured image; the shorter the shutter time, the less light entering, and the darker the captured image.
  • Gain refers to the process of amplifying or reducing the electrical signal or digital signal after photoelectric conversion. Increase the gain, and the captured image will be brighter than the actual scene; reduce the gain, the captured image will be darker than the actual scene.
  • the aperture is used to control the amount of light entering the fuselage through the lens. Increasing the aperture means increasing the amount of light entering, and the captured image is brighter; reducing the aperture means reducing the amount of light entering, and the captured image is darker.
  • ISP Image Signal Processor
  • the camera system 12 includes a camera module 13, an image signal processor (ISP) 14, and an encoder 15.
  • ISP image signal processor
  • the camera module 13 includes a lens module 131, an image sensor 132, and a gain control circuit 133 integrated on the image sensor.
  • the lens module 131 includes an aperture in front of the lens and an optical lens combination, and is mainly used to collect light from the subject 11.
  • the optical lens combination is usually a lens group composed of one or more pieces of optical glass (or plastic), and can be composed of a lens such as a concave lens, a convex lens, an M-type lens, or a combination of lenses.
  • the image sensor 132 may be a CCD image sensor composed of a charge-coupled device (CCD), a CMOS image sensor composed of a complementary metal oxide semiconductor (CMOS), or a contact type A CIS image sensor composed of an image sensor (contact image sensor, CIS), etc.
  • the image sensor is mainly used to receive the light signal transmitted from the camera module, convert the light signal into an electrical signal, and perform photoelectric conversion.
  • the gain control circuit 133 is generally integrated in the image sensor, and is mainly used to ensure that the standard video signal that can be output in the captured image under different scene illumination conditions.
  • the image signal processor 15 is a special digital signal processor (Digital Signal Processor, DSP), and its main function is to perform post-processing on the signal output by the front-end image sensor. Different ISPs are used to match image sensors from different manufacturers. The excellence of ISP is very important in the entire camera product, and it can directly affect the quality of the image presented to the user.
  • the ISP has a special circuit to connect with the previous camera module, which can control the camera module 13 to adopt different camera parameters, which is used to realize the 2A control (Automatic white balance/Automatic exposure) that we often mentioned. Exposure) or 3A control (Automatic white balance/Automatic exposure/Automatic Focus, automatic white balance/automatic exposure/automatic focus).
  • the encoder 16 is mainly used to compress and encode signal data according to a standard format to facilitate the transmission of video signals.
  • the light of the fill light is different from natural light, it is a non-parallel light, so its fill light effect is not as uniform as natural light during the day. As shown in Figure 2, the central part of the fill light area has sufficient light, and the edge of the fill light area has weak light.
  • the innermost circle area has sufficient fill light, so it needs the shortest exposure time, assuming it is ST1; the amount of light in the second inner circle area is only Next to the innermost circle, the required exposure time is assumed to be ST2; and so on, the exposure times required for the other two arc areas are ST3 and ST4 respectively, and further, ST1 ⁇ ST2 ⁇ ST3 ⁇ ST4.
  • step S41 the camera module collects ambient light, and generally uses some filters to improve the image quality.
  • Step S42 the image signal processor ISP calculates the brightness of the image, and outputs a statistical value M.
  • the common methods of statistical brightness include the average brightness method, the weight average method, and the brightness histogram.
  • the most common method is the average brightness method.
  • the average brightness method is to average the brightness of all pixels of the image, and finally achieve the target brightness by continuously adjusting the exposure parameters.
  • the weighted average method is to set different weights to different areas of the image to calculate the image brightness.
  • the brightness histogram method calculates the image brightness by assigning different weights to the peaks in the histogram.
  • Step S43 Calculate the absolute value of the brightness statistical value M and the preset target brightness difference, and determine whether it is less than the threshold. If the difference between the two is less than the threshold value, proceed to step S44, otherwise, proceed to step S45.
  • Step S44 output exposure parameters.
  • the exposure parameters are applied to the image captured by the camera module.
  • Step S45 recalculate the exposure parameters and apply the new exposure parameters to the camera module, repeat steps S41-S43, until the absolute value of the statistical brightness M and the preset target brightness difference is less than the threshold, and output the final exposure parameters.
  • the above-mentioned automatic exposure method uses only one exposure parameter globally when shooting objects or faces, and it is difficult to adapt to scenes with uneven environmental brightness.
  • the exposure parameter adjustment of the automatic exposure method is slow.
  • the pedestrian enters the central area of the fill light from the dark area the face will quickly change from the under-exposed state to the over-exposed state, making it difficult to obtain the normal state.
  • the image in the exposed state greatly reduces the accuracy of face recognition.
  • the embodiment of the present application provides an exposure method in which the exposure parameter periodically changes to improve the image quality of the face in the different brightness areas in the picture, thereby improving the face recognition rate.
  • this application by alternately performing manual exposure and automatic exposure when capturing images, it can quickly respond to changes in scene brightness and improve the imaging quality of different brightness areas in the picture.
  • there are more than two types of manual exposure parameters that change periodically which can adapt to scenes with uneven brightness distribution at multiple levels, rather than limited to scenes with significant contrast between bright and dark. Therefore, the camera's ability to adapt to scenes with uneven brightness is greatly improved. .
  • Figure 5 is the overall solution process of the present invention. Combined with the schematic structural diagram of Figure 6, the method of the present invention includes the following basic steps:
  • Step S51 The first image signal processing device (ISP1) obtains brightness data of the current shooting scene, and generates automatic exposure parameters based on the brightness data.
  • ISP1 The first image signal processing device
  • step S51 when step S51 is implemented, the brightness data of the current shooting scene is collected by the camera through the lens module of the environment brightness of the scene to be shot and determined by the image sensor.
  • Step S52 The second image signal processing device (ISP2) generates manual exposure parameters according to the automatic exposure parameters generated by ISP1.
  • ISP2 can directly retrieve the value of automatic exposure parameters from ISP1, and calculate the corresponding manual exposure parameters accordingly.
  • Step S53 ISP1 applies the automatic exposure parameter to the camera module, and obtains the odd-numbered video stream (the first video stream) among all the video frames collected by the camera. That is, when the camera module shoots an odd-numbered frame video stream, the exposure parameters (shutter time, aperture size, gain size) adopt the automatic exposure parameter values calculated by ISP1.
  • Step S54 ISP2 applies the manual exposure parameter to the camera module, and obtains the even-numbered video stream (second video stream) among all the video frames collected by the camera. That is, when the camera module is shooting an even-numbered frame video stream, the exposure parameters (shutter time, aperture size, gain size) should be switched to the manual exposure parameter values calculated by ISP2.
  • Step S55 The odd-numbered frame video stream is used for video display, and the even-numbered frame video stream is transmitted to the target detection and recognition module for target analysis.
  • the odd-numbered frame video stream adopts the automatic exposure method, its parameters are slowly and continuously changed, so it can be sent to the back end for video display.
  • the manual exposure parameters used in the even-numbered frame video stream are not continuously changing, which cannot be adapted by the human eye, and is mainly used for delivery to the analysis module for face recognition or target detection.
  • odd and even frames are only to distinguish between two video streams.
  • odd frames are collected based on manual exposure parameters
  • even frames are collected based on automatic exposure parameters, even every three frames of the video stream.
  • the first two frames are collected based on automatic exposure parameters
  • the third frame is collected based on manual exposure parameters, which is not specifically limited in this application.
  • all the following embodiments take as an example that the odd-numbered frames of all the video frames captured by the camera are captured with automatic exposure parameters, and the even-numbered frames are captured with manual exposure parameters as examples.
  • step S52 ISP2 generates a manual exposure parameter according to the automatic exposure parameter generated by ISP1, including: for each parameter of the first part of the automatic exposure parameter, a parameter is generated according to the parameter. Group sequences and perform periodic expansion to obtain the parameter expansion sequence as the corresponding parameter in the first part of the manual exposure parameter; keep the second part of the automatic exposure parameter unchanged as the second part of the manual exposure parameter.
  • the above method includes two solutions: one is that the first part of parameters includes shutter time, and the second part of parameters includes aperture size and gain size; the other is that the first part of parameters includes shutter time and gain size, and the second part of parameters includes aperture size. Taking the first solution as an example, as shown in FIG. 7, step S52 specifically includes:
  • Step S71 ISP2 obtains the automatic exposure parameters obtained by the current ISP1: shutter time ST AE , aperture size, gain size.
  • ISP1 generates automatic exposure parameters based on the ambient brightness data, and ISP2 can directly obtain the shutter time ST AE from ISP1.
  • Step S72 ISP2 generates a set of shutter sequences that change up and down: [K1*ST AE , K2*ST AE , K3*ST AE ,..., KN*ST AE ].
  • K1, K2,...KN are the values manually set by the user according to the situation, such as 1, 3, 7, 10.
  • the generated shutter sequence is [ST AE , 3*ST AE , 7*ST AE , 10*ST AE ].
  • Step S73 According to the shutter sequence, automatically generate a shutter period that changes up and down.
  • the shutter time of the even-numbered frames is periodically changed up and down according to the automatic exposure shutter time ST AE 1 time, 3 times, 7 times, 10 times, 7 times, 3 times, and 1 time.
  • the target analysis module cannot receive all data frames due to the limitation of computing power, and can only process every frame. Therefore, sometimes the parameters of every two even-numbered frames need to be kept the same.
  • the shutter time of the even-numbered frame is 1 times, 1 times, 3 times, 3 times, 7 times, 7 times, 10 times, 10 times of the automatic exposure shutter time ST AE. Times, 7 times, 7 times, 3 times, 3 times, 1 times, 1 times.
  • Step S74 Apply the generated shutter period to the camera module cyclically to obtain an even-numbered frame video stream.
  • the aperture size and gain size of the manual exposure parameters are consistent with the aperture size and gain size of the automatic exposure parameters.
  • steps S72 and S73 can also be directly combined into one step. That is, when generating a shutter sequence, you can directly generate a shutter period, for example, the shutter sequence is [ST AE , 3*ST AE , 7*ST AE , 10*ST AE , 7*ST AE , 3*ST AE , ST AE ], Then step S74 is executed to cyclically apply the shutter sequence to the camera module.
  • the above steps only use the shutter time in the manual exposure parameter to link with the shutter time in the automatic exposure parameter.
  • the exposure parameter of gain size is linked.
  • the gain of manual exposure can be periodically changed based on the gain of automatic exposure by -2dB, -4dB, -6dB, -8dB, -6dB, -4dB, and -2dB.
  • the gain of automatic exposure is A
  • the sequence of gains is [A-2,A-4,A-6,A-8,A-6,A-4,A-2]
  • the parameters in a period do not necessarily need to be completely symmetrical, and it depends on the specific situation.
  • the manual exposure parameters are generated based on the automatic exposure parameters, when the automatic exposure parameters change, the manual exposure parameter sequence at this time is immediately stopped looping, and the manual exposure parameter sequence is recalculated according to the new automatic exposure parameters, and then the The new manual exposure parameter sequence is cyclically applied to the camera module to obtain even-numbered frame data.
  • the embodiments of the present application apply the technical solution to a scene of mixed traffic between people and vehicles, and show the implementation details of the solution in detail.
  • the shutter time required for the license plate is 5ms
  • the shutter time for light-colored vehicles is 5-10ms
  • the shutter time for dark-colored vehicles is 10-20ms
  • the exposure time for nearby faces 5-10ms the shutter time required for a distant face is 10-20ms.
  • the specific steps are as follows:
  • Step2 ISP2 obtains the iris, gain and shutter time ST AE of the automatic exposure path, the iris and gain of the manual exposure are consistent with the iris and gain of the automatic exposure, and the shutter time sequence can be designed as [K1*ST AE ,K2*ST AE , K3*ST AE ,K4*ST AE ], where K1, K2, K3, K4 are 1, 2, 3, 4 respectively;
  • Step3 The shutter sequence, generates a shutter cycle period of even frames, is able to satisfy both the needs of the exposure plate, the body and the face distance, the shutter time even frame may ST AE, 2ST AE, 3ST AE , 4ST AE, 3ST AE , 2ST AE , ST AE, the lifting and lowering modes change cyclically;
  • Step4 If the shutter time of odd-numbered frames changes due to changes in ambient lighting, assuming ST AE is updated to 4ms, the shutter time of even-numbered frames in the next cycle should also be updated synchronously, that is, recalculate the even number of the next cycle according to Step2 and Step3 Frame shutter time. Then, ISP2 applies the new manual exposure parameters to the camera module and reacquires even-numbered frame data.
  • the method provided by the present invention can take into account scenes containing multiple levels of brightness, and is not limited to scenes with significant contrast between bright and dark. This method greatly improves the probability of obtaining images with appropriate exposure, and significantly improves target analysis such as face analysis or license plate recognition. The accuracy of this ensures the stability of the social environment.
  • an odd-even frame fusion module in order to further improve the imaging effect of manual exposure, can be added before ISP2.
  • the even-numbered frame video streams are fused, and then transmitted to ISP2 for subsequent target analysis, further improving the accuracy of the analysis.
  • image depth refers to the number of bits used to store each pixel, and is also used to measure the color resolution of the image.
  • Image depth determines the number of colors that each pixel of a color image may have, or determines the grayscale The number of gray levels that each pixel of the image may have. It determines the maximum number of colors that can appear in a color image, or the maximum gray level in a grayscale image) is 8bit, then the range of the pixel value of each pixel It is 0-255. Exemplarily, taking an image of an odd frame as a reference, each pixel in the captured image has a pixel value in the range of 0-255.
  • the dots with pixel value lower than 50 adopt odd frame data
  • the dots with pixel value higher than 150 adopt even frame data
  • the dots with pixel value between 50-150 adopt weighted average data of odd and even frames. So far, each pair of odd and even frames
  • the fusion is completed according to the shooting sequence, and then transmitted to ISP2 for subsequent video analysis. It is worth noting that the above fusion scheme is only a schematic example. When other collection methods are used, the fusion method needs to be adjusted.
  • the alternate method of capturing images is automatic exposure for the first two frames of every three frames and manual exposure for the third frame, then every three frames in the shooting sequence are grouped together, and the first automatic exposure image frame in each group is taken as the reference Image, according to the above method, the last two frames of images are merged into the reference image. Then, the multiple sets of video frames are sequentially merged to obtain a merged video stream.
  • the video fusion method needs to match the alternate acquisition method, and the specific fusion rules can be determined based on user experience or actual conditions.
  • the video capture method based on exposure control provided in this application divides the video stream into manual exposure and automatic exposure, which can not only meet the needs of users to watch videos in real time, but also overcome the disadvantage of slow response to scene brightness changes in existing exposure methods.
  • the manual exposure parameters cover a wider and more layered range, which can adapt to multi-level scenes with gradual light and dark, ensuring that each area has a better exposure frame, thereby greatly improving the accuracy of video analysis.
  • FIG. 10 is a video capture device provided by an embodiment of the application.
  • the device 100 may include a camera module 101, a first image signal processing module 102, and a second image signal processing module 103.
  • the first image signal processing module 102 is configured to determine the automatic exposure parameters of the camera module according to the environmental data.
  • the second image signal processing module 103 is configured to obtain manual exposure parameters according to the automatic exposure parameters.
  • the camera module 101 includes a lens 1011 and an image sensor 1012 for collecting video frames based on the automatic exposure parameters to form a first video stream; and also for collecting video frames based on the manual exposure parameters to form a second video stream.
  • the video frames constituting the first video stream and the video frames constituting the second video stream are alternately collected by the camera module.
  • the automatic exposure parameters include: shutter time, aperture size, and gain size.
  • the second image signal processing module 103 is specifically configured to generate a set of sequences for each parameter of the first part of the automatic exposure parameters. And perform periodic expansion to obtain the parameter expansion sequence as the corresponding parameter in the first part of the manual exposure parameter; keep the second part of the automatic exposure parameter unchanged as the second part of the manual exposure parameter.
  • the first part of the automatic exposure parameters includes the shutter time
  • the second image signal processing module 103 is specifically configured to: obtain the shutter time in the automatic exposure parameters; generate a set of shutter time series according to the shutter time, and repeat all The extended shutter time sequence obtained from the shutter time sequence is used as the shutter time in the manual exposure parameter.
  • the first part of the auto-exposure parameter further includes a gain size
  • the second image signal processing module 103 is further used to: obtain the gain size in the auto-exposure parameter; generate a set of gain size sequence according to the gain size, and repeat the loop
  • the gain size expansion sequence obtained from the gain size sequence is used as the gain size in the manual exposure parameter.
  • the shutter time in the manual exposure parameter and the gain in the manual exposure parameter change periodically, and include rising and falling changes in one cycle.
  • the second part of the automatic exposure parameters includes: aperture size.
  • the first video stream is used for video display
  • the second video stream is used for video target detection, identification and/or analysis.
  • the device further includes a fusion module, configured to perform fusion processing on the video frames constituting the first video stream and the video frames constituting the second video stream to obtain a third video stream.
  • a fusion module configured to perform fusion processing on the video frames constituting the first video stream and the video frames constituting the second video stream to obtain a third video stream.
  • the present application also provides a video surveillance system, including: the video capture device provided in the foregoing device embodiment, which is used to obtain the first video stream according to the automatic exposure method, and to obtain the first video stream according to the manual exposure method.
  • the second video stream, the manual exposure parameters and the automatic exposure parameters are partially linked;
  • the video display module is used to display the first video stream;
  • the video analysis module is used to analyze the second video stream and/or the third video stream Video streaming.
  • modules of the above device is only a division of logical functions, and may be fully or partially integrated into a physical entity during actual implementation, or may be physically separated.
  • modules can all be implemented in the form of software called by processing elements; they can also be implemented in the form of hardware; some modules can be implemented in the form of calling software by processing elements, and some of the modules can be implemented in the form of hardware.
  • the present invention also provides an embodiment of a computer program product.
  • the computer program product contains computer-readable code instructions.
  • the computer can configure the video capture device so that the device can execute the method. Any of the methods described in the various possible implementation manners of the embodiment.
  • the present invention also provides an embodiment of a non-transitory computer-readable storage medium.
  • the non-transitory computer-readable storage medium contains computer program code instructions, which can be implemented when the computer-readable code instructions are executed by a computer.
  • the configuration of the video capture device by the computer enables the device to execute any of the methods described in the various possible implementation manners of the method embodiments.
  • the non-transitory computer-readable storage medium includes one or more of the following options: Read-Only Memory (ROM), Programmable ROM (Programmable ROM), Erasable PROM (Erasable PROM, EPROM) ), flash memory (Flash Memory), electrical EPROM (Electrically EPROM, EEPROM) and hard drive (Hard Drive).

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Studio Devices (AREA)

Abstract

The present application relates to the field of image capture technology and provides an exposure control-based video capture method and an apparatus. The method comprises: using a same camera module, within a same time period, and performing in alternation automatic exposure and manual exposure on image frames being shot, wherein a manual exposure parameter is set according to an automatic exposure parameter, and has the unique quality of periodically changing. In the described method, the automatic exposure parameter slowly changes according to the brightness of an environment, and so automatically exposed video frames can be used for video display; and the manual exposure parameter can be adjusted, thereby allowing for rapid response to a change of brightness in a scenario; the manual exposure parameter has a plurality of values within a single period, and a video frame will be shot and obtained based on every value of the manual exposure parameter, allowing a relatively optimally exposed frame to be found for every region within a scenario having slowly changing brightness, and utilizing the video frames obtained by the manual exposure parameter to perform video analysis thereby improves video analysis accuracy.

Description

一种基于曝光控制的视频采集方法及装置Video acquisition method and device based on exposure control
本申请要求于2020年3月3日提交中国专利局、申请号为202010140270.8、申请名称为“一种基于曝光控制的视频采集方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on March 3, 2020, the application number is 202010140270.8, and the application name is "a method and device for video capture based on exposure control", the entire content of which is incorporated by reference In this application.
技术领域Technical field
本申请涉及图像采集技术领域,尤其涉及一种基于曝光控制的视频采集方法及视频采集装置。This application relates to the field of image acquisition technology, and in particular to a video acquisition method and video acquisition device based on exposure control.
背景技术Background technique
随着科技的快速发展,近年来,智能安防逐渐成为了安防企业转型升级的重点方向。在安防系统中,作为最前端的图像采集设备,监控摄像机在其中起着关键性作用。With the rapid development of science and technology, in recent years, intelligent security has gradually become the key direction of the transformation and upgrading of security enterprises. In the security system, as the most front-end image acquisition equipment, surveillance cameras play a key role in it.
对当前的监控摄像机而言,在夜晚工作时光线较弱,难以采集到高质量的彩色图像,所以往往会采用补光的方式增加摄像机所采集的图像亮度,但是外加的补光灯目前无法像太阳光一样做到均匀补光。在这样的情况下,当利用自动曝光的方法进行拍摄时,由于曝光参数是考虑整体场景的亮度而计算得出的,所以场景中部分区域难免会出现过曝(Overexposed)或者欠曝(Underexposed)状态,从而导致视频分析(又被称为:智能视频分析、视频内容分析,如:视频目标的检测、识别和/或分析)的准确率下降。而当利用手动曝光的方法进行拍摄时,由于曝光参数是非连续缓慢变化的,所以这样的视频帧不能像自动曝光视频帧一样用于视频显示。For current surveillance cameras, the light is weak when working at night and it is difficult to collect high-quality color images. Therefore, the method of supplement light is often used to increase the brightness of the image collected by the camera, but the additional light is currently unable to The sunlight can fill light evenly. In this case, when using the automatic exposure method to shoot, because the exposure parameters are calculated by considering the brightness of the overall scene, it is inevitable that some areas of the scene will be overexposed or underexposed. Status, resulting in a decrease in the accuracy of video analysis (also known as: intelligent video analysis, video content analysis, such as: video target detection, recognition and/or analysis). When the manual exposure method is used for shooting, because the exposure parameters change slowly and discontinuously, such video frames cannot be used for video display like auto-exposure video frames.
因此,如何通过曝光控制采集得到视频流,使得该视频流既能满足用户观看的需求,又能提高视频分析的准确度,这是亟待解决的问题。Therefore, how to collect a video stream through exposure control so that the video stream can not only meet the viewing needs of users, but also improve the accuracy of video analysis is a problem to be solved urgently.
发明内容Summary of the invention
本申请提供一种基于曝光控制的视频采集方法及装置,在视频帧采集的过程时交替进行自动曝光和手动曝光,使得获得的视频流既能满足用户观看的需求,又能保证后续在视频分析时可以找到一个曝光合适的视频帧。This application provides a video capture method and device based on exposure control, which alternately performs automatic exposure and manual exposure during the process of video frame capture, so that the obtained video stream can not only meet the needs of users for viewing, but also ensure subsequent video analysis When you can find a suitable exposure video frame.
本申请第一方面提供一种基于曝光控制的视频采集方法,该方法包括:根据环境数据确定摄像模组的自动曝光参数,然后根据自动曝光参数生成手动曝光参数。摄像模组基于自动曝光参数采集视频帧获取第一视频流,基于手动曝光参数采集视频帧获取第二视频流。其中,构成第一视频流的视频帧和构成第二视频流的视频帧是摄像模组在同一时段交替采集而成的视频流。示例性的,第一视频流是由摄像模组采集的所有视频帧中的奇数帧构成,第二视频流是由摄像模组采集的所有视频帧中的偶数帧构成,反之亦可。需要说明的是,除了奇偶帧这种间隔一帧的交替采集方法之外,还可以间隔两帧,甚至三帧。例如第一视频流是由摄像模组采集的所有视频帧(以拍摄前 9个视频帧为例)中的1、2、4、5、7、8帧构成,第二视频流是由摄像模组采集的所有视频帧中的3、6、9帧构成,即构成第二视频流的视频帧间隔2帧,之后的视频帧以此类推,本发明对于交替采集的方法不做具体限定,视实际情况而定。上述基于曝光控制的视频采集方法,可以获得两路采用不同方法曝光的视频流。其中,由于自动曝光参数是缓慢变化的,所以自动曝光采集的视频帧可以用于视频显示;手动曝光参数是可调的,从而手动曝光采集的视频帧可以及时响应待拍摄场景中的亮度变化,提高视频的采集质量。The first aspect of the present application provides a video acquisition method based on exposure control. The method includes: determining automatic exposure parameters of a camera module according to environmental data, and then generating manual exposure parameters according to the automatic exposure parameters. The camera module collects video frames based on automatic exposure parameters to obtain a first video stream, and collects video frames based on manual exposure parameters to obtain a second video stream. Among them, the video frames constituting the first video stream and the video frames constituting the second video stream are video streams that are alternately collected by the camera module at the same time period. Exemplarily, the first video stream is composed of odd-numbered frames among all video frames collected by the camera module, and the second video stream is composed of even-numbered frames among all video frames collected by the camera module, and vice versa. It should be noted that, in addition to the alternate acquisition method of one-frame interval such as odd-even frames, two or even three frames may also be interval. For example, the first video stream is composed of 1, 2, 4, 5, 7, and 8 of all the video frames collected by the camera module (take the first 9 video frames as an example), and the second video stream is composed of the camera module. The 3, 6, and 9 frames of all the video frames collected in the group constitute the video frame that constitutes the second video stream at an interval of 2 frames, and the subsequent video frames can be deduced by analogy. The present invention does not specifically limit the alternate collection method. It depends on the actual situation. The above-mentioned video acquisition method based on exposure control can obtain two video streams exposed by different methods. Among them, because the automatic exposure parameters change slowly, the video frames collected by the automatic exposure can be used for video display; the manual exposure parameters are adjustable, so that the video frames collected by the manual exposure can respond to the brightness changes in the scene to be shot in time. Improve the quality of video capture.
在另一种可能的实现方式中,自动曝光参数包括:快门时间、光圈大小以及增益大小,根据自动曝光参数获得手动曝光参数包括:对于所述自动曝光参数的第一部分参数的每个参数,根据该参数生成一组序列并进行周期性扩展得到该参数扩展序列,作为所述手动曝光参数的第一部分参数中的对应参数;保持所述自动曝光参数的第二部分参数不变,作为所述手动曝光参数的第二部分参数。上述基于曝光控制的视频采集方法中,对于第一部分自动曝光参数的每个参数都生成了一组曝光参数序列,该曝光参数序列中的每一个取值分别都是待拍摄场景中某一块区域所需的较优曝光参数。在这样的曝光方式下,基于手动曝光参数的每一个取值,都会拍摄获得一个视频帧,这样针对每一块区域,都能得到至少一个该区域曝光较为合适的手动曝光视频帧,提高了视频采集装置对场景中亮度不均匀区域的适应能力。可选的,在具体实现中,第一部分参数包括自动曝光参数中的快门时间和/或增益大小,第二部分参数包括自动曝光参数中的光圈大小。In another possible implementation manner, the automatic exposure parameters include: shutter time, aperture size, and gain size, and obtaining manual exposure parameters according to the automatic exposure parameters includes: for each parameter of the first part of the automatic exposure parameters, according to The parameter generates a set of sequences and periodically expands to obtain the parameter expansion sequence, which is used as the corresponding parameter in the first part of the manual exposure parameter; keeps the second part of the automatic exposure parameter unchanged, as the manual The second part of the exposure parameters. In the above-mentioned video acquisition method based on exposure control, a set of exposure parameter sequences is generated for each parameter of the first part of the automatic exposure parameters, and each value in the exposure parameter sequence is determined by a certain area of the scene to be shot. Optimal exposure parameters required. In this exposure mode, based on each value of the manual exposure parameter, a video frame will be captured, so that for each area, at least one manual exposure video frame with more appropriate exposure for the area can be obtained, which improves video capture The device's ability to adapt to areas with uneven brightness in the scene. Optionally, in a specific implementation, the first part of the parameters includes the shutter time and/or the gain size in the automatic exposure parameters, and the second part of the parameters includes the aperture size in the automatic exposure parameters.
在另一种可能的实现方式中,自动曝光参数的第一部分参数包括快门时间,对于自动曝光参数的第一部分参数的每个参数,根据该参数生成一组序列并进行周期性扩展得到该参数扩展序列,作为手动曝光参数的第一部分参数中的对应参数包括:获取自动曝光参数中的快门时间并根据所述快门时间生成一组快门时间序列,然后循环重复快门时间序列得到的快门时间扩展序列作为手动曝光参数中的快门时间。在上述实现方式中,手动曝光参数中的两个参数:光圈大小以及增益大小,均与自动曝光参数对应的参数保持一致,手动曝光参数中的快门时间在自动曝光参数包含的快门时间的基础上进行周期性扩展得到该参数扩展序列,使得视频采集装置基于手动曝光参数拍摄视频帧时,可以适应多层次明暗不均的场景,而不仅仅是明暗对比显著的场景。可选的,上述手动曝光参数中所包含一组快门时间序列是由至少3个快门时间取值构成。举例说明,若自动曝光参数的快门时间1/500秒,基于待拍摄场景的光线分布,手动曝光参数中所包含一组快门时间序列包括[1/500秒,1/250秒,1/125秒,1/250秒,1/500秒],按照周期性扩展得到的快门时间的参数扩展序列包括[1/500秒,1/250秒,1/125秒,1/250秒,1/500秒,1/250秒,1/125秒,1/250秒,1/500秒,……]。In another possible implementation, the first part of the automatic exposure parameter includes the shutter time, and for each parameter of the first part of the automatic exposure parameter, a set of sequences is generated according to the parameter and periodically expanded to obtain the parameter expansion Sequence, the corresponding parameters in the first part of the parameters as the manual exposure parameters include: acquiring the shutter time in the automatic exposure parameters and generating a set of shutter time sequences according to the shutter time, and then repeating the shutter time sequence cyclically to obtain the shutter time extended sequence as The shutter time in the manual exposure parameters. In the above implementation, the two parameters in the manual exposure parameters: the aperture size and the gain size are consistent with the parameters corresponding to the automatic exposure parameters. The shutter time in the manual exposure parameters is based on the shutter time included in the automatic exposure parameters. Perform periodic expansion to obtain the parameter expansion sequence, so that when the video capture device shoots video frames based on manual exposure parameters, it can adapt to scenes with multi-level uneven light and dark, not just scenes with significant contrast of light and dark. Optionally, a set of shutter time sequences included in the manual exposure parameter is composed of at least 3 shutter time values. For example, if the shutter time of the automatic exposure parameter is 1/500 second, based on the light distribution of the scene to be shot, a set of shutter time series included in the manual exposure parameter includes [1/500 second, 1/250 second, 1/125 second , 1/250 second, 1/500 second], according to the parameter expansion sequence of the periodically expanded shutter time, including [1/500 second, 1/250 second, 1/125 second, 1/250 second, 1/500 second , 1/250 second, 1/125 second, 1/250 second, 1/500 second,...].
在另一种可能的实现方式中,自动曝光参数的第一部分包括快门时间和增益大小,对于自动曝光参数的第一部分参数的每个参数,根据该参数生成一组序列并进行周期性扩展得到该参数扩展序列,作为手动曝光参数的第一部分参数中的对应参数还包括:获取自动曝光参数中的增益大小并根据所述增益大小生成一组增益大小序列;循环重复所述增益大小序列得到的增益大小扩展序列作为所述手动曝光参数中的增益大小。将手动曝光的快门时间和增益大小这两个参数与自动曝光进行联动,除了提高 摄像机对亮度渐变场景的适应能力以外,还提高了第二视频流的信噪比,改善了图像质量。和上一种可能的实现方式中的举例类似,手动曝光参数中的增益大小也可以根据自动曝光参数中的增益大小扩展为一组增益大小序列,并进行周期性的扩展获得手动曝光参数中的增益大小。In another possible implementation, the first part of the automatic exposure parameters includes the shutter time and the gain size. For each parameter of the first part of the automatic exposure parameters, a set of sequences is generated according to the parameters and periodically expanded to obtain the The parameter expansion sequence, as the corresponding parameter in the first part of the manual exposure parameter, also includes: obtaining the gain size in the automatic exposure parameter and generating a set of gain size sequence according to the gain size; loop repeating the gain size sequence to obtain the gain The size expansion sequence is used as the gain size in the manual exposure parameter. Linking the two parameters of manual exposure with shutter time and gain size and automatic exposure, in addition to improving the camera's ability to adapt to scenes with gradual brightness changes, it also increases the signal-to-noise ratio of the second video stream and improves image quality. Similar to the example in the previous possible implementation, the gain size in the manual exposure parameter can also be expanded into a set of gain size sequence according to the gain size in the automatic exposure parameter, and it is periodically expanded to obtain the gain size in the manual exposure parameter. The size of the gain.
在另一种可能的实现方式中,手动曝光参数中的快门时间和/或所述手动曝光参数中的增益大小呈周期性变化,且在一个周期内包含上升以及下降变化。手动曝光参数的变化规律符合视频采集装置所拍摄场景的亮度分布。In another possible implementation manner, the shutter time in the manual exposure parameter and/or the gain in the manual exposure parameter changes periodically, and includes rising and falling changes in one cycle. The change rule of the manual exposure parameter conforms to the brightness distribution of the scene shot by the video capture device.
在另一种可能的实现方式中,自动曝光参数的第二部分参数包括:光圈大小。为了保证摄像机的稳定性,不影响自动曝光支路的视频流,手动曝光参数的光圈大小与自动曝光的光圈大小应保持一致。In another possible implementation manner, the second part of the automatic exposure parameters includes: aperture size. In order to ensure the stability of the camera and not affect the video stream of the automatic exposure branch, the aperture size of the manual exposure parameter should be consistent with the aperture size of the automatic exposure.
在另一种可能的实现方式中,第一视频流用于视频显示,第二视频流用于视频分析。第一视频流采用的是自动曝光,其曝光参数为了适应人眼的视觉能力只能缓慢变化,所以可以用于视频显示。第二视频流采用的是手动曝光,为了使得场景中每一个明暗区域都有一个较优曝光帧,手动曝光参数需要大幅度的变化,不适合给人观看,但是可以送往智能分析模块,识别分析场景中的各种明暗区域。In another possible implementation manner, the first video stream is used for video display, and the second video stream is used for video analysis. The first video stream uses automatic exposure, and its exposure parameters can only change slowly in order to adapt to the visual ability of the human eye, so it can be used for video display. The second video stream uses manual exposure. In order to make each light and dark area in the scene have a better exposure frame, manual exposure parameters need to be greatly changed, which is not suitable for human viewing, but can be sent to the intelligent analysis module for identification Analyze various light and dark areas in the scene.
在另一种可能的实现方式中,将构成第一视频流的视频帧和构成第二视频流的视频帧进行融合处理获得第三视频流。也就是第三视频流中包含了通过自动曝光和手动曝光两种曝光方法获取的视频帧。In another possible implementation manner, the video frames constituting the first video stream and the video frames constituting the second video stream are fused to obtain the third video stream. That is, the third video stream contains video frames obtained by two exposure methods: automatic exposure and manual exposure.
在另一种可能的实现方式中,第三视频流将用于视频分析。比起只分析手动曝光下的视频流,本实现方式提供了更多视频帧用来视频分析,大大提高了识别分析的准确度。In another possible implementation, the third video stream will be used for video analysis. Compared with only analyzing the video stream under manual exposure, this implementation provides more video frames for video analysis, which greatly improves the accuracy of identification and analysis.
第二方面,本申请提供一种视频采集装置,所述装置包括:摄像模组、第一图像信号处理模块和第二图像信号处理模块。所述第一图像信号处理模块,用于根据环境数据确定摄像模组的自动曝光参数;所述第二图像信号处理模块,用于根据自动曝光参数获得手动曝光参数;所述摄像模组,包括镜头和图像传感器,用于基于所述自动曝光参数,采集视频帧构成第一视频流;还用于基于所述手动曝光参数,采集视频帧构成第二视频流,其中,构成所述第一视频流的视频帧和构成所述第二视频流的视频帧是由所述摄像模组交替采集得到。In a second aspect, the present application provides a video capture device, which includes a camera module, a first image signal processing module, and a second image signal processing module. The first image signal processing module is used to determine the automatic exposure parameters of the camera module according to environmental data; the second image signal processing module is used to obtain manual exposure parameters according to the automatic exposure parameters; the camera module includes The lens and the image sensor are used to collect video frames based on the automatic exposure parameters to form a first video stream; and are also used to collect video frames based on the manual exposure parameters to form a second video stream, where the first video is formed The video frames of the stream and the video frames constituting the second video stream are alternately collected by the camera module.
在另一种可能的实现方式中,自动曝光参数包括:快门时间、光圈大小以及增益,第二图像信号处理模块用于:对于自动曝光参数的第一部分参数的每个参数,根据该参数生成一组序列并进行周期性扩展得到该参数扩展序列,作为手动曝光参数的第一部分参数中的对应参数;保持自动曝光参数的第二部分参数不变,作为手动曝光参数的第二部分参数。In another possible implementation manner, the automatic exposure parameters include: shutter time, aperture size, and gain, and the second image signal processing module is used to: for each parameter of the first part of the automatic exposure parameter, generate a parameter based on the parameter Group sequences and perform periodic expansion to obtain the parameter expansion sequence as the corresponding parameter in the first part of the manual exposure parameter; keep the second part of the automatic exposure parameter unchanged as the second part of the manual exposure parameter.
在另一种可能的实现方式中,自动曝光参数的第一部分参数包括快门时间,第二图像信号处理模块用于:获取自动曝光参数中的快门时间;根据所述快门时间生成一组快门时间序列,循环重复所述快门时间序列得到的快门时间扩展序列作为手动曝光参数中的快门时间。In another possible implementation manner, the first part of the automatic exposure parameter includes the shutter time, and the second image signal processing module is used to: obtain the shutter time in the automatic exposure parameter; and generate a set of shutter time series according to the shutter time , The shutter time extended sequence obtained by cyclically repeating the shutter time sequence is used as the shutter time in the manual exposure parameter.
在另一种可能的实现方式中,自动曝光参数的第一部分参数还包括增益大小,第二图像信号处理模块还用于:获取自动曝光参数中的增益大小;根据所述增益大小 生成一组增益大小序列,循环重复所述增益大小序列得到的增益大小扩展序列作为手动曝光参数中的增益大小。In another possible implementation manner, the first part of the automatic exposure parameters further includes a gain size, and the second image signal processing module is further used to: obtain the gain size in the automatic exposure parameter; and generate a set of gains according to the gain size The size sequence, the gain size expansion sequence obtained by cyclically repeating the gain size sequence is used as the gain size in the manual exposure parameter.
在另一种可能的实现方式中,手动曝光参数中的快门时间和所述手动曝光参数中的增益大小呈周期性变化,且在一个周期内包含上升以及下降变化。In another possible implementation manner, the shutter time in the manual exposure parameter and the gain in the manual exposure parameter change periodically, and include rising and falling changes in one cycle.
在另一种可能的实现方式中,自动曝光参数的第二部分参数包括:光圈大小。In another possible implementation manner, the second part of the automatic exposure parameters includes: aperture size.
在另一种可能的实现方式中,第一视频流用于视频显示,第二视频流用于视频分析。In another possible implementation manner, the first video stream is used for video display, and the second video stream is used for video analysis.
在另一种可能的实现方式中,所述装置还包括融合模块,用于将构成第一视频流的视频帧和构成第二视频流的视频帧进行融合处理,获得第三视频流。In another possible implementation manner, the device further includes a fusion module, configured to perform fusion processing on the video frames constituting the first video stream and the video frames constituting the second video stream to obtain the third video stream.
在另一种可能的实现方式中,第三视频流用于视频分析。In another possible implementation manner, the third video stream is used for video analysis.
第二方面提供的视频采集装置及可能的实现方式所能够达到的技术效果,与根据第一方面基于曝光控制的视频采集方法及可能的实现方式所能够达到的技术效果相同,在此不再赘述。The technical effects that can be achieved by the video capture device and possible implementation manners provided by the second aspect are the same as those that can be achieved by the exposure control-based video capture method and possible implementation manners according to the first aspect, and will not be repeated here. .
第三方面,本申请提供一种视频监控系统,所述系统包括第二方面所述的视频采集装置;视频显示模块,用于显示第一视频流;视频分析模块,用于分析第二和/或第三视频流。In a third aspect, the present application provides a video surveillance system, the system includes the video capture device described in the second aspect; a video display module for displaying the first video stream; a video analysis module for analyzing the second and/ Or the third video stream.
第四方面,本申请提供一种计算机程序产品,该计算机程序产品包含计算机可读代码指令,当这些计算机可读代码指令被计算机执行时能够实现计算机对视频采集装置的配置,使得该装置能够执行第一方面以及第一方面的各种可能的实现方式中的任一所述方法。In a fourth aspect, this application provides a computer program product that contains computer-readable code instructions. When these computer-readable code instructions are executed by the computer, the computer can configure the video capture device so that the device can execute The method described in the first aspect and any of the various possible implementation manners of the first aspect.
第五方面,本申请提供一种非暂态(Non-transitory)计算机可读存储介质,该非暂态计算机可读存储介质包含计算机程序代码指令,当这些计算机可读代码指令被计算机执行时能够实现计算机对视频采集装置的配置,使得该装置能够执行第一方面以及第一方面的各种可能的实现方式中的任一所述方法。所述非暂态计算机可读存储介质包括下列选项中的一个或多个:只读存储器(Read-Only Memory,ROM)、可编程ROM(Programmable ROM)、可擦除的PROM(Erasable PROM,EPROM)、闪存(Flash Memory)、电EPROM(Electrically EPROM,EEPROM)和硬盘驱动器(Hard Drive)。In the fifth aspect, the present application provides a non-transitory computer-readable storage medium, which contains computer program code instructions, which can be executed when the computer-readable code instructions are executed by a computer The configuration of the video capture device by the computer is implemented, so that the device can execute the method described in the first aspect and any of the various possible implementation manners of the first aspect. The non-transitory computer-readable storage medium includes one or more of the following options: Read-Only Memory (ROM), Programmable ROM (Programmable ROM), Erasable PROM (Erasable PROM, EPROM) ), flash memory (Flash Memory), electrical EPROM (Electrically EPROM, EEPROM) and hard drive (Hard Drive).
附图说明Description of the drawings
图1为本申请实施例提供的基于曝光控制的视频采集方法的应用架构示意图。FIG. 1 is a schematic diagram of the application architecture of a video capture method based on exposure control provided by an embodiment of the application.
图2为本申请实施例提供的亮度分布不均匀场景的示意图。FIG. 2 is a schematic diagram of a scene with uneven brightness distribution provided by an embodiment of the application.
图3为本申请实施例提供的场景中不同亮度区域所需的快门时间示意图。FIG. 3 is a schematic diagram of shutter time required for different brightness areas in a scene provided by an embodiment of the application.
图4为本申请实施例提供的自动曝光方法流程示意图。FIG. 4 is a schematic flowchart of an automatic exposure method provided by an embodiment of the application.
图5为本申请实施例提供的基于曝光控制的视频采集方法步骤流程示意图。FIG. 5 is a schematic flowchart of steps of a video acquisition method based on exposure control provided by an embodiment of the application.
图6为本申请实施例提供的基于曝光控制的视频采集方法结构示意图。FIG. 6 is a schematic structural diagram of a video capture method based on exposure control provided by an embodiment of the application.
图7为本申请实施例提供的根据自动曝光参数生成手动曝光参数的流程示意图。FIG. 7 is a schematic diagram of a flow of generating manual exposure parameters according to automatic exposure parameters according to an embodiment of the application.
图8为本申请实施例提供的快门循环周期示意图。FIG. 8 is a schematic diagram of a shutter cycle period provided by an embodiment of the application.
图9为本申请实施例提供的奇偶帧融合结构示意图。FIG. 9 is a schematic diagram of a parity frame fusion structure provided by an embodiment of the application.
图10为本申请实施例提供的视频采集装置的结构示意图。FIG. 10 is a schematic structural diagram of a video capture device provided by an embodiment of the application.
具体实施方式Detailed ways
为了便于理解,首先对本申请实施例所涉及的技术术语进行说明。In order to facilitate understanding, the technical terms involved in the embodiments of the present application are described first.
1)曝光参数:摄像时的曝光参数决定了图像的亮度。曝光参数包括快门时间、增益大小或光圈大小等参数中的一个或多个。1) Exposure parameters: The exposure parameters during shooting determine the brightness of the image. The exposure parameters include one or more of the shutter time, gain size, or aperture size.
快门时间(Shutter Time,ST),也称曝光时间,快门为控制进光时间的阀门。快门时间越长,意味着进光量越多,拍摄的到的图像越亮;快门时间越短,意味着进光量越少,拍摄得到的图像越暗。Shutter Time (ST), also known as exposure time, shutter is a valve that controls the light-in time. The longer the shutter time, the more light entering, and the brighter the captured image; the shorter the shutter time, the less light entering, and the darker the captured image.
增益是指对光电转换后的电信号或数字信号进行放大或者缩小的过程。增大增益,拍摄得到的图像比实际场景更亮;减小增益,拍摄得到的图像比实际场景更暗。Gain refers to the process of amplifying or reducing the electrical signal or digital signal after photoelectric conversion. Increase the gain, and the captured image will be brighter than the actual scene; reduce the gain, the captured image will be darker than the actual scene.
光圈用于控制透过镜头进入机身的进光量。增大光圈意味着进光量增多,拍摄得到的图像更亮;减小光圈意味着进光量减少,拍摄得到的图像更暗。The aperture is used to control the amount of light entering the fuselage through the lens. Increasing the aperture means increasing the amount of light entering, and the captured image is brighter; reducing the aperture means reducing the amount of light entering, and the captured image is darker.
2)自动曝光(Automatic Exposure):是指摄像机根据环境亮度数据,通过算法自动调节曝光参数(快门时间、增益、光圈)进行曝光,使得所摄物体亮度正常。2) Automatic Exposure: It means that the camera automatically adjusts the exposure parameters (shutter time, gain, aperture) according to the ambient brightness data through the algorithm for exposure, so that the brightness of the subject is normal.
3)手动曝光(Manual Exposure):是一种手动设置摄像机的曝光参数(快门时间、增益、及光圈)的曝光方法。3) Manual Exposure: It is an exposure method that manually sets the camera's exposure parameters (shutter time, gain, and aperture).
4)图像信号处理器(Image Signal Processor,ISP):主要作用是对前端图像传感器输出的信号做处理,主要功能有白平衡调节、自动曝光控制等。4) Image Signal Processor (ISP): The main function is to process the signal output by the front-end image sensor. The main functions are white balance adjustment, automatic exposure control, etc.
下面将结合图1介绍一下本申请提供的曝光控制方法的系统应用架构示意图。如图1所示,摄像机系统12包括摄像模组13,图像信号处理器(ISP)14、编码器15。The following will introduce a schematic diagram of the system application architecture of the exposure control method provided by the present application in conjunction with FIG. 1. As shown in FIG. 1, the camera system 12 includes a camera module 13, an image signal processor (ISP) 14, and an encoder 15.
摄像模组13包括了镜头模组131、图像传感器132、以及集成在图像传感器上的增益控制电路133。镜头模组131包括了镜头前的光圈以及光学镜头组合,主要用于采集来自被摄对象11的光线。光学镜头组合通常是由一块或者多块光学玻璃(或者塑料)组成的透镜组,可以由凹透镜、凸透镜、M型透镜等透镜或者透镜的组合组成。图像传感器132,可以为电荷耦合元件(charge-coupled device,CCD)构成的CCD图像传感器,也可以为互补金属氧化物半导体(complementary metal oxide semiconductor,CMOS)构成的CMOS图像传感器,或可以为接触式图像传感器(contact image sensor,CIS)构成的CIS图像传感器等。图像传感器主要用于接收摄像模组传递过来的光信号,将光信号转变为电信号,进行光电转换。增益控制电路133一般集成在图像传感器中,主要用于保证在不同的景物照度条件下拍摄图像都能输出的标准视频信号。The camera module 13 includes a lens module 131, an image sensor 132, and a gain control circuit 133 integrated on the image sensor. The lens module 131 includes an aperture in front of the lens and an optical lens combination, and is mainly used to collect light from the subject 11. The optical lens combination is usually a lens group composed of one or more pieces of optical glass (or plastic), and can be composed of a lens such as a concave lens, a convex lens, an M-type lens, or a combination of lenses. The image sensor 132 may be a CCD image sensor composed of a charge-coupled device (CCD), a CMOS image sensor composed of a complementary metal oxide semiconductor (CMOS), or a contact type A CIS image sensor composed of an image sensor (contact image sensor, CIS), etc. The image sensor is mainly used to receive the light signal transmitted from the camera module, convert the light signal into an electrical signal, and perform photoelectric conversion. The gain control circuit 133 is generally integrated in the image sensor, and is mainly used to ensure that the standard video signal that can be output in the captured image under different scene illumination conditions.
图像信号处理器15(ISP)是一种特殊的数字信号处理器(Digital signal processor,DSP),它的主要作用是对前端图像传感器输出的信号做后期处理。不同的ISP用来匹配不同厂商的图像传感器。ISP的优异在整个摄像机产品中很重要,它可以直接影响呈现给用户的画质的优劣。ISP与前面的摄像模组有专门的电路进行连接,可以控制摄像模组13采用不同的摄像参数,即用于实现我们常常提及的2A控制(Automatic white balance/Automatic exposure,自动白平衡/自动曝光)或者3A控制(Automatic white balance/Automatic exposure/Automatic Focus,自动白平衡/自动曝光/自动聚焦)。The image signal processor 15 (ISP) is a special digital signal processor (Digital Signal Processor, DSP), and its main function is to perform post-processing on the signal output by the front-end image sensor. Different ISPs are used to match image sensors from different manufacturers. The excellence of ISP is very important in the entire camera product, and it can directly affect the quality of the image presented to the user. The ISP has a special circuit to connect with the previous camera module, which can control the camera module 13 to adopt different camera parameters, which is used to realize the 2A control (Automatic white balance/Automatic exposure) that we often mentioned. Exposure) or 3A control (Automatic white balance/Automatic exposure/Automatic Focus, automatic white balance/automatic exposure/automatic focus).
编码器16主要用于对信号数据按照标准格式进行压缩编码,方便视频信号的传输。The encoder 16 is mainly used to compress and encode signal data according to a standard format to facilitate the transmission of video signals.
在仓库管理、无人值守、平安城市等视频监控领域,时常需要在低照度场景下进行图 像/视频的拍摄,由于环境光线不足,摄像机难以获得高质量的彩色图像。在这样的情况下往往需要通过补光的方式提高摄像机的成像质量。但是补光灯的光线不同于自然光,是非平行的光线,所以它的补光效果不如白天自然光线一样那么均匀。如图2所示,补光区域的中心部分光线充足,补光区域的边缘部分光线较弱。为了获得一个曝光合适的图像,示例性的,如图3所示,最内圈的区域因为补光光线十分充足,所以它需要的曝光时间最短,假设为ST1;次内圈区域的光线量仅次于最内圈,需要的曝光时间假设为ST2;以此类推,另外两圆弧区域需要的曝光时间分别为ST3、ST4,进一步的,ST1<ST2<ST3<ST4。In the field of video surveillance such as warehouse management, unattended, and safe cities, it is often necessary to shoot images/videos in low-light scenes. Due to insufficient ambient light, it is difficult for the camera to obtain high-quality color images. In this case, it is often necessary to improve the imaging quality of the camera by means of supplementary light. However, the light of the fill light is different from natural light, it is a non-parallel light, so its fill light effect is not as uniform as natural light during the day. As shown in Figure 2, the central part of the fill light area has sufficient light, and the edge of the fill light area has weak light. In order to obtain a properly exposed image, for example, as shown in Figure 3, the innermost circle area has sufficient fill light, so it needs the shortest exposure time, assuming it is ST1; the amount of light in the second inner circle area is only Next to the innermost circle, the required exposure time is assumed to be ST2; and so on, the exposure times required for the other two arc areas are ST3 and ST4 respectively, and further, ST1<ST2<ST3<ST4.
在现有的自动曝光技术下,全局采用同一组曝光参数,因此人脸多处于过曝或欠曝的状态,这样会导致人脸成像质量差而难以识别。现有的自动曝光技术整体实现过程如图4所示:In the existing automatic exposure technology, the same set of exposure parameters are used globally, so the face is mostly in an over-exposed or under-exposed state, which will lead to poor image quality of the face and difficult to recognize. The overall realization process of the existing automatic exposure technology is shown in Figure 4:
步骤S41,摄像模组采集环境光,一般会搭配一些滤光片以提高成像质量。In step S41, the camera module collects ambient light, and generally uses some filters to improve the image quality.
步骤S42,图像信号处理器ISP计算图像亮度,输出统计值M。在自动曝光技术中,统计亮度比较常见的方法有平均亮度法、权重均值法、亮度直方图等,其中最普遍的就是平均亮度法。平均亮度法是对图像所有像素亮度求平均值,通过不断调整曝光参数最终达到目标亮度。而权重均值法是对图像不同区域设置不同权重来计算图像亮度。亮度直方图法是通过为直方图中峰值分配不同权重来计算图像亮度。Step S42, the image signal processor ISP calculates the brightness of the image, and outputs a statistical value M. In the automatic exposure technology, the common methods of statistical brightness include the average brightness method, the weight average method, and the brightness histogram. The most common method is the average brightness method. The average brightness method is to average the brightness of all pixels of the image, and finally achieve the target brightness by continuously adjusting the exposure parameters. The weighted average method is to set different weights to different areas of the image to calculate the image brightness. The brightness histogram method calculates the image brightness by assigning different weights to the peaks in the histogram.
步骤S43,计算亮度统计值M与预设的目标亮度差的绝对值,并判断是否小于阈值。如果两者之间的差值小于阈值则进行步骤S44,反之,则进行步骤S45。Step S43: Calculate the absolute value of the brightness statistical value M and the preset target brightness difference, and determine whether it is less than the threshold. If the difference between the two is less than the threshold value, proceed to step S44, otherwise, proceed to step S45.
步骤S44,输出曝光参数。将曝光参数应用于摄像模组采集图像。Step S44, output exposure parameters. The exposure parameters are applied to the image captured by the camera module.
步骤S45,重新计算曝光参数,并将新的曝光参数应用于摄像模组,重复步骤S41-S43,直到统计亮度M与预设的目标亮度差的绝对值小于阈值,输出最终曝光参数。Step S45, recalculate the exposure parameters and apply the new exposure parameters to the camera module, repeat steps S41-S43, until the absolute value of the statistical brightness M and the preset target brightness difference is less than the threshold, and output the final exposure parameters.
上述自动曝光的方法在拍摄物体或者人脸时,全局仅采用一种曝光参数,难以适应环境亮度不均匀的场景。此外,为了保证画面亮度的平稳变化,自动曝光方法的曝光参数调节较慢,当行人从暗区进入到补光中心区域,人脸会从欠曝状态快速转变为过曝状态,从而难以获取正常曝光状态下的图像,大大降低了人脸识别的准确率。The above-mentioned automatic exposure method uses only one exposure parameter globally when shooting objects or faces, and it is difficult to adapt to scenes with uneven environmental brightness. In addition, in order to ensure the smooth change of the picture brightness, the exposure parameter adjustment of the automatic exposure method is slow. When the pedestrian enters the central area of the fill light from the dark area, the face will quickly change from the under-exposed state to the over-exposed state, making it difficult to obtain the normal state. The image in the exposed state greatly reduces the accuracy of face recognition.
所以,为了解决上述问题,本申请实施例提供一种曝光参数周期变化的曝光方法来提升画面中不同亮度区域人脸的成像质量,进而提升人脸识别率。使用同一摄像模组在同一时段交叉进行自动曝光和手动曝光,其中,手动曝光的参数根据自动曝光的参数设定,且具有周期性变化的特点;然后将利用自动曝光方法获得的视频流用于视频显示,将利用手动曝光方法获得的视频流用于目标识别/分析。本申请在采集图像时通过交替进行手动曝光和自动曝光的方法,可以快速响应场景亮度的变化,提升画面中不同亮度区域的成像质量。而且周期性变化的手动曝光参数种类不止两种,可以适应多层次亮度分布不均的场景,而不是仅限于亮暗对比显著的场景,因此,大大提高了摄像机对亮度不均的场景的适应能力。Therefore, in order to solve the above-mentioned problem, the embodiment of the present application provides an exposure method in which the exposure parameter periodically changes to improve the image quality of the face in the different brightness areas in the picture, thereby improving the face recognition rate. Use the same camera module to perform automatic exposure and manual exposure at the same time interval, where the parameters of manual exposure are set according to the parameters of automatic exposure, and have the characteristics of periodic changes; then the video stream obtained by the automatic exposure method is used for the video Show that the video stream obtained by the manual exposure method is used for target recognition/analysis. In this application, by alternately performing manual exposure and automatic exposure when capturing images, it can quickly respond to changes in scene brightness and improve the imaging quality of different brightness areas in the picture. Moreover, there are more than two types of manual exposure parameters that change periodically, which can adapt to scenes with uneven brightness distribution at multiple levels, rather than limited to scenes with significant contrast between bright and dark. Therefore, the camera's ability to adapt to scenes with uneven brightness is greatly improved. .
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application.
图5是本发明的整体解决方案流程,结合图6的结构示意图,本发明方法包括如下基本步骤:Figure 5 is the overall solution process of the present invention. Combined with the schematic structural diagram of Figure 6, the method of the present invention includes the following basic steps:
步骤S51:第一图像信号处理装置(ISP1)获取当前拍摄场景的亮度数据,根据亮度数 据生成自动曝光参数。Step S51: The first image signal processing device (ISP1) obtains brightness data of the current shooting scene, and generates automatic exposure parameters based on the brightness data.
作为一种具体实现,在实现步骤S51时,当前拍摄场景的亮度数据是由摄像机通过镜头模组采集待拍摄场景的环境亮度并通过图像传感器确定。As a specific implementation, when step S51 is implemented, the brightness data of the current shooting scene is collected by the camera through the lens module of the environment brightness of the scene to be shot and determined by the image sensor.
步骤S52:第二图像信号处理装置(ISP2)根据ISP1生成的自动曝光参数生成手动曝光参数。ISP2可以直接从ISP1中调取自动曝光参数的数值,并依此计算相应的手动曝光参数。Step S52: The second image signal processing device (ISP2) generates manual exposure parameters according to the automatic exposure parameters generated by ISP1. ISP2 can directly retrieve the value of automatic exposure parameters from ISP1, and calculate the corresponding manual exposure parameters accordingly.
步骤S53:ISP1将自动曝光参数应用于摄像模组,获取摄像机采集的所有视频帧中的奇数帧视频流(第一视频流)。即摄像模组在拍摄奇数帧视频流的时候,曝光参数(快门时间、光圈大小、增益大小)采用ISP1计算得出的自动曝光参数数值。Step S53: ISP1 applies the automatic exposure parameter to the camera module, and obtains the odd-numbered video stream (the first video stream) among all the video frames collected by the camera. That is, when the camera module shoots an odd-numbered frame video stream, the exposure parameters (shutter time, aperture size, gain size) adopt the automatic exposure parameter values calculated by ISP1.
步骤S54:ISP2将手动曝光参数应用于摄像模组,获取摄像机采集的所有视频帧中的偶数帧视频流(第二视频流)。即摄像模组在拍摄偶数帧视频流的时候,曝光参数(快门时间、光圈大小、增益大小)要切换成ISP2计算得出的手动曝光参数数值。Step S54: ISP2 applies the manual exposure parameter to the camera module, and obtains the even-numbered video stream (second video stream) among all the video frames collected by the camera. That is, when the camera module is shooting an even-numbered frame video stream, the exposure parameters (shutter time, aperture size, gain size) should be switched to the manual exposure parameter values calculated by ISP2.
步骤S55:将奇数帧视频流用于视频显示,将偶数帧视频流传输至目标检测、识别模块,用于目标分析。Step S55: The odd-numbered frame video stream is used for video display, and the even-numbered frame video stream is transmitted to the target detection and recognition module for target analysis.
由于奇数帧视频流采用的是自动曝光方法,其参数是缓慢连续变化的,所以可以输送至后端用于视频显示。而偶数帧视频流采用的手动曝光参数不是连续变化的,人眼无法适应,主要用于输送至分析模块用于人脸识别或者目标检测等。Because the odd-numbered frame video stream adopts the automatic exposure method, its parameters are slowly and continuously changed, so it can be sent to the back end for video display. However, the manual exposure parameters used in the even-numbered frame video stream are not continuously changing, which cannot be adapted by the human eye, and is mainly used for delivery to the analysis module for face recognition or target detection.
值得说明的是,上述的奇偶帧只是为了进行区分两种视频流,其实还可以是奇数帧是基于手动曝光参数而采集,偶数帧是基于自动曝光参数而采集,甚至可以每三帧视频流中前两帧基于自动曝光参数采集,第三帧基于手动曝光参数采集,本申请对此不做具体限定。为了方便介绍本发明技术方案,接下来的所有实施例皆以摄像机采集的所有视频帧中的奇数帧采用自动曝光参数拍摄、偶数帧采用手动曝光参数拍摄为例。It is worth noting that the above-mentioned odd and even frames are only to distinguish between two video streams. In fact, it is also possible that odd frames are collected based on manual exposure parameters, and even frames are collected based on automatic exposure parameters, even every three frames of the video stream. The first two frames are collected based on automatic exposure parameters, and the third frame is collected based on manual exposure parameters, which is not specifically limited in this application. In order to facilitate the introduction of the technical solution of the present invention, all the following embodiments take as an example that the odd-numbered frames of all the video frames captured by the camera are captured with automatic exposure parameters, and the even-numbered frames are captured with manual exposure parameters as examples.
示例性的,在上述实施例的基础上,在步骤S52中,ISP2根据ISP1生成的自动曝光参数生成手动曝光参数,包括:对于自动曝光参数的第一部分参数的每个参数,根据该参数生成一组序列并进行周期性扩展得到该参数扩展序列,作为手动曝光参数的第一部分参数中的对应参数;保持自动曝光参数的第二部分参数不变,作为手动曝光参数的第二部分参数。上述方法包括两个方案:一种是第一部分参数包括快门时间,第二部分参数包括光圈大小和增益大小;另一种是第一部分参数包括快门时间和增益大小,第二部分参数包括光圈大小。下面以第一种方案为例,,如图7所示,步骤S52具体包括:Exemplarily, on the basis of the foregoing embodiment, in step S52, ISP2 generates a manual exposure parameter according to the automatic exposure parameter generated by ISP1, including: for each parameter of the first part of the automatic exposure parameter, a parameter is generated according to the parameter. Group sequences and perform periodic expansion to obtain the parameter expansion sequence as the corresponding parameter in the first part of the manual exposure parameter; keep the second part of the automatic exposure parameter unchanged as the second part of the manual exposure parameter. The above method includes two solutions: one is that the first part of parameters includes shutter time, and the second part of parameters includes aperture size and gain size; the other is that the first part of parameters includes shutter time and gain size, and the second part of parameters includes aperture size. Taking the first solution as an example, as shown in FIG. 7, step S52 specifically includes:
步骤S71:ISP2获取当前ISP1获取的自动曝光参数:快门时间ST AE、光圈大小、增益大小。ISP1根据环境亮度数据生成了自动曝光参数,ISP2可以直接从ISP1中获取快门时间ST AEStep S71: ISP2 obtains the automatic exposure parameters obtained by the current ISP1: shutter time ST AE , aperture size, gain size. ISP1 generates automatic exposure parameters based on the ambient brightness data, and ISP2 can directly obtain the shutter time ST AE from ISP1.
步骤S72:ISP2生成一组呈升降变化的快门序列:[K1*ST AE,K2*ST AE,K3*ST AE,…,KN*ST AE]。其中,K1,K2,…KN是用户根据情况手动设置的值,例如是1,3,7,10。则生成的快门序列为[ST AE,3*ST AE,7*ST AE,10*ST AE]。 Step S72: ISP2 generates a set of shutter sequences that change up and down: [K1*ST AE , K2*ST AE , K3*ST AE ,..., KN*ST AE ]. Among them, K1, K2,...KN are the values manually set by the user according to the situation, such as 1, 3, 7, 10. The generated shutter sequence is [ST AE , 3*ST AE , 7*ST AE , 10*ST AE ].
步骤S73:根据所述快门序列自动生成一个呈升降变化的快门周期。如图8所示,偶数帧的快门时间按照自动曝光快门时间ST AE的1倍、3倍、7倍、10倍、7倍、3倍、1倍这种方式进行周期性升降变化。值得注意的是,有时候目标分析模块由于计算能力限制,无法接收所有数据帧,只能隔帧处理。所以,有时每两个偶数帧的参数需要保持一致,例如偶 数帧的快门时间为自动曝光快门时间ST AE的1倍、1倍、3倍、3倍、7倍、7倍、10倍、10倍、7倍、7倍、3倍、3倍、1倍、1倍。 Step S73: According to the shutter sequence, automatically generate a shutter period that changes up and down. As shown in FIG. 8, the shutter time of the even-numbered frames is periodically changed up and down according to the automatic exposure shutter time ST AE 1 time, 3 times, 7 times, 10 times, 7 times, 3 times, and 1 time. It is worth noting that sometimes the target analysis module cannot receive all data frames due to the limitation of computing power, and can only process every frame. Therefore, sometimes the parameters of every two even-numbered frames need to be kept the same. For example, the shutter time of the even-numbered frame is 1 times, 1 times, 3 times, 3 times, 7 times, 7 times, 10 times, 10 times of the automatic exposure shutter time ST AE. Times, 7 times, 7 times, 3 times, 3 times, 1 times, 1 times.
步骤S74:将生成好的快门周期循环应用到摄像模组中以获取偶数帧视频流。并且,手动曝光参数的光圈大小、增益大小和自动曝光的光圈大小、增益大小保持一致。Step S74: Apply the generated shutter period to the camera module cyclically to obtain an even-numbered frame video stream. In addition, the aperture size and gain size of the manual exposure parameters are consistent with the aperture size and gain size of the automatic exposure parameters.
其中,步骤S72和S73也可以直接合并为一步。即生成快门序列的时候可以直接生成一个快门周期,例如快门序列为[ST AE,3*ST AE,7*ST AE,10*ST AE,7*ST AE,3*ST AE,ST AE],然后执行步骤S74,将所述快门序列循环应用于摄像模组。 Among them, steps S72 and S73 can also be directly combined into one step. That is, when generating a shutter sequence, you can directly generate a shutter period, for example, the shutter sequence is [ST AE , 3*ST AE , 7*ST AE , 10*ST AE , 7*ST AE , 3*ST AE , ST AE ], Then step S74 is executed to cyclically apply the shutter sequence to the camera module.
值得说明的是,上述步骤仅仅采用了手动曝光参数中的快门时间与自动曝光参数中的快门时间进行联动,为了能获取更合适的曝光图像,在对快门时间进行联动的基础上,还可以对增益大小这一曝光参数进行联动。示例性的,手动曝光的增益可在自动曝光增益的基础上-2dB、-4dB、-6dB、-8dB、-6dB、-4dB、-2dB进行周期变化。假设自动曝光的增益大小为A,则增益大小序列为[A-2,A-4,A-6,A-8,A-6,A-4,A-2],然后将此扩展序列循环应用于摄像模组。进一步的,有时一个周期内的参数不一定需要完全对称,需要视具体情况而定。此外,因为手动曝光参数是根据自动曝光参数生成的,当自动曝光参数发生变化时,立即停止循环此时的手动曝光参数序列,并根据新的自动曝光参数重新计算手动曝光参数序列,,然后将新的手动曝光参数序列循环应用于摄像模组以获取偶数帧数据。本申请技术方案通过交替进行手动曝光和自动曝光,可以快速响应物体在场景中移动时亮度的变化,提高摄像机对包含多层次亮度场景的适应能力。It is worth noting that the above steps only use the shutter time in the manual exposure parameter to link with the shutter time in the automatic exposure parameter. In order to obtain a more suitable exposure image, on the basis of linking the shutter time, you can also The exposure parameter of gain size is linked. Exemplarily, the gain of manual exposure can be periodically changed based on the gain of automatic exposure by -2dB, -4dB, -6dB, -8dB, -6dB, -4dB, and -2dB. Assuming that the gain of automatic exposure is A, the sequence of gains is [A-2,A-4,A-6,A-8,A-6,A-4,A-2], and then this extended sequence is looped Applied to camera modules. Furthermore, sometimes the parameters in a period do not necessarily need to be completely symmetrical, and it depends on the specific situation. In addition, because the manual exposure parameters are generated based on the automatic exposure parameters, when the automatic exposure parameters change, the manual exposure parameter sequence at this time is immediately stopped looping, and the manual exposure parameter sequence is recalculated according to the new automatic exposure parameters, and then the The new manual exposure parameter sequence is cyclically applied to the camera module to obtain even-numbered frame data. By alternately performing manual exposure and automatic exposure, the technical solution of the present application can quickly respond to changes in brightness when objects move in the scene, and improve the camera's ability to adapt to scenes containing multiple levels of brightness.
为了便于理解,本申请实施例将技术方案应用于人车混行场景,详细展示方案实施细节。假设在摄像机当前拍摄场景的光照条件下车牌需要的快门时间为5ms,浅色车身需要的快门时间为5-10ms,深色车身需要的快门时间为10-20ms,近处人脸需要的曝光时间5-10ms,远处人脸需要的快门时间为10-20ms。同样的,以奇数帧自动曝光,偶数帧手动曝光,仅仅快门时间这一曝光参数进行联动为例,具体步骤如下:For ease of understanding, the embodiments of the present application apply the technical solution to a scene of mixed traffic between people and vehicles, and show the implementation details of the solution in detail. Assuming that under the lighting conditions of the current shooting scene of the camera, the shutter time required for the license plate is 5ms, the shutter time for light-colored vehicles is 5-10ms, the shutter time for dark-colored vehicles is 10-20ms, and the exposure time for nearby faces 5-10ms, the shutter time required for a distant face is 10-20ms. Similarly, take automatic exposure for odd frames, manual exposure for even frames, and linkage with only the exposure parameter of shutter time as an example. The specific steps are as follows:
Step1:为了保证车牌和近处人脸不过曝,假设奇数帧自动曝光路的快门时间ST AE为5ms,即ST AE=5ms; Step1: In order to ensure that the license plate and nearby faces are not exposed, assume that the shutter time ST AE of the odd-numbered frame automatic exposure road is 5ms, that is, ST AE = 5ms;
Step2:ISP2获取自动曝光路的光圈、增益和快门时间ST AE,手动曝光的光圈和增益与自动曝光的光圈、增益保持一致,快门时间序列可设计为[K1*ST AE,K2*ST AE,K3*ST AE,K4*ST AE],其中K1、K2、K3、K4分别为1、2、3、4; Step2: ISP2 obtains the iris, gain and shutter time ST AE of the automatic exposure path, the iris and gain of the manual exposure are consistent with the iris and gain of the automatic exposure, and the shutter time sequence can be designed as [K1*ST AE ,K2*ST AE , K3*ST AE ,K4*ST AE ], where K1, K2, K3, K4 are 1, 2, 3, 4 respectively;
Step3:根据快门序列,生成偶数帧的一个循环快门周期,为能同时兼顾车牌、车身和远近人脸的曝光需求,偶数帧的快门时间可按ST AE、2ST AE、3ST AE、4ST AE、3ST AE、2ST AE、ST AE这种升降方式循环变化; Step3: The shutter sequence, generates a shutter cycle period of even frames, is able to satisfy both the needs of the exposure plate, the body and the face distance, the shutter time even frame may ST AE, 2ST AE, 3ST AE , 4ST AE, 3ST AE , 2ST AE , ST AE, the lifting and lowering modes change cyclically;
Step4:如果奇数帧的快门时间由于环境光照变化而发生了改变,假设ST AE更新为4ms,则下一周期的偶数帧快门时间也要同步更新,即按照Step2和Step3重新计算下一周期的偶数帧快门时间。然后,ISP2将新的手动曝光参数应用于摄像模组,重新获取偶数帧数据。 Step4: If the shutter time of odd-numbered frames changes due to changes in ambient lighting, assuming ST AE is updated to 4ms, the shutter time of even-numbered frames in the next cycle should also be updated synchronously, that is, recalculate the even number of the next cycle according to Step2 and Step3 Frame shutter time. Then, ISP2 applies the new manual exposure parameters to the camera module and reacquires even-numbered frame data.
本发明提供的方法可以兼顾包含多层次亮度的场景,而不仅仅限于亮暗对比显著的场景,这样的方法大大提高了获得曝光合适图像的概率,显著提高了人脸分析或者车牌识别等目标分析的准确度,从而保障了社会环境的稳定性。The method provided by the present invention can take into account scenes containing multiple levels of brightness, and is not limited to scenes with significant contrast between bright and dark. This method greatly improves the probability of obtaining images with appropriate exposure, and significantly improves target analysis such as face analysis or license plate recognition. The accuracy of this ensures the stability of the social environment.
在另一个实施例中,为了进一步提升手动曝光的成像效果,可以在ISP2前加入一个奇偶帧融合模块,如图9所示,将基于自动曝光参数获得的奇数帧视频流和基于手动曝光参 数的偶数帧视频流进行融合,然后传输至ISP2用于后续的目标分析,进一步提高分析的准确度。In another embodiment, in order to further improve the imaging effect of manual exposure, an odd-even frame fusion module can be added before ISP2. The even-numbered frame video streams are fused, and then transmitted to ISP2 for subsequent target analysis, further improving the accuracy of the analysis.
假设摄像机拍摄出来的图像深度(图像深度是指存储每个像素所用的位数,也用于量度图像的色彩分辨率。图像深度确定彩色图像的每个像素可能有的颜色数,或者确定灰度图像的每个像素可能有的灰度级数.它决定了彩色图像中可出现的最多颜色数,或灰度图像中的最大灰度等级)为8bit,则每个像素点的像素值的范围为0-255。示例性的,以奇数帧的图像作为基准,拍摄出的图像中每个像素点都有一个在0-255范围内的像素值。然后像素值低于50的点采用奇数帧数据,像素值高于150的点采用偶数帧数据,像素值在50-150之间的点采用奇偶帧的加权平均数据,至此,每一对奇偶帧按照拍摄顺序完成融合,然后传输至ISP2,用于后续的视频分析。值得说明的是,上述融合方案仅是一个示意性的例子,当采用别的采集方式时,融合方式需要进行调整。譬如:当交替采集图像的方式为每三帧中前两帧自动曝光、第三帧手动曝光时,则按照拍摄顺序每三帧为一组,以每组中第一个自动曝光图像帧为基准图像,按照上述方法将后两帧图像融合进基准图像。然后将多组视频帧按顺序融合完毕即可获得融合视频流。总之,视频融合的方法需要与交替采集的方法相匹配,具体融合规则可以依据用户经验或者实际情况而定。Suppose the image depth taken by the camera (image depth refers to the number of bits used to store each pixel, and is also used to measure the color resolution of the image. Image depth determines the number of colors that each pixel of a color image may have, or determines the grayscale The number of gray levels that each pixel of the image may have. It determines the maximum number of colors that can appear in a color image, or the maximum gray level in a grayscale image) is 8bit, then the range of the pixel value of each pixel It is 0-255. Exemplarily, taking an image of an odd frame as a reference, each pixel in the captured image has a pixel value in the range of 0-255. Then the dots with pixel value lower than 50 adopt odd frame data, the dots with pixel value higher than 150 adopt even frame data, and the dots with pixel value between 50-150 adopt weighted average data of odd and even frames. So far, each pair of odd and even frames The fusion is completed according to the shooting sequence, and then transmitted to ISP2 for subsequent video analysis. It is worth noting that the above fusion scheme is only a schematic example. When other collection methods are used, the fusion method needs to be adjusted. For example: when the alternate method of capturing images is automatic exposure for the first two frames of every three frames and manual exposure for the third frame, then every three frames in the shooting sequence are grouped together, and the first automatic exposure image frame in each group is taken as the reference Image, according to the above method, the last two frames of images are merged into the reference image. Then, the multiple sets of video frames are sequentially merged to obtain a merged video stream. In short, the video fusion method needs to match the alternate acquisition method, and the specific fusion rules can be determined based on user experience or actual conditions.
本申请提供的基于曝光控制的视频采集方法,将视频流分成手动曝光和自动曝光,既可以满足用户实时观看视频的需求,也可以克服现有曝光方法对场景亮度变化响应慢的缺点。而且手动曝光参数覆盖的范围更广更有层次,可以适应明暗渐变的多层次场景,保证每一个区域都有一个较优曝光帧,从而大大提高视频分析的准确率。The video capture method based on exposure control provided in this application divides the video stream into manual exposure and automatic exposure, which can not only meet the needs of users to watch videos in real time, but also overcome the disadvantage of slow response to scene brightness changes in existing exposure methods. Moreover, the manual exposure parameters cover a wider and more layered range, which can adapt to multi-level scenes with gradual light and dark, ensuring that each area has a better exposure frame, thereby greatly improving the accuracy of video analysis.
上文结合图1至图9,详细描述了本申请实施例所提供的基于曝光控制的视频采集方法,下面将结合图10,介绍本申请视频采集装置,对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The foregoing describes in detail the video capture method based on exposure control provided by the embodiments of the present application with reference to FIGS. 1 to 9. The following describes the video capture device of the present application with reference to FIG. 10. For details, please refer to the method embodiment of this application.
图10为本申请实施例提供的一种视频采集装置,该装置100可以包括摄像模组101、第一图像信号处理模块102、第二图像信号处理模块103。FIG. 10 is a video capture device provided by an embodiment of the application. The device 100 may include a camera module 101, a first image signal processing module 102, and a second image signal processing module 103.
第一图像信号处理模块102,用于根据环境数据确定摄像模组的自动曝光参数。The first image signal processing module 102 is configured to determine the automatic exposure parameters of the camera module according to the environmental data.
第二图像信号处理模块103,用于根据所述自动曝光参数获得手动曝光参数。The second image signal processing module 103 is configured to obtain manual exposure parameters according to the automatic exposure parameters.
摄像模组101包括镜头1011和图像传感器1012,用于基于所述自动曝光参数,采集视频帧构成第一视频流;还用于基于所述手动曝光参数,采集视频帧构成第二视频流。The camera module 101 includes a lens 1011 and an image sensor 1012 for collecting video frames based on the automatic exposure parameters to form a first video stream; and also for collecting video frames based on the manual exposure parameters to form a second video stream.
其中,构成所述第一视频流的视频帧和构成所述第二视频流的视频帧是由所述摄像模组交替采集得到。可选的,自动曝光参数包括:快门时间、光圈大小以及增益大小,第二图像信号处理模块103具体用于对于所述自动曝光参数的第一部分参数的每个参数,根据该参数生成一组序列并进行周期性扩展得到该参数扩展序列,作为手动曝光参数的第一部分参数中的对应参数;保持所述自动曝光参数的第二部分参数不变,作为手动曝光参数的第二部分参数。Wherein, the video frames constituting the first video stream and the video frames constituting the second video stream are alternately collected by the camera module. Optionally, the automatic exposure parameters include: shutter time, aperture size, and gain size. The second image signal processing module 103 is specifically configured to generate a set of sequences for each parameter of the first part of the automatic exposure parameters. And perform periodic expansion to obtain the parameter expansion sequence as the corresponding parameter in the first part of the manual exposure parameter; keep the second part of the automatic exposure parameter unchanged as the second part of the manual exposure parameter.
可选的,自动曝光参数的第一部分参数包括快门时间,第二图像信号处理模块103具体用于:获取自动曝光参数中的快门时间;根据所述快门时间生成一组快门时间序列,循环重复所述快门时间序列得到的快门时间扩展序列作为手动曝光参数中的快门时间。Optionally, the first part of the automatic exposure parameters includes the shutter time, and the second image signal processing module 103 is specifically configured to: obtain the shutter time in the automatic exposure parameters; generate a set of shutter time series according to the shutter time, and repeat all The extended shutter time sequence obtained from the shutter time sequence is used as the shutter time in the manual exposure parameter.
可选的,自动曝光参数的第一部分参数还包括增益大小,第二图像信号处理模块103还用于:获取自动曝光参数中的增益大小;根据所述增益大小生成一组增益大小序列,循 环重复所述增益大小序列得到的增益大小扩展序列作为手动曝光参数中的增益大小。Optionally, the first part of the auto-exposure parameter further includes a gain size, and the second image signal processing module 103 is further used to: obtain the gain size in the auto-exposure parameter; generate a set of gain size sequence according to the gain size, and repeat the loop The gain size expansion sequence obtained from the gain size sequence is used as the gain size in the manual exposure parameter.
可选的,手动曝光参数中的快门时间和所述手动曝光参数中的增益大小呈周期性变化,且在一个周期内包含上升以及下降变化。Optionally, the shutter time in the manual exposure parameter and the gain in the manual exposure parameter change periodically, and include rising and falling changes in one cycle.
可选的,自动曝光参数的第二部分参数包括:光圈大小。Optionally, the second part of the automatic exposure parameters includes: aperture size.
可选的,所述第一视频流用于视频显示,所述第二视频流用于视频目标的检测、识别和/或分析。Optionally, the first video stream is used for video display, and the second video stream is used for video target detection, identification and/or analysis.
可选的,所述装置还包括融合模块,用于将构成所述第一视频流的视频帧和构成所述第二视频流的视频帧进行融合处理,获得第三视频流。Optionally, the device further includes a fusion module, configured to perform fusion processing on the video frames constituting the first video stream and the video frames constituting the second video stream to obtain a third video stream.
作为另一种可能的实施例,本申请还提供一种视频监控系统,包括:上述装置实施例提供的视频采集装置,用于根据自动曝光的方法获取第一视频流,根据手动曝光的方法获取第二视频流,所述手动曝光参数与自动曝光参数采取部分联动;视频显示模块,用于显示所述第一视频流;视频分析模块,用于分析所述第二视频流和/或第三视频流。As another possible embodiment, the present application also provides a video surveillance system, including: the video capture device provided in the foregoing device embodiment, which is used to obtain the first video stream according to the automatic exposure method, and to obtain the first video stream according to the manual exposure method. The second video stream, the manual exposure parameters and the automatic exposure parameters are partially linked; the video display module is used to display the first video stream; the video analysis module is used to analyze the second video stream and/or the third video stream Video streaming.
需要说明的是,应理解以上装置的各个模块的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块通过处理元件调用软件的形式实现,部分模块通过硬件的形式实现。It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions, and may be fully or partially integrated into a physical entity during actual implementation, or may be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be implemented in the form of hardware; some modules can be implemented in the form of calling software by processing elements, and some of the modules can be implemented in the form of hardware.
本发明还提供一种计算机程序产品实施例,该计算机程序产品包含计算机可读代码指令,当这些计算机可读代码指令被计算机执行时能够实现计算机对视频采集装置的配置,使得该装置能够执行方法实施例的各种可能实现方式中的任一所述方法。The present invention also provides an embodiment of a computer program product. The computer program product contains computer-readable code instructions. When the computer-readable code instructions are executed by the computer, the computer can configure the video capture device so that the device can execute the method. Any of the methods described in the various possible implementation manners of the embodiment.
本发明还提供一种非暂态(Non-transitory)计算机可读存储介质实施例,该非暂态计算机可读存储介质包含计算机程序代码指令,当这些计算机可读代码指令被计算机执行时能够实现计算机对视频采集装置的配置,使得该装置能够执行方法实施例的各种可能的实现方式中的任一所述方法。所述非暂态计算机可读存储介质包括下列选项中的一个或多个:只读存储器(Read-Only Memory,ROM)、可编程ROM(Programmable ROM)、可擦除的PROM(Erasable PROM,EPROM)、闪存(Flash Memory)、电EPROM(Electrically EPROM,EEPROM)和硬盘驱动器(Hard Drive)。The present invention also provides an embodiment of a non-transitory computer-readable storage medium. The non-transitory computer-readable storage medium contains computer program code instructions, which can be implemented when the computer-readable code instructions are executed by a computer. The configuration of the video capture device by the computer enables the device to execute any of the methods described in the various possible implementation manners of the method embodiments. The non-transitory computer-readable storage medium includes one or more of the following options: Read-Only Memory (ROM), Programmable ROM (Programmable ROM), Erasable PROM (Erasable PROM, EPROM) ), flash memory (Flash Memory), electrical EPROM (Electrically EPROM, EEPROM) and hard drive (Hard Drive).
以上所述实施例仅用以说明本发明的技术方案而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,然而:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。The above-mentioned embodiments are only used to illustrate the technical solutions of the present invention and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, it is still possible to modify the technical solutions described in the foregoing embodiments. , Or equivalently replace some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (17)

  1. 一种基于曝光控制的视频采集方法,其特征在于,所述方法包括:A video acquisition method based on exposure control, characterized in that the method includes:
    根据环境数据确定摄像模组的自动曝光参数;Determine the automatic exposure parameters of the camera module according to the environmental data;
    根据所述自动曝光参数获得手动曝光参数;Obtaining manual exposure parameters according to the automatic exposure parameters;
    基于所述自动曝光参数,所述摄像模组采集得到的视频帧构成第一视频流;Based on the automatic exposure parameters, the video frames collected by the camera module constitute a first video stream;
    基于所述手动曝光参数,所述摄像模组采集得到的视频帧构成第二视频流;Based on the manual exposure parameters, the video frames collected by the camera module constitute a second video stream;
    构成所述第一视频流的视频帧和构成所述第二视频流的视频帧是由所述摄像模组交替采集得到。The video frames constituting the first video stream and the video frames constituting the second video stream are alternately collected by the camera module.
  2. 根据权利要求1所述的方法,其特征在于,所述自动曝光参数包括:快门时间、光圈大小以及增益大小,所述根据所述自动曝光参数获得手动曝光参数包括:The method according to claim 1, wherein the automatic exposure parameters include: shutter time, aperture size, and gain, and the obtaining manual exposure parameters according to the automatic exposure parameters includes:
    对于所述自动曝光参数的第一部分参数的每个参数,根据该参数生成一组序列并进行周期性扩展得到该参数扩展序列,作为所述手动曝光参数的第一部分参数中的对应参数;For each parameter of the first partial parameter of the automatic exposure parameter, a set of sequences is generated according to the parameter and periodically expanded to obtain the parameter expansion sequence, which is used as a corresponding parameter in the first partial parameter of the manual exposure parameter;
    保持所述自动曝光参数的第二部分参数不变,作为所述手动曝光参数的第二部分参数。The second part of the parameter of the automatic exposure parameter is kept unchanged as the second part of the parameter of the manual exposure parameter.
  3. 根据权利要求2所述的方法,其特征在于,所述自动曝光参数的第一部分参数包括快门时间,所述对于所述自动曝光参数的第一部分参数的每个参数,根据该参数生成一组序列并进行周期性扩展得到该参数扩展序列,作为所述手动曝光参数的第一部分参数中的对应参数包括:The method according to claim 2, wherein the first part of the automatic exposure parameter includes a shutter time, and for each parameter of the first part of the automatic exposure parameter, a set of sequences is generated according to the parameter And perform periodic expansion to obtain the parameter expansion sequence, and the corresponding parameters in the first part of the parameters as the manual exposure parameters include:
    获取所述自动曝光参数中的快门时间;Acquiring the shutter time in the automatic exposure parameter;
    根据所述快门时间生成一组快门时间序列;Generating a set of shutter time sequences according to the shutter time;
    循环重复所述快门时间序列得到的快门时间扩展序列作为所述手动曝光参数中的快门时间。The shutter time expansion sequence obtained by cyclically repeating the shutter time sequence is used as the shutter time in the manual exposure parameter.
  4. 根据权利要求3所述的方法,其特征在于,所述自动曝光参数的第一部分参数还包括增益大小,所述对于所述自动曝光参数的第一部分参数的每个参数,根据该参数生成一组序列并进行周期性扩展得到该参数扩展序列,作为所述手动曝光参数的第一部分参数中的对应参数还包括:The method according to claim 3, wherein the first part of the parameters of the automatic exposure parameters further includes a gain size, and for each parameter of the first part of the parameters of the automatic exposure parameters, a set of parameters is generated according to the parameters. Sequence and perform periodic expansion to obtain the parameter expansion sequence, and the corresponding parameter in the first part of the parameter as the manual exposure parameter further includes:
    获取所述自动曝光参数中的增益大小;Acquiring the gain size in the automatic exposure parameter;
    根据所述增益大小生成一组增益大小序列;Generating a set of gain size sequences according to the gain size;
    循环重复所述增益大小序列得到的增益大小扩展序列作为所述手动曝光参数中的增益大小。The gain size expansion sequence obtained by cyclically repeating the gain size sequence is used as the gain size in the manual exposure parameter.
  5. 根据权利要求3或4所述的方法,其特征在于,所述手动曝光参数中的快门时间和/或所述手动曝光参数中的增益大小呈周期性变化,且在一个周期内包含上升以及下降变化。The method according to claim 3 or 4, wherein the shutter time in the manual exposure parameter and/or the gain in the manual exposure parameter changes periodically, and includes rising and falling within one cycle Variety.
  6. 根据权利要求2-5任一所述的方法,其特征在于,所述自动曝光参数的第二部分参数包括:光圈大小。The method according to any one of claims 2-5, wherein the second part of the automatic exposure parameters includes: aperture size.
  7. 根据权利要求1-6任一所述的方法,其特征在于,所述第一视频流用于视频显示,所述第二视频流用于视频分析。The method according to any one of claims 1-6, wherein the first video stream is used for video display, and the second video stream is used for video analysis.
  8. 根据权利要求1-7任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-7, wherein the method further comprises:
    将构成所述第一视频流的视频帧和构成所述第二视频流的视频帧进行融合处理,获得第三视频流。Perform fusion processing on the video frames constituting the first video stream and the video frames constituting the second video stream to obtain a third video stream.
  9. 一种视频采集装置,其特征在于,所述装置包括:摄像模组,第一图像信号处理模块和第二图像信号处理模块;A video capture device, characterized in that the device includes a camera module, a first image signal processing module, and a second image signal processing module;
    所述第一图像信号处理模块,用于根据环境数据确定摄像模组的自动曝光参数;The first image signal processing module is configured to determine the automatic exposure parameters of the camera module according to environmental data;
    所述第二图像信号处理模块,用于根据所述自动曝光参数获得手动曝光参数;The second image signal processing module is configured to obtain manual exposure parameters according to the automatic exposure parameters;
    所述摄像模组,包括镜头和图像传感器,用于基于所述自动曝光参数,采集视频帧构成第一视频流,以及用于基于所述手动曝光参数,采集视频帧构成第二视频流。The camera module includes a lens and an image sensor, and is configured to collect video frames to form a first video stream based on the automatic exposure parameters, and to collect video frames to form a second video stream based on the manual exposure parameters.
    其中,构成所述第一视频流的视频帧和构成所述第二视频流的视频帧是由所述摄像模组交替采集得到。Wherein, the video frames constituting the first video stream and the video frames constituting the second video stream are alternately collected by the camera module.
  10. 根据权利要求9所述的装置,其特征在于,所述自动曝光参数包括:快门时间、光圈大小以及增益大小,所述第二图像信号处理模块用于:The device according to claim 9, wherein the automatic exposure parameters include: shutter time, aperture size, and gain size, and the second image signal processing module is used for:
    对于所述自动曝光参数的第一部分参数的每个参数,根据该参数生成一组序列并进行周期性扩展得到该参数扩展序列,作为手动曝光参数的第一部分参数中的对应参数;For each parameter of the first part of the parameters of the automatic exposure parameters, generate a set of sequences according to the parameters and perform periodic expansion to obtain the parameter expansion sequence, which is used as the corresponding parameter in the first part of the parameters of the manual exposure parameters;
    保持所述自动曝光参数的第二部分参数不变,作为手动曝光参数的第二部分参数。Keep the second part of the automatic exposure parameter unchanged, and serve as the second part of the manual exposure parameter.
  11. 根据权利要求10所述的装置,其特征在于,所述自动曝光参数的第一部分参数包括快门时间,所述第二图像信号处理模块用于:The device according to claim 10, wherein the first part of the automatic exposure parameter includes a shutter time, and the second image signal processing module is used for:
    获取所述自动曝光参数中的快门时间;Acquiring the shutter time in the automatic exposure parameter;
    根据所述快门时间生成一组快门时间序列;Generating a set of shutter time sequences according to the shutter time;
    循环重复所述快门时间序列得到的快门时间扩展序列作为所述手动曝光参数中的快门时间。The shutter time expansion sequence obtained by cyclically repeating the shutter time sequence is used as the shutter time in the manual exposure parameter.
  12. 根据权利要求11所述的装置,其特征在于,所述自动曝光参数的第一部分参数还包括增益大小,所述第二图像信号处理模块还用于:The apparatus according to claim 11, wherein the first part of the automatic exposure parameter further includes a gain size, and the second image signal processing module is further configured to:
    获取所述自动曝光参数中的增益大小;Acquiring the gain size in the automatic exposure parameter;
    根据所述增益大小生成一组增益大小序列;Generating a set of gain size sequences according to the gain size;
    循环重复所述增益大小序列得到的增益大小扩展序列作为所述手动曝光参数中的增益大小。The gain size expansion sequence obtained by cyclically repeating the gain size sequence is used as the gain size in the manual exposure parameter.
  13. 根据权利要求11或12所述的装置,其特征在于,所述手动曝光参数中的快门时间和所述手动曝光参数中的增益大小呈周期性变化,且在一个周期内包含上升以及下降变化。The device according to claim 11 or 12, wherein the shutter time in the manual exposure parameter and the gain in the manual exposure parameter change periodically, and include rising and falling changes in one cycle.
  14. 根据权利要求10-13任一所述的装置,其特征在于,所述自动曝光参数的第二部分参数包括:光圈大小。The device according to any one of claims 10-13, wherein the second part of the automatic exposure parameters includes: aperture size.
  15. 根据权利要求9-14任一所述的装置,其特征在于,所述第一视频流用于视频显示,所述第二视频流用于视频分析。The device according to any one of claims 9-14, wherein the first video stream is used for video display, and the second video stream is used for video analysis.
  16. 根据权利要求9-15任一所述的装置,其特征在于,所述装置还包括融合模块,用于将构成所述第一视频流的视频帧和构成所述第二视频流的视频帧进行融合处理,获得第三视频流。The device according to any one of claims 9-15, wherein the device further comprises a fusion module, configured to perform processing between the video frames constituting the first video stream and the video frames constituting the second video stream. Fusion process to obtain the third video stream.
  17. 一种视频监控系统,其特征在于,包括:A video surveillance system, characterized in that it comprises:
    如权利要求9-16任一所述的视频采集装置;The video capture device according to any one of claims 9-16;
    视频显示模块,用于显示所述第一视频流;A video display module for displaying the first video stream;
    视频分析模块,用于分析所述第二视频流和/或第三视频流。The video analysis module is used to analyze the second video stream and/or the third video stream.
PCT/CN2021/078677 2020-03-03 2021-03-02 Exposure control-based video capture method and apparatus WO2021175211A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010140270.8A CN113347368B (en) 2020-03-03 2020-03-03 Video acquisition method and device based on exposure control
CN202010140270.8 2020-03-03

Publications (1)

Publication Number Publication Date
WO2021175211A1 true WO2021175211A1 (en) 2021-09-10

Family

ID=77467381

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/078677 WO2021175211A1 (en) 2020-03-03 2021-03-02 Exposure control-based video capture method and apparatus

Country Status (2)

Country Link
CN (1) CN113347368B (en)
WO (1) WO2021175211A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117176922A (en) * 2023-10-31 2023-12-05 安徽三禾一信息科技有限公司 Intelligent thermal power plant monitoring method and system based on Internet of things

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101137013A (en) * 2006-09-01 2008-03-05 索尼株式会社 Shooting device, method and program
CN101893804A (en) * 2010-05-13 2010-11-24 杭州海康威视软件有限公司 Exposure control method and device
CN104243834A (en) * 2013-06-08 2014-12-24 杭州海康威视数字技术股份有限公司 Image streaming dividing control method and device of high-definition camera
US20160360101A1 (en) * 2015-06-05 2016-12-08 Digital Signal Corporation System and Method for Intelligent Camera Control
CN110636227A (en) * 2019-09-24 2019-12-31 合肥富煌君达高科信息技术有限公司 High dynamic range HDR image synthesis method and high-speed camera integrating same

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254782A (en) * 2016-09-28 2016-12-21 北京旷视科技有限公司 Image processing method and device and camera
CN107896316A (en) * 2017-11-29 2018-04-10 合肥寰景信息技术有限公司 Digital video intelligent monitoring system based on dual camera
CN110619593B (en) * 2019-07-30 2023-07-04 西安电子科技大学 Double-exposure video imaging system based on dynamic scene

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101137013A (en) * 2006-09-01 2008-03-05 索尼株式会社 Shooting device, method and program
CN101893804A (en) * 2010-05-13 2010-11-24 杭州海康威视软件有限公司 Exposure control method and device
CN104243834A (en) * 2013-06-08 2014-12-24 杭州海康威视数字技术股份有限公司 Image streaming dividing control method and device of high-definition camera
US20160360101A1 (en) * 2015-06-05 2016-12-08 Digital Signal Corporation System and Method for Intelligent Camera Control
CN110636227A (en) * 2019-09-24 2019-12-31 合肥富煌君达高科信息技术有限公司 High dynamic range HDR image synthesis method and high-speed camera integrating same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117176922A (en) * 2023-10-31 2023-12-05 安徽三禾一信息科技有限公司 Intelligent thermal power plant monitoring method and system based on Internet of things
CN117176922B (en) * 2023-10-31 2023-12-29 安徽三禾一信息科技有限公司 Intelligent thermal power plant monitoring method and system based on Internet of things

Also Published As

Publication number Publication date
CN113347368A (en) 2021-09-03
CN113347368B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
CN108419023B (en) Method for generating high dynamic range image and related equipment
CN108712608B (en) Terminal equipment shooting method and device
CN108111749B (en) Image processing method and device
US8106965B2 (en) Image capturing device which corrects a target luminance, based on which an exposure condition is determined
US9596400B2 (en) Image pickup apparatus that periodically changes exposure condition, a method of controlling image pickup apparatus, and storage medium
US8937677B2 (en) Digital photographing apparatus, method of controlling the same, and computer-readable medium
KR20200054320A (en) Imaging control method and imaging device
CN107948538B (en) Imaging method, imaging device, mobile terminal and storage medium
CN108024054B (en) Image processing method, device, equipment and storage medium
JP4600684B2 (en) Imaging apparatus and imaging method
US20100328498A1 (en) Shooting parameter adjustment method for face detection and image capturing device for face detection
CN108156369B (en) Image processing method and device
CN102892008A (en) Dual image capture processing
US9288428B2 (en) Shooting apparatus and method for controlling shooting apparatus
JP2009177472A (en) Image processing method, image processor and imaging device
WO2012093519A1 (en) Imaging device and light emission amount control method
CN110636227B (en) High dynamic range HDR image synthesis method and high-speed camera integrating same
WO2010118658A1 (en) Video processing method and device
CN116055897B (en) Photographing method and related equipment thereof
JP2012120132A (en) Imaging apparatus and program
JP5898509B2 (en) Imaging apparatus, control method therefor, program, and storage medium
WO2021175211A1 (en) Exposure control-based video capture method and apparatus
CN102004370B (en) Method for detecting focal length by flashlight in auxiliary manner
CN110266967B (en) Image processing method, image processing device, storage medium and electronic equipment
JP2003195151A (en) Autofocus device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21765002

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21765002

Country of ref document: EP

Kind code of ref document: A1