A method for temporal and spatial matching between event cameras and traditional optical cameras
By using scene similarity matching and Sobel edge extraction operators in event cameras and traditional cameras to re-represent event stream data, high-precision spatio-temporal matching between event cameras and traditional cameras is achieved, which solves the problem of frame rate asynchrony and ensures Temporal and spatial matching accuracy.
Patent Information
- Application Number
- CN202210079982.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-24
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-01-24
AI Technical Summary
It is difficult to achieve time matching between event cameras and traditional cameras in high-speed, high-frame-rate scenes, resulting in field of view deviation and time desynchronization. Existing matching algorithms cannot be directly applied to the task of matching event streams and image frame data.
Scene similarity is used as the matching index, and the field of view is matched between the image frames of the event camera and the traditional camera in the static scene, and the common scene structure information is extracted from the dynamic scene, and the Sobel edge extraction operator and bilinear interpolation are used to re- Event stream data are represented to synchronize with conventional camera frame rates, and average structural similarity metrics are calculated for temporal matching.
It achieves high-precision spatio-temporal matching between event cameras and traditional cameras, solving the problem of low matching accuracy caused by frame rate asynchrony. It takes advantage of the high temporal resolution of event streams to ensure the accuracy of temporal continuity and spatial matching. .
Smart Images

Figure CN114463399B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image processing, and in particular relates to cross-modal camera spatiotemporal matching of event cameras and traditional optical cameras. Background Art
[0002] In real life, in computer vision fields such as robotics, remote sensing, target detection and tracking, multimodal sensors such as visible light, infrared, and depth are often used to collect multimodal data and fuse them, so as to obtain complete information about the target scene and improve the accuracy of subsequent algorithms. In recent years, a new type of dynamic visual sensor (event camera) based on the principle of biological retina has been born. The event camera perceives and measures the brightness change of each pixel in the logarithmic domain. Whenever the brightness change of a pixel exceeds the threshold, an event point containing pixel coordinates, polarity, and timestamp is stimulated, thereby forming an event stream data containing a large number of event points. Compared with traditional cameras that output images frame by frame, the characteristic of asynchronous output of each pixel enables event cameras to have high temporal resolution, and there will be no dynamic blur in high-speed scenes. In addition, the property of sensing brightness changes in the logarithmic domain enables the camera to have a higher dynamic range, and it can also correctly image in some extreme lighting scenes. At present, imaging systems based on the fusion of event cameras and traditional cameras are widely used in high-speed, high-frame-rate, and high-dynamic scene imaging and reconstruction.
[0003] Since the resolution of event cameras is generally low, event cameras and high-resolution traditional cameras are often used to collect data and fuse images at the same time to obtain higher resolution imaging results. The data acquisition system based on dual cameras requires that the two types of data match in space (field of view) and synchronize the timestamps. However, due to the limited design accuracy of each device and the hardware design differences between different cameras, the problems of field of view deviation and time asynchrony occur. In space, the static scene image frames output by event cameras and traditional cameras can often be used to match the field of view area. In time, dynamic scene data is needed for matching. Since the image frame rate output by event cameras is low and is not synchronized with the image frame output of traditional optical cameras, it is impossible to obtain the corresponding image frame sequence in time when shooting in a moving scene, which makes it difficult to effectively achieve time matching or the matching accuracy is low. To address this problem, it is possible to consider using event stream data to match the image frames output by traditional cameras. Event stream data with high temporal resolution can observe the scene approximately continuously, so it can effectively solve the problem of the inability to correspond between the image frame sequences of event cameras and traditional cameras. However, since event cameras record pixel brightness changes as asynchronous event points, while traditional cameras record the absolute brightness information of pixels as image frames, the differences in data structure and properties make some existing matching algorithms unable to be directly applied to the matching tasks of event streams and image frame data. Summary of the invention
[0004] In view of the above problems, the present invention provides a method for spatiotemporal matching of event cameras and traditional cameras. The method uses scene similarity as the matching index. First, the image frames output by the event camera and the traditional camera in static scenes are used to match the field of view. Then, the common scene structure information is extracted from the event stream output by the dynamic scene and the traditional image frame sequence to complete the time matching.
[0005] The present invention provides a method for spatiotemporal matching of an event camera and a traditional camera, comprising the following specific steps:
[0006] Step 1: Field of view matching: In a static scene, obtain the image frame output by the event camera and the image frame after bilinear interpolation of the traditional camera, and perform field of view matching based on structural similarity.
[0007] Step 2: Extract structural features of dynamic scene image frames. Use the Sobel edge extraction operator to extract scene structures from the image frame sequence output by the traditional camera, and perform cropping and bilinear interpolation based on the view frame area searched in step 1 to obtain a sequence of structural feature maps about the scene.
[0008] Step 3: Extract structural features of dynamic scene event streams. Under the assumed time offset, the event stream is re-represented as a time-synchronized event frame sequence with the same frame rate as the traditional camera, and cropped according to the viewing frame area set in step 1 to obtain a sequence of structural feature maps of the scene.
[0009] Step 4: Time matching. Match the search time difference within a certain time range, repeat step 3 under different assumed time differences to generate the structural feature graph sequence of the event stream, and calculate the average structural similarity index with the structural feature graph sequence obtained in step 2 to obtain the accurate time offset.
[0010] Furthermore, the event camera image frame and the traditional camera image frame described in step 1 are expressed as
[0011]
[0012]
[0013] Among them, (H E , W E ) is the event camera image size, (H F , W F ) is the traditional camera image size.
[0014] Furthermore, the bilinear interpolation described in step 1 is expressed as
[0015]
[0016]
[0017]
[0018] Where I represents a frame of image, P = (x, y) is the coordinate of the point to be interpolated, R1 = (x, y1), R2 = (x, y2) is the first interpolation coordinate in the x direction, Q 11 =(x1,y1),Q 12 =(x1,y2),Q 21 =(x2,y1),Q 22 =(x2, y2), which are the coordinates of four adjacent pixels.
[0019] Furthermore, the calculation method of the structural similarity in step 1 can be expressed as
[0020] SSIM(X,Y)=[L(X,Y) a ]×[C(X,Y) b ]×[S(X,Y) c ]
[0021] Among them, SSIM is the structural similarity calculation function, a>0, b>0, c>0 are weighting coefficients of each component. μ X and μ Y represent the means of X and Y respectively, σ X , σ Y and σ XY Represent the variance of images X and Y and their covariance respectively. C1, C2, and C3 are constants used to maintain the stability of the operation and avoid division by zero. They are expressed as follows:
[0022] C1=(k1L) 2
[0023] C2=(k2L) 2
[0024] C3=C2 / 2
[0025] Among them, k1 and k2 are generally set as scale coefficients, and L is the number of gray levels of the image.
[0026] Furthermore, the conventional camera image frame sequence described in step 2 is expressed as
[0027]
[0028] in, The nth image in the image frame sequence output by a traditional camera, where N is the number of image frames contained in the sequence.
[0029] The Sobel edge extraction described in step 2 is expressed as:
[0030]
[0031] Among them, X is the input image, Y is the image after edge extraction, is a two-dimensional convolution operation, abs is the absolute value, Sobel x , Sobel y are the Sobel operators in the x and y directions respectively, which are expressed as:
[0032]
[0033]
[0034] Furthermore, the event stream data described in step 3 can be expressed as:
[0035] e k =(x k , t k , p k )
[0036] x k =(x k ,y k )
[0037] x k ∈[1,W E ],y k ∈[1,H E ], p k ∈{0, 1}
[0038] Among them, e k is the kth event point data, x k ,y k is the pixel coordinate of the kth event point; p k is the event polarity (a polarity of 1 means that the brightness of the point increases, and a polarity of -1 means that the brightness of the point decreases); t k The timestamp of the event.
[0039] The event frame described in step 3 is represented as:
[0040]
[0041] in It is represented as the nth event frame obtained by using the event stream. The re-representation process of the event stream is:
[0042]
[0043] Where x is the pixel coordinate of the event frame image, δ is the Dirac function, and t nis the timestamp of the nth traditional camera image frame, Δt is the time length used to calculate the event frame, and dt is the assumed timestamp offset.
[0044] Furthermore, the average structural similarity in step 4 is expressed as:
[0045]
[0046] Among them, SSIM mean is the average structural similarity calculation function, and Sobel is the edge extraction function;
[0047] By setting the initial value of dt and the iteration step, if the current SSIM mean >SSIM best , then update SSIM mean and dt, and iterates continuously according to the iteration step until dt>T, the iteration ends, and the best time difference matching result is output, including the best structural similarity SSIM best and the best matching time difference dt best ; Where T represents the end value of the time difference iteration, and step represents the time difference step size of each loop iteration.
[0048] Compared with the prior art, the advantages of the present invention are:
[0049] The present invention solves the spatiotemporal correction problem of imaging systems based on event cameras and traditional cameras, and uses the image frames and event stream data output by the event camera to match the image frame sequence output by the traditional camera for field of view matching and time matching. The present invention takes advantage of the high temporal resolution of the event stream, and re-represents the time-continuous event stream as an event frame sequence synchronized with the frame rate of the traditional camera. By extracting and matching scene structural features, high-precision time matching is achieved, solving the problem of ineffective time matching between cameras due to asynchronous output frame rates. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 Hardware platform for dual-camera shooting.
[0051] Figure 2 The present invention is an overall implementation flow chart of the method.
[0052] Figure 3 Detailed flowchart for time matching search.
[0053] Figure 4 The original image frames of the event camera and the traditional camera and the set view frame; (a) is the original image frame of the event camera and the set view frame; (b) is the original image frame of the traditional optical camera and the matched view frame.
[0054] Figure 5The scene structure feature maps are extracted from the image frames of the traditional camera and the event camera, where (a) is the scene structure feature map extracted from the image frame of the traditional camera; (b) is the scene structure feature map extracted from the event camera.
[0055] Figure 6 Detailed flowchart for spatial field matching search.
[0056] Figure 7 The image frames and event flow superposition diagrams before and after time matching, where (a) is the image frames and event flow superposition diagram when time is not matched; (b) is the image frames and event flow superposition diagram after time matching. DETAILED DESCRIPTION
[0057] In order to understand the present invention more clearly, the following Figure 1 An example is described to more clearly and completely introduce the technical content of the present invention. Obviously, the described example is only a part of the present invention, not all implementation examples. Based on the example in the present invention, all other examples obtained by ordinary technicians in the field without creative work are within the scope of protection of the present invention.
[0058] The specific embodiment of the present invention is a method for spatiotemporal matching between an event camera and a traditional camera.
[0059] The hardware platform of the specific implementation mode of the present invention is shown in the attached figure Figure 1 As shown, it includes: event camera, traditional optical camera, spectroscope, computer terminal;
[0060] The event camera and the traditional optical camera are connected via a beam splitter and use lenses of the same specifications;
[0061] The computer terminal is connected to the event camera and the traditional optical camera;
[0062] The event camera is used to collect image frames and event stream data, and the traditional optical camera collects high-resolution image frame data and transmits it to the computer terminal;
[0063] The event camera model is a Davis346 event camera; the traditional optical camera is a FLIR BFS-U3-04S2C-CS camera, and the lens is designed so that the image resolution of the traditional optical camera is twice that of the event camera;
[0064] The computer terminal is connected to the event camera and the traditional camera respectively through two USB 3.0 interfaces.
[0065] The overall flow chart of the present invention is shown in the attached figure Figure 2 As shown, the specific steps are as follows:
[0066] Step 1: After acquiring the image frames output by the event camera and the traditional camera in a static scene, bilinear interpolation is first used to make the image resolution of the traditional camera the same as that of the event camera, and then a view frame matching search is performed using the image frames output by the event camera and the image frames output by the traditional camera after downsampling based on structural similarity (SSIM).
[0067] The event camera image frame I described in step 1 E Compared with traditional optical camera image frame I F Expressed as
[0068]
[0069]
[0070] Among them, (H E , W E )=(260,346) is the event camera image size, (H F , W F )=(540, 720) is the traditional camera image size.
[0071] The bilinear interpolation described in step 1 is expressed as:
[0072]
[0073]
[0074]
[0075] Where I refers to the image, P(x, y) is the coordinate of the point to be interpolated, R1 = (x, y1), R2 = (x, y2) is the first interpolation coordinate in the x direction, Q 11 =(x1,y1),Q 12 =(x1,y2),Q 21 =(x2,y1),Q 22 =(x2, y2), are the coordinates of the four adjacent pixels. Since the image resolution of the traditional camera of this system is twice that of the event camera, bilinear interpolation is used to downsample the traditional camera image frame by 1 / 2. The size of the traditional camera image frame after interpolation is (H F2 , W F2 )=(270,360) pixels.
[0076] The calculation method of structural similarity in step 1 can be expressed as
[0077] SSIM=[L(X,Y) a ]×[C(X,Y) b ]×[S(X,Y) c ]
[0078] in a>0, b>0, c>0 are weighted coefficients of each component, and a=b=c=1 is generally set. X and μ Y represent the means of X and Y respectively, σ X , σ Y and σ XY Represent the variance of images X and Y and their covariance respectively. C1, C2, and C3 are constants used to maintain the stability of the operation and avoid division by zero. They are expressed as follows:
[0079] C1=(k1L) 2
[0080] C2=(k2L) 2
[0081] C3=C2 / 2
[0082] Among them, k1=0.01, k2=0.03 are generally set as scale coefficients, L is the grayscale level of the image, and for 8-bit images, L is set to 255.
[0083] Refer to the detailed flowchart of matching search in step 1 Figure 3 First, the parameters are initialized, and the view frame size is set to (H, W) = (256, 320) pixels. The view frame in the event camera image frame is fixed. Figure 4 As shown in (a), let the view frame offset dx=dy=0 on the x and y axes in the traditional camera image frame, and set the search range in the x and y directions to (H F2 -H, W F2 -W) = (14, 40), set the optimal structural similarity SSIM best = 0 and start the cyclic search. In each search, the structural similarity of the event camera and the traditional camera image frame is calculated respectively. The higher the structural similarity, the more the field of view between the two images is matched. If the currently calculated SSIM>SSIM best , then update dx best ,dy best and SSIM best , after all possible offsets have been traversed, the best view frame offset (dx best ,dy best ), complete the field of view matching, such as Figure 4 (b) as shown.
[0084] Step 2: Use the Sobel edge extraction operator to perform edge extraction on the image frame sequence, and perform image cropping and bilinear interpolation based on the matching view frame searched in step 1 to obtain a sequence of structural feature maps about the scene.
[0085] The conventional camera image frame sequence described in step 2 is represented as
[0086]
[0087] in, is the nth image in the image frame sequence output by the traditional camera, and N=30 is the number of image frames contained in the sequence.
[0088] The Sobel edge extraction described in step 2 is expressed as
[0089]
[0090] Among them, X is the input image, Y is the image after edge extraction, is a two-dimensional convolution operation, abs is the absolute value, Sobel x , Sobel y are the Sobel operators in the x and y directions respectively, which are expressed as
[0091]
[0092]
[0093] Figure 5 (a) is the result of Sobel edge extraction of a single image frame.
[0094] Step 3: Based on the given time difference dt, the continuous event stream output by the event camera in the dynamic scene is re-represented as an event frame sequence and cropped according to the view frame set in step 1 to obtain a scene structure feature map sequence whose frame rate and timestamp are synchronized with the traditional camera image frame sequence.
[0095] The event stream data described in step 3 can be represented as:
[0096] e k =(x k , t k , p k )
[0097] x k =(x k ,y k )
[0098] x k ∈[1,W E ],y k ∈[l,H E ], p k ∈{0,1)
[0099] Among them, e kis the kth event point data, x k ,y k is the pixel coordinate of the kth event point; p k is the event polarity (a polarity of 1 means that the brightness of the point increases, and a polarity of -1 means that the brightness of the point decreases); t k The timestamp of the event.
[0100] The event frame described in step 3 is represented as
[0101]
[0102] in It is represented as the nth event frame obtained by using the event stream, and a total of N = 30 event frame sequences are generated. The re-representation of the event stream is to accumulate the event point data within a certain time range in time to obtain an event frame, which can be represented as
[0103]
[0104] Where x is the pixel coordinate of the event frame image, δ is the Dirac function, and t n is the timestamp of the nth traditional camera image frame, ensuring the synchronization of the event frame and the image frame, Δt=0.001 is the time length used to calculate the event frame, and dt is the assumed timestamp offset. Through the above method, the event stream can be re-represented to obtain the event frame sequence about the scene edge information, which contains the structural characteristics of the scene. Figure 5 (b) is a single event frame obtained by accumulating event streams.
[0105] Step 4: Time difference matching flowchart reference in step 4 Figure 6 First, assume that the initial time difference dt = -0.3s, SSIM best =0, the iteration step of each time difference is step=0.0001s, and the time difference iteration end value T=0.3s. In each iterative search, the current time difference dt is brought into step 3 to calculate the corresponding event stream structure feature graph sequence, and the search time difference is matched. Step 3 is repeated under different assumed time differences to calculate the structure feature graph sequence of the event stream, and the average structure similarity index is calculated with the structure feature graph sequence obtained in step 2 to obtain the accurate time offset.
[0106] The average structural similarity in step 4 is expressed as
[0107]
[0108] Among them, SSIM is the structural similarity calculation function, and Sobel is the edge extraction function.
[0109] In step 4, if the current SSIM mean>SSIM best , then update SSIM mean and dt, and iterates continuously according to the iteration step until dt>T, the iteration ends, and the best time difference matching result is output, including the best structural similarity SSIM best and the best matching time difference dt best . Figure 7 (a) shows the image frames and event flow accumulation graph without matching time, where the white point cloud represents the event flow data. Figure 7 (b) shows the image frames and event stream accumulation graph after time matching. The method of the present invention effectively realizes the spatiotemporal matching between the event camera and the traditional optical camera.
[0110] It should be understood that the technical parts not elaborated in detail in this specification belong to the prior art.
[0111] It should be understood that the above description of the preferred embodiments is relatively detailed, but it cannot be regarded as limiting the scope of protection of the patent for the invention. Under the guidance of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested for the present invention shall be based on the attached claims.
Claims
1. A method for spatiotemporal matching of an event camera and a traditional optical camera, characterized in that: The following steps are involved: Step 1, after obtaining the image frames output by the event camera and the traditional optical camera in the static scene, first use bilinear interpolation to make the image resolution of the traditional camera the same as that of the event camera, and then use the image frames output by the event camera and the image frames output by the traditional optical camera after downsampling to perform a view frame matching search based on the structural similarity SSIM; The bilinear interpolation in step 1 is expressed as: Where I refers to the image, P = (x, y) is the coordinate of the point to be interpolated, R1 = (x, y1), R2 = (x, y2) is the first interpolation coordinate in the x direction, Q 11 =(x1,y1),Q 12 =(x1,y2),Q 21 =(x2,y1),Q 22 =(x2, y2), which are the coordinates of four adjacent pixel points. Since the image resolution of the traditional optical camera is twice that of the event camera, bilinear interpolation is used to downsample the image frame of the traditional optical camera by 1 / 2; In step 1, the structural similarity can be expressed as: SSIM(X,Y)=[L(X,Y) a ]×[C(X,Y) b ]×[S(X,Y) c ] Among them, SSIM is the structural similarity calculation function, a>0, b>0, c>0 are weighted coefficients of each component; μ X and μ Y represent the means of X and Y respectively, σ X , σ Y and σ XY Represent the variance of images X and Y and their covariance respectively. C1, C2, and C3 are constants used to maintain the stability of the operation and avoid division by zero. They are expressed as follows: C1=(k1L) 2 C2=(k2L) 2 C3=C2 / 2 Among them, k1 and k2 are set as scale coefficients, and L is the grayscale level of the image; Step 2, using the Sobel edge extraction operator to extract the scene structure from the image frame sequence output by the traditional optical camera, and cropping and bilinear interpolation are performed according to the view frame area searched in step 1 to obtain a sequence of structural feature maps about the scene; Step 3, under the assumed time offset, by re-representing the event stream as a time-synchronized event frame sequence with the same frame rate as the traditional optical camera, and cropping it according to the view frame area in step 1, a sequence of structural feature maps of the scene is obtained; Step 4, match the search time difference within a certain time range, repeat step 3 under different assumed time differences to generate a structural feature graph sequence of the event stream, and calculate the average structural similarity index with the structural feature graph sequence obtained in step 2, so as to obtain the precise time offset and output the best time difference matching result.
2. The method for spatiotemporal matching of an event camera and a traditional optical camera according to claim 1, characterized in that: The event camera image frame I described in step 1 E Compared with traditional optical camera image frame I F It is expressed as: Among them, (H E , W E ) is the event camera image size, (H F , W F ) is the image size of a traditional optical camera.
3. The method for spatiotemporal matching of an event camera and a traditional optical camera according to claim 1, characterized in that: The traditional optical camera image frame sequence in step 2 is expressed as: in, is the nth image in the image frame sequence output by the traditional optical camera, and N is the number of image frames contained in the sequence; The Sobel edge extraction described in step 2 is expressed as: Among them, X is the input image, Y is the image after edge extraction, is a two-dimensional convolution operation, abs is the absolute value, Sobel x , Sobel y are the Sobel operators in the x and y directions respectively, which are expressed as:
4. The method for spatiotemporal matching of an event camera and a traditional optical camera according to claim 1, characterized in that: In step 3, the event stream data can be represented as: e k =(x k ,t k ,p k ) x k =(x k ,y k ) x k ∈[1,W E ],y k ∈[1,H E ],p k ∈{0,1} Among them, e k is the kth event point data, x k ,y k is the pixel coordinate of the kth event point; p k is the event polarity, a polarity of 1 means the brightness of the point increases, and a polarity of -1 means the brightness of the point decreases; t k The timestamp of the event point; The event frame in step 3 is represented as: in It is represented as the nth event frame obtained by using the event stream, where N is the number of image frames. The re-representation process of the event stream is: Where x is the pixel coordinate of the event frame image, δ is the Dirac function, and t n is the timestamp of the nth traditional optical camera image frame, Δt is the time length used to calculate the event frame, and dt is the assumed timestamp offset.
5. The method for spatiotemporal matching of an event camera and a traditional optical camera according to claim 4, characterized in that: The average structural similarity in step 4 is expressed as: Among them, SSIM mean is the average structural similarity calculation function, and Sobel is the edge extraction function; By setting the initial value of dt and the iteration step, if the current SSIM mean >SSIM best , then update SSIM mean and dt, and iterates continuously according to the iteration step until dt>T, the iteration ends, and the best time difference matching result is output, including the best structural similarity SSIM best and the best matching time difference dt best ; Where T represents the end value of the time difference iteration, and step represents the time difference step size of each loop iteration.
6. The method for spatiotemporal matching of an event camera and a traditional optical camera according to claim 1, characterized in that: The event camera model is the Davis346 event camera; the traditional optical camera is the FLIR BFS-U3-04S2C-CS camera.
Citation Information
Patent Citations
Dynamic vision sensor DVS event processing method and device
CN108073857A
Event camera image reconstruction method and system based on manifold constraint
CN111798370A
Exercise training evaluation system and method based on cooperation of event camera and visual camera
CN113688741A
