A multi-structured light mapping continuous playing method, a storage medium and a 3D structured light device
Patent Information
- Application Number
- CN202610901084.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-22
- Publication Date
- 2026-10-27
AI Technical Summary
对于多光机(通常为四台光机),每台光机如需投映8张图卡,则需产生8个脉冲信号,且投多张图卡时,脉冲只能按记忆叠加循环,如中间有干扰脉冲,必须重新通过另外端口软件复位或者重新上电,才能恢复起始位,难以实时校正,控制难度大,响应慢耗时长,影响系统效率
[0014]实施本申请上述技术方案中的一个技术方案,具有如下优点或有益效果:本申请一个脉冲信号可以播放多张图卡,如个别脉冲信号导致误触发,只需忽略采集这个脉冲信号触发的图卡,下一个脉冲信号正常触发,控制难度大大降低,响应速度非常快;若某次触发因干扰失效,仅需重新发送脉冲即可从预设起始位置重新播放,无需执行硬件复位或断电操作,大幅提升了系统的鲁棒性和操作便捷性。
Smart Images

Figure CN122994482A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of 3D structured light technology, and in particular to a method for continuous playback of multi-structured light projection, a storage medium, and a 3D structured light device. Background Technology
[0002] 3D structured light projects a set of known, specific coded light patterns (such as dot matrix, stripes, or grids) onto the surface of an object using a projection device. These light patterns deform due to variations in the object's depth and contour. A camera then captures the deformed pattern, and a chip calculates the offset of each point in the pattern. Combined with triangulation principles, the three-dimensional depth information of the object's surface can then be determined.
[0003] Currently, optical engines (also known as 3D structured light optical engines or structured light) generally adopt a pulse projection mode, that is, a single pulse corresponds to a single image card. For multiple optical engines (usually four optical engines), if each optical engine needs to project 8 image cards, it needs to generate 8 pulse signals. When projecting multiple image cards, the pulses can only be superimposed and cycled according to memory. If there is an interference pulse in the middle, it is necessary to reset through software on another port or restart the power to restore the starting position. This makes real-time correction difficult, control difficult, slow response time, and affects system efficiency. Summary of the Invention
[0004] The purpose of this application is to overcome the shortcomings of the prior art and provide a method for continuous playback of multi-structured light projection, a storage medium, and a 3D structured light device. To achieve the above objective, this application provides the following technical solution: The first aspect of this application provides a method for continuous playback of multi-structured light projection, specifically including: S10. Configure projection commands and playback commands. The projection commands include handshake commands, external trigger setting commands, and map card response commands. The map card response commands include the position of the first map card, the number of playback frames per map card, and the position of the last map card. The playback commands include the working mode, playback method, and selection of map card file. S20. Send the mapping instruction according to the control command; the control command is a pulse signal; S30. Each of the optical engines continuously plays multiple image cards according to the image projection instruction.
[0005] Preferably, it also includes the following steps: S00. Create and store the image card file, which includes multiple horizontal stripe images and multiple vertical stripe images; the number of images is 1-255.
[0006] Preferably, the control command is a 232 serial port command, used to modify and configure the projection instruction.
[0007] Preferably, the handshake command includes: selecting a graphic card to be displayed, adjusting the brightness of the optical engine, setting the working mode of the optical engine, setting continuous playback of graphic cards, setting the LED lights to switch on and off, and / or generating a graphic card.
[0008] Preferably, the optical engine operating modes include normal mode + automatic power-off, normal mode + no automatic power-off, test mode + automatic power-off, and test mode + no automatic power-off.
[0009] Preferably, the pulse signal includes a first optomechanical trigger signal from the controller to the optomechanical unit, a camera trigger signal from the optomechanical unit to the external camera, and a second optomechanical trigger signal from the optomechanical unit to the next linked optomechanical unit.
[0010] Preferably, the optical engine displays the image card at a refresh rate of aHz, and the total display time for each image card can be continuously refreshed n times through parameter settings, thus the total display time is 1000. n / a ms, where a ranges from 60 to 180 and n ranges from 1 to 100.
[0011] A second aspect of this application provides a computer-readable storage medium storing a computer program that, when executed, implements the multi-structured light projection continuous playback method as described above.
[0012] A third aspect of this application provides a 3D structured light device, including a controller, at least one optical engine, at least one camera, and a camera triggering coordination module; the camera is communicatively connected to each of the optical engines through the camera triggering coordination module; the controller is communicatively connected to the camera and each of the optical engines; the controller includes a memory and one or more processors; the memory is used to store one or more computer programs, and the one or more processors are used to execute the one or more computer programs stored in the memory to cause the one or more processors to perform the multi-structured light projection continuous playback method described above.
[0013] Preferably, the 3D structured light device includes at least two optical engines.
[0014] Implementing one of the above-mentioned technical solutions of this application has the following advantages or beneficial effects: One pulse signal of this application can play multiple graphics cards. If an individual pulse signal causes a false trigger, it is only necessary to ignore the graphics card triggered by this pulse signal, and the next pulse signal will trigger normally, which greatly reduces the difficulty of control and the response speed is very fast. If a trigger fails due to interference, it is only necessary to resend the pulse to resume playback from the preset starting position. There is no need to perform hardware reset or power-off operation, which greatly improves the robustness and ease of operation of the system. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 This is a flowchart illustrating the multi-structured light projection continuous playback method according to an embodiment of this application; Figure 2 This is a schematic diagram of the drawing instruction according to an embodiment of this application; Figure 3 This is a schematic diagram of four optomechanically linked 3D structured light devices according to an embodiment of this application. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this application clearer, various exemplary embodiments described below will be referenced to the accompanying drawings, which form part of the exemplary embodiments and depict various exemplary embodiments that may be adopted to implement this application. Unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. It should be understood that they are merely examples of processes, methods, and apparatuses consistent with some aspects of this application disclosed as detailed in the appended claims, and other embodiments may be used, or structural and functional modifications may be made to the embodiments listed herein without departing from the scope and spirit of this application.
[0017] In the description of this application, it should be understood that the terms "center," "longitudinal," "lateral," etc., indicate the orientation or positional relationship based on the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the referred element must have a specific orientation, or be constructed and operated in a specific orientation. The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. The term "multiple" means two or more. The terms "connected" and "linked" should be interpreted broadly, for example, they can be fixed connections, detachable connections, integral connections, mechanical connections, electrical connections, communication connections, direct connections, indirect connections through an intermediate medium, and can be the internal connection of two elements or the interaction relationship between two elements. The term "and / or" includes any and all combinations of one or more of the related listed items. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0018] like Figure 1 As shown, the multi-structured light projection continuous playback method of this application specifically includes: S00. Create a storage card file, wherein the card file includes multiple horizontal stripe cards and multiple vertical stripe cards. Specifically, the number of cards is 1-225; the card file is generated by an algorithm based on the cards of the device to be tested. If the card to be burned is a horizontal stripe card, then a vertical stripe card is selected; if the card to be burned is a vertical stripe card, then a horizontal stripe card is selected.
[0019] S10. Configure image projection commands and playback commands. The image projection commands include handshake commands, external trigger setting commands, and image card response commands. The image card response commands include the position of the first image card, the number of playback frames for each image card, and the position of the last image card (specifically as follows). Figure 2 (As shown); the playback instructions include working mode, playback method, and selection of image card file; specifically, the playback frame rate refers to the number of image card frames transmitted in 1 second. Specifically, the handshake commands include: selecting the image card to be displayed, adjusting the optical engine brightness, setting the optical engine working mode, setting continuous playback of image cards, setting the LED lights to switch on and off, and / or generating image cards.
[0020] S20. Send the projection command according to the control command; specifically, the control command is a pulse signal, the pulse signal includes the first optical engine trigger signal (Trig1) of the controller to the optical engine, the camera trigger signal (Trig2, Trig3) of the optical engine to the external camera, and the second optical engine trigger signal (Trig4) of the optical engine to the next optical engine linked.
[0021] Meanwhile, the control command can also be a 232 serial port command, used to modify and configure the projection instruction.
[0022] S30. Each optical engine plays multiple image cards according to the image projection command. Specifically, the refresh rate of the image card displayed by the optical engine is aHz, and the total display time of each image card can be continuously refreshed n times through parameter settings, so the total display time is 1000. n / a ms, where a ranges from 60 to 180, and n ranges from 1 to 100. Preferably, the optical engine displays the graphics card at 120Hz, and the total display time for each graphics card can be continuously refreshed n times through parameter settings, resulting in a total display duration of 1000 ms. n / 120 ms.
[0023] Specifically, this application allows multiple graphics cards to be played with a single pulse signal. If a false trigger occurs due to an individual pulse signal, the graphics card triggered by that pulse signal can be ignored, and the next pulse signal will trigger normally, greatly reducing the control difficulty and providing a very fast response speed. If a trigger fails due to interference, simply resending the pulse signal will allow playback to resume from the preset starting position without requiring hardware reset or power-off operations, significantly improving the robustness and ease of operation of the device.
[0024] This application significantly improves the image card storage capacity, supporting up to 255 pre-stored image cards and the definition and retrieval of multiple image card sequences. The system also receives external trigger pulses and configures parameters via the RS232 communication protocol (similar to the I²C protocol in the standard solution, both being communication interfaces). A key improvement is that a single trigger pulse signal can initiate the continuous playback of multiple image cards, with the specific number of cards flexibly set via image card response commands. For example, by defining the starting image card position (e.g., 0 representing the 1st image card) and the ending image card position (e.g., 9 representing the 10th image card) through the image card response commands, automatic sequential playback of image cards from 0 to 9 can be achieved. The display duration of each image card can be independently adjusted via parameters, with an accuracy of up to n / 120ths of a second.
[0025] During the system deployment phase, this application only requires parameter configuration via the communication interface during debugging. Once officially put into production, the connection can be disconnected without retaining the physical interface, thus reducing circuit complexity and the risk of signal crosstalk. Regarding playback control, this application presets playback intervals (from image A to image B) through image card response commands. A single trigger pulse signal initiates playback of the complete image card sequence within that interval.
[0026] Furthermore, existing standard solutions require rewriting the firmware when modifying the content, number of images, or playback time of the graphics card, while this application only needs to update the graphics card index or timing parameters stored in the FPGA via instructions, without modifying the hardware. This application is more flexible in terms of parameter adjustment.
[0027] In terms of specific application scenarios, this application mainly focuses on achieving rapid continuous image playback functionality using structured light. Its core value lies in improving the projection speed and reliability of multi-image sequence sequences. In high-speed inspection scenarios, such as large-area, high-precision scanning of printed circuit boards (PCBAs) (accuracy up to 0.007-0.014 mm), the area to be tested needs to be divided into multiple small units (e.g., 20×20 mm) for sequential scanning and stitching. In this case, the image playback speed directly determines the overall inspection efficiency. This application significantly shortens the unit inspection time through single-pulse signal-triggered continuous multi-image playback and anti-interference design, thereby greatly improving the overall efficiency.
[0028] Specifically, the operating modes include normal mode + automatic power-off, normal mode + no automatic power-off, test mode + automatic power-off, and test mode + no automatic power-off, as detailed in the table below: In some specific embodiments, the pulse signal is described in detail in the table below: Specifically, the camera trigger signal from the optical engine is a 1ms rectangular wave, which is triggered when the screen is displayed. The four signals are the same, and up to four cameras can be connected at the same time. At the same time, (1) Trig1 IN is at a high level (3.3~5V) when there is no signal input. To trigger it, a low-level pulse signal is required, that is, the input control Trig1 IN changes from a high level (3.3~5V) to a low level (0V), holds for more than 1ms, and then changes from a low level (0V) to a high level (3.3~5V). (2) After the optical engine is triggered, the optical engine presses 54 80 20 00 00 00 00 00 (of which (3) Before each optical engine is used on the device, the number of graphics cards to be played by external triggering and the number of cycles displayed on each graphics card must be set by the 232 command.
[0029] The specific workflow of the multi-structured light projection continuous playback method in this application is as follows: First, the system is configured using projection and playback commands (e.g., setting sequence number 54 80, handshake command). This configuration itself is also completed via I / O; once configuration is complete, the configuration link can be removed (i.e., disconnecting the RS232 interface or I / O). 2 (e.g., C-interface). If an error occurs during subsequent operation, simply resend the pulse signal; if the error cannot be corrected, a system reset or power-off restart is required. The current system stores parameters in the local memory of each device, and the parameters are persistently saved after being written.
[0030] This application supports the collaborative operation of multiple optical engines and cameras, and can theoretically be expanded infinitely through serial connection. For example, when the system is configured with 8 cameras, a coordinator is required. Typically, there is only one master controller, which sends a start signal to trigger sequentially starting from the first optical engine. When the last optical engine completes its acquisition, it sends a completion signal back to the coordinator, informing it that its acquisition is complete, and then starts the acquisition of the next group.
[0031] In the production, calibration, and use of 3D structured light equipment, there are three main states: factory testing, calibration, and production. (1) Factory testing: The 3D structured light equipment is tested in its own factory. It is necessary to set the focal length, brightness, etc., and to debug the equipment itself. (2) Calibration: It is used for customer debugging. It can be tested and calibrated by control commands, pulse signals, etc. It usually involves a lot of graphic card configuration, such as 40 to 50 cards. (3) Production: It is used in the customer's production process. It is used to test the PCBA on the customer's PCBA production line. Only pulse signals need to be sent. In daily operation, the number of graphic cards is small, usually 8 cards. This difference stems from the need for more comprehensive test coverage in the debugging stage. In mass production, all graphic card content can be preloaded into the equipment in the factory stage. All configurations are completed during production. Afterwards, only control commands are needed to switch functions. Specifically, after the whole machine is installed, the equipment enters the factory mode for calibration and debugging. After debugging, it enters the production mode. In the customer use stage, the equipment is in normal operation. There is no need to connect external debugging tools. Operation is only performed through internal control commands.
[0032] We can configure multiple chart cards to suit the needs of different products by setting different chart cards or parameters. However, this configuration is relatively rare in practice. The key issue lies in the significant difference between the calibration process and normal production operation. This difference is mainly reflected in the following aspects: Calibration is usually performed in the factory, involving the production and commissioning of equipment. For example, the production of a single machine may only produce 200 to 300 units per year because each production line typically only needs one or at most two machines. However, on the production line, the equipment needs to run continuously, processing thousands or even tens of thousands of boards per day, thus requiring extremely high speeds.
[0033] During calibration, using more charts can improve accuracy. For example, calibration using 8 charts might take an hour, while using 40 charts might take two hours. Despite the increased time, the accuracy is significantly improved. Therefore, calibration typically uses a multi-chart configuration, while production uses fewer charts to prioritize speed. For equipment debugging, adjustment time only affects production efficiency; however, since the annual output of such equipment is limited, the impact of time increases or decreases is relatively small. However, on the production floor, even a one-second delay can reduce the production cycle time. For example, if the original processing capacity was 180 pieces per hour, a slower pace might only allow processing 120 pieces, leading to a decrease in capacity. To maintain high capacity, increasing the number of machines is necessary, but the additional costs are often undesirable. Therefore, balancing calibration and production needs presents a challenge: production requires high speed, while calibration requires multiple charts to improve accuracy. Existing solutions cannot satisfy both simultaneously, typically employing a two-step process: first, printing the calibration chart to complete calibration, then printing the production chart for production. While feasible, this is inefficient.
[0034] Those skilled in the art will understand that all or part of the features / steps of the above-described method embodiments can be implemented by methods, data processing systems, or computer programs. These features may be implemented without hardware, entirely in software, or in a combination of hardware and software. The aforementioned computer program may be stored in one or more computer-readable storage media. When the computer program is executed (e.g., by a processor), it performs the steps of the above-described multi-structured light projection continuous playback method embodiments.
[0035] The aforementioned storage media capable of storing program code include: static hard disks, solid-state hard disks, random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), optical storage devices, magnetic storage devices, flash memory, magnetic disks or optical disks, and / or combinations of the above devices, that is, they can be implemented by any type of volatile or non-volatile storage devices or combinations thereof.
[0036] like Figure 3 As shown, this application also provides an embodiment of a 3D structured light device, including a controller, at least one optical engine, at least one camera, and a camera triggering coordination module; the camera is communicatively connected to each of the optical engines through the camera triggering coordination module; the controller is communicatively connected to the camera and each of the optical engines; the controller includes one or more processors and a memory; wherein, the memory is used to store one or more computer programs, and the one or more processors are used to execute the one or more computer programs stored in the memory, so that the processors execute the features / steps of the above-described multi-structured light projection continuous playback method embodiment.
[0037] Specifically, 3D structured light equipment can take the following forms: (1) containing multiple optical engines and 1 camera. The number of optical engines can be 2, 4, 8, etc., depending on the specific needs; (3) containing multiple optical engines and multiple cameras. The number of optical engines and cameras can be 2, 4, 8, etc., depending on the specific needs.
[0038] The above description is merely a preferred embodiment of this application. Those skilled in the art will understand that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of this application. Furthermore, under the teachings of this application, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of this application. Therefore, this application is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of this application.
Claims
1. A method for continuous playback of multi-structured light projection, characterized in that, Specifically, it includes: S10. Configure projection commands and playback commands. The projection commands include handshake commands, external trigger setting commands, and map card response commands. The map card response commands include the position of the first map card, the number of playback frames per map card, and the position of the last map card. The playback commands include the working mode, playback method, and selection of map card file. S20. Send the mapping instruction according to the control command; the control command is a pulse signal; S30. Each of the optical engines continuously plays multiple image cards according to the image projection instruction.
2. The multi-structured light projection continuous playback method according to claim 1, characterized in that, It also includes the following steps: S00. Create and store the image card file, which includes multiple horizontal stripe images and multiple vertical stripe images; the number of images is 1-255.
3. The multi-structured light projection continuous playback method according to claim 1, characterized in that, The control command is a 232 serial port command, used to modify and configure the projection instructions.
4. The multi-structured light projection continuous playback method according to claim 1, characterized in that, The handshake commands include: selecting the image card to be displayed, adjusting the optical engine brightness, setting the optical engine working mode, setting continuous playback of the image card, setting the LED lights to turn on and off, and / or generating the image card.
5. The multi-structured light projection continuous playback method according to claim 4, characterized in that, The optical engine operating modes include normal mode + automatic power-off, normal mode + no automatic power-off, test mode + automatic power-off, and test mode + no automatic power-off.
6. The multi-structured light projection continuous playback method according to claim 1, characterized in that, The pulse signal includes a first optical engine trigger signal from the controller to the optical engine, a camera trigger signal from the optical engine to the external camera, and a second optical engine trigger signal from the optical engine to the next linked optical engine.
7. The multi-structured light projection continuous playback method according to claim 6, characterized in that, The optical engine displays the refresh rate of the graphics card as aHz. The total display time for each graphics card can be continuously refreshed n times through parameter settings, resulting in a total display duration of 1000 seconds. n / a ms, where a ranges from 60 to 180 and n ranges from 1 to 100.
8. A computer-readable storage medium, characterized in that, It stores computer program instructions, which, when executed by a processor, implement the multi-structured light projection continuous playback method as described in any one of claims 1-7.
9. A 3D structured light device, characterized in that, The system includes a controller, at least one optical engine, at least one camera, and a camera triggering coordination module; the camera is communicatively connected to each of the optical engines through the camera triggering coordination module; the controller is communicatively connected to the camera and each of the optical engines. The controller includes a memory and one or more processors; The memory is used to store one or more computer programs, and the one or more processors are used to execute the one or more computer programs stored in the memory to cause the one or more processors to perform the multi-structured light projection continuous playback method as described in any one of claims 1-7.
10. The 3D structured light device according to claim 9, characterized in that, The 3D structured light device includes at least two optical engines.