A stroboscopic control method, device, system and computer equipment
By combining the frequency multiplication of the external clock signal with the configuration information and the counting of the reference clock signal, precise strobe control of the controlled device is achieved, solving the technical problem that the exposure time of the image acquisition device and the light emission system cannot be controlled in the prior art, and realizing the control method of the image acquisition device and the light emission system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-01
- Publication Date
- 2026-03-24
AI Technical Summary
Existing strobe control devices cannot meet the application scenarios with higher requirements for image acquisition accuracy, resulting in the inability to precisely control the exposure time of the image acquisition device and the light emission system as needed.
By multiplying the external clock signal, a reference clock signal that matches the target clock frequency is obtained. The type and duration of the output signal are determined by the configuration information and the count value of the reference clock signal, so as to achieve precise strobe control of the controlled device.
It achieves precise exposure control of the image acquisition device and the light emission system in application scenarios with higher precision requirements, thus meeting the high precision requirements for image acquisition.
Smart Images

Figure CN116761314B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine vision technology, and in particular to a flicker control method, apparatus, system and computer equipment. Background Technology
[0002] With the development of industrial automation, industrial machine vision technology, as an intrinsic driver of industrial automation, has also developed rapidly. Industrial machine vision systems, which apply industrial machine vision technology, automate factory processes by collecting large amounts of data and making intelligent responses based on that data.
[0003] Industrial machine vision systems typically include an optical unit, an electronic control unit, an image processing unit, and a mechanical structure unit. The optical unit acquires images, the image processing unit processes and analyzes the acquired images, and the electronic control unit controls the mechanical structure unit to perform corresponding operations based on the analysis results from the image processing unit. For example, the optical unit... Figure 1 As shown, the device includes a light-emitting system that provides specific illumination, an image acquisition device (e.g., a monochrome camera) for photographing objects, and a strobe control device. The strobe control device controls the exposure time of the image acquisition device when taking an image by outputting a pulse signal of preset width, and controls the light-emitting system to emit light with a specific on / off frequency, which is used to provide illumination for the image acquisition device during the shooting process.
[0004] Currently, the pulse signals generated by stroboscopic control devices have a relatively large width. Therefore, when controlling image acquisition devices or light emission systems using stroboscopic control devices, the control can only be applied to these devices with a relatively large period. For example, the minimum period corresponding to the width of the pulse signal generated by the current stroboscopic control device is 1µs. When using this stroboscopic control device, the image acquisition device can only expose once every 1µs at most, and the light emission system can only emit light once every 1µs at most. This cannot meet the application scenarios with higher requirements for image acquisition accuracy. Summary of the Invention
[0005] This application provides a flicker control method, apparatus, system, and computer device that can meet the application scenarios with higher requirements for image acquisition accuracy.
[0006] Firstly, a flicker control method is provided, including:
[0007] Based on the target clock frequency corresponding to the target scenario, the external clock signal is multiplied to obtain a reference clock signal that conforms to the target clock frequency.
[0008] Obtain at least one piece of configuration information. The configuration information is used to indicate the correspondence between each first duration and the type of the corresponding output signal after the trigger signal is received. The types of output signals include high level and low level. The output signals are used to perform strobe control on the device to be controlled.
[0009] If a preset type of change is detected in the trigger signal, the output signal is determined based on the count value obtained by counting the reference clock signal, the target clock frequency, and the configuration information.
[0010] Send an output signal to the device to be controlled corresponding to the configuration information.
[0011] In a feasible design, the pulse width of the output signal is N times the pulse width of the reference clock signal, where N is an integer greater than or equal to 1.
[0012] In one feasible design, the method is applied to a programmable logic device, which includes registers and, before acquiring at least one piece of configuration information, also includes:
[0013] Receive the first instruction information, at least one piece of configuration information to be stored, and the register address corresponding to each piece of configuration information;
[0014] If the first indication information indicates that the configuration information should be updated, each configuration information should be stored in the register according to the register address corresponding to each configuration information.
[0015] Retrieve at least one piece of configuration information, including:
[0016] Based on the device to be controlled, at least one piece of configuration information is obtained from the register.
[0017] In one feasible design, if a preset type of change in the trigger signal is detected, the output signal is determined based on the count value obtained by counting the reference clock signal, the target clock frequency, and configuration information, including:
[0018] If a preset type of change in the trigger signal is detected and the storage of configuration information is completed, the output signal is determined based on the count value obtained by counting the reference clock signal, the target clock frequency, and the configuration information.
[0019] In one feasible design, the output signal is determined based on the count value obtained by counting the reference clock signal, the target clock frequency, and configuration information, including:
[0020] The second duration when a preset type of change occurs in the trigger signal is determined by using the count value obtained from counting the reference clock signal and the target clock frequency;
[0021] If the second duration matches the first duration indicated by the configuration information, the output signal is determined according to the type of output signal corresponding to the first duration.
[0022] In one feasible design, the configuration information is also used to indicate a third duration for which the transmission of the output signal will cease. After the output signal is transmitted, the method further includes:
[0023] If the second duration matches the third duration for stopping the output signal, then stop sending the output signal.
[0024] In a feasible design, the trigger signal undergoes a preset type of change, either by changing from a low level to a high level or by changing from a high level to a low level.
[0025] Secondly, a strobe control device is provided, comprising:
[0026] The frequency multiplier module is used to multiply the external clock signal according to the target clock frequency corresponding to the target scene to obtain a reference clock signal that conforms to the target clock frequency;
[0027] The data storage module is used to acquire at least one piece of configuration information. The configuration information is used to indicate the correspondence between each first duration and the type of the corresponding output signal after the trigger signal is received. The types of output signals include high level and low level. The output signals are used to perform strobe control on the controlled device.
[0028] If a preset type of change is detected in the trigger signal, the signal output module determines the output signal based on the count value obtained by counting the reference clock signal, the target clock frequency, and the configuration information.
[0029] The signal output module is also used to send output signals to the device to be controlled corresponding to the configuration information.
[0030] Thirdly, a computer device is provided, which includes a memory and a processor. The memory stores computer-executable instructions, and when the processor executes the computer-executable instructions in the memory, it can implement the method of any of the above-described embodiments of the strobe control method.
[0031] Fourthly, a strobe control system is provided, including a host computer and a strobe control device:
[0032] The host computer is used to send at least one configuration message to the strobe control device;
[0033] The strobe control device is used to perform the method as described in any of the examples in the above-described strobe control method embodiments.
[0034] Currently, microcontroller units (MCUs) are typically used to control the light-emitting system to emit light at specific on / off frequencies and to control the exposure time of the image acquisition device when capturing images by outputting pulse signals of preset widths. However, the pulse signal width generated by the MCU corresponds to a minimum period of 1µs. When using an MCU, the image acquisition device can only expose once every 1µs at most, and the light-emitting system can only emit light once every 1µs at most, which cannot meet the application scenarios with higher requirements for image acquisition accuracy. In this embodiment, a reference clock signal corresponding to the target clock frequency that meets the requirements of the target scenario is obtained by frequency multiplication of the external clock signal. Since the reference clock signal meets the requirements of the target scenario, and the configuration information is used to indicate the correspondence between each first duration and the type of the corresponding output signal after receiving the trigger signal. Next, by counting the number of levels of the reference clock signal and obtaining the count value and the target clock frequency, the duration starting from the time when the trigger signal changes to a preset type can be accurately calculated. If at least one configuration information contains a first duration that matches the calculated duration, the output signal can be determined based on the first duration that matches the calculated duration and the type of output signal corresponding to that first duration indicated in the corresponding configuration information. Therefore, provided that the target clock frequency meets the requirements of the target application scenario, the pulse width of the determined output signal between the end times of the two durations can meet the requirements of the target scenario. Attached Figure Description
[0035] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a schematic diagram of an industrial machine vision system provided in an exemplary embodiment of this application;
[0037] Figure 2 This is a schematic diagram of an exemplary strobe control system provided in an exemplary embodiment of this application;
[0038] Figure 3 This is a flowchart illustrating an exemplary flicker control method provided in an exemplary embodiment of this application;
[0039] Figure 4 This is a schematic diagram illustrating the correspondence between the output signal types and the first duration for different controlled devices provided in an exemplary embodiment of this application;
[0040] Figure 5This is a schematic diagram showing the correspondence between four scenarios provided in an exemplary embodiment of this application and four light source output signals and four control camera output signals, respectively.
[0041] Figure 6 This is a schematic diagram of a data structure for storing configuration information provided in an exemplary embodiment of this application;
[0042] Figure 7 This is a schematic diagram of an example pulse signal provided in an exemplary embodiment of this application;
[0043] Figure 8 This is a schematic diagram of an exemplary strobe control device provided in an exemplary embodiment of this application;
[0044] Figure 9 This is a schematic flowchart illustrating the working mechanism of a data storage module provided in an exemplary embodiment of this application;
[0045] Figure 10 This is a schematic flowchart illustrating the working mechanism of a trigger processing module provided in an exemplary embodiment of this application;
[0046] Figure 11 This is a schematic flowchart illustrating the working mechanism of a signal output module provided in an exemplary embodiment of this application;
[0047] Figure 12 This is a schematic diagram of an example computer device provided in an exemplary embodiment of this application. Detailed Implementation
[0048] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.
[0049] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0050] This application provides a flicker control method, apparatus, system, and computer device, wherein the method is applied to a flicker control apparatus. For example... Figure 2 As shown, the strobe control device is communicatively connected to both the host computer and the device under control. After receiving configuration information from the host computer, the strobe control device configures the output signal according to the configuration information, and then sends the output signal to the device under control to realize strobe control of the device under control.
[0051] In one feasible design, the strobe control device communicates with a host computer via a microcontroller unit (MCU). For example, in this design, the MCU and the host computer can communicate via a serial port or Ethernet.
[0052] Figure 3 This is a schematic flowchart illustrating an exemplary flicker control method provided in an exemplary embodiment of this application. Figure 3 As shown, the flicker control method provided in this application includes the following steps:
[0053] S110 performs frequency multiplication on the external clock signal according to the target clock frequency corresponding to the target scene to obtain a reference clock signal that conforms to the target clock frequency.
[0054] In one feasible design, the external clock signal is an externally input crystal oscillator signal.
[0055] For example, if the target scenario requires a pulse width of 0.1µs, and one cycle of the reference clock signal includes a high-level pulse, the target clock frequency of the reference clock signal needs to reach 10^7 Hz.
[0056] S120, obtain at least one piece of configuration information. The configuration information is used to indicate the correspondence between each first duration and the type of the corresponding output signal after the trigger signal is received. The type of output signal includes high level and low level. The output signal is used to perform strobe control on the device to be controlled.
[0057] For example, the first duration is the duration for which timing begins at the rising or falling edge of the trigger signal.
[0058] Figure 4 This is a schematic diagram illustrating the correspondence between the output signal types and the first duration for different controlled devices provided in the embodiments of this application, such as... Figure 4 As shown, taking the output of light source signal b to the device to be controlled as an example, the configuration information is explained. The configuration information includes the first duration and the corresponding output signal type:
[0059] The start time of the trigger signal tb0: the first duration (i.e., Time) = 0; the output signal type: low level (i.e., PowerLevel = 0).
[0060] First critical point time tb1: Time = tb1 - tb0; Output signal type: high level (i.e., Power Level = 1).
[0061] Second critical moment tb2: Time = tb2 - tb0; Power Level = 0.
[0062] Third critical moment tb3: Time = tb3 - tb0; Power Level = 1.
[0063] Fourth critical moment tb4: Time = tb4 - tb0; Power Level = 0.
[0064] Fifth critical moment tb5: Time = tb5 - tb0; Power Level = 1.
[0065] Sixth critical moment tb6: Time = tb6 - tb0; Power Level = 0.
[0066] Seventh critical moment tb7: Time = tb7 - tb0; Power Level = 1.
[0067] Eighth critical moment tb8: Time = tb8 - tb0; Power Level = 0.
[0068] Ninth critical moment tb9: Time = tb9 - tb0; Power Level = 0.
[0069] The start time is the time corresponding to the rising edge of the trigger signal. Each key point time is the start time when the type of the output signal changes.
[0070] For example, if the device to be controlled is a light source and the trigger signal is of a high level, the trigger signal can be used to control the light source to light up; if the device to be controlled is a light source and the trigger signal is of a high level, the trigger signal can be used to control the camera exposure.
[0071] In one feasible design, the configuration information is also used to indicate the correspondence between each first duration and the corresponding output signal type after receiving a trigger signal, under each scenario. In each scenario, the controlled device operates in the corresponding working mode. For example, in a scenario where the light source needs to be on for 0.5µs and then off for 0.3µs, and the trigger signal is high-level, then the trigger signal can be used to control the light source to be on. In this scenario, the configuration information can indicate that the output signal includes a 0.5µs high-level signal and a 0.3µs low-level signal.
[0072] Because the inspected products are becoming increasingly complex, multiple exposure times are often required for a single process step. The duration for which the light source remains on for each exposure time also needs to be configured separately. Therefore, after receiving a trigger signal, multiple exposure times under different scenarios need to be completed. In the example above, multiple operating scenarios for the controlled device can be configured through a single configuration message, enabling the controlled device to expose and photograph the inspected product in different operating modes within a single process step.
[0073] Figure 5 This is a schematic diagram illustrating the correspondence between four scenarios provided in an exemplary embodiment of this application and four light source output signals and four control camera output signals, as shown below. Figure 5 As shown, in scenario 1, the light source signal b is high between times tb1 and tb2, and low between times tb2 and tb3. For the correspondence between other scenarios and output signals or camera control output signals, please refer to [link to relevant documentation]. Figure 5 This will not be elaborated further. In general, when the strobe control device receives the trigger signal, the light source signal (a,b,c,d) and the control camera signal (A,B,C,D) switch sequentially according to Scene 1->Scene 2->Scene 3->Scene 4. After the exposure and photography of Scene 4 is completed, the strobe control device and the controlled equipment enter the waiting stage, waiting for the next trigger signal to trigger the switching of Scene 1->Scene 2->Scene 3->Scene 4. This enables the controlled equipment to expose and photograph the inspected product in different working modes in one process.
[0074] In one feasible design, based on the content of the above configuration information, this application provides a method for determining at least one piece of configuration information, including:
[0075] First, determine the scenario type indicated by the configuration information, and then determine the corresponding configuration information based on the scenario type of the device to be controlled.
[0076] The configuration information determined using the above method can be used to configure various working scenarios for the device to be controlled, so that the device to be controlled can expose and photograph the inspected product in different working modes in one process.
[0077] In a feasible design, the above-described flicker control method is applied to a programmable logic device, which includes registers. This application provides a method for storing configuration information in the registers. Before obtaining at least one piece of configuration information, this method includes:
[0078] Receive the first instruction information, at least one piece of configuration information to be stored, and the register address corresponding to each piece of configuration information;
[0079] If the first indication information indicates that the configuration information should be updated, each configuration information is stored in the register according to the register address corresponding to each configuration information.
[0080] Accordingly, the host computer first sends at least one configuration piece of information to be stored, along with the register address corresponding to each configuration piece of information, to the strobe control device. After a preset time interval, it sends a first indication message to the strobe control device.
[0081] For example, such as Figure 6 As shown, the configuration information stored in the register is represented by 32 bits, where the first bit represents the level type in the configuration information, and the second to 32nd bits represent the first duration in the configuration information.
[0082] In programmable logic devices, information is represented by the sequence of high and low levels of pulse signals. For example... Figure 7 As shown, in practice, when a pulse signal undergoes a level change, a transition time is required to achieve a transition from low to high or from high to low (it should be noted that, ideally, such as...). Figure 4 or Figure 5As shown, the transition time is 0, where a level less than or equal to 0.3V is considered low and a level greater than or equal to 0.7V is considered high. If the information represented by the pulse signal is stored during the transition time before the pulse signal completes its level change process, the stored information may be inaccurate. To avoid this problem, this application enables the host computer to send at least one piece of configuration information to be stored to the strobe control device, and after a preset time interval, sends a first indication message to the strobe control device to trigger it to store the configuration information based on the identified pulse signal. After receiving the complete pulse signal representing the configuration information, i.e., after the last level change of the pulse signal has been completed, the strobe control device receives the first indication message after a preset time. The strobe control device can identify the complete pulse signal based on the first indication message, thereby accurately storing the configuration information.
[0083] Based on the above embodiments of storing configuration information, the methods for obtaining at least one piece of configuration information include:
[0084] Based on the device to be controlled, at least one piece of configuration information is obtained from the register.
[0085] In one example, the number of configuration information entries is determined based on the number of devices to be controlled and the number of working modes of each device in a process.
[0086] like Figure 5 As shown, each controlled device operates in 4 modes per process step, requiring 4 scenario switching operations. Each of these four scenarios corresponds to 9 configuration information entries (each entry includes the start time or level change time, duration, and level of the trigger signal). With 8 controlled devices, the total number of configuration information entries is 8 * 9 = 72. Correspondingly, each configuration information entry corresponds to one register address; therefore, 72 register addresses are required.
[0087] S130: If a preset type of change in the trigger signal is detected, the output signal is determined based on the count value obtained by counting the reference clock signal, the target clock frequency, and the configuration information.
[0088] In the above example, by counting the number of levels of the reference clock signal and obtaining the count value and the target clock frequency, the duration of the time from the start of the trigger signal changing to a preset type can be accurately counted. If at least one configuration information has a first duration that matches the counted duration, the output signal can be determined based on the first duration that matches the counted duration and the type of output signal corresponding to the first duration indicated in the corresponding configuration information.
[0089] For example, before determining the output signal based on the duration determined by counting the reference clock signal and the target clock frequency, and configuration information, if a preset type of change in the trigger signal is detected, the method further includes:
[0090] Receive the trigger signal sent by the host computer.
[0091] In one feasible design, the trigger signal undergoes a preset type of change, which is either a change from a low level to a high level or a change from a high level to a low level. This application does not limit the preset type of change; it can be set as needed.
[0092] In one feasible design, if a preset type of change in the trigger signal is detected, the output signal is determined based on the count value obtained by counting the reference clock signal, the target clock frequency, and configuration information, including:
[0093] If a preset type of change in the trigger signal is detected and the storage of configuration information is completed, the output signal is determined based on the count value obtained by counting the reference clock signal, the target clock frequency, and the configuration information.
[0094] To ensure the accuracy of the acquired configuration information, the configuration information is retrieved from the register only after a preset type of change in the trigger signal is detected and the configuration information has been stored. This allows for the accurate determination of the output signal based on the duration determined by counting the reference clock signal and the target clock frequency, along with the configuration information.
[0095] In one feasible design, the output signal is determined based on the count value obtained by counting the reference clock signal, the target clock frequency, and configuration information, including:
[0096] The second duration when a preset type of change occurs in the trigger signal is determined by using the count value obtained from counting the reference clock signal and the target clock frequency;
[0097] If the second duration matches the first duration indicated by the configuration information, the output signal is determined according to the type of output signal corresponding to the first duration.
[0098] In the example above, by counting the reference clock signal to obtain the count value and the target clock frequency, the second duration can be accurately calculated starting from the moment when the trigger signal undergoes a preset type of change. This facilitates the determination of the output signal based on the second duration and configuration information.
[0099] In one feasible design, if the second duration matches the first duration indicated by the configuration information, the output signal is determined based on the type of output signal corresponding to the first duration, including:
[0100] If the host computer determines the order in which to send each configuration message based on the scenario sequence, then each configuration message is stored according to the order in which it is received. Within one cycle of the output signal (e.g.) Figure 4 Within the first cycle shown, each configuration piece of information is traversed according to its storage order. During the traversal of each configuration piece of information:
[0101] Determine whether the current second duration matches the first duration indicated by the current configuration information;
[0102] If the current second duration does not match the first duration indicated by the current configuration information, the second duration will continue to be counted until the second duration matches the first duration indicated by the current configuration information.
[0103] If the current second duration matches the first duration indicated by the current configuration information, determine the output signal according to the type of output signal corresponding to the first duration, and then continue to count the second duration and traverse the next configuration information;
[0104] In the example above, each configuration piece of information is traversed according to its storage order. During this traversal, if the second duration matches the first duration, it means the type of the output signal needs to change, and the output signal should be determined based on the current configuration piece of information. Since the order of the scenarios corresponds to the first duration indicated by each configuration piece of information (i.e., earlier scenarios have shorter first durations, and later scenarios have longer first durations), the storage order of the configuration information determined by the scenario order also corresponds to the first duration indicated by the configuration information, and the second duration continuously increases. Therefore, after determining the output signal based on the current configuration piece of information, the next configuration piece of information can be traversed directly without needing to match the second duration with configuration pieces stored before the current one, thus improving the matching efficiency between the second and first durations.
[0105] S140 sends an output signal to the device to be controlled corresponding to the configuration information.
[0106] In a feasible design, the pulse width of the output signal is N times the pulse width of the reference clock signal, where N is an integer greater than or equal to 1.
[0107] Since the reference clock signal conforms to the target clock frequency, its pulse width meets the requirements of the target scenario. Because the output signal's pulse width is N times that of the reference clock signal, its pulse width accuracy meets the requirements of the target scenario.
[0108] In one feasible design, the configuration information is also used to indicate a third duration for which the transmission of the output signal will cease. After the output signal is transmitted, the method further includes:
[0109] If the second duration matches the third duration for stopping the output signal, then stop sending the output signal.
[0110] In the example above, by monitoring the second duration in real time to see if it matches the third duration, the system can promptly stop sending output signals when the second duration matches the third duration.
[0111] Currently, microcontroller units (MCUs) are typically used to control the light-emitting system to emit light at specific on / off frequencies and to control the exposure time of the image acquisition device when capturing images by outputting pulse signals of preset widths. However, the pulse signal width generated by the MCU corresponds to a minimum period of 1µs. When using an MCU, the image acquisition device can only expose once every 1µs at most, and the light-emitting system can only emit light once every 1µs at most, which cannot meet the application scenarios with higher requirements for image acquisition accuracy. In this embodiment, a reference clock signal corresponding to the target clock frequency that meets the requirements of the target scenario is obtained by frequency multiplication of the external clock signal. Since the reference clock signal meets the requirements of the target scenario, and the configuration information is used to indicate the correspondence between each first duration and the type of the corresponding output signal after receiving the trigger signal. Next, by counting the number of levels of the reference clock signal and obtaining the count value and the target clock frequency, the duration starting from the time when the trigger signal changes to a preset type can be accurately calculated. If at least one configuration information contains a first duration that matches the calculated duration, the output signal can be determined based on the first duration that matches the calculated duration and the type of output signal corresponding to that first duration indicated in the corresponding configuration information. Therefore, provided that the target clock frequency meets the requirements of the target application scenario, the pulse width of the determined output signal between the end times of the two durations can meet the requirements of the target scenario.
[0112] In conjunction with the above-described embodiments of the flicker control method, such as Figure 8 As shown, this application also provides a strobe control device, comprising:
[0113] The frequency multiplier module is used to multiply the external clock signal according to the target clock frequency corresponding to the target scene to obtain a reference clock signal that conforms to the target clock frequency;
[0114] The data storage module is used to acquire at least one piece of configuration information. The configuration information is used to indicate the correspondence between each first duration and the type of the corresponding output signal after the trigger signal is received. The types of output signals include high level and low level. The output signals are used to perform strobe control on the controlled device.
[0115] If a preset type of change is detected in the trigger signal, the signal output module determines the output signal based on the count value obtained by counting the reference clock signal, the target clock frequency, and the configuration information.
[0116] The signal output module is also used to send output signals to the device to be controlled corresponding to the configuration information.
[0117] In one feasible design, the frequency multiplier module is used to multiply the externally input external clock signal to the maximum clock frequency available to the stroboscopic control device, which serves as the reference clock signal (clk) for other modules of the stroboscopic control device. This maximum clock frequency is greater than or equal to the target clock frequency, so that the output signal determined according to the reference clock signal and configuration information can meet the requirements for capturing high-precision images of the target scene.
[0118] In a feasible design, the flicker control device is a programmable logic device, such as a field programmable gate array (FPGA).
[0119] In a feasible design, the pulse width of the output signal is N times the pulse width of the reference clock signal, where N is an integer greater than or equal to 1.
[0120] In one feasible design, the trigger signal undergoes a preset type of change, which is either a change from a low level to a high level or a change from a high level to a low level. This application does not limit the preset type of change; it can be set as needed.
[0121] In a feasible design, the data storage module can store configuration information through registers in the following ways:
[0122] The data storage module receives the first instruction information, at least one piece of configuration information to be stored, and the register address corresponding to each piece of configuration information;
[0123] If the first indication information indicates that the configuration information should be updated, the data storage module stores each piece of configuration information in the register according to the register address corresponding to each piece of configuration information, so that the signal output module can obtain at least one piece of configuration information from the register based on the device to be controlled in this controllable situation.
[0124] For example, the implementation of the data storage module receiving the first instruction information, at least one piece of configuration information to be stored, and the register address corresponding to each piece of configuration information includes:
[0125] The data storage module receives a first configuration signal from the MCU and determines a first indication message based on the first configuration signal. If the first configuration signal is set, the first indication message indicates that the configuration information should be updated. If the first configuration signal is cleared, the first indication message indicates that the configuration information should be stopped.
[0126] The data storage module receives a second configuration signal from the MCU and determines, based on the second configuration signal, at least one piece of configuration information to be stored and the register address corresponding to each piece of configuration information.
[0127] The following example illustrates the working mechanism of the data storage module, where the flicker control device also includes a trigger processing module. For example... Figure 9 As shown, the data storage module stores configuration information through changes between states S0, S1, and S2:
[0128] In state S0, the data storage module is in the power-on initial state. The data storage module receives and determines whether the first configuration signal is set. If the first configuration signal is set, it enters state S1; otherwise, it remains in state S0.
[0129] In state S1, the data storage module stores each configuration information in the register according to the register address corresponding to each configuration information, and sets the third configuration signal (setting the third configuration signal indicates that configuration information is being stored), and sends the third configuration signal to the trigger processing module. The data storage module receives and determines whether the first configuration signal has been cleared. If the first configuration signal has been cleared, it enters state S2; otherwise, it remains in state S1.
[0130] In state S2, after the data storage module clears the third configuration signal (clearing the third configuration signal indicates that the configuration information storage is finished), it sends the third configuration signal to the trigger processing module and enters state S0.
[0131] In the example above, during the process of storing configuration information, the data storage module sends a third configuration signal to the trigger processing module so that after the configuration information is stored, the trigger processing module can enable the signal output module to determine and send the output signal based on the complete configuration information.
[0132] In one feasible design, if a preset type of change in the trigger signal is detected, the signal output module determines the output signal based on the count value obtained by counting the reference clock signal, the target clock frequency, and configuration information, including:
[0133] If the trigger processing module detects a change in the trigger signal of a preset type and the storage of configuration information is completed, the signal output module determines the output signal based on the count value obtained by counting the reference clock signal, the target clock frequency, and the configuration information.
[0134] For example, the trigger processing module receives a trigger signal from the MCU.
[0135] In one feasible design, the configuration information is also used to indicate a third duration for stopping the transmission of the output signal. After the output signal is transmitted, the trigger processing module is used to enable the signal output module to stop transmitting the output signal if the second duration matches the third duration for stopping the transmission of the output signal.
[0136] The following example illustrates the working mechanism of the triggering processing module. For example... Figure 10 As shown, the trigger processing module determines the output signal by using the changes between states S3, S4, and S5.
[0137] In state S3, the trigger processing module is in the power-on initial state. The trigger processing module receives and determines whether the trigger signal has undergone a preset type of change. If the trigger signal has undergone a preset type of change and the third configuration signal is in a cleared state, it enters state S4; otherwise, it remains in state S3.
[0138] In state S4, the trigger processing module sets the enable signal and then sends the enable signal to the signal output module. If the second duration matches the third duration of stopping the transmission of the output signal, the process proceeds to state S5; otherwise, it remains in state S4.
[0139] In state S5, after the trigger processing module clears the enable signal, it sends the enable signal to the signal output module. Then it enters state S3.
[0140] In the example above, the trigger processing module sends an enable signal to the signal output module after the configuration information storage is completed by the third configuration signal, so that the signal output module can determine and send the output signal based on the complete configuration information.
[0141] In one feasible design, the signal output module is used to determine the output signal based on the count value obtained by counting the reference clock signal, the target clock frequency, and configuration information, including:
[0142] The signal output module is used to determine the second duration when a preset type of change occurs in the trigger signal by using the count value obtained from counting the reference clock signal and the target clock frequency;
[0143] If the second duration matches the first duration indicated by the configuration information, the output signal is determined according to the type of output signal corresponding to the first duration.
[0144] The following example illustrates the working mechanism of the signal output module. For example... Figure 11 As shown, the signal output module determines the output signal by changing between states S6, S7, and S8, and then sends the output signal to the device under control.
[0145] In state S6, the signal output module is in the power-on initial state. The signal output module receives and determines whether the enable signal is set. If the enable signal is set, it enters state S7; otherwise, it remains in state S6.
[0146] In state S7, the signal output module records the number of high-level signals of the received reference clock signals using a level counter. The initial value of the level counter is 0, and the signal output module increments the level counter by 1 each time it receives a high-level reference clock signal. Based on the level counter value and the target clock frequency, the signal output module determines the second duration. It then retrieves configuration information from the data storage module and determines whether the second duration matches the first duration indicated by the configuration information. If they match, the output signal level is adjusted according to the type of output signal corresponding to the first duration, and the output signal is sent to the corresponding controlled device. If the second duration matches the third duration, or the enable signal is cleared, the module enters state S8; otherwise, it remains in state S7.
[0147] In state S8, the output signal is stopped and the level count value is initialized to 0 so that the reference clock signal can be recounted using the initialized level count value in the next cycle.
[0148] In the example above, after receiving the enable signal sent by the trigger processing module after the configuration information storage is completed, the signal output module can obtain the complete configuration information and accurately determine the output signal.
[0149] In a feasible design, the number of signal output modules is the same as the number of devices to be controlled. That is, one signal output module is communicatively connected to one device to be controlled, so that the signal output module can quickly send output signals to the device to be controlled.
[0150] Other implementation methods and effects of the above-mentioned strobe control device can be found in the description of the strobe control method, and will not be repeated here.
[0151] like Figure 12As shown, this application provides a computer device, which includes a memory and a processor. The memory stores computer-executable instructions, and when the processor executes the computer-executable instructions in the memory, it can implement the method in any of the above-described embodiments of the strobe control method.
[0152] like Figure 2 As shown, this application provides a strobe control system, including a host computer and a strobe control device:
[0153] The host computer is used to send at least one configuration message to the strobe control device;
[0154] The strobe control device is used to perform the method as described in any of the examples in the above-described strobe control method embodiments.
[0155] In a feasible design, the methods by which the host computer sends at least one piece of configuration information to the strobe control device include:
[0156] The host computer sends at least one configuration message to the strobe control device through the microcontroller unit.
[0157] Other implementation methods and effects of the above system can be found in the description of the strobe control method, and will not be repeated here.
[0158] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.
[0159] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0160] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0161] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.
[0162] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0163] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A flicker control method, characterized in that, include: Based on the target clock frequency corresponding to the target scene, the external clock signal is multiplied to obtain a reference clock signal that conforms to the target clock frequency; Obtain at least one piece of configuration information, which is used to indicate the correspondence between each first duration and the type of the corresponding output signal after receiving the trigger signal. The type of the output signal includes high level and low level. The output signal is used to perform strobe control on the device to be controlled. If a preset type of change is detected in the trigger signal, the output signal is determined based on the count value obtained by counting the reference clock signal, the target clock frequency, and the configuration information. The output signal is sent to the device to be controlled corresponding to the configuration information.
2. The method according to claim 1, characterized in that, The pulse width of the output signal is N times the pulse width of the reference clock signal, where N is an integer greater than or equal to 1.
3. The method according to claim 1 or 2, characterized in that, The method is applied to a programmable logic device, which includes registers, and further includes the following steps before acquiring at least one piece of configuration information: Receive a first instruction message, at least one piece of configuration information to be stored, and the register address corresponding to each piece of configuration information; If the first indication information indicates that the configuration information is to be updated, each piece of configuration information is stored in the register according to the register address corresponding to each piece of configuration information. The process of obtaining at least one piece of configuration information includes: Based on the device to be controlled, at least one piece of configuration information is obtained from the register.
4. The method according to claim 3, characterized in that, If a preset type of change is detected in the trigger signal, determining the output signal based on the count value obtained by counting the reference clock signal, the target clock frequency, and the configuration information includes: If a preset type of change is detected in the trigger signal and the storage of the configuration information is completed, the output signal is determined based on the count value obtained by counting the reference clock signal, the target clock frequency, and the configuration information.
5. The method according to claim 1, characterized in that, The step of determining the output signal based on the count value obtained by counting the reference clock signal, the target clock frequency, and the configuration information includes: The second duration when the trigger signal undergoes a preset type of change is determined by using the count value obtained from counting the reference clock signal and the target clock frequency; If the second duration matches the first duration indicated by the configuration information, the output signal is determined according to the type of the output signal corresponding to the first duration.
6. The method according to claim 5, characterized in that, The configuration information is also used to indicate a third duration for which the transmission of the output signal is stopped. After the output signal is transmitted, the method further includes: If the second duration matches the third duration for which the output signal is to be stopped, the output signal is to be stopped.
7. The method according to claim 1 or 2, characterized in that, The trigger signal undergoes a preset type of change, which is either a change from a low level to a high level or a change from a high level to a low level.
8. A strobe control device, characterized in that, include: The frequency multiplier module is used to multiply the external clock signal according to the target clock frequency corresponding to the target scene to obtain a reference clock signal that conforms to the target clock frequency; The data storage module is used to acquire at least one piece of configuration information. The configuration information is used to indicate the correspondence between each first duration and the type of the corresponding output signal after receiving the trigger signal. The type of the output signal includes high level and low level. The output signal is used to perform strobe control on the device to be controlled. If a preset type of change is detected in the trigger signal, the signal output module is used to determine the output signal based on the count value obtained by counting the reference clock signal, the target clock frequency, and the configuration information; The signal output module is also used to send the output signal to the device to be controlled corresponding to the configuration information.
9. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing computer-executable instructions, and the processor executing the computer-executable instructions in the memory to implement the method according to any one of claims 1 to 7.
10. A strobe control system, characterized in that, Includes the host computer and the strobe control device: The host computer is used to send the at least one configuration message to the strobe control device; The strobe control device is used to perform the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Auxiliary synchronization LED control device and LED light control system
CN110831281A
Stroboscopic lamp information acquisition method, device, stroboscope lamp and light supplementing system
CN112996206A