Image acquisition method and device and camera shooting equipment

By determining the minimum exposure time in the camera device and adjusting the short exposure time to make it an integer multiple of the minimum exposure time, the image flickering problem caused by different brightness of short exposure frames in HDR technology is solved, and the consistency of image brightness and the satisfaction of target brightness are achieved.

CN120186475APending Publication Date: 2025-06-20SHENZHEN BAICHUAN SECURITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510378543.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

When using HDR technology to acquire images, the short exposure time of the short exposure frame is not necessarily an integer multiple of the light brightness change period, which leads to different brightness of the collected short exposure frames, which in turn causes the problem of flickering images after synthesized.

Method used

By obtaining the mains frequency of the camera device, the minimum exposure time is determined, and the short exposure time is calculated based on the target brightness and exposure ratio, ensuring that the short exposure time is an integer multiple of the minimum exposure time, so as to maintain the brightness of the short exposure frame consistent.

Benefits of technology

It effectively avoids the image flickering problem caused by different brightness of short exposure frames, and ensures that the acquired image brightness is consistent and meets the target brightness requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120186475A_ABST
    Figure CN120186475A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses an image acquisition method, an image acquisition device and camera equipment, the method is applied to the camera equipment, and the method specifically comprises the following steps: firstly, determining the minimum exposure duration according to the mains supply frequency of the camera equipment, and then determining the long exposure duration of the camera equipment according to the target brightness, determining a short exposure time length according to the long exposure time length and the exposure proportion, determining the minimum exposure time length as the short exposure time length when the short exposure time length is smaller than the minimum exposure time length, and rounding a ratio between the short exposure time length and the minimum exposure time length when the short exposure time length is larger than or equal to the minimum exposure time length, and determining a short exposure duration according to the rounded ratio and the minimum exposure duration, and finally controlling the camera equipment to shoot an image according to the long exposure duration and the determined short exposure duration. Through the above mode, the brightness of the short exposure frames collected by the camera device can be kept consistent, and the image is prevented from flickering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image processing technology, and in particular, to an image acquisition method, an image acquisition device, and a camera device. Background Art

[0002] With the development of technology, people's requirements for image quality are getting higher and higher. However, limited by the hardware dynamic range, in some scenarios (such as low-light scenarios, backlight scenarios, etc.), the captured images may have problems such as dark areas where details cannot be seen and bright areas being overexposed. Against this background, image synthesis technologies have emerged, such as HDR technology (High Dynamic Range imaging, also known as high dynamic range imaging technology). HDR technology captures exposure frames with different exposure durations and synthesizes multiple exposure frames to obtain an image, so that details in the dark areas can be seen in the image and the bright areas will not be overexposed.

[0003] However, for street lights that flicker according to the mains frequency, the brightness of the light will change with the sinusoidal wave cycle of the mains power. This change cycle is usually half of the mains cycle. Based on the imaging principle of the image sensor, the brightness of the image is proportional to the energy accumulated by the sensor within the exposure period, and the amount of energy accumulated by the sensor is determined by the brightness of the light. This results in that when the exposure duration is not an integer multiple of the brightness change cycle of the light, the brightness of different exposure frames captured with the same exposure duration may be different, thus causing the synthesized image to flicker.

[0004] In the existing HDR technology for security camera devices, the exposure durations between multiple exposure frames are usually determined by setting a preset long exposure duration and then determining the short exposure duration according to a fixed ratio. This leads to the problem that during the process of using HDR technology to capture images, the short exposure duration of the short exposure frame for obtaining details in the high-brightness area around the light may not be an integer multiple of the brightness change cycle of the light. As a result, the brightness of the captured short exposure frames is different, and finally the brightness of the synthesized image is also different, thus causing the problem of image flickering. Summary of the Invention

[0005] In view of the above problems, the embodiments of the present application provide an image acquisition method, an image acquisition device, and a camera device, which are used to solve the problem that the brightness of multiple short exposure frames captured by a security camera device using HDR is different, resulting in image flickering in the synthesized image.

[0006] According to one aspect of the embodiments of the present application, an image acquisition method is provided, which is applied to a camera device. The method includes: obtaining the mains frequency of the camera device; determining the minimum exposure duration of the camera device according to the mains frequency; determining the long exposure duration of the camera device according to the target brightness of the image captured by the camera device; calculating the short exposure duration of the camera device according to the long exposure duration and the exposure ratio; when the short exposure duration is less than the minimum exposure duration, determining the minimum exposure duration as the short exposure duration; when the short exposure duration is greater than or equal to the minimum exposure duration, rounding up the ratio between the short exposure duration and the minimum exposure duration, and determining the short exposure duration according to the rounded-up ratio and the minimum exposure duration; controlling the camera device to capture an image according to the long exposure duration and the determined short exposure duration.

[0007] In an alternative manner, rounding up the ratio between the short exposure duration and the minimum exposure duration, and determining the short exposure duration according to the rounded-up ratio and the minimum exposure duration, specifically includes: rounding up the ratio between the short exposure duration and the minimum exposure duration; determining the product of the rounded-up ratio and the minimum exposure duration as the short exposure duration.

[0008] In an alternative manner, rounding down the ratio between the short exposure duration and the minimum exposure duration, and determining the short exposure duration according to the rounded-down ratio and the minimum exposure duration, specifically includes: rounding down the ratio between the short exposure duration and the minimum exposure duration; determining the product of the rounded-down ratio and the minimum exposure duration as the short exposure duration.

[0009] In an alternative manner, after determining the short exposure duration according to the rounded-up ratio and the minimum exposure duration, the method further includes: determining the long exposure duration according to the product of the determined short exposure duration and the exposure ratio, so as to control the camera device to capture an image according to the determined short exposure duration and the determined long exposure duration.

[0010] In an alternative manner, after determining the long exposure duration according to the product of the short exposure duration and the exposure ratio, the method further includes: obtaining the frame rate of the camera device, and determining the maximum exposure duration according to the frame rate; when the long exposure duration is greater than the maximum exposure duration, rounding down the ratio between the maximum exposure duration and the short exposure duration, and determining the long exposure duration according to the product of the rounded-down ratio and the short exposure duration.

[0011] In an alternative manner, controlling the camera device to capture an image according to the long exposure duration and the determined short exposure duration, specifically includes: controlling the camera device to collect a short exposure frame according to the preset gain of the camera device and the short exposure duration; controlling the camera device to collect a long exposure frame according to the preset gain and the long exposure duration; synthesizing the target image captured by the camera device according to the brightness of the long exposure frame, the weight of the long exposure frame, the brightness of the short exposure frame, and the weight of the short exposure frame.

[0012] In an alternative manner, after synthesizing a target image captured by a camera device based on the brightness of a long-exposure frame, the weight of the long-exposure frame, the brightness of a short-exposure frame, and the weight of the short-exposure frame, the method further includes: calculating a ratio between the target brightness and the brightness of the target image to obtain a brightness difference ratio; updating a preset gain according to the brightness difference ratio, and controlling the camera device to capture images according to the updated preset gain, short-exposure duration, and long-exposure duration.

[0013] According to another aspect of the embodiments of the present application, there is provided an image acquisition device, including: a minimum exposure duration determination module, configured to obtain the mains frequency of a camera device and determine the minimum exposure duration of the camera device according to the mains frequency; a long-exposure duration determination module, configured to determine the long-exposure duration of the camera device according to the target brightness of the image captured by the camera device; a short-exposure duration determination module, configured to calculate the short-exposure duration of the camera device according to the long-exposure duration and an exposure ratio; the short-exposure duration determination module is further configured to, when the short-exposure duration is less than the minimum exposure duration, determine the minimum exposure duration as the short-exposure duration; the short-exposure duration determination module is further configured to, when the short-exposure duration is greater than or equal to the minimum exposure duration, round up the ratio between the short-exposure duration and the minimum exposure duration, and determine the short-exposure duration according to the rounded-up ratio and the minimum exposure duration; a control module, configured to control the camera device to capture images according to the long-exposure duration and the determined short-exposure duration.

[0014] In an alternative manner, the long-exposure duration determination module is further configured to determine the long-exposure duration according to the product of the determined short-exposure duration and the exposure ratio, so that the control module controls the camera device to capture images according to the determined short-exposure duration and the determined long-exposure duration.

[0015] According to another aspect of the embodiments of the present application, there is provided a camera device, including a memory, a processor, and a computer program stored on the memory, where the processor executes the computer program to implement the image acquisition method described in any one of the above.

[0016] The embodiments of the present application determine the minimum exposure duration through the anti-flicker frequency, and adjust the short-exposure duration through the minimum exposure duration, so that the adjusted short-exposure duration is an integer multiple of the minimum exposure duration, to ensure that the brightness of the short-exposure frames captured by the camera device according to the adjusted short-exposure duration can be kept consistent, thereby avoiding the problem of flicker of the camera device due to different brightnesses of the short-exposure frames. In addition, the short-exposure duration is initially determined according to configuration parameters such as the target brightness of the image captured by the camera device and the exposure ratio, so that the finally captured images of the camera device can meet the brightness requirements.

[0017] The above description is only an overview of the technical solution of the embodiments of the present application. In order to be able to understand the technical means of the embodiments of the present application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the embodiments of the present application more obvious and understandable, the specific embodiments of the present application are specifically exemplified below. Brief Description of the Drawings

[0018] The drawings are only used to illustrate the embodiments and are not considered to be a limitation of the present application. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:

[0019] Figure 1 It shows a schematic diagram of the application scenario of the image acquisition method provided by the embodiments of the present application;

[0020] Figure 2 It shows a schematic diagram of the structure of the imaging device provided by the embodiments of the present application;

[0021] Figure 3 It shows a schematic diagram of the structure of the image acquisition device provided by the embodiments of the present application;

[0022] Figure 4 It shows a schematic flow chart of the image acquisition method provided by the first embodiment of the present application;

[0023] Figure 5 It shows a schematic diagram of the change period of the alternating current involved in the embodiments of the present application;

[0024] Figure 6 It shows a schematic diagram of the brightness change period of the light source involved in the embodiments of the present application;

[0025] Figure 7 It shows a schematic flow chart of the image acquisition method provided by the second embodiment of the present application;

[0026] Figure 8 It shows a schematic flow chart of the image acquisition method provided by the third embodiment of the present application. Detailed Description of the Embodiments

[0027] Hereinafter, the exemplary embodiments of the present application will be described in more detail with reference to the drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein.

[0028] Figure 1 It shows a schematic diagram of the application scenario of the image acquisition method provided by the embodiments of the present application. As Figure 1As shown in the figure, the image acquisition method provided by this application is applied to the imaging device 1. The imaging device 1 establishes a communication connection with the electronic device 2 through the network 3. The imaging device 1 can be a camera for security monitoring, an IP camera, or other video monitoring devices, or can also be a device such as an intelligent door lock with an image acquisition function. The electronic device 2 can be a touch mobile phone, a smart phone, a tablet computer, a portable electronic device, or other terminal electronic devices with a display screen, as well as an NVR, etc. The network 3 includes but is not limited to one or more of a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a 4G / 5G network, WIFI, Bluetooth, and a peer-to-peer (P2P) communication network.

[0029] In the embodiments of this application, both the imaging device 1 and the electronic device 2 can include one or more processors. The processor may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application, which is not limited herein. The one or more processors included in the electronic device can be of the same type of processor, such as one or more CPUs; or can be of different types of processors, such as one or more CPUs and one or more ASICs, which is not limited herein.

[0030] In the embodiments of this application, the imaging device 1 is installed in an area to be monitored (such as a home, an office, a mall, etc.) so that the imaging device 1 can continuously capture surveillance videos in the surveillance area and send the captured videos to the terminal electronic device 2 through the network 3.

[0031] See Figure 2 As shown in the figure, Figure 2 shows a schematic structural diagram of the imaging device provided by the embodiments of this application. As Figure 2 shown in the figure, the imaging device 1 can include: a processor 11 and a memory 12.

[0032] Among them, the processor 11 is used to execute the computer program 13, and specifically can execute the relevant steps in the embodiments of the image acquisition method provided by this application. Specifically, the computer program 13 can include computer executable instructions.

[0033] The processor 11 may be a CPU, or an ASIC, or one or more integrated circuits configured to implement the embodiments of this application. The one or more processors included in the imaging device 1 can be of the same type of processor, such as one or more CPUs; or can be of different types of processors, such as one or more CPUs and one or more ASICs.

[0034] The memory 12 is used to store the computer program 13. The memory 12 may include high-speed RAM memory and may also include non-volatile memory, such as at least one disk memory.

[0035] In the embodiment of the present application, the imaging device 1 further includes an image acquisition unit 14. The image acquisition unit 14 is used to take pictures and record videos of the monitoring area. The processor 11 implements the steps in the following embodiments of the image acquisition method for the imaging device 1 and acquires images of the monitoring area of the imaging device 1 through the image acquisition unit 14. Specifically, first determine the short exposure duration and the long exposure duration according to information such as the target brightness and exposure ratio of the imaging device 1, and then control and acquire the images taken by the image acquisition unit 14 according to the short exposure duration and the long exposure duration respectively to complete the monitoring of the monitoring area.

[0036] See Figure 3 as shown Figure 3 shows a schematic structural diagram of the image acquisition device provided by the embodiment of the present application. As Figure 3 shown, the image acquisition device 4 may include: a minimum exposure duration determination module 41, a long exposure duration determination module 42, a short exposure duration determination module 43, and a control module 44. In the embodiment provided by the present application, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation. The above functional modules can be implemented either by a computer program 13 of computer program code instructions or in the form of a combination of hardware and software functional modules.

[0037] In the embodiment of the present application, the multiple modules included in the image acquisition device 4 are functional modules in the processor 11 of the imaging device 1 for implementing the computer program 13. The specific implementation methods of each functional module of the computer program 13 by the processor 11 can refer to the description of the relevant method steps in the Figure 4 corresponding embodiments.

[0038] Figure 4 shows a schematic flowchart of the image acquisition method provided by the first embodiment of the present application, and this method is applied to the imaging device 1. In the embodiment of the present application, the image acquisition method can be executed by a controller (such as the processor 11) in the imaging device 1. As Figure 4 shown, this method includes the following steps:

[0039] Step S110: Obtain the mains frequency of the imaging device.

[0040] Step S120: Determine the minimum exposure duration of the imaging device according to the mains frequency.

[0041] Among them, the camera device 1 and the light source within its shooting area are usually connected to alternating current (AC), which can be in the form of a sine wave, a triangular wave, or a rectangular wave. The frequency of the alternating current is usually the mains frequency of the area where the camera device 1 is located, and the mains frequencies in different regions may vary. For example, the mains frequency in Europe and China is 50 Hz, and the mains frequency in North America and some Asian countries is 60 Hz, and both are sine-wave alternating currents. The brightness of the light source within the shooting area of the camera device 1 changes with the sine-wave cycle of the mains electricity, and this change cycle is usually half of the mains cycle. Specifically, as Figure 5 and Figure 6 shown Figure 5 shows a schematic diagram of the change cycle of the alternating current involved in the embodiments of the present application, Figure 6 and shows a schematic diagram of the change cycle of the brightness of the light source involved in the embodiments of the present application. Taking the mains frequency of 50 Hz as an example, the voltage of the alternating current is as Figure 5 shown and changes periodically in a sine wave, with a change cycle of 20 ms. The brightness of the light source changes with the change of the voltage. The greater the absolute value of the voltage, the higher the brightness of the light source. Therefore, the brightness of the light source is as Figure 6 shown and changes periodically, with a change cycle of 10 ms.

[0042] The exposure duration refers to the duration during which the image acquisition unit 14 on the camera device 1 is exposed to light during the shooting process. The image acquisition unit 14 includes photosensitive materials or photosensitive elements. The longer the duration during which the image acquisition unit 14 is exposed to light, the more energy can be accumulated, and the higher the brightness of the captured image. In addition, when data such as the gain and exposure duration of the image acquisition unit 14 remain unchanged, the amount of energy accumulated by the image acquisition unit 14 is determined by the brightness of the light source. The higher the brightness of the light source, the more energy the image acquisition unit 14 can accumulate. The minimum exposure duration is the minimum exposure duration that can ensure that the brightness of each frame of the image captured by the image acquisition unit 14 is the same, that is, when the duration during which the image acquisition unit 14 is exposed to light is an integer multiple of the minimum exposure duration, the brightness of each captured frame of the image will remain consistent.

[0043] As Figure 5 and Figure 6 shown, taking the mains frequency of 50 Hz as an example, the period of the alternating current is 20 ms. The change cycle of the light source brightness is 10 ms. Assume that the exposure duration for the camera device 1 to capture images is not an integer multiple of the light source brightness change cycle. For example, when the exposure duration is 8 ms, for two consecutive frames of images captured by the image acquisition unit 14, although the exposure time for both is 8 ms, the brightness of the light during the capture of these two frames of images is different, as Figure 6 the light in the T1 time period and the T2 time period is different. Therefore, the energy accumulated on the image acquisition unit 14 is also different, that is Figure 6The area of the region enclosed by the curve, the dashed line, and the horizontal axis during the T1 time period is different from the area of the region enclosed by the curve, the dashed line, and the horizontal axis during the T2 time period, and the brightness of two consecutive frames of images continuously captured by the image acquisition unit 14 is also different.

[0044] Therefore, the exposure duration of the camera device 1 for capturing images is equal to an integer multiple of the light source brightness change period. Only in this way can the brightness of each frame of image captured by the image acquisition unit 14 remain consistent regardless of the starting position of image capture. In other words, the light source brightness change period can be used as the minimum exposure duration for the camera device 1 to capture images. That is, the minimum exposure duration can be one-half of the mains cycle. In the Figure 5 shown mains cycle, the minimum exposure duration is 10 ms.

[0045] In a preferred manner, the minimum exposure duration determination module 41 obtains the mains frequency of the camera device 1 and determines the minimum exposure duration of the camera device according to the mains frequency. As Figure 5 shown, taking the mains frequency of 50 Hz as an example, the mains cycle is 20 ms, and the light source brightness change period is 10 ms. After the minimum exposure duration determination module 41 obtains the mains frequency, it first determines the mains cycle to be 20 ms according to the mains frequency, and then determines the minimum exposure duration to be 10 ms.

[0046] Furthermore, in order to more conveniently control the minimum exposure duration of the device, the anti-flicker frequency can be preset in the camera device. For example, the mains frequency can be set as the anti-flicker frequency in the camera device. Taking the mains frequency of 50 Hz as an example, the anti-flicker frequency can be set to 50 Hz. The minimum exposure duration determination module 41 can obtain the anti-flicker frequency from the camera device 1, then determine the mains cycle to be 20 ms according to the anti-flicker frequency, and then determine the minimum exposure duration to be 10 ms.

[0047] Furthermore, the anti-flicker frequency can also be set in the camera device 1 because in a single usage scenario, such as street lights using alternating current in the same country, the frequency and cycle of the alternating current are determined, and the brightness change period of the street lights is also determined. There is also a way to obtain the anti-flicker frequency input by the user through the minimum exposure duration determination module; specifically, the user can directly set the anti-flicker frequency in the camera device 1 when installing the camera device 1, or can set the anti-flicker frequency in the user operation interface of the electronic device 2, and then send the anti-flicker frequency to the camera device 1 through the network 3.

[0048] Step S130: Determine the long exposure duration of the camera device 1 according to the target brightness of the image captured by the camera device 1.

[0049] Among them, the target brightness is the brightness of the image expected to be captured by the imaging device 1, which can be a parameter pre-set in the imaging device 1 or a parameter set by the user through the operation interface or debugging interface of the imaging device 1. For example, during the debugging of the imaging device 1, the target brightness is set according to the actual image capture effect of the imaging device 1. When the imaging device 1 captures an image, it is necessary to capture a long-exposure frame according to the long exposure duration and a short-exposure frame according to the short exposure duration, and finally synthesize the long-exposure frame and the short-exposure frame into an image.

[0050] In addition, after synthesizing the long-exposure frame and the short-exposure frame into an image, the brightness of the image is usually formed by the brightness of the long-exposure frame and the brightness of the short-exposure frame in a certain proportion (i.e., the brightness ratio). Therefore, when determining the long exposure duration, the brightness of the long-exposure frame can be calculated first according to the target brightness and the brightness ratio, and then the long exposure duration can be calculated according to the brightness of the long-exposure frame. Specifically, after obtaining the brightness of the long-exposure frame, the long exposure duration can be calculated through the following formula:

[0051] L exp =T exp ×K exp ×N exp (1)

[0052] Among them, L exp is the brightness of the exposure frame, T exp is the exposure duration, K exp is the exposure sensitivity of the imaging device 1, and N exp is the gain of the imaging device 1, that is, the data magnification ratio.

[0053] In addition, the exposure sensitivity is an index to measure the sensitivity of the image capture unit 14 on the imaging device 1 to light, that is, how much light the image capture unit 14 can capture under specific conditions to form an image. It should be particularly noted that the formulas in the embodiments of the present application are all the underlying principles for the image capture unit 14 to generate an image. Although the brightness of the image generated by the image capture unit 14 is affected by the exposure sensitivity, the exposure sensitivity is a characteristic of the sensor in the image capture unit 14, and its specific value is usually unobtainable and cannot be changed.

[0054] In a preferred manner, the long exposure duration determination module 42 determines the long exposure duration of the imaging device 1 according to the target brightness of the image captured by the imaging device 1. Specifically, the long exposure duration determination module 42 obtains parameters such as the target brightness and the brightness ratio from the imaging device 1. The long exposure duration determination module 42 can select corresponding parameters according to the specific shooting scene at preset time intervals. For example, it reads the parameters once every 3 minutes; the long exposure duration determination module 42 can also obtain the parameters matching the shooting scene from the imaging device 1 after the processor 11 recognizes that the shooting scene has changed. The short exposure duration determination module 43 calculates the short exposure duration of the imaging device according to the long exposure duration and the exposure ratio.

[0055] Step S140: Calculate the short exposure duration of the imaging device according to the long exposure duration and the exposure ratio.

[0056] Among them, the exposure ratio is the ratio between the long exposure duration and the short exposure duration. The short exposure duration determined in this step is the exposure duration for obtaining the short exposure frame when the imaging device 1 captures an image, which is mainly used to ensure that the brightness of the short exposure frame captured by the imaging device 1 can meet the requirements of the target brightness. In a preferred manner, the short exposure duration determination module 43 calculates the short exposure duration of the imaging device according to the long exposure duration and the exposure ratio.

[0057] Since multiple parameters are involved when the imaging device 1 captures an image, in order to make the use of the imaging device 1 more convenient, the brightness ratio and the exposure ratio are usually used to control the image capture effect of the imaging device 1, and the specific values can be adjusted according to the actual image effect. Of course, the brightness ratio and the exposure ratio are usually parameters pre-stored in the imaging device 1 after being debugged multiple times by R & D personnel, and this parameter can generally be applicable to multiple scenarios. Taking the HDR mode of the imaging device 1 as an example, the target brightness, the brightness ratio, and the exposure ratio can all be parameters pre-set in the imaging device 1, and multiple groups of parameters can also be pre-stored in the imaging device 1 to meet multiple different shooting scenes. Specifically, when the user selects the HDR mode of the imaging device 1 to capture an image, the controller of the imaging device 1 selects the corresponding parameters according to the specific shooting scene.

[0058] It should be particularly noted that the image capture method provided in the embodiments of the present application can be applied not only to the process of the imaging device 1 capturing the monitoring area, but also to the process of debugging the imaging device 1 during the R & D process. Specifically, due to the different hardware performances of different imaging devices 1, when applying the image capture method to different imaging devices 1, if the same configuration parameters (such as brightness ratio, exposure ratio, etc.) are used on different imaging devices 1, it may affect the image capture effect of the imaging device 1.

[0059] Therefore, when integrating the image acquisition method into different imaging devices 1, developers usually need to adjust the configuration parameters for different imaging devices 1 so that the image acquisition method can be adapted to the imaging device 1. As an example, when integrating the HDR mode into the imaging device 1, the developer can install the imaging device 1 in a simulated scene, and use the HDR mode on the imaging device 1 to acquire images of the simulated scene. Then, the configuration parameters such as the brightness ratio and the exposure ratio are continuously adjusted according to the effects of the acquired images until the images acquired by the imaging device 1 meet the user's requirements. Then, the configuration parameters obtained through debugging are stored in the imaging device 1.

[0060] Furthermore, when the image acquisition method is applied in the R & D process, developers usually need to view the effects of the images acquired by the imaging device 1 while debugging the configuration parameters. However, in a dimly lit scene, only a small amount of image details in the bright areas can be seen in the short exposure frame, and the image details in the dark areas are basically invisible. It is difficult for researchers to infer the effects of the finally synthesized images based on the content in the short exposure frame. Therefore, if the short exposure duration is debugged first, after determining the short exposure duration, it is necessary to first determine the long exposure duration to obtain the long exposure frame, and then roughly infer the effects of the finally synthesized images based on the image details in the long exposure frame, so as to re-determine the short exposure duration according to the effects of the synthesized images. This results in the need to debug two exposure durations simultaneously during the debugging process, making the debugging process complex and difficult to operate.

[0061] Through step S130 and step 140, the imaging device 1 can first obtain the long exposure frame according to the long exposure duration, enabling the developer to roughly deduce the effects of the synthesized images based on the large amount of image details in the dark areas of the long exposure frame, and first adjust the configuration parameters and the long exposure duration of the imaging device 1 to complete the debugging of the effects of the long exposure frame, making the dark area details in the long exposure frame appear, and the bright areas are appropriately overexposed. Then, the short exposure duration is determined according to the long exposure duration and the exposure ratio to debug the effects of the short exposure frame, making the brightness details appear. Such an adjustment method does not require adjusting the long exposure duration and the short exposure duration simultaneously, making the debugging process of the configuration parameters of the imaging device 1 simpler and easier to operate, indirectly accelerating the adjustment speed of the long exposure duration and the short exposure duration, and improving the adjustment efficiency of the configuration parameters.

[0062] Step S150: Determine whether the short exposure duration is less than the minimum exposure duration.

[0063] Among them, if the short exposure duration is less than the minimum exposure duration, it means that the short exposure duration cannot even reach the minimum exposure duration that can ensure the same brightness for each frame of images captured by the image acquisition unit 14. The brightness of two adjacent frames in the multiple frames of images directly captured by the imaging device 1 according to the short exposure duration will be different. Therefore, it is necessary to jump to step S160 so that the imaging device 1 obtains short exposure frames according to the minimum exposure duration, thereby ensuring that the brightness of the multiple frames of short exposure frames captured is the same.

[0064] If the short exposure duration is greater than or equal to the minimum exposure duration, it means that the short exposure duration exceeds the minimum exposure duration that can ensure the same brightness for each frame of images captured by the image acquisition unit 14. It is necessary to first ensure that the brightness of the captured short exposure frames can meet the requirements of the target brightness, and then adjust the short exposure duration according to the minimum exposure duration, and jump to step S170 so that the imaging device 1 obtains short exposure frames according to an integer multiple of the minimum exposure duration, thereby ensuring that the brightness of the multiple frames of short exposure frames captured is not only the same, but also its brightness can meet the requirements of the target brightness.

[0065] Step S160: Determine the minimum exposure duration as the short exposure duration.

[0066] Among them, the short exposure duration is the exposure duration corresponding to the short exposure frames during the process of the imaging device 1 finally capturing images. The short exposure duration can ensure that the brightness of the short exposure frames captured by the imaging device 1 can meet the requirements of the target brightness, and at the same time, it can also ensure that the brightness of each frame of short exposure frames can be kept consistent. In a preferred manner, when the short exposure duration is less than the minimum exposure duration, the short exposure duration determination module 43 determines the minimum exposure duration as the short exposure duration.

[0067] Step S170: Round the ratio between the short exposure duration and the minimum exposure duration, and determine the short exposure duration according to the rounded ratio and the minimum exposure duration.

[0068] Among them, first calculate the ratio of the short exposure duration to the minimum exposure duration, round the ratio, and then calculate the short exposure duration based on the rounded ratio. This can not only make the short exposure duration an integer multiple of the minimum short exposure duration to ensure that the brightness of the short exposure frames captured by the imaging device 1 according to the short exposure duration remains consistent, but also make the difference between the short exposure duration determined in this step and the short exposure duration calculated in step S140 as small as possible to ensure that the brightness of the short exposure frames captured by the imaging device 1 according to the short exposure duration can also meet the requirements of the target brightness. The rounding method can use methods such as rounding up, rounding to the nearest, rounding down, and rounding towards zero. In a preferred manner, when the short exposure duration is greater than or equal to the minimum exposure duration, the short exposure duration determination module 43 first rounds the ratio between the short exposure duration and the minimum exposure duration, and then determines the short exposure duration based on the rounded ratio and the minimum exposure duration.

[0069] Step S180: Control the imaging device to capture images according to the long exposure duration and the determined short exposure duration.

[0070] Among them, after the short exposure duration and the long exposure duration are determined, the imaging device 1 captures short exposure frames according to the short exposure duration, and captures long exposure frames according to the long exposure duration. Finally, the short exposure frames and the long exposure frames are combined into one image to complete image capture. In a preferred manner, the control module 44 controls the imaging device 1 to capture images according to the long exposure duration and the determined short exposure duration.

[0071] In the above embodiments, first, determine the minimum exposure duration according to the anti-flash frequency of the imaging device 1, so as to adjust through the minimum exposure duration when determining the short exposure duration later, so that the adjusted short exposure duration is an integer multiple of the minimum exposure duration, to ensure that the brightness of the short exposure frames captured by the imaging device according to the adjusted short exposure duration remains consistent, thereby avoiding the problem of flickering of the imaging device 1 due to different brightnesses of the short exposure frames. In addition, initially determine the short exposure duration according to configuration parameters such as the target brightness and exposure ratio of the images captured by the imaging device, so that the finally captured images of the imaging device can meet the brightness requirements.

[0072] Specifically, when the short exposure duration is less than the minimum exposure duration, the minimum exposure duration is determined as the short exposure duration. When the short exposure duration is greater than or equal to the minimum exposure duration, the ratio between the short exposure duration and the minimum exposure duration is rounded, and then the short exposure duration is determined according to the rounded ratio, so that the determined short exposure duration is both an integer multiple of the minimum exposure duration to ensure that the brightness of the short exposure frames captured by the imaging device 1 according to the determined short exposure duration remains consistent, and the difference from the original short exposure duration is relatively small, to ensure that the brightness of the short exposure frames captured by the imaging device 1 according to the determined short exposure duration can meet the requirements of the target brightness.

[0073] Further, to ensure that the short exposure duration is an integer multiple of the minimum short exposure duration, step S170 may specifically include the following steps:

[0074] Step S171a: Round up the ratio between the short exposure duration and the minimum exposure duration.

[0075] Step S172a: Determine the short exposure duration as the product of the rounded-up ratio and the minimum exposure duration.

[0076] Among them, rounding up returns the smallest integer greater than or equal to the given value. For example, rounding up 2.3 gives 3, and rounding up 3.8 gives 4. The determined short exposure duration t s2 The ratio between the short exposure duration and the minimum exposure duration can be directly rounded up using the rounding-up function in the function library, and then the product of the rounded-up ratio and the minimum exposure duration is calculated. It is also possible to first expand the short exposure duration using the minimum exposure duration, and then round down the ratio between the expanded short exposure duration and the minimum exposure duration. At this time, the rounded-down ratio is the result of rounding up. Specifically, it can be calculated through the following formula:

[0077] t s2 = floor((t s1 + t light - 1) / t light ) × t light

[0078] Among them, t s1 is the original short exposure duration, t light is the minimum exposure duration, t s1 + t light - 1 is the process of expanding the short exposure duration using the minimum exposure duration, floor() is the rounding-down function, and t s2 is the determined short exposure duration.

[0079] In the above embodiments, first round up the ratio between the short exposure duration and the minimum exposure duration, and then determine the short exposure duration as the product of the rounded-up ratio and the minimum exposure duration. On the one hand, the determined short exposure duration is an integer multiple of the minimum exposure duration, thereby ensuring that the brightness of multiple short exposure frames collected by the imaging device 1 according to the determined short exposure duration can be kept consistent; on the other hand, using the ratio between the short exposure duration and the minimum exposure duration to determine the short exposure duration can minimize the difference between the determined short exposure duration and the original short exposure duration, making the difference between the short exposure frames obtained by the imaging device 1 according to the determined short exposure duration and the short exposure frames obtained by the original short exposure duration relatively small, thereby ensuring that the brightness of the finally synthesized image can meet the requirements of the target brightness.

[0080] Further, since the image captured by the imaging device 1 is synthesized from a short-exposure frame and a long-exposure frame, in addition to the brightness of the short-exposure frame affecting the image captured by the imaging device 1, the brightness of the long-exposure frame also affects the image captured by the imaging device 1. To further avoid the problem of image flicker in the image captured by the imaging device 1, as Figure 7 shown, Figure 7 FIG. shows a flowchart of an image acquisition method provided in the third embodiment of the present application. The method further includes the following steps:

[0081] Step S173: Determine the long-exposure duration according to the product of the determined short-exposure duration and the exposure ratio, so as to control the imaging device to capture images according to the determined short-exposure duration and the determined long-exposure duration.

[0082] Among them, the long-exposure duration is the exposure duration corresponding to the long-exposure frame during the process of the imaging device 1 capturing an image. When synthesizing a long-exposure frame and a short-exposure frame into one image, the brightness of the dark area on the long-exposure frame usually determines the brightness of the dark area on the synthesized image. If the brightness of multiple long-exposure frames during the process of the imaging device 1 capturing an image is different, the brightness of the dark area on the multiple finally captured images will also be different.

[0083] Therefore, in order to ensure that the brightness of multiple long-exposure frames captured by the imaging device 1 according to the long-exposure duration can be kept consistent, the long-exposure duration also needs to be an integer multiple of the minimum exposure duration. Specifically, the long-exposure duration can be determined according to the product of the determined short-exposure duration and the exposure ratio, so that the long-exposure duration is an integer multiple of the determined short-exposure duration. In this way, the long-exposure duration can also be an integer multiple of the minimum exposure duration, thereby ensuring that the brightness of the long-exposure frames captured by the imaging device 1 according to the long-exposure duration can be kept consistent.

[0084] In a preferred manner, the long-exposure duration determination module 42 also determines the long-exposure duration according to the product of the determined short-exposure duration and the exposure ratio, so that the control module controls the imaging device 1 to capture images according to the determined short-exposure duration and the determined long-exposure duration.

[0085] In the above embodiment, the long-exposure duration is determined according to the product of the determined short-exposure duration and the exposure ratio, so that the determined long-exposure duration is an integer multiple of the determined short-exposure duration, that is, the determined long-exposure duration is also an integer multiple of the minimum exposure duration, so as to ensure that the brightness of the long-exposure frames captured by the imaging device 1 according to the determined long-exposure duration can also be kept consistent, thereby ensuring that the brightness of the multiple images synthesized by the imaging device 1 according to the long-exposure frames and the short-exposure frames can be kept consistent and avoiding the problem of image flicker.

[0086] Further, when the images captured by the imaging device 1 are finally presented in the form of a video, to ensure the continuity of the images in the video, especially when there are moving objects in the video, to ensure that the actions of the moving objects can be captured more precisely, it is usually necessary to limit the frame rate of the images captured by the imaging device, that is, it is necessary to ensure that the number of video frames that the imaging device 1 can capture per second reaches the minimum standard. However, the frame rate and the exposure duration are mutually restrictive. If the exposure duration of each frame of image is increased, the frame rate will decrease. If the exposure duration of each frame of image is decreased, the frame rate will increase. In addition, the short exposure duration is usually relatively small, and its impact on the frame rate is usually particularly small, or even has no impact. While the long exposure duration may directly affect the frame rate of the imaging device 1. Therefore, when determining the long exposure duration, it is also necessary to consider the frame rate of the imaging device 1 to ensure the continuity of the images in the video captured by the imaging device 1.

[0087] As Figure 8 shown, Figure 8 FIG. shows a schematic flow chart of the image acquisition method provided in the third embodiment of the present application. To meet the frame rate requirements of the imaging device, after step S173, the method further includes the following steps:

[0088] Step S174: Obtain the frame rate of the imaging device, and determine the maximum exposure duration according to the frame rate.

[0089] Among them, the frame rate refers to the number of video frames that the imaging device can capture per second, usually measured in "frames per second (fps)", and different imaging devices 1 support different frame rates. The higher the frame rate, the more video frames that the imaging device 1 can capture per second, and the smaller the exposure duration corresponding to each frame of image. Therefore, the maximum exposure duration of the imaging device 1 can be determined according to the frame rate, that is, the maximum exposure duration corresponding to each frame of image of the imaging device 1 on the premise of meeting the frame rate. Specifically, the maximum exposure duration t can be calculated by the following formula l-max :

[0090] f l-max = 1 / fps

[0091] where, fps is the current frame rate of the imaging device 1.

[0092] Step S175: Determine whether the long exposure duration is greater than the maximum exposure duration.

[0093] If so, it means that the imaging device 1 directly captures images according to the long exposure duration, and the frame rate of the finally obtained video may not meet the frame rate requirements of the imaging device 1. It is necessary to adjust the long exposure duration, and jump to step S176 to make the finally obtained video meet the frame rate of the imaging device 1.

[0094] Otherwise, it indicates that the imaging device 1 directly acquires images according to the long exposure duration, and the frame rate of the finally obtained video can meet the frame rate requirement of the imaging device 1, without the need to adjust the long exposure duration. Then, it jumps to step S180 to directly acquire images according to the long exposure duration.

[0095] Step S176: Round down the ratio between the maximum exposure duration and the determined short exposure duration, and determine the long exposure duration according to the product of the rounded-down ratio and the short exposure duration.

[0096] Among them, since the maximum exposure duration is not necessarily an integer multiple of the short exposure duration, the maximum exposure duration cannot be directly updated to the long exposure duration. Instead, the ratio between the maximum exposure duration and the short exposure duration is first calculated to adjust the exposure ratio between the long exposure duration and the short exposure duration. Rounding down means returning the largest integer less than or equal to the given value. In other words, it is to ignore the decimal part of the real number and return the closest integer smaller than the real number. For example, 2.3 rounded down is 2, and 3.8 rounded down is 3. The ratio obtained in this way will be less than or equal to the actual ratio between the maximum exposure duration and the short exposure duration, thereby ensuring that the long exposure duration updated according to the adjusted ratio and the short exposure duration will not exceed the maximum exposure duration. The specific calculation formula for the adjusted ratio M is shown in the following formula:

[0097] M = floor(t l-max / t s2 )

[0098] Then, calculate the product of the adjusted ratio and the short exposure duration, and update the product to the long exposure duration, so that the long exposure duration can not only meet the frame rate requirement of the imaging device 1, but also be an integer multiple of the short exposure duration, thereby ensuring that the brightness of multiple long exposure frames captured by the imaging device 1 can be kept consistent.

[0099] In the above embodiments, first, the maximum exposure duration is determined according to the frame rate of the imaging device 1, so that the imaging device 1 can limit the long exposure duration through the maximum exposure duration, and the number of video frames captured by the imaging device 1 according to the long exposure duration can meet the frame rate requirement of the imaging device 1. Secondly, when the long exposure duration exceeds the maximum exposure duration, round down the ratio between the maximum exposure duration and the short exposure duration, and update the long exposure duration according to the adjusted ratio and the short exposure duration, so that the long exposure duration can not only meet the frame rate requirement of the imaging device 1, but also be an integer multiple of the short exposure duration, avoiding the problem of flickering in the video captured by the imaging device 1.

[0100] Furthermore, since rounding up returns the smallest integer greater than or equal to a given value, this will cause the determined short exposure time and the determined long exposure time to become larger. Although the impact on the final composite image is very small or even almost no impact, it may cause the long exposure time to exceed the maximum exposure time more easily. Therefore, in order to further prevent the long exposure time from exceeding the maximum exposure time, step S170 may specifically include the following steps:

[0101] Step S171b: round down the ratio between the short exposure time and the minimum exposure time.

[0102] Step S172b: Determine the product of the rounded ratio and the minimum exposure time as the short exposure time.

[0103] Among them, the short exposure time t after determination s2 The comparison value can be rounded by using the floor function in the function library, and then the rounded ratio and the original short exposure time t can be calculated. s1 The specific calculation formula is as follows:

[0104] t s2 =floor(t s1 / t light )×t light

[0105] In the above embodiment, the short exposure time is determined by rounding down the ratio between the short exposure time and the minimum exposure time, and then calculating the product of the rounded ratio and the minimum exposure time, so that the determined short exposure time is less than or equal to the short exposure time. In this way, while ensuring the effect of the short exposure frame, it is possible to avoid increasing the long exposure time as much as possible, thereby avoiding the problem of not being able to meet the frame rate requirement of the camera device 1 due to the long exposure time exceeding the maximum exposure time.

[0106] Furthermore, in order to include more details on the target image, step S180 may specifically include the following steps:

[0107] Step S181: controlling the camera device to collect short exposure frames according to the preset gain and short exposure time of the camera device.

[0108] Step S182: Control the camera device to collect long exposure frames according to the preset gain and long exposure time.

[0109] Step S183: synthesizing the target image captured by the camera device 1 according to the brightness of the long exposure frame, the weight of the long exposure frame, the brightness of the short exposure frame, and the weight of the short exposure frame.

[0110] The preset gain refers to the process of increasing the signal strength of the image acquisition unit 14 to improve the brightness of the image.

[0111] Among them, the short-exposure frames and long-exposure frames are obtained according to the determined short-exposure duration and the determined long-exposure duration respectively. For example, the imaging device 1 can collect the short-exposure frames and long-exposure frames according to formula (1). Of course, formula (1) is just a simplified formula. When the imaging device 1 actually collects the short-exposure frames and long-exposure frames, other parameters of the imaging device 1 (such as white balance, resolution, color space, exposure mode, etc.) also need to be combined.

[0112] Among them, the exposure duration of the short-exposure frames collected by the imaging device 1 is relatively short. Therefore, the short-exposure frames are used to capture the details of the bright areas in the scene to avoid overexposure. The exposure duration of the long-exposure frames collected by the imaging device 1 is relatively long. Therefore, the long-exposure frames are used to capture the details of the dark areas in the scene, and the bright areas are appropriately overexposed. Finally, the details of the bright areas in the short-exposure frames and the details of the dark areas in the long-exposure frames are synthesized into one image, so that the target image has both the details of the bright areas and the details of the dark areas. Specifically, the synthesis formula of the target image can be shown as follows:

[0113] L = L l ×W l +L s ×W s (2)

[0114] Among them, L is the brightness of the target image, L l is the brightness of the long-exposure frame, W l is the weight of the long-exposure frame, L s is the brightness of the long-exposure frame, W s is the weight of the long-exposure frame. It should be particularly noted that W l and W s are not fixed values, but are adjusted according to the brightness of each area on the long-exposure frame and the short-exposure frame during the synthesis of the target image. For example, when synthesizing the content of the bright area on the target image, the weight W s of the short-exposure frame is increased, and the weight W l of the long-exposure frame is decreased, so that the weight W s of the short-exposure frame is higher than the weight W l of the long-exposure frame, and further more details of the bright area are retained on the target image to prevent overexposure of the bright area on the target image; when synthesizing the content of the dark area on the target image, the weight W s of the short-exposure frame is decreased, and the weight W l of the long-exposure frame is increased, so that the weight W s of the short-exposure frame is lower than the weight W l of the long-exposure frame, and further more details of the dark area are retained on the target image, so that the details of the dark area on the target image are revealed.

[0115] In the above embodiments, first, short-exposure frames are collected according to a short exposure duration to capture details of regions with relatively high brightness in the shooting area, then long-exposure frames are collected according to a long exposure duration to capture details of regions with relatively low brightness in the shooting area, and finally, a target image is synthesized based on the short-exposure frames and the long-exposure frames, so that the target image has details of both bright regions and dark regions.

[0116] Further, since the short exposure duration is adjusted according to the minimum exposure duration after determining the short exposure duration according to the target brightness, this may cause a difference between the brightness of the finally synthesized image and the target brightness. Therefore, in order to ensure that the brightness of the finally synthesized image can meet the requirements of the target brightness, after step S183, the method further includes the following steps:

[0117] Step S184: Calculate the ratio between the target brightness and the brightness of the target image to obtain a brightness difference ratio.

[0118] Step S185: Update the preset gain according to the brightness difference ratio, and control the imaging device to capture images according to the updated preset gain, short exposure duration, and long exposure duration.

[0119] Among them, when calculating the brightness L of the target image, the following formula can be obtained by substituting formula (1) into formula (2):

[0120] L = t l ×K exp ×N exp ×W l +t s2 ×K exp ×N exp ×W s

[0121] Among them, t l is the long exposure duration. Since the brightness of both the long-exposure frames and the short-exposure frames needs to be calculated through the exposure sensitivity K exp and the preset gain N exp , the above formula can be simplified as:

[0122] L = (t l ×W l +t s2 ×W s )×K exp ×N exp

[0123] It can be seen from the above formula that the brightness of the target image can be adjusted by adjusting the magnitude of the exposure sensitivity k exp or the preset gain N exp . Since the exposure sensitivity K exp usually cannot be obtained or changed, while the preset gain Nexp It is a configuration parameter for adjusting the brightness of an image. Usually, when the light is insufficient, a cameraman will increase the gain to ensure that the image is bright enough. Moreover, many imaging devices 1 have an automatic gain control function, which can automatically adjust the gain value according to the shooting environment. Therefore, when there is a difference between the brightness of the target image and the target brightness, the preset gain of the imaging device 1 can be updated so that the brightness of the new target image synthesized according to the updated preset gain is as close as possible to the target brightness.

[0124] Specifically, the brightness difference ratio between the target brightness and the brightness of the target image can be calculated first, and then the preset gain can be adjusted according to the brightness difference ratio. For example, the product of the brightness difference ratio and the preset gain can be updated as the new preset gain.

[0125] In the above embodiment, by calculating the difference between the target brightness and the brightness of the target image, and updating the preset gain of the imaging device 1 according to the difference, the brightness of the target image collected and synthesized by the imaging device 1 according to the updated preset gain can be as close as possible to the target brightness.

[0126] The embodiment of the present application provides a computer-readable storage medium, and the storage medium stores a computer program, and when the computer program is executed by a processor, it implements the above-mentioned embodiment of the image acquisition method.

[0127] The embodiment of the present application provides a computer program, and the computer program can be executed by a processor to implement the above-mentioned embodiment of the image acquisition method.

[0128] The embodiment of the present application provides a computer program product, and the computer program product includes a computer program, and when the computer program is executed by a processor, it implements the above-mentioned embodiment of the image acquisition method.

[0129] In several embodiments provided by the present application, if any function is implemented in the form of a software functional module / unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, part or all of the technical solutions of the present application can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be an electronic device such as a personal computer or a server) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store computer program code.

[0130] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. A variety of general-purpose systems may also be used in conjunction with the teachings based herein. The structure required to construct such systems will be apparent from the above description. Additionally, the embodiments of the present application are not directed to any particular programming language. It should be understood that the content of the present application described herein can be implemented using a variety of programming languages, and the description of a particular language above is for the purpose of disclosing the best mode of the present application.

[0131] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a claim listing several devices, several units or modules of these devices may be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

[0132] The above-described embodiments merely represent several implementation manners of the present application, and their descriptions are relatively specific and detailed, but should not be construed as limiting the patent scope of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. An image acquisition method, characterized in that: Applied to a camera device, the method comprises: Obtaining the mains power frequency of the camera device; Determining a minimum exposure time of the camera device according to the mains frequency; Determining the long exposure time of the camera device according to the target brightness of the image captured by the camera device; Calculating the short exposure time of the camera device according to the long exposure time and the exposure ratio; When the short exposure duration is less than the minimum exposure duration, determining the minimum exposure duration as the short exposure duration; When the short exposure time is greater than or equal to the minimum exposure time, rounding the ratio between the short exposure time and the minimum exposure time, and determining the short exposure time according to the rounded ratio and the minimum exposure time; The camera device is controlled to capture images according to the long exposure time and the determined short exposure time.

2. The image acquisition method according to claim 1, characterized in that: Rounding the ratio between the short exposure time and the minimum exposure time, and determining the short exposure time according to the rounded ratio and the minimum exposure time, specifically includes: Rounding up the ratio between the short exposure time and the minimum exposure time; The product of the rounded ratio and the minimum exposure duration is determined as the short exposure duration.

3. The image acquisition method according to claim 1, characterized in that: The rounding of the ratio between the short exposure time and the minimum exposure time, and determining the short exposure time according to the rounded ratio and the minimum exposure time specifically includes: Rounding down the ratio between the short exposure time and the minimum exposure time; The product of the rounded ratio and the minimum exposure duration is determined as the short exposure duration.

4. The image acquisition method according to claim 1, characterized in that: The method further comprises: The long exposure duration is determined according to the product of the determined short exposure duration and the exposure ratio, so as to control the camera to capture images according to the determined short exposure duration and the determined long exposure duration.

5. The image acquisition method according to claim 4, characterized in that: After determining the long exposure duration according to the determined product of the short exposure duration and the exposure ratio, the method further includes: Acquire the frame rate of the camera device, and determine the maximum exposure time according to the frame rate; When the long exposure time is greater than the maximum exposure time, the ratio between the maximum exposure time and the determined short exposure time is rounded down, and the long exposure time is determined according to the product of the rounded ratio and the short exposure time.

6. The image acquisition method according to claim 4 or 5, characterized in that: The controlling the camera device to capture an image according to the long exposure time and the determined short exposure time specifically includes: Controlling the camera device to collect short exposure frames according to a preset gain of the camera device and the short exposure duration; Controlling the camera device to collect long exposure frames according to the preset gain and the long exposure time; A target image captured by the camera device is synthesized according to the brightness of the long exposure frame, the weight of the long exposure frame, the brightness of the short exposure frame, and the weight of the short exposure frame.

7. The image acquisition method according to claim 6, characterized in that: After synthesizing the target image captured by the camera device according to the brightness of the long exposure frame, the weight of the long exposure frame, the brightness of the short exposure frame, and the weight of the short exposure frame, the method further includes: Calculating the ratio between the target brightness and the target image brightness to obtain a brightness difference ratio; The preset gain is updated according to the brightness difference ratio, and the camera is controlled to capture an image according to the updated preset gain, the short exposure time, and the long exposure time.

8. An image acquisition device, characterized in that: The device comprises: A minimum exposure time determination module, used to obtain the mains frequency of the camera device and determine the minimum exposure time of the camera device according to the mains frequency; A long exposure duration determination module, used to determine the long exposure duration of the camera device according to the target brightness of the image captured by the camera device; A short exposure duration determination module, used to calculate the short exposure duration of the camera device according to the long exposure duration and the exposure ratio; The short exposure duration determination module is further configured to determine the minimum exposure duration as the short exposure duration when the short exposure duration is less than the minimum exposure duration; The short exposure duration determination module is further configured to, when the short exposure duration is greater than or equal to the minimum exposure duration, round the ratio between the short exposure duration and the minimum exposure duration, and determine the short exposure duration according to the rounded ratio and the minimum exposure duration; A control module is used to control the camera device to capture images according to the long exposure time and the determined short exposure time.

9. The image acquisition device according to claim 8, characterized in that: The long exposure time determination module is also used to determine the long exposure time according to the product of the determined short exposure time and the exposure ratio, so that the control module controls the camera device to capture images according to the determined short exposure time and the determined long exposure time.

10. A camera device, comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the image acquisition method according to any one of claims 1 to 7.