Camera control method, camera and computer readable storage medium

By obtaining the configuration information before and after the camera collects the target image frame, and adjusting the exposure starting time, the problem of poor image collection effect when the camera switches configuration information is solved, and stable image collection under different configuration information is achieved.

CN119364193APending Publication Date: 2025-01-24ZHEJIANG HUARAY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411282817.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

During the camera acquisition process, switching of configuration information leads to poor image acquisition effect, and how to adapt to different configuration information for image acquisition has become an urgent problem.

Method used

By obtaining the configuration information before and after the camera collection target image frame, based on the exposure related parameters corresponding to these configuration information, determine the target time, and adjust the exposure of the target image frame according to the target time and reference exposure start time to adapt to the configuration configuration Switching of information.

Benefits of technology

When configured information switching, by flexible adjustment of the beginning of the exposure, ensure the stability and quality of the image collection effect, avoid the problems of wrong frames and bad frames, and improve the frame rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119364193A_ABST
    Figure CN119364193A_ABST
Patent Text Reader

Abstract

The invention discloses a camera control method, a camera and a computer readable storage medium. The method comprises the following steps: acquiring first configuration information and second configuration information; wherein the first configuration information is the configuration information adopted before the camera collects the target image frame, and the second configuration information is the configuration information adopted when the camera collects the target image frame; determining target time based on a first exposure related parameter corresponding to the first configuration information and a second exposure related parameter corresponding to the second configuration information; and determining the exposure starting moment of the target image frame based on the target time and the reference exposure starting moment of the target image frame. According to the scheme, image acquisition can be carried out according to different configuration information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of camera technology, and in particular to a camera control method, a camera and a computer-readable storage medium. Background Art

[0002] As an important image recording device, cameras are widely used in production and life. For example, industrial cameras are used to participate in the inspection and quality control of industrial production. Cameras can be pre-configured with configuration information, which may include gain, exposure value, or other attributes supported by the camera.

[0003] The camera may switch configuration information during the acquisition process. How to adapt to different configuration information for image acquisition has become an urgent problem to be solved. Summary of the invention

[0004] The present application at least provides a camera control method, a camera, and a computer-readable storage medium.

[0005] The present application provides a camera control method, which includes: obtaining first configuration information and second configuration information; wherein the first configuration information is the configuration information used by the camera before acquiring a target image frame, and the second configuration information is the configuration information used by the camera when acquiring the target image frame; determining a target time based on first exposure-related parameters corresponding to the first configuration information and second exposure-related parameters corresponding to the second configuration information; and determining an exposure start time of the target image frame based on the target time and a reference exposure start time of the target image frame.

[0006] The present application also provides a camera, comprising a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement any of the above-mentioned camera control methods.

[0007] The present application also provides a computer-readable storage medium on which program instructions are stored. When the program instructions are executed by a processor, any of the above-mentioned camera control methods is implemented.

[0008] In the above scheme, during the image acquisition process, when switching configuration information, the exposure start time of the current image frame is flexibly adjusted according to the exposure-related parameters corresponding to the configuration information before and after the switching, so as to adapt to different configuration information for image acquisition.

[0009] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0011] Figure 1 It is a flowchart of an embodiment of the camera control method of the present application;

[0012] Figure 2 It is a flowchart of the application for determining the target time;

[0013] Figure 3 is a schematic diagram of another embodiment of the camera control method of the present application;

[0014] Figure 4 is a timing diagram of an embodiment of the camera control method of the present application;

[0015] Figure 5 is a timing diagram of another embodiment of the camera control method of the present application;

[0016] Figure 6 is a timing diagram of another embodiment of the camera control method of the present application;

[0017] Figure 7 It is a schematic diagram of the framework of a camera embodiment of the present application;

[0018] Figure 8 A schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0019] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.

[0020] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0021] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.

[0022] See also Figure 1 , Figure 1 It is a flowchart of an embodiment of the camera control method of the present application.

[0023] Specifically, the following steps may be included:

[0024] Step S110: Acquire first configuration information and second configuration information.

[0025] It should be noted that the first configuration information and the second configuration information are configuration information of the camera.

[0026] The first configuration information is the configuration information used by the camera before it acquires the target image frame, and the second configuration information is the configuration information used by the camera when it acquires the target image frame. When acquiring the target image frame, the camera switches from the first configuration information to the second configuration information.

[0027] Step S120: Determine the target time based on the first exposure-related parameter corresponding to the first configuration information and the second exposure-related parameter corresponding to the second configuration information.

[0028] It can be understood that the configuration information of the camera includes configuration related to exposure. After the configuration information is determined, the first exposure-related parameter corresponding to the first configuration information is determined accordingly, and the second exposure-related parameter corresponding to the second configuration information is determined accordingly.

[0029] After obtaining the first exposure-related parameter and the second exposure-related parameter, the target time used when the camera switches between the two configuration information can be determined accordingly. The target time is used to adjust the exposure start time when the first frame image is captured using the switched configuration information.

[0030] The data items included in the first exposure-related parameter and the second exposure-related parameter may be at least partially different.

[0031] Step S130: determining the exposure start time of the target image frame based on the target time and the reference exposure start time of the target image frame.

[0032] The reference exposure start time of the target image frame is used as a reference for the exposure start of the target image frame.

[0033] In some embodiments, the reference exposure start time of the target image frame may be determined based on the first configuration information. Specifically, the reference exposure start time may be determined based on the exposure start time required to capture the target image frame using the first configuration information.

[0034] In a specific application scenario, the first configuration information is used before capturing the target image frame, and the second configuration information is used from the target image frame. If the first configuration information is still used to capture the target image frame, the exposure start time required for the target image frame is the reference exposure start time.

[0035] The target time is a delayed time or an advanced time. The time after the delayed time from the reference exposure start time of the target image frame is used as the exposure start time of the target image frame, or the time before the reference exposure start time of the target image frame is used as the exposure start time of the target image frame.

[0036] See also Figure 2 , Figure 2 This is a flow chart of determining the target time in this application. Specifically, this step may include:

[0037] Step S210: determining a first duration based on a first exposure-related parameter.

[0038] Step S220: Determine a second duration based on the first exposure-related parameter and the second exposure-related parameter.

[0039] It should be noted that there is no necessary order restriction for step S210 and step S120.

[0040] The first duration is the duration from the reference moment to the reference exposure start moment. The reference moment can be determined based on the exposure start moment of the reference image frame, the reference image frame is the previous frame of the target image frame, and the reference image frame is acquired using the first configuration information.

[0041] In some embodiments, the exposure start time of the reference image frame may be directly used as the reference time, or the exposure start time of the reference image frame may be adjusted based on the exposure start time of the reference image frame, such as floating before or after a certain time length, as the reference time.

[0042] It can be understood that the reference exposure start time is determined based on the exposure start time required to be used when the target image frame is captured using the first configuration information, and the reference exposure start time can be determined based on the first exposure-related parameters corresponding to the first configuration information.

[0043] In some embodiments, the first exposure-related parameter includes an exposure interval (period), which indicates the duration of the interval from the exposure start time of the previous frame to the exposure start time of the next frame when performing image acquisition according to the first configuration information. If the exposure start time of the reference image frame is directly used as the reference time, the exposure interval can be used as the first duration.

[0044] In a specific application scenario, the exposure interval refers to the reciprocal of the frame rate corresponding to the current exposure value, and can be determined using the following formula: 1 / frameRate, where frameRate represents the frame rate corresponding to the current exposure value.

[0045] The second time duration is the time duration from the reference time to the first candidate exposure start time corresponding to the target image frame. The first candidate exposure start time is used as a candidate time for exposing the target image frame. It should be noted that the first candidate exposure start time may not be used as the exposure start time.

[0046] In some embodiments, the second exposure-related parameter includes an exposure duration corresponding to the second configuration information. Determining the second duration may include determining a fourth duration based on the first exposure-related parameter, wherein the fourth duration is a duration from a reference moment to an exposure end moment corresponding to the first candidate exposure start moment. The difference between the fourth duration and the exposure duration corresponding to the second configuration information is used as the second duration.

[0047] It should be noted that an exposure process includes an exposure phase and a frame readout phase. The exposure phase of the next frame is affected by the frame readout phase of the previous frame. The exposure end time of the next frame, that is, the frame readout start time of the next frame, is affected by the frame readout end time of the previous frame. Therefore, the first candidate exposure start time can be selected accordingly. Therefore, according to the frame readout end time corresponding to the reference image frame, the candidate exposure end time of the target image frame can be determined, and the exposure start time corresponding to the candidate exposure end time is the first candidate exposure start time.

[0048] In a specific application scenario, the first exposure-related parameter includes the exposure duration and frame readout duration corresponding to the first configuration information, and the sum of the exposure duration and frame readout duration corresponding to the first configuration information can be used as the fourth duration.

[0049] First, according to the first exposure-related parameters, determine the duration from the reference moment to the exposure end moment corresponding to the first candidate exposure start moment, and then subtract the exposure duration corresponding to the second configuration information to obtain the duration from the reference moment to the first candidate exposure start moment.

[0050] In a specific application scenario, the first exposure-related parameters include the exposure duration and frame readout duration corresponding to the first configuration information, which are respectively denoted as EXP1 and ReadoutTime. The exposure start time of the reference image frame is used as the reference time, and the fourth duration is EXP1+ReadoutTime. After the fourth duration has passed from the reference time, the frame readout phase of the reference image frame ends, and this moment can be used as the candidate frame readout start time of the target image frame, so that the first candidate exposure start time of the target image frame can be derived and the corresponding second duration can be determined. The second exposure-related parameters include the exposure duration corresponding to the second configuration information, which is denoted as EXP2, and the second duration is EXP1+ReadoutTime-EXP2.

[0051] Step S230: Determine the target time based on the first duration and the second duration.

[0052] Among them, the target time is the advance time or the delay time, that is, the exposure start time of the target image frame can be before the reference exposure start time or after the reference exposure start time, which is specifically related to the first configuration information and the second configuration information.

[0053] It should be noted that if the first candidate exposure start time is before the reference exposure start time, the target time is the advance time, and if the first candidate exposure start time is after the reference exposure start time, the target time is the postponed time. Specifically, it can be judged according to the first duration and the second duration. For example, if the first duration is less than or equal to the second duration, the target time is the postponed time, and if the first duration is greater than the second duration, the target time is the advance time.

[0054] It is understandable that the advance time and the postponement time may be determined in a variety of ways. In some embodiments, determining the target time may include: in response to the second duration being greater than the first duration, determining the postponement time based on the difference between the second duration and the first duration.

[0055] In a specific application scenario, the difference obtained by subtracting the first time length from the second time length can be directly used as the postponement time. In some cases, the postponement time can also be adjusted based on this difference, for example, the difference obtained by subtracting the first time length from the second time length plus the second preset time length is used as the postponement time. Increasing the second preset time length can avoid the influence of sensor error on exposure.

[0056] In one implementation scenario, the delay time is EXP1+ReadoutTime-EXP2-period. In one implementation scenario, the delay time is EXP1+ReadoutTime-EXP2-period+2μs.

[0057] In some embodiments, determining the target time may include: in response to the second duration being less than or equal to the first duration, determining a third duration based on the first exposure-related parameter, selecting a target duration from the third duration and the second duration, and determining the advance time based on the difference between the first duration and the target duration.

[0058] In a specific application scenario, the difference obtained by subtracting the target duration from the first duration can be directly used as the advance time. In some cases, the advance time can also be obtained by adjusting based on this difference. Exemplarily, the advance time is obtained by subtracting the first preset duration from the result of subtracting the target duration from the first duration.

[0059] The third duration is the duration from the reference moment to the second candidate exposure start moment corresponding to the target image frame.

[0060] It should be noted that an exposure process includes an exposure phase and a frame readout phase. The exposure phase of the next frame is affected by the exposure phase of the previous frame. The exposure start time of the next frame is affected by the exposure end time of the previous frame. Therefore, the second candidate exposure start time can be selected accordingly. In some embodiments, the reference time can be the exposure start time of the reference image frame. The first exposure-related parameter includes the exposure duration corresponding to the first configuration information, and the exposure duration corresponding to the first configuration information is used as the third duration, that is, the second candidate exposure start time of the target image frame cannot be earlier than the exposure end time of the reference image frame.

[0061] In a specific application scenario, the exposure duration corresponding to the first configuration information is expressed as EXP1, and the third duration is EXP1.

[0062] In some embodiments, selecting the target duration may include: selecting the shorter one from the third duration and the second duration as the target duration. The first candidate exposure start time and the second candidate exposure start time may have a sequence, and both are moments selected according to two different restrictions on the exposure start time. The exposure start time of the target image frame should not be earlier than the above two moments, so the larger one of the third duration and the second duration can be used as the target duration.

[0063] In some embodiments, the target time may be determined by first determining a target time range and then selecting the target time from the range. Specifically, when the second duration is less than the first duration, the advance time range is determined based on the difference between the first duration and the target duration; when the second duration is greater than or equal to the first duration, the postponed time range is determined based on the difference between the second duration and the first duration.

[0064] In one implementation scenario, when the second duration is less than the first duration, the difference between the first duration and the target duration can be used as the first upper limit value, and zero can be used as the first lower limit value, and the first upper limit value and the first lower limit value constitute the advance time range.

[0065] In an implementation scenario, when the second duration is greater than or equal to the first duration, the difference between the second duration and the first duration can be used as the second lower limit. The second upper limit can be determined based on the first exposure-related parameter and the camera sensor-related parameter. The second upper limit and the second lower limit constitute a postponement time range.

[0066] It is understandable that the exposure start time of the target image frame is also affected by the camera sensor. Specifically, the sensor has three states, namely, idle state (IDLE), protection state (FOT) and frame readout time state (FRD), and the sensor state cycles through the above three states. Among them, exposure is allowed to start in the idle state. The protection state can also be called the locked state, in which exposure is not allowed to start or end. Exposure can start in the frame readout time state. An exposure needs to include the protection state, that is, the exposure starts before a protection state starts, and the exposure ends after a protection state ends. Usually, the end time of the frame readout time of a frame of image is aligned with the end time of the protection state.

[0067] In a specific application scenario, exposure is controlled by the TEXP0 signal. When a high signal is detected, exposure starts immediately, and when a low state is detected, exposure stops. An exposure cycle is the time from the start of exposure to the stop of exposure. The TEXP0 signal is controlled by the FPGA (Field-Programmable Gate Array). Exposure can be started in the frame readout time state stage of the previous frame, or in the idle state stage of the current frame, but exposure must be terminated after the protection state stage of a frame.

[0068] When determining the postponement time range, the sensor state can also be considered. The frame readout end time of the reference image frame is aligned with the protection state end time. The duration of the protection state is a sensor-related parameter. The frame readout end time of the reference image frame can be determined based on the first exposure-related parameter, and the range of the protection state can be further determined in combination with the duration of the protection state. The exposure start time of the target image frame needs to be earlier than the protection state, so that the first exposure-related parameter and the sensor-related parameter can be used to determine the second upper limit value to ensure the rationality of the postponement time.

[0069] In one implementation scenario, the first exposure-related parameter includes the exposure duration and frame readout duration corresponding to the first configuration information. The sum of the exposure duration and frame readout duration corresponding to the first configuration information is used as the duration from the reference moment to the end moment of the protection state, and the duration of the protection state is subtracted from this to obtain the duration from the reference moment to the start moment of the protection state. The aforementioned protection state is a protection state included in the exposure process of the target image frame. The start moment of the protection state is used as a candidate exposure start moment of the target image frame, and the second upper limit value is determined based on the difference between the duration from the reference moment to the start moment of the protection state and the first duration.

[0070] In a specific application scenario, the first exposure-related parameter includes the exposure duration and frame readout duration corresponding to the first configuration information, which are respectively denoted as EXP1 and ReadoutTime. The duration of the protection state is expressed as FOT time, and the duration from the reference time to the protection state start time is EXP1+ReadoutTime-FOT time. The protection state start time is used as a candidate exposure start time of the target image frame, and the duration between it and the reference exposure start time is EXP1+ReadoutTime-FOT time-period. As the second upper limit value.

[0071] In the above scheme, the exposure start time of the target image frame is flexibly adjusted according to the exposure-related parameters corresponding to the configuration information before and after the switching, and image acquisition is adapted to different configuration information to avoid acquisition problems. If there is a switch from large exposure to small exposure, the exposure start time of the target image frame is postponed to adapt to the switching of the exposure value to avoid the problem of wrong frames and bad frames. If there is a switch from small exposure to large exposure, the exposure start time of the target image frame is advanced to adapt to the switching of the exposure value, which can shorten the cycle and improve the frame rate. The accurate selection of the postponement time and the advance time can ensure the coordination between frames, and the exposure is not performed within the unallowed range or the exposure is ended prematurely.

[0072] Please refer to Figure 3 , Figure 3 It is a schematic diagram of another embodiment of the camera control method of the present application.

[0073] In this embodiment, the camera has a sequence function. Multiple sets of configuration information are set for the camera in advance, and each set of configuration information can set different gain, exposure value or other attributes supported by the camera. After the sequence function is turned on, the camera automatically outputs images in turn according to the set multiple sets of configuration information without manual switching.

[0074] In a specific application scenario, multiple groups of configuration information are used as current configuration information in turn, and each group of configuration information is used to collect one frame of image. After the last group of configuration information is used as the current configuration information, the first group of configuration information is returned.

[0075] like Figure 3 As shown, Figure 3 Four sets of configuration information are preset for the camera. The exposure time of the first configuration information is 3000μs, the exposure time of the second configuration information is 3000μs, the exposure time of the third configuration information is 30000μs, and the exposure time of the fourth configuration information is 35μs.

[0076] See also Figure 4 , Figure 4 It is a timing diagram of an embodiment of the camera control method of the present application.

[0077] like Figure 4 As shown, EXP1 represents the exposure duration corresponding to the first configuration information, and ReadoutTime1 after EXP1 represents the frame readout duration corresponding to the first configuration information. EXP2 represents the exposure duration corresponding to the first configuration information, and ReadoutTime2 after EXP2 represents the frame readout duration corresponding to the first configuration information. It should be noted that the difference between the frame readout duration corresponding to the first configuration information and the frame readout duration corresponding to the second configuration information can be ignored in the calculation process.

[0078] The frame readout phase starts from the end of exposure and ends after the next frame protection state ends.

[0079] like Figure 4 As shown in , the exposure duration corresponding to the first configuration information is greater than the exposure duration corresponding to the second configuration information.

[0080] IDLE indicates the duration of the idle state, FOT indicates the duration of the protection state, and FRD indicates the duration of the frame read time state.

[0081] From top to bottom, the first row indicates the exposure timing of the reference image, the second row indicates the sensor state timing, and the third row indicates the exposure timing of the target image frame if the first configuration information is used to collect the exposure timing of the target image frame, wherein if the first configuration information is used to collect the exposure timing of the target image frame, the exposure start time of the target image frame at this time is used as the reference exposure start time. The fourth row indicates that if the reference exposure time is used as the exposure start time of the target image frame, the exposure timing of the target image frame is collected using the second configuration information. If the reference exposure time is used as the exposure start time of the target image frame, the exposure end position has not entered the protection state time period, which will cause an error frame, so there must be a delay to ensure that the exposure start time of the target image frame is delayed and the end time is also delayed to ensure that the exposure end time of the target image frame is after the protection state of the corresponding frame ends.

[0082] The fifth row indicates the exposure timing after delaying using an optional delay time. The red dotted line indicates the delay time. In the figure, ① indicates the exposure interval corresponding to the first configuration information, and ② indicates the exposure interval after the delay. The corresponding delay time is expressed as delay time = EXP1 + ReadoutTime - EXP2 – period.

[0083] It is understandable that due to the characteristics of the sensor, each time the large exposure is switched to the small exposure, the TEXP0 signal of the small exposure will be pulled low before the protection state of this frame ends, resulting in the end of the exposure. Therefore, it is inevitable to provide a delay time to ensure that the exposure of the second frame of small exposure ends after the protection state stage is completed.

[0084] See also Figure 5 , Figure 5 It is a timing diagram of another embodiment of the camera control method of the present application.

[0085] like Figure 5 As shown in , the exposure duration corresponding to the first configuration information is shorter than the exposure duration corresponding to the second configuration information.

[0086] From top to bottom, the first row represents the exposure timing of the reference image, the second row represents the sensor state timing, and the third row represents the exposure timing of the target image frame if the first configuration information is used to collect the exposure timing of the target image frame, wherein if the first configuration information is used to collect the exposure timing of the target image frame, the exposure start time of the target image frame at this time is used as the reference exposure start time. The fourth row represents if the reference exposure time is used as the exposure timing of the target image frame collected using the second configuration information. The fifth row represents the exposure timing after an optional advance time is used. Among them, the dotted line part represents the advance time.

[0087] In the figure, ① represents the exposure interval corresponding to the first configuration information, and ② represents the exposure interval after being advanced.

[0088] Figure 5 The second duration is used as the target duration in the timing diagram shown. The corresponding advance time is expressed as aheadtime=period-(EXP1+ReadoutTime-EXP2).

[0089] The solution of advancing the exposure of the target image frame as a whole needs to ensure that the exposure end time of the target image frame is after the protection state ends.

[0090] See also Figure 6 , Figure 6 It is a timing diagram of another embodiment of the camera control method of the present application.

[0091] like Figure 6 As shown in , the exposure duration corresponding to the first configuration information is shorter than the exposure duration corresponding to the second configuration information.

[0092] From top to bottom, the first row represents the exposure timing of the reference image, the second row represents the sensor state timing, and the third row represents the exposure timing of the target image frame if the first configuration information is used to collect the exposure timing of the target image frame, wherein if the first configuration information is used to collect the exposure timing of the target image frame, the exposure start time of the target image frame at this time is used as the reference exposure start time. The fourth row represents if the reference exposure time is used as the exposure timing of the target image frame collected using the second configuration information. The fifth row represents the exposure timing after an optional advance time is used. Among them, the dotted line part represents the advance time.

[0093] In the figure, ① represents the exposure interval corresponding to the first configuration information, and ② represents the exposure interval after being advanced. Advancing the exposure of the target image frame can shorten the cycle and increase the frame rate.

[0094] In addition, when adopting the solution of advancing the exposure of the target image frame as a whole, it is necessary to consider the exposure start time of the target image frame. It cannot overlap with the exposure of the previous frame, nor can it be during the protection state stage of the previous frame. It needs to be after the protection state stage of the previous frame ends. Figure 6 The timing diagram shown uses the third duration as the target duration. The corresponding advance time is expressed as ahead time = period - EXP1.

[0095] Figure 5 and Figure 6 They represent two constraints on the lead time. The actual lead time needs to meet these two constraints.

[0096] In a specific application scenario, multiple sets of configuration information may be determined by a host computer based on an object instruction, and the camera and the host computer can communicate with each other and obtain multiple sets of configuration information from the host computer to execute the camera control method.

[0097] In some embodiments, the camera control method provided in the present application can be executed by an industrial camera.

[0098] In a specific application scenario, the target time can be calculated by the following formula: delay time = EXP1 + ReadoutTime - EXP2 – period. Determine whether the calculation result is less than zero. If the calculation result is less than zero, determine whether the calculation result is less than EXP1 – period. If the calculation result is less than EXP1 – period, the advance time is period – EXP1. If the calculation result is greater than or equal to EXP1 – period, the delay time is the negative value of the calculation result. If the calculation result is greater than or equal to zero, the delay time is the calculation result.

[0099] In some embodiments, after determining multiple groups of configuration information, the target time for switching between every two groups of configuration information is obtained, and the advance time can be determined according to the postponement time.

[0100] The above scheme advances the exposure of the next frame by setting the advance time, shortens the cycle and improves the frame rate.

[0101] See also Figure 7 , Figure 7 It is a schematic diagram of the framework of a camera embodiment of the present application.

[0102] In this embodiment, the camera 70 includes a memory 71 and a processor 72 coupled to each other, and the processor 72 is used to execute program instructions stored in the memory 71 to implement any of the above-mentioned camera control methods.

[0103] Specifically, the processor 72 is used to control itself and the memory 71 to implement any of the above-mentioned camera control methods. The processor 72 may also be referred to as a CPU (Central Processing Unit). The processor 72 may be an integrated circuit chip having signal processing capabilities. The processor 72 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. In addition, the processor 72 may be implemented by an integrated circuit chip.

[0104] See also Figure 8 , Figure 8 A schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application.

[0105] In this embodiment, the computer-readable storage medium 80 stores program instructions 81 that can be executed by a processor, and the program instructions 81 are used to implement any of the above-mentioned camera control methods.

[0106] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0107] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0108] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0109] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0110] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

Claims

1. A camera control method, characterized in that: The method comprises: Acquire first configuration information and second configuration information; wherein the first configuration information is the configuration information used by the camera before acquiring the target image frame, and the second configuration information is the configuration information used by the camera when acquiring the target image frame; determining a target time based on a first exposure-related parameter corresponding to the first configuration information and a second exposure-related parameter corresponding to the second configuration information; Based on the target time and the reference exposure start time of the target image frame, an exposure start time of the target image frame is determined.

2. The method according to claim 1, characterized in that The determining the target time based on the first exposure-related parameter corresponding to the first configuration information and the second exposure-related parameter corresponding to the second configuration information includes: Determine a first duration based on the first exposure-related parameter, and determine a second duration based on the first exposure-related parameter and the second exposure-related parameter; wherein the first duration is the duration from a reference moment to the reference exposure start moment, and the second duration is the duration from the reference moment to a first candidate exposure start moment corresponding to the target image frame, the reference moment is determined based on the exposure start moment of a reference image frame, and the reference image frame is a frame previous to the target image frame; The target time is determined based on the first duration and the second duration.

3. The method according to claim 2, characterized in that The target time is an advance time or a postpone time, and determining the target time based on the first duration and the second duration includes: In response to the second duration being less than the first duration, determining a third duration based on the first exposure-related parameter, selecting a target duration from the third duration and the second duration, and determining the advance time based on a difference between the first duration and the target duration; wherein the third duration is a duration from the reference moment to a second candidate exposure start moment corresponding to the target image frame; In response to the second duration being greater than or equal to the first duration, the postponement time is determined based on a difference between the second duration and the first duration.

4. The method according to claim 3, characterized in that The first exposure-related parameter includes an exposure duration corresponding to the first configuration information; and determining the third duration based on the first exposure-related parameter includes: Using the exposure duration corresponding to the first configuration information as the third duration; The selecting a target duration from the third duration and the second duration comprises: A larger one is selected from the third duration and the second duration as the target duration.

5. The method according to claim 3, characterized in that: The determining the advance time based on the difference between the first duration and the target duration comprises: The difference between the first duration and the target duration is used as the advance time; or, the difference between the first duration and the target duration minus a first preset duration is used to obtain the advance time, or, based on the difference between the first duration and the target duration, an advance time range is determined, and the advance time is selected within the advance time range; Determining the postponement time based on the difference between the second duration and the first duration includes: The difference between the second duration and the first duration is used as the postponement time; or, the sum of the difference between the second duration and the first duration and a second preset duration is used as the postponement time; or, a postponement time range is determined based on the difference between the second duration and the first duration, and the advance time is selected within the postponement time range.

6. The method according to claim 5, characterized in that The determining of the advance time range based on the difference between the first duration and the target duration comprises: The difference between the target duration and the first duration is used as a first upper limit value, and zero is used as a first lower limit value, wherein the first upper limit value and the first lower limit value constitute the advance time range; and / or, The determining of the postponement time range based on the difference between the second duration and the first duration includes: The difference between the second duration and the first duration is taken as a second lower limit value, and a second upper limit value is determined based on the first exposure-related parameters and sensor-related parameters. The second upper limit value and the second lower limit value constitute the postponement time range.

7. The method according to claim 2, characterized in that The first exposure-related parameter includes an exposure duration and a frame readout duration corresponding to the first configuration information, the second exposure-related parameter includes an exposure duration corresponding to the second configuration information, and determining the second duration based on the first exposure-related parameter and the second exposure-related parameter includes: The sum of the exposure duration and the frame readout duration corresponding to the first configuration information is used as a fourth duration; the fourth duration is the duration from the reference time to the exposure end time corresponding to the first candidate exposure start time; The difference between the fourth duration and the exposure duration corresponding to the second configuration information is used as the second duration.

8. The method according to claim 2, characterized in that: The first exposure-related parameter includes an exposure interval corresponding to the first configuration information, and determining the first duration based on the first exposure-related parameter includes: The exposure interval corresponding to the first configuration information is used as the first duration.

9. A camera, characterized in that: The invention comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the camera control method according to any one of claims 1 to 8.

10. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the camera control method according to any one of claims 1 to 8 is implemented.