Event frame image alignment method based on space-time gradient propagation
Through the event frame image alignment method based on spatiotemporal gradient propagation, the poor alignment effect caused by relying on camera pose estimation in the prior art is solved, high-precision alignment and noise suppression in various scenarios are achieved, the application range is expanded, and the generation quality of event frames and visual task performance are improved.
Patent Information
- Application Number
- CN202511005831.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-07-22
AI Technical Summary
The event alignment method in the prior art relies on camera posture estimation, resulting in poor alignment effect when the camera is fixed or when moving objects in the scene, difficult to meet the requirements of high temporal and spatial resolution, and the effect is directly invalid in dynamic scenes.
The event frame image alignment method based on spatiotemporal gradient propagation is adopted, and the events are processed sequentially, the historical matrix and accumulation matrix are constructed, and the gradient information in the local spatiotemporal neighborhood is used for motion fitting and coordinate correction to achieve accurate alignment at the subpixel level.
It realizes high-precision alignment in multiple scenarios, effectively removes motion blur and noise, expands the application range, improves the generation quality of event frames and the performance of a variety of visual tasks.
Smart Images

Figure CN120510348A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing and computer vision, and in particular to an event frame image alignment method based on spatiotemporal gradient propagation. Background Art
[0002] With the development of event camera technology, capturing asynchronous events through pixel-level brightness changes has become an important means of solving problems in high-speed dynamic scenes. Traditional image processing methods mainly rely on continuous frame images, which often cannot meet the requirements of high spatiotemporal resolution for fast-moving or changing scenes. When using event data for image processing, the asynchronous event data needs to be preprocessed, which often requires de-motion blurring through alignment. Existing event alignment methods are usually based on coordinate reprojection based on camera pose estimation. This often makes it difficult to accurately capture local motion information in environments where the camera is fixed and there are moving objects in the scene, resulting in poor alignment results or even outright failure.
[0003] To address the scene limitations of traditional alignment methods, this paper proposes an event frame image alignment method based on spatiotemporal gradient propagation. This method is scene-independent and achieves sub-pixel precision alignment by sequentially processing events, establishing a history matrix, and performing cumulative processing. It leverages the gradient information of events within their local spatiotemporal neighborhood for motion fitting and coordinate correction. This technical solution not only effectively enhances the accuracy of event information but also effectively suppresses noise, making it well-suited for event data processing in dynamic scenarios. Summary of the Invention In view of the above problems, the present invention provides an event frame image alignment method based on spatiotemporal gradient propagation, which solves the problem in the prior art that it relies on camera pose estimation and can only be applied in a few specific shooting scenarios.
[0004] The present invention provides an event frame image alignment method based on spatiotemporal gradient propagation, the specific steps of which are as follows: Step S1: Divide the event stream data captured by the event camera into multiple event stream segments; Step S2: construct a history matrix and a cumulative matrix of the same size as the image resolution; Step S3: Process the events in the event stream segment one by one, obtain the spatiotemporal gradient of the current event based on the historical events in the spatiotemporal neighborhood of the history matrix; obtain the fitting starting point of the current event based on the spatiotemporal gradient of the current event and save it in the history matrix; Step S4: Calculate the corrected coordinates of the corresponding event based on the spatiotemporal coordinates of each event, the spatiotemporal coordinates of the fitting starting point, and the alignment time to obtain an updated cumulative matrix; Step S5: After all events in the event stream segment are processed according to steps S3 and S4, a final accumulation matrix is obtained, and logarithmic mapping and normalization processing are performed on the values in the final accumulation matrix to generate a grayscale event frame.
[0005] Optionally, the fitting gradient and likelihood of the current event relative to each historical event in the spatiotemporal neighborhood of the historical matrix are obtained, and the two best historical events are selected to calculate the spatiotemporal gradient of the current event.
[0006] Optionally, the specific steps for selecting two optimal historical events to calculate the spatiotemporal gradient of the current event are as follows: Get the relative gradient of current events and historical events; Get the fitted gradient of the current event; Based on the relative gradients of the current event and historical events, as well as the fitted gradient of the current event, the probability that each historical event and the current event are triggered by the same real-world point is obtained; For all historical events in the spatiotemporal neighborhood, the two historical events with the highest probability are selected, and the average of their fitted gradients is taken as the spatiotemporal gradient of the current event.
[0007] Optionally, the relative gradient of the current event and the historical events The expression is:
[0008] in, Indicates the current event c x Axis pixel coordinates, y Axis pixel coordinates and timestamps, Indicates the historical event n being fitted x Axis pixel coordinates, y Axis pixel coordinates and timestamps. Optionally, the fitted gradient of the current event The expression is: when hour: ; when hour: ; in, Represents the spatiotemporal gradient of historical event n.
[0009] Alternatively, the probability C of each historical event and the current event being triggered by the same real-world point is expressed as:
[0010] in, e Represents a natural constant.
[0011] Optionally, the expression of the spatiotemporal gradient G of the current event is:
[0012] in, and Represent the fitted spatiotemporal gradients of the two historical events s0 and s1 with the highest probability C respectively.
[0013] Optionally, the expression for the fitting starting point of the current event is:
[0014] in, Respectively represent the fitting starting point of the current event c x Axis pixel coordinates, y axis pixel coordinates and timestamps; and Represents the starting points of the two historical events s0 and s1 with the highest probability C x Axis pixel coordinates, y Axis pixel coordinates and timestamps.
[0015] Optionally, the specific steps of step S4 are as follows: Step S4-1: Obtaining the sub-pixel corrected coordinates of the current event based on the spatiotemporal coordinates of the current event and the spatiotemporal coordinates of the fitting starting point; Step S4-2: Map the sub-pixel level corrected coordinates of each current event to the integer pixel coordinates of the accumulation matrix, and perform accumulation processing on the corresponding integer pixel coordinates to obtain an updated accumulation matrix with added weight values.
[0016] Optionally, the specific steps of step S5 are as follows: Step S5-1: After all events in the segment are processed according to Step S3 and Step S4, a final cumulative matrix is obtained, and logarithmic mapping is performed on the values in the final cumulative matrix to obtain a normalized matrix; Step S5-2: setting a preset threshold, and performing filtering on the normalized matrix to obtain a filter matrix; Step S5-3: Generate an alignment event frame according to the filter matrix.
[0017] Compared with the prior art, the present invention has at least the following beneficial effects: (1) The alignment method used in this invention significantly overcomes the reliance of traditional alignment methods on camera pose estimation, and is therefore more adaptable and flexible. In various scenarios, including those with a fixed camera, those with a moving camera, and those with a static or dynamic subject, this method can achieve efficient and high-precision alignment event frame generation, greatly expanding its scope of application.
[0018] (2) The alignment method adopted by the present invention can process event data more effectively. Through the spatiotemporal gradient propagation mechanism, motion blur and some noise in the event data can be effectively removed during the alignment process, thereby improving the generation quality of event frames.
[0019] (3) The alignment method employed in this invention provides a practical and feasible data preprocessing paradigm for various applications of event cameras, especially those combined with frame cameras. By optimizing the processing flow of event data, this invention can significantly improve the performance of various vision tasks and promote the widespread application of event cameras in vision systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings are only for purposes of illustrating particular embodiments and are not to be considered limiting of the invention.
[0021] Figure 1 This is a flow chart of the event frame image alignment method based on spatiotemporal gradient propagation of the present invention.
[0022] Figure 2 Schematic diagram of the original event frame when the spatiotemporal gradient propagation method is not used for alignment.
[0023] Figure 3 Schematic diagram of event frames after alignment according to the event frame image alignment method based on spatiotemporal gradient propagation of the present invention. DETAILED DESCRIPTION
[0024] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. In addition, the present invention can also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited by the specific embodiments disclosed below.
[0025] A specific embodiment of the present invention, as Figure 1-Figure 3 , provides an event frame image alignment method based on spatiotemporal gradient propagation, the specific steps are as follows: Step S1: Divide the event stream data captured by the event camera into multiple event stream segments.
[0026] Specifically, event stream data is data used to record dynamic visual information. The event stream data is in the form of an event sequence. The event sequence contains multiple events arranged in chronological order. Each of the events contains a parameter vector [ x , y , p , t ],in, x and y For eventsx Axis pixel coordinates and y Axis pixel coordinates, indicating where the event occurs in the image, p is the polarity of the event, indicating the change in brightness, p A value of 1 indicates increased brightness (positive polarity), p A value of 0 indicates a decrease in brightness (negative polarity). t The timestamp of the event, indicating the time when the event occurred.
[0027] The present invention adopts a segmented processing method to divide the events in the event stream data into multiple windows according to timestamps.
[0028] Specifically, obtaining the event stream data captured by the event camera and the overall time range of the event stream data, including the start time and the end time; Determine the time window , starting from the start time, based on the time window Evenly dividing the overall time range into a plurality of time windows; For each event in the event stream data, the event is assigned to a corresponding time window according to the timestamp of the event, and a plurality of event stream segments are generated.
[0029] In some embodiments, the positive and negative polarities of the events are classified and processed, and two alignment event frames with different polarities are generated, or an alignment event frame is generated that distinguishes the positive and negative polarities by grayscale.
[0030] Step S2: Construct a history matrix M with the same size as the image resolution h and the cumulative matrix M f .
[0031] Specifically, the history matrix M h Each pixel coordinate corresponds to a linear list. Events can be stored in the cells of the list corresponding to the pixel coordinates, and each cell stores an event. The content of each event includes the timestamp t of the event, the spatiotemporal gradient G of the event, and the spatiotemporal coordinates (x, y, t) of the starting point of the event. Furthermore, the spatiotemporal gradient of an event is: the differential of the pixel displacement of the real-world point corresponding to the event in the event camera coordinate system with respect to time. This gradient represents the displacement speed of the real-world point corresponding to the event on the image plane. The world point refers to the real physical world point that triggers the event. For example, when photographing a table, the corner of the table is a real-world point, which will trigger multiple events during the photographing process. In the records of the event camera, the timestamps and coordinates of these events are different, but they all correspond to the same world point (the corner of the table).
[0032] Furthermore, the spatiotemporal coordinates of the starting point of an event are: the pixel coordinates of the real-world point corresponding to the event in the event camera coordinate system at the starting moment of the event stream segment, and the timestamp of the corresponding event stream segment starting moment under the camera clock.
[0033] Specifically, the accumulation matrix M f Each pixel coordinate is used to record the accumulation of event points aligned to the pixel coordinate, and the accumulation matrix M f Finally, it is used to generate aligned event frame images.
[0034] Step S3: Process the events in the event stream segment one by one, according to the history matrix M h Historical events in the spatiotemporal neighborhood are used to obtain the spatiotemporal gradient of the current event; the fitting starting point is obtained based on the spatiotemporal gradient of the current event and saved in the historical matrix M h middle.
[0035] Furthermore, the current event is calculated relative to the historical matrix M h The fitting gradient G of each historical event in the spatiotemporal neighborhood fit and possibility C, and select the two best historical events to calculate the spatiotemporal gradient and starting point of the current event.
[0036] It is understood that the specific event being processed is called the current event; the processed event is the historical event and is stored in the history matrix M h middle.
[0037] Specifically, obtain the relative gradient of the current event and the historical event , the expression is:
[0038] in, Represents the time and space coordinates of the current event c (corresponding to the current event c x Axis pixel coordinates, y axis pixel coordinates and timestamps), Indicates the time and space coordinates of the historical event n being fitted (corresponding to the time and space coordinates of the historical event n being fitted x Axis pixel coordinates, y axis pixel coordinates and timestamps). The fitted gradient of the current event The expression is: when hour: ; when hour: ; in, Represents the spatiotemporal gradient of historical event n.
[0039] In some embodiments, linear, cubic, multi-time, etc. motion models are used to fit the spatiotemporal gradient of the current event.
[0040] Furthermore, the probability C of each historical event and the current event being triggered by the same real-world point is obtained, which is expressed as:
[0041] in, e Represents a natural constant.
[0042] In some embodiments, the likelihood is calculated using similarity methods such as Jaccard distance, NCC correlation, and cosine similarity.
[0043] Furthermore, for all historical events in the spatiotemporal neighborhood, the two historical events with the highest probability C are selected, and the average value of their fitted gradients is taken as the spatiotemporal gradient G of the current event, which is expressed as:
[0044] in, and They represent the fitted spatiotemporal gradients of the two historical events with the highest probability C.
[0045] Furthermore, for all historical events in the spatiotemporal neighborhood, the two historical events with the highest probability C are selected, and the midpoint of their starting points is taken as the fitting starting point of the current event. The expression is:
[0046] in, Indicates the time and space coordinates of the fitting starting point of the current event c (corresponding to the time and space coordinates of the current event c x Axis pixel coordinates, y axis pixel coordinates and timestamps); and The table shows the time-space coordinates of the starting points of the two historical events with the highest probability C (corresponding to the time-space coordinates of the two historical events with the highest probability C, s0 and s1). x Axis pixel coordinates, y axis pixel coordinates and timestamps). In some embodiments, the spatial-temporal coordinates of the starting point of the current event are calculated by using the historical event with the highest probability C alone, the top N historical events with the highest probability C, performing arithmetic averaging, or performing weighted averaging according to the exponential power of the probability C.
[0047] Furthermore, the spatiotemporal neighborhood of the current event is: the history matrix M hAmong all events stored in , the Manhattan distance to the pixel coordinates of the current event is less than the preset threshold r, and the timestamp difference is less than the preset threshold t max The events of constitute the spatiotemporal neighborhood of the current event.
[0048] Step S4: Calculate the corrected coordinates of the corresponding event based on the spatiotemporal coordinates of each event, the spatiotemporal coordinates of the fitting starting point, and the alignment time to obtain an updated cumulative matrix; Step S4-1: According to the spatiotemporal coordinates (x s ,y s ,t s ) and space-time coordinates (x c ,y c ,t c ), obtain the sub-pixel corrected coordinates (x′, y′) of the current event c, expression:
[0049] .
[0050] in, The start timestamp of the event stream segment.
[0051] Step S4-2: Correct the coordinates (x′, y′) of each current event c according to the sub-pixel level (i.e.: x Axis sub-pixel level correction coordinates, y Axis sub-pixel corrected coordinates), mapped to the accumulation matrix M f The integer pixel coordinates of the image are accumulated by using the distance-based weight distribution method to obtain an updated accumulation matrix with added weight values. Step S4-2-1, selecting multiple integer pixel coordinates closest to the sub-pixel corrected coordinate (x′, y′); Preferably, the four integer pixel coordinates closest to the sub-pixel corrected coordinates are selected.
[0052] Step S4-2-2: Calculate the weight corresponding to each integer pixel coordinate using bilinear interpolation based on the difference between the sub-pixel corrected coordinate and the plurality of integer pixel coordinates; Step S4-2-3: Accumulate the weights corresponding to the multiple integer pixel coordinates in step S4-2-2 into the accumulation matrix M f The corresponding pixel coordinate value is obtained by adding the weight value to update the accumulation matrix.
[0053] Step S5: After all events in the segment are processed according to steps S3 and S4, a final accumulation matrix is obtained, and logarithmic mapping and normalization processing are performed on the values in the final accumulation matrix to generate a grayscale event frame.
[0054] Step S5-1: After processing all events in the fragment according to steps S3 and S4, the final accumulation matrix is obtained M f , for the final cumulative matrix M f The values in are logarithmically mapped to obtain the normalized matrix , to enhance the contrast and reduce the impact of extreme values. Subsequently, the result is normalized so that its value range is mapped to [0,1] and converted into a grayscale value that conforms to the standard grayscale image pixel range. The expression is:
[0055] ; in, Represents the final cumulative matrix M f Logarithmic matrix after logarithmic processing; Represents the logarithmic result The normalized matrix after normalization.
[0056] Step S5-2: Set a preset threshold T and normalize the matrix Perform filtering to obtain the filter matrix , to suppress noise and highlight valid event information.
[0057] According to the normalized matrix The midpoint ( x , y ) coordinate values , calculate the filter matrix The coordinate value of the corresponding coordinate point , the expression is: .
[0058] Step S5-3: According to the filter matrix Generate a frame of aligned events.
[0059] It can be understood that according to the filter matrix Generate an aligned event frame obtained through format conversion.
[0060] See also Figure 2 and Figure 3 , you can see that the aligned event frames become significantly clearer, the outlines of the captured objects in the image can be seen clearly, and some noise has been removed.
[0061] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with this technical field within the technical scope disclosed by the present invention should be covered by the scope of protection of the present invention.
Claims
1. An event frame image alignment method based on spatiotemporal gradient propagation, characterized in that: The specific steps are as follows: Step S1: Divide the event stream data captured by the event camera into multiple event stream segments; Step S2: construct a history matrix and a cumulative matrix of the same size as the image resolution; Step S3: Process the events in the event stream segment one by one, obtain the spatiotemporal gradient of the current event based on the historical events in the spatiotemporal neighborhood of the history matrix; obtain the fitting starting point of the current event based on the spatiotemporal gradient of the current event and save it in the history matrix; Step S4: Calculate the corrected coordinates of the corresponding event based on the spatiotemporal coordinates of each event, the spatiotemporal coordinates of the fitting starting point, and the alignment time to obtain an updated cumulative matrix; Step S5: After all events in the event stream segment are processed according to steps S3 and S4, a final accumulation matrix is obtained, and logarithmic mapping and normalization processing are performed on the values in the final accumulation matrix to generate a grayscale event frame.
2. The event frame image alignment method according to claim 1, characterized in that: Obtain the fitting gradient and probability of the current event relative to each historical event in the spatiotemporal neighborhood of the historical matrix, and select the two best historical events to calculate the spatiotemporal gradient of the current event.
3. The event frame image alignment method according to claim 2, characterized in that: The specific steps for selecting two optimal historical events to calculate the spatiotemporal gradient of the current event are as follows: Get the relative gradient of current events and historical events; Get the fitted gradient of the current event; Based on the relative gradients of the current event and historical events, as well as the fitted gradient of the current event, the probability that each historical event and the current event are triggered by the same real-world point is obtained; For all historical events in the spatiotemporal neighborhood, the two historical events with the highest probability are selected, and the average of their fitted gradients is taken as the spatiotemporal gradient of the current event.
4. The event frame image alignment method according to claim 3, characterized in that: The relative gradient of current events and historical events The expression is: in, Indicates the current event c x Axis pixel coordinates, y Axis pixel coordinates and timestamps, Indicates the historical event n being fitted x Axis pixel coordinates, y Axis pixel coordinates and timestamps.
5. The event frame image alignment method according to claim 4, characterized in that: The fitted gradient of the current event The expression is: when hour: ; when hour: ; in, Represents the spatiotemporal gradient of historical event n.
6. The event frame image alignment method according to claim 5, characterized in that: The probability C that each historical event and the current event are triggered by the same real-world point is expressed as: in, e Represents a natural constant.
7. The event frame image alignment method according to claim 6, characterized in that: The expression of the space-time gradient G of the current event is: in, and Represent the fitted spatiotemporal gradients of the two historical events s0 and s1 with the highest probability C respectively.
8. The event frame image alignment method according to claim 7, characterized in that: The expression of the fitting starting point of the current event is: in, Respectively represent the fitting starting point of the current event c x Axis pixel coordinates, y axis pixel coordinates and timestamps; and Represents the starting points of the two historical events s0 and s1 with the highest probability C x Axis pixel coordinates, y Axis pixel coordinates and timestamps.
9. The event frame image alignment method according to claim 8, characterized in that: The specific steps of step S4 are as follows: Step S4-1: Obtaining the sub-pixel corrected coordinates of the current event based on the spatiotemporal coordinates of the current event and the spatiotemporal coordinates of the fitting starting point; Step S4-2: Map the sub-pixel level corrected coordinates of each current event to the integer pixel coordinates of the accumulation matrix, and perform accumulation processing on the corresponding integer pixel coordinates to obtain an updated accumulation matrix with added weight values.
10. The event frame image alignment method according to claim 9, characterized in that: The specific steps of step S5 are as follows: Step S5-1: After all events in the segment are processed according to Step S3 and Step S4, a final cumulative matrix is obtained, and logarithmic mapping is performed on the values in the final cumulative matrix to obtain a normalized matrix; Step S5-2: setting a preset threshold, and performing filtering on the normalized matrix to obtain a filter matrix; Step S5-3: Generate an alignment event frame according to the filter matrix.
Citation Information
Patent Citations
Dual-event camera synchronous acquisition system and noise event suppression method
CN116389682A
Event camera and CMOS (Complementary Metal Oxide Semiconductor) camera-based throwing object tracking method
CN117689881A
Image processing method and device
CN118864803A
Event feature extraction method based on spatial gradient variance maximization
CN119380042A
Optical flow techniques for event cameras
US10600189B1