Instantaneous trigger acquisition method and device for high-speed camera
By combining high-speed cameras and computers, software and algorithms are used to determine the target status in real time, generate trigger signals, and realize instant collection and storage of high-speed video streaming images. This solves the problem in the existing technology that high-speed cameras are difficult to automatically trigger to obtain key image data, and improves Improve collection efficiency and storage management.
Patent Information
- Application Number
- CN202310249394.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-15
- Publication Date
- 2024-09-20
AI Technical Summary
It is difficult for existing high-speed cameras to automatically trigger and obtain key image data based on internal algorithms. They mainly rely on external trigger signals or manual operations, resulting in low efficiency and large storage space usage.
Using a high-speed camera combined with a computer, special software and algorithms are used to determine the status of high-speed targets in real time, generate trigger signals, and use FIFO queues and memory to automatically configure storage space to achieve instantaneous collection and storage of high-speed video stream images, mainly using the background difference method, Algorithms such as the inter-frame difference method make instantaneous judgments.
Real-time, intelligent automatic acquisition and storage of key frame image data is realized, which improves the collection efficiency, reduces subsequent offline processing and manual operations, avoids waste of storage space, and the storage volume is small and can be automatically performed for a long time.
Smart Images

Figure CN118678201A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of machine vision, and in particular relates to a method and device for instantaneous triggering acquisition of a high-speed camera. Background Art
[0002] Machine vision technology is widely used in the field of industrial inspection. The current low- and medium-speed image acquisition systems, especially the visual systems with a frame rate of less than 100fps, can basically achieve the acquisition of high-definition and high-quality images, and can detect and record the key processes of target objects online in real time. With the large-scale application of high-speed processing and high-speed assembly lines, as well as the needs of target detection and defect detection, there is a great demand for high-speed cameras to process high-speed moving targets in real time, and even to automatically trigger the camera instantly to obtain key video image data. The mainstream instantaneous triggering and video acquisition methods of high-speed cameras still use external trigger signals for synchronous acquisition, or manual triggering of recording by human eye judgment. However, it is difficult for current high-speed cameras to find a method based on the camera's internal algorithm and automatically trigger, and to obtain and save key image data.
[0003] To this end, we propose a high-speed camera instantaneous triggering acquisition method and device to solve the problems existing in the prior art. We use a high-speed camera to continuously acquire real-time images of the target object, use a high-speed inter-frame image processing algorithm to intelligently judge the instantaneous drastic changes, generate a trigger signal, and design a high-speed video stream image instantaneous storage technology to achieve instantaneous triggering and acquisition of high-speed cameras. Summary of the invention
[0004] The purpose of the present invention is to provide a high-speed camera instantaneous triggering acquisition method and device to solve the problem mentioned in the above background technology that the existing high-speed camera is difficult to trigger and obtain key image data based on the camera's internal algorithm.
[0005] To achieve the above object, the present invention adopts the following technical solution: a high-speed camera instantaneous trigger acquisition method, comprising the following steps:
[0006] S1, high-speed camera image acquisition and storage, select a high-speed camera with a speed of more than 100fps, that is, instant exposure imaging within 10ms, and continuously acquire high-speed motion images, then connect the high-speed camera to the computer through a dedicated high-speed data transmission line, install the computer operating system with dedicated software for the high-speed camera, embed an algorithm inside the computer software, calculate the image frame data to determine the high-speed target state, generate a trigger signal, control the computer memory or hard disk space, and store the key frame image;
[0007] S2, generation of instant trigger signal of high-speed camera, the high-speed camera acquisition software built into the computer acquires the video stream data of high-speed camera in real time, generates camera trigger signal, controls automatic configuration of storage space, and stores key frame video stream images into memory or hard disk;
[0008] S3, calculation of the instant trigger signal of the high-speed camera. The video stream image of the high-speed camera is divided into two paths. One path is for instant calculation. The computer is embedded with an algorithm to instantly judge the state and process the image data in real time, waiting for the generation of the camera trigger signal. For example, within a period of time, two anomalies are instantly judged, and the first anomaly generates the first pulse signal. S1 is the rising edge, which is the signal for the start of the trigger, and x1 is the falling edge, which is the signal for the end of the trigger. According to the instants of the trigger start and the end of the trigger, according to the time period, the storage space is automatically configured to save the key frame image of the abnormal state;
[0009] S4, automatic configuration of high-speed camera storage space. Another channel of high-speed camera video stream image is input into the pre-opened FIFO queue storage space. This storage space can store a certain number of high frame rate images, such as 1000 frames of high frame rate images within 1 second, pre-store instantaneous image data, and reserve memory for subsequent abnormal key frame video stream images.
[0010] S5. Instantaneous judgment calculation of high frame rate images. Instantaneous calculation is performed on real-time video stream image data. Since the calculation time is very short, the instantaneous judgment algorithm should not use complex theories. It is mainly implemented using algorithms such as background difference method, inter-frame difference method, and video optical flow method.
[0011] Preferably, the high-speed camera in S1 needs to cooperate with an auxiliary light source for imaging to ensure the generation of high-definition and high-quality images.
[0012] Preferably, if it is set in S2 to obtain a frame of image within 0.5 ms, high-speed algorithm processing and automatic instantaneous state judgment are completed within another 0.5 ms.
[0013] Preferably, the video stream data in S4 is updated in real time in FIFO. Once the algorithm determines and generates a trigger signal, the currently opened FIFO queue storage space data can be instantly stored to intelligently save the image.
[0014] Preferably, in S4, the target detection algorithm of the pre-stored training samples may be used for calculation.
[0015] Preferably, in S1, the high-speed camera can also be placed in the acquisition software through a dedicated external storage device, and the camera storage device can be triggered by the external device to record high-speed motion key frame video images.
[0016] A high-speed camera instantaneous trigger acquisition device comprises a shell, a high-speed camera is fixedly mounted on the surface of the shell by screws, a back cover is mounted on the surface of the shell, a circuit board and an image acquisition card are assembled on the surface of the back cover, a high frame rate image instantaneous judgment algorithm module and a high-speed camera signal generation module are integrated on the surface of the circuit board, and the high-speed camera signal generation module comprises a video stream image receiving unit, an instantaneous state automatic judgment unit, an automatic camera trigger signal generation unit and a storage space automatic configuration unit.
[0017] Preferably, the automatic camera trigger signal generation unit is connected to the storage space automatic configuration unit, the storage space automatic configuration unit is connected to the image acquisition card, the high-speed camera is connected to the image acquisition card, the video stream image receiving unit and the automatic camera trigger signal generation unit, the video stream image receiving unit is connected to the instantaneous state automatic judgment unit, and the instantaneous state automatic judgment unit is connected to the automatic camera trigger signal generation unit.
[0018] Technical effects and advantages of the present invention: Compared with the prior art, the high-speed camera instantaneous trigger acquisition method and device proposed by the present invention has the following advantages:
[0019] 1. The current high-speed camera or high-speed photography system mainly has the function of collecting and storing high-frame rate video stream images, but mainly uses external triggers, external sensor triggers, or manual operation triggers, and often needs to save high-speed video images for a long period of time, and then process them offline and intercept key frame images, which is inefficient and uses a large storage space. This method can generate trigger signals in real time and instantly intelligently judge, automatically save key frame image data, which is efficient and more accurate, and also avoids the problem of subsequent offline processing or manual interception;
[0020] 2. The present invention can automatically judge and store data of multiple key frame images without manually releasing storage space as in the traditional method. The conventional method is that a high-speed camera is always online to collect images. After storing a key video, when the memory or hard disk data is full, it is necessary to manually clear the storage space before the next high-speed storage. The present invention makes real-time judgments and selectively saves key frame video images, so the storage capacity is small and can be automatically stored for a long time. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A block diagram showing the connection between the high-speed camera signal generation module of the present invention, the high-speed camera and the image acquisition card;
[0022] Figure 2 A block diagram of automatic configuration of storage space of a high-speed camera of the present invention;
[0023] Figure 3 A block diagram of the image acquisition and storage of the high-speed camera of the present invention;
[0024] Figure 4 It is a schematic diagram of the main structure of the present invention;
[0025] Figure 5 It is a schematic diagram of the main structure of the back cover of the present invention.
[0026] In the figure: 1. high-speed camera; 2. shell; 3. back cover; 4. circuit board; 5. high frame rate image instantaneous judgment algorithm module; 6. high-speed camera signal generation module; 7. image acquisition card. DETAILED DESCRIPTION
[0027] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0028] The present invention provides Figure 1-3 A high-speed camera instantaneous trigger acquisition method is shown, comprising the following steps:
[0029] S1. High-speed camera image acquisition and storage. Select a high-speed camera with a speed of more than 100fps, that is, instant exposure imaging within 10ms, and continuously acquire high-speed motion images. Then connect the high-speed camera to the computer through a dedicated high-speed data transmission line. Install the computer operating system with dedicated software for the high-speed camera. By embedding an algorithm inside the computer software, calculate the image frame data to determine the high-speed target state, generate a trigger signal, control the computer memory or hard disk space, and store key frame images. The high-speed camera can also be embedded in the acquisition software through a dedicated peripheral storage device, and the camera storage device can be triggered by the peripheral device to record high-speed motion key frame video images. The high-speed camera needs to be imaged with an auxiliary light source to ensure the generation of high-definition and high-quality images.
[0030] S2. Generation of instant trigger signals for high-speed cameras. The computer's built-in high-speed camera acquisition software acquires high-speed camera video stream data in real time and generates camera trigger signals. It controls automatic configuration of storage space and stores key frame video stream images in memory or hard disk. If a frame of image is obtained within 0.5ms, high-speed algorithm processing and instantaneous state automatic judgment are completed within another 0.5ms. High-speed vision instantaneously generates trigger signals and automatically saves them. Images are mainly used for data processing. Infrared sensors, laser sensors and other equipment can also be used to generate trigger signals through thermal imaging images, laser ranging changes, etc. for subsequent processing.
[0031] S3, calculation of the instant trigger signal of the high-speed camera. The video stream image of the high-speed camera is divided into two paths. One path is for instant calculation. The computer is embedded with an algorithm to instantly judge the state and process the image data in real time, waiting for the generation of the camera trigger signal. For example, within a period of time, two anomalies are instantly judged, and the first anomaly generates the first pulse signal. S1 is the rising edge, which is the signal for the start of the trigger, and x1 is the falling edge, which is the signal for the end of the trigger. According to the instants of the trigger start and the end of the trigger, according to the time period, the storage space is automatically configured to save the key frame image of the abnormal state;
[0032] S4, automatic configuration of high-speed camera storage space. Another channel of high-speed camera video stream image is input to the pre-opened FIFO queue storage space. This storage space can store a certain number of high-frame rate images, such as 1000 frames of high-frame rate images within 1 second. It pre-stores instantaneous image data and reserves memory for subsequent abnormal key frame video stream images. The video stream data is updated in real-time FIFO. Once the algorithm determines and generates a trigger signal, the currently opened FIFO queue storage space data can be instantly stored, and the image can be intelligently saved. The target detection algorithm of the pre-stored training samples can also be used for calculation;
[0033] S5, high frame rate image instantaneous judgment calculation, instantaneous calculation is performed on real-time video stream image data. Since the calculation time is very short, the instantaneous judgment algorithm should not use complex theories. It is mainly implemented by background difference method, inter-frame difference method, video optical flow method and other algorithms. Currently, it mainly uses wired data transmission. If with the advancement of technology, wireless transmission methods can also achieve ultra-high-speed data transmission, wireless transmission technology can be used for data transmission. The background difference method is used as an example for explanation:
[0034] 1) Calculate the background difference image
[0035] The real-time input image of the video stream is defined as I(x, y, t), the background image is R(x, y), B(x, y, t) is defined as the difference image, and the threshold T is set. d , then the background difference image calculated in real time for the current frame can be calculated:
[0036]
[0037] 2) Calculate the moment of high-speed video stream image
[0038] For the background difference image B(x, y, t), calculate the image 0th order moment M 0 (t), represents the area of the foreground object in the image, and calculates the image first-order moment M x (t) and M y (t) represents the horizontal and vertical data of the real-time change of the foreground target:
[0039]
[0040] 3) Calculate the position, velocity and acceleration of the foreground target
[0041] Define the center position x of the foreground object C (t) = (x C (t), y C (t)), the change speed of the foreground object And the change acceleration of the foreground target:
[0042]
[0043]
[0044] Among them, Δt is the acquisition interval of high frame rate video stream images. For example, for a 1000fps high-speed camera, the corresponding frame sampling time is 1ms. In order to reduce noise interference, the sliding average calculation method can be used to calculate the speed and acceleration of the foreground target. and Generally, the previous N frames of the current real-time data frame image are designed for average smoothing. The value of N is generally determined by the time of high-speed calculation. For a 1000fps high-speed camera, N is generally not more than 5:
[0045] 4) Calculation of instantaneous virtual force
[0046] The trigger signal calculation method used in the present invention is the instantaneous virtual force F C (t), the algorithm designed by the present invention believes that in high-speed motion scenes, only when a dramatic change in energy occurs in an instant, it can intelligently determine that a key motion has occurred, and automatically store the current high frame rate image. This means that instantaneous energy changes can also be reflected by changes in force, so according to x C (t), and Calculate the instantaneous virtual force F of high frame rate images C (t):
[0047]
[0048] Among them, M, D and K correspond to mass, damping coefficient and elastic constant. Since the unit corresponding to the video stream image is pixel, these values in this algorithm are virtual values and remain unchanged. Therefore, the calculated instantaneous virtual force corresponds to the virtual force change of high-speed video data. Once this value changes dramatically, it is judged as abnormal key information and a trigger signal can be generated.
[0049] 5) Instantaneous state judgment and trigger signal generation
[0050] The high frame rate video stream image trigger signal s(t) is based on the instantaneous virtual force F C (t) and the defined threshold F 0 Judgment is generated when the instantaneous virtual force F C (t) Fluctuates violently and instantly exceeds the stability threshold F 0 When a key change or other movement occurs in the target scene, a trigger signal can be generated to notify the storage device to automatically save the high frame rate video image at that moment.
[0051]
[0052] The present invention provides Figure 4-5 A high-speed camera instantaneous trigger acquisition device shown includes a shell 2, a high-speed camera 1 is fixedly installed on the surface of the shell 2 by screws, a back cover 3 is installed on the surface of the shell 2, a circuit board 4 and an image acquisition card 7 are assembled on the surface of the back cover 3, a high frame rate image instantaneous judgment algorithm module 5 and a high-speed camera signal generation module 6 are integrated on the surface of the circuit board 4, and the high-speed camera signal generation module 6 includes a video stream image receiving unit, an instantaneous state automatic judgment unit, an automatic camera trigger signal generation unit and a storage space automatic configuration unit.
[0053] The automatic generation of camera trigger signal unit is connected to the storage space automatic configuration unit, the storage space automatic configuration unit is connected to the image acquisition card 7, the high-speed camera 1 is connected to the image acquisition card 7, the video stream image receiving unit and the automatic generation of camera trigger signal unit are connected, the video stream image receiving unit is connected to the instantaneous state automatic judgment unit, and the instantaneous state automatic judgment unit is connected to the automatic generation of camera trigger signal unit. In the specific implementation, the high frame rate image instantaneous judgment algorithm module 5, the high-speed camera signal generation module 6 and the image acceleration module 7 can be integrated and installed in a large module, or they can form several small modules for decentralized installation and application.
[0054] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A high-speed camera instantaneous trigger acquisition method, Features: The following steps are involved: S1, high-speed camera image acquisition and storage, select a high-speed camera with a speed of more than 100fps, that is, instant exposure imaging within 10ms, and continuously acquire high-speed motion images, then connect the high-speed camera to the computer through a dedicated high-speed data transmission line, install the computer operating system with dedicated software for the high-speed camera, embed an algorithm inside the computer software, calculate the image frame data to determine the high-speed target state, generate a trigger signal, control the computer memory or hard disk space, and store the key frame image; S2, generation of instant trigger signal of high-speed camera, the high-speed camera acquisition software built into the computer acquires the video stream data of high-speed camera in real time, generates camera trigger signal, controls automatic configuration of storage space, and stores key frame video stream images into memory or hard disk; S3, calculation of the instant trigger signal of the high-speed camera. The video stream image of the high-speed camera is divided into two paths. One path is for instant calculation. The computer is embedded with an algorithm to instantly judge the state and process the image data in real time, waiting for the generation of the camera trigger signal. For example, within a period of time, two anomalies are instantly judged, and the first anomaly generates the first pulse signal. S1 is the rising edge, which is the signal for the start of the trigger, and x1 is the falling edge, which is the signal for the end of the trigger. According to the instants of the trigger start and the end of the trigger, according to the time period, the storage space is automatically configured to save the key frame image of the abnormal state; S4, automatic configuration of high-speed camera storage space. Another channel of high-speed camera video stream image is input into the pre-opened FIFO queue storage space. This storage space can store a certain number of high frame rate images, such as 1000 frames of high frame rate images within 1 second, pre-store instantaneous image data, and reserve memory for subsequent abnormal key frame video stream images. S5. Instantaneous judgment calculation of high frame rate images. Instantaneous calculation is performed on real-time video stream image data. Since the calculation time is very short, the instantaneous judgment algorithm should not use complex theories. It is mainly implemented using algorithms such as background difference method, inter-frame difference method, and video optical flow method.
2. A high-speed camera instantaneous trigger acquisition method according to claim 1, Features: The high-speed camera in the S1 needs to be combined with an auxiliary light source for imaging to ensure the generation of high-definition and high-quality images.
3. A high-speed camera instantaneous trigger acquisition method according to claim 1, Features: If it is set in S2 that one frame of image is obtained within 0.5 ms, high-speed algorithm processing and automatic instantaneous state judgment are completed within another 0.5 ms.
4. A high-speed camera instantaneous trigger acquisition method according to claim 1, Features: The video stream data in S4 is updated in real time in FIFO. Once the algorithm determines and generates a trigger signal, the currently opened FIFO queue storage space data can be instantly stored to intelligently save the image.
5. A high-speed camera instantaneous trigger acquisition method according to claim 1, Features: In S4, the target detection algorithm of the pre-stored training samples may be used for calculation.
6. A high-speed camera instantaneous trigger acquisition method according to claim 1, Features: In the S1, the high-speed camera can also be placed in the acquisition software through a dedicated external storage device, and the camera storage device can be triggered by the external device to record high-speed motion key frame video images.
7. A high-speed camera instantaneous trigger acquisition device, comprising a housing (2), Features: A high-speed camera (1) is fixedly mounted on the surface of the housing (2) by means of screws, a back cover (3) is mounted on the surface of the housing (2), a circuit board (4) and an image acquisition card (7) are mounted on the surface of the back cover (3), a high frame rate image instantaneous judgment algorithm module (5) and a high-speed camera signal generation module (6) are integrated on the surface of the circuit board (4), and the high-speed camera signal generation module (6) comprises a video stream image receiving unit, an instantaneous state automatic judgment unit, an automatic camera trigger signal generation unit and a storage space automatic configuration unit.
8. A high-speed camera instantaneous trigger acquisition device according to claim 7, Features: The automatic camera trigger signal generation unit is connected to the storage space automatic configuration unit, the storage space automatic configuration unit is connected to the image acquisition card (7), the high-speed camera (1) is connected to the image acquisition card (7), the video stream image receiving unit and the automatic camera trigger signal generation unit, the video stream image receiving unit is connected to the instantaneous state automatic judgment unit, and the instantaneous state automatic judgment unit is connected to the automatic camera trigger signal generation unit.
