Search

CN-122002123-A - Multi-camera multi-light source control method and device, electronic equipment and storage medium

CN122002123ACN 122002123 ACN122002123 ACN 122002123ACN-122002123-A

Abstract

The application provides a control method, a device, electronic equipment and a storage medium of a multi-camera multi-light source, wherein the method comprises the steps of responding to a target trigger signal, obtaining a control execution sequence, determining a control mode of a control subtask instruction according to a task demand parameter corresponding to the control subtask instruction aiming at each control subtask instruction in the control execution sequence, setting control pulse of the control subtask instruction according to the determined control mode, and sequentially executing each control subtask instruction in the control execution sequence according to the control pulse of each control subtask instruction so as to cooperatively control a plurality of target light sources and a target camera, wherein the target light sources comprise an internal target light source and an external target light source. Therefore, the technical scheme of the application solves the problems of low control precision and poor degree of automation of the multi-camera multi-light source system in the prior art, thereby improving the overall performance.

Inventors

  • DU YINGKANG

Assignees

  • 深圳个元科技有限公司

Dates

Publication Date
20260508
Application Date
20260126

Claims (10)

  1. 1. A method for controlling a multi-camera multi-light source, the method comprising: The method comprises the steps of responding to a target trigger signal, acquiring a control execution sequence, wherein the control execution sequence comprises at least one control subtask instruction, and each control subtask instruction is added with a corresponding task demand parameter; Aiming at each control subtask instruction in the control execution sequence, determining a control mode of the control subtask instruction according to a task demand parameter corresponding to the control subtask instruction; setting a control pulse of the control subtask instruction according to the determined control mode; and executing each control subtask instruction in the control execution sequence in sequence according to the control pulse of each control subtask instruction so as to cooperatively control a plurality of target light sources and the target camera, wherein the target light sources comprise an internal target light source and an external target light source.
  2. 2. The control method according to claim 1, wherein the target trigger signal is a hardware trigger signal or a software trigger signal, the hardware trigger signal is a pulse trigger signal received from a PLC or other control devices through an IO interface, and the software trigger signal is a signal obtained by issuing a trigger instruction through an SDK based on network communication or serial communication.
  3. 3. The control method of claim 1, wherein the task demand parameters added to each control subtask instruction include an internal lighting parameter, a camera output parameter, and an external device output parameter.
  4. 4. The control method according to claim 1, characterized in that the control mode of the control subtask instruction is determined by: Aiming at the control subtask instruction, determining whether all pulse widths in the control subtask instruction exceed a preset pulse width threshold according to a task demand setting parameter of the control subtask instruction; if the control modes do not exceed the control modes, determining that the control modes of the control subtasks are high-precision modes; If any one of the control sub-tasks exceeds a preset pulse width threshold value, determining that the control mode of the control sub-task is a low-precision mode.
  5. 5. The control method of claim 1, wherein the control pulses of the control subtask instructions comprise an LED light pulse, a camera exposure pulse and a DO output pulse, wherein timing parameters are independently set in the LED light pulse, the camera exposure pulse and the DO output pulse, the timing parameters comprise a pulse width and a pulse delay, and the pulse delay is used for guaranteeing synchronization of a camera and a light source.
  6. 6. The control method according to claim 1, wherein the control pulse of the control sub-task instruction includes a plurality of control pulses, and each control sub-task instruction in the control execution sequence is executed in turn according to the control pulse of each control sub-task instruction, including: And executing all control pulses of the control subtask instructions in parallel when each control subtask instruction is executed in sequence according to the sequence of the control execution sequence, and feeding back the execution condition of the current instruction in real time.
  7. 7. The control method according to claim 1, characterized in that the control method further comprises: basic information of each camera is acquired through a communication interface; Controlling the working state of each camera to be a state to be shot so that each camera is ready to receive the trigger pulse; Sequentially controlling each light source controller to output a trigger signal, and monitoring all cameras to determine whether to generate a response image; And (3) carrying out information binding on the cameras generating the response images and the corresponding light source controllers until all the cameras and the light source controllers are bound.
  8. 8. A control device for a multi-camera multi-light source, the control device comprising: the system comprises an acquisition module, a control execution sequence and a control module, wherein the acquisition module is used for responding to a target trigger signal and acquiring a control execution sequence, the control execution sequence comprises at least one control subtask instruction, and corresponding task demand parameters are added in each control subtask instruction; the determining module is used for determining a control mode of each control subtask instruction in the control execution sequence according to the task demand parameter corresponding to the control subtask instruction; The setting module is used for setting the control pulse of the control subtask instruction according to the determined control mode; The control module is used for sequentially executing each control subtask instruction in the control execution sequence according to the control pulse of each control subtask instruction so as to cooperatively control a plurality of target light sources and the target camera, wherein the target light sources comprise an internal target light source and an external target light source.
  9. 9. An electronic device comprising a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication via the bus when the electronic device is in operation, the machine-readable instructions being executable by the processor to perform the steps of the control method according to any one of claims 1 to 7.
  10. 10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the control method according to any of claims 1 to 7.

Description

Multi-camera multi-light source control method and device, electronic equipment and storage medium Technical Field The present application relates to the field of visual control technologies, and in particular, to a method and apparatus for controlling multiple light sources of a multi-camera, an electronic device, and a storage medium. Background In the field of industrial visual detection, cooperative control of a multi-camera multi-light source system is a key for realizing high-precision and high-efficiency detection. However, the prior art scheme has significant shortcomings in control precision, pairing efficiency, feedback mechanism and expansibility, and further improvement and wide application of system performance are severely restricted. Currently, conventional multi-camera multi-light source control relies mainly on fixed and single technical means. In the control mode, a common light source controller scheme adopts fixed pulse width control, for example, a Programmable Logic Controller (PLC) generates a rising edge trigger signal to drive a light source, but lacks a binding relationship between an Input Output (IO) and an execution sequence (sequence), so that a synchronization strategy between a camera and the light source is stiff, and complex lighting processes such as multi-stage exposure, multi-light source alternate lighting and the like cannot be supported. In the aspect of multi-light source coordination, an internal light source (such as camera built-in illumination) and an external light source (such as independent light supplementing equipment) are often managed by different controllers respectively, and lack of unified scheduling leads to difficult coordination work, poor expansibility and incapability of adapting to diversified application scenes (such as high-speed dynamic detection). Therefore, an innovative control method is needed in the art to overcome the above technical problems and improve the control accuracy, automation degree and overall performance of the multi-camera multi-light source system. Disclosure of Invention Accordingly, the present application is directed to a method, an apparatus, an electronic device, and a storage medium for controlling multiple light sources of multiple cameras, so as to solve the problems of low control accuracy and poor automation degree of the multiple light sources of multiple cameras in the prior art, thereby improving the overall performance. The embodiment of the application provides a control method of a multi-camera multi-light source, which comprises the following steps: The method comprises the steps of responding to a target trigger signal, acquiring a control execution sequence, wherein the control execution sequence comprises at least one control subtask instruction, and each control subtask instruction is added with a corresponding task demand parameter; Aiming at each control subtask instruction in the control execution sequence, determining a control mode of the control subtask instruction according to a task demand parameter corresponding to the control subtask instruction; setting a control pulse of the control subtask instruction according to the determined control mode; and executing each control subtask instruction in the control execution sequence in sequence according to the control pulse of each control subtask instruction so as to cooperatively control a plurality of target light sources and the target camera, wherein the target light sources comprise an internal target light source and an external target light source. Optionally, the target trigger signal is a hardware trigger signal or a software trigger signal, the hardware trigger signal is a pulse trigger signal received from a PLC or other control devices through an IO interface, and the software trigger signal is a signal obtained by issuing a trigger instruction through an SDK based on network communication or serial communication. Optionally, the task demand parameters added in each control subtask instruction include an internal lighting parameter, a camera output parameter, and an external device output parameter. Optionally, the control mode of the control subtask instruction is determined by: Aiming at the control subtask instruction, determining whether all pulse widths in the control subtask instruction exceed a preset pulse width threshold according to a task demand setting parameter of the control subtask instruction; if the control modes do not exceed the control modes, determining that the control modes of the control subtasks are high-precision modes; If any one of the control sub-tasks exceeds a preset pulse width threshold value, determining that the control mode of the control sub-task is a low-precision mode. Optionally, the control pulse of the control subtask instruction comprises an LED light pulse, a camera exposure pulse and a DO output pulse, wherein time sequence parameters are independently set in the LED light pulse, the camera ex