Method and system for determining vehicle motion state based on background flow
By using a background flow-based vehicle motion state determination method, which utilizes optical flow tracking and background optical flow technology, the motion state and speed of a vehicle can be determined quickly and accurately. This solves the problems of computational complexity and reliance on camera intrinsic parameters in existing technologies, and achieves high real-time performance and high accuracy in vehicle motion state determination.
Patent Information
- Application Number
- CN202310309433.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-24
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-03-24
AI Technical Summary
In scenarios where speed cannot be obtained or the speed is inaccurate, existing technologies struggle to quickly and accurately determine the vehicle's motion status, especially when onboard sensors malfunction or GPS signals are blocked. Conventional methods are computationally complex and rely too heavily on camera intrinsic parameters, making it impossible to determine the vehicle's motion status in a timely manner.
A background flow-based vehicle motion state determination method is adopted. By acquiring image sequences in real time, removing moving targets, performing optical flow tracking feature matching, calculating the GRIC values of the fundamental matrix F and the homography matrix H, and combining the FOE points of the background optical flow, the motion state and direction of the vehicle are determined, and the information of the image itself is used for rapid determination.
It achieves real-time vehicle motion status judgment on edge devices, without relying on camera intrinsic parameters, improving accuracy and stability, and can quickly calculate the forward or backward speed of the vehicle, thus improving the accuracy of the judgment.
Smart Images

Figure CN116385487B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of automatic driving, and particularly relates to a vehicle motion state judgment method and system based on images. BACKGROUND
[0002] In a scene where speed cannot be obtained or the obtained speed is inaccurate, how to accurately obtain the motion state of the vehicle is very crucial for the implementation of certain automatic driving functions. For example, during automatic driving, when a vehicle-mounted sensor fails or passes through a GPS signal blocked area such as a tunnel, it is easy to cause the vehicle motion state to be unable to be obtained, at which time the current motion state of the vehicle needs to be timely and accurately judged, so as to quickly make the next decision. In the modern complex and changeable traffic environment, in the dynamic scene where a large number of moving targets exist around the vehicle, the conventional motion state judgment method may not be able to timely judge the current motion state of the vehicle. For example, patent application CN102999759A discloses a vehicle motion state estimation method based on optical flow, which realizes vehicle motion state estimation based on multi-frame image corner detection and optical flow tracking. However, this method still needs camera intrinsic parameter calibration, relies on too many parameters, and the calculation process is also relatively complex, and cannot quickly calculate the vehicle motion state. SUMMARY
[0003] Therefore, the application provides a vehicle motion state judgment method and system based on background flow, which is used to solve the problem of low real-time performance of the existing vehicle motion state judgment.
[0004] In a first aspect of the application, a vehicle motion state judgment method based on background flow is disclosed, and the method comprises the following steps:
[0005] Real-time image acquisition is performed around the vehicle to form a frame image sequence, and pre-processing is performed;
[0006] Motion targets in each frame image of the frame image sequence are removed through target detection;
[0007] For the current frame and the previous frame image, feature matching is performed by using an optical flow tracking method, and point pairs that are not qualified for optical flow reverse tracking are removed, so as to obtain a matching point set of the current frame and the previous frame respectively;
[0008] The basis matrix F and the homography matrix H are calculated according to the matching point set of the current frame and the previous frame, and the GRIC values of the basis matrix F and the homography matrix H are calculated respectively;
[0009] Whether the vehicle is in a motion state or a static state is judged according to the comparison result of the GRIC value of the basis matrix F and the GRIC value of the homography matrix H;
[0010] When the vehicle is in motion, the FOE points of the background optical flow are calculated based on the matching point sets of the current frame and the previous frame. The distance between the FOE points and the matching point pairs determines whether the vehicle is moving forward or backward.
[0011] Based on the above technical solutions, preferably, the preprocessing includes:
[0012] Extract GFT feature points from real-time acquired frame images, determine whether the number of GFT feature points is greater than a preset threshold. If not, divide each frame image into image blocks using a grid, extract a set number of GFT feature points for each image block. If the specified number of GFT feature points cannot be extracted, lower the set GFT feature detection threshold, re-extract, and use the mask generated by target detection to filter out GFT feature points within the mask.
[0013] The targets detected include pedestrians and vehicles.
[0014] Based on the above technical solutions, preferably, the removal of point pairs that fail optical flow reverse tracking specifically includes:
[0015] Let P0 be the set of GFT feature points detected in the previous frame. Optical flow forward tracking is performed based on the feature point set P0 to obtain the feature point set P of the current frame. c1 ;
[0016] Based on the feature point set P of the current frame c1 Perform optical flow reverse tracking to obtain the feature point set P of the previous frame. c0 ;
[0017] Calculate the feature point sets P0 and P c0 The distance between feature points is used to eliminate feature points whose distance is greater than a preset distance threshold.
[0018] Based on the above technical solutions, preferably, the calculation of the GRIC values of the fundamental matrix F and the homography matrix H respectively includes:
[0019] Let M represent F or H, and calculate the GRIC value of the fundamental matrix F using the following formulas. F And the GRIC value of the homography matrix H. H :
[0020]
[0021]
[0022] λ1 = log(r)
[0023] λ² = log(r*n)
[0024] Wherein, n is the number of matching point pairs, i = 1, 2, …, n, The probability distribution corresponding to the i th matching point pair is represented, and sigma is the standard deviation when the probability distribution is a normal distribution, lambda 1, lambda 2, lambda 3 are all coefficients, k, d, r are all constants; m0 is the coordinate matrix of the feature points in the previous frame image, and m1 is the coordinate matrix of the feature points in the current frame image.
[0025] On the basis of the above technical solutions, preferably, the comparison result of the GRIC value of the basis matrix F and the GRIC value of the homography matrix H is used to determine whether the vehicle is in a motion state or a static state, and the determination specifically includes:
[0026] If GRIC H > GRIC F , it is determined that the current motion state of the vehicle is motion, otherwise it is determined that the current motion state of the vehicle is static.
[0027] On the basis of the above technical solutions, preferably, the FOE point of the background optical flow is calculated according to the matching point set of the current frame and the previous frame, and the distance between the FOE point and the matching point pair is used to determine whether the vehicle is in a forward state or a backward state, and the determination specifically includes:
[0028] The distance from the FOE point to the straight line formed by each matching point pair is calculated, and if the distance is less than a preset distance threshold, the distance D_previous from the point of the previous frame in the current matching point pair to the FOE and the distance D_current from the point of the current frame to the FOE are calculated.
[0029] If D_current > D_previous, it is determined that the motion state corresponding to the current matching point pair is a backward state, otherwise it is a forward state.
[0030] The number of matching point pairs corresponding to all forward states and backward states is counted, and if the number of matching point pairs in the forward state exceeds half of the total, it is determined that the final motion state of the vehicle is a forward state; if the number of matching point pairs in the backward state exceeds half of the total, it is determined that the final motion state of the vehicle is a backward state.
[0031] On the basis of the above technical solutions, preferably, the method further includes:
[0032] If the motion state corresponding to the current matching point pair is a backward state, the corresponding backward speed is (D_current - D_previous) / D_current;
[0033] If the motion state corresponding to the current matching point pair is a forward state, the corresponding forward speed is (D_previous - D_current) / D_previous;
[0034] Calculate the speed corresponding to each matched point pair and form a speed set, sort the speed set, and take the median of the speed set as the final speed of the vehicle.
[0035] In a second aspect, the application discloses a vehicle motion state judgment system based on background flow, which comprises:
[0036] The pre-processing module is used for collecting images around the vehicle in real time to form a frame image sequence and performing pre-processing, and removing moving targets in each frame image of the frame image sequence through target detection.
[0037] The feature calculation module is used for performing feature matching on the current frame and the previous frame image by using an optical flow tracking method, and removing point pairs that are not qualified for optical flow reverse tracking, to obtain matched point sets of the current frame and the previous frame respectively.
[0038] The state judgment module is used for judging whether the vehicle is in a motion state or a static state according to the comparison result of the GRIC value of the fundamental matrix F and the GRIC value of the homography matrix H.
[0039] In a third aspect, the application discloses an electronic device, which comprises at least one processor, at least one memory, a communication interface and a bus.
[0040] The processor, the memory and the communication interface can communicate with each other through the bus.
[0041] The memory stores program instructions executable by the processor, and the processor invokes the program instructions to implement the method according to the first aspect of the application.
[0042] In a fourth aspect, the application discloses a computer readable storage medium, which stores computer instructions, and the computer instructions enable a computer to implement the method according to the first aspect of the application.
[0043] Compared with the prior art, the application has the following beneficial effects:
[0044] 1) The application adopts optical flow tracking method to perform background feature matching, and preliminary motion state judgment can be realized by comparing the GRIC values of the fundamental matrix F and the homography matrix H, and the advancing or retreating can be further judged by the FOE point of the background optical flow, that is, the application can realize vehicle motion state judgment only by the information of the image itself, without other information such as camera internal parameters, and the algorithm is fast to execute, and experiments show that the method of the application can achieve more than 6fps on the edge device ArmA53, so the real-time performance is high.
[0045] 2) When calculating the GRIC values of the fundamental matrix F and the homography matrix H, the application comprehensively considers the difference in the probability distribution of the background points in the image when judging the straight driving and turning of the vehicle, so as to ensure the accuracy and stability of the judgment.
[0046] 3) The application calculates the corresponding motion state and speed of each matching point pair to form a speed set, sorts the speed set, and takes the median value of the speed set as the final speed of the vehicle, so as to objectively evaluate the advancing or retreating speed after judging the advancing or retreating state, and improve the accuracy of the judgment. BRIEF DESCRIPTION OF DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only constitute some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0048] Figure 1 The flow chart of the vehicle motion state judgment method based on the background flow of the application. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the application will be described clearly and completely in combination with the embodiments of the application. Obviously, the described embodiments only constitute some of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments of the application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the application.
[0050] Please refer to Figure 1 A vehicle motion state judgment method based on background flow, the method comprises:
[0051] S1, real-time acquisition of images around the vehicle to form a frame image sequence, and pre-processing is performed.
[0052] The real-time frame image outside the vehicle is collected by a vehicle-mounted image slam front-end detector, GFT (Good Feature to Track) feature points of the frame image are extracted in real time, whether the number of GFT feature points is greater than a preset number threshold is judged, if yes, optical flow tracking is directly entered in step S2; if no, the frame image is divided into image blocks by a grid, a set number of GFT feature points are extracted for each image block to ensure the uniformity of the features, if the set number of GFT feature points cannot be extracted, the set GFT feature detection threshold needs to be reduced, re-extraction is performed, and the GFT feature points in the mask are filtered out by using the mask generated by target detection.
[0053] The purpose of filtering out the GFT feature points in the mask by using the mask generated by target detection is to remove the moving targets in each frame image of the frame image sequence by target detection to obtain a background image. Since there are many pedestrians and vehicles in a dynamic scene, the vehicle motion state based on pure images is greatly increased in the scene where there are a large number of moving targets around the vehicle. Therefore, the moving targets in the foreground image are removed by target detection to obtain a background image, the features reserved are basically on the background, the vehicle motion state is determined by the background image, and the influence of the moving targets on the determination of the vehicle motion state is avoided.
[0054] As shown in Figure 1 After the tth frame image is collected in real time, the GFT feature points of the tth frame image are extracted, whether there are enough GFT feature points in the tth frame image is judged, if yes, optical flow tracking is directly entered in step S2; if no, the image is divided into image blocks by a grid, a set number of GFT feature points are extracted for each image block, the GFT feature points in the mask are filtered out by using the mask generated by target detection, and then optical flow tracking in step S2 is entered.
[0055] S2, for the current frame and the previous frame image in the background image sequence, a feature matching is performed by using an optical flow tracking method, and a point pair with unqualified reverse tracking of the optical flow is removed, and a matching point set of the current frame and the previous frame is obtained respectively.
[0056] The optical flow tracking method is adopted to perform feature matching of the previous frame image previous and the current frame current, the optical flow tracking method includes forward tracking and reverse tracking, the optical flow forward tracking is first performed to obtain a matching feature point set, and then the optical flow reverse tracking is performed to remove points with large deviations and improve the accuracy of the optical flow tracking.
[0057] Specifically, step S2 includes the following sub-steps:
[0058] S21, set the GFT feature point set detected in the previous frame previous as P0, perform optical flow forward tracking based on the feature point set P0, and use the mask generated by target detection of the current frame to remove the optical flow forward tracking points inside the mask, to obtain the feature point set P of the current frame current c1 ;
[0059] S22, perform optical flow backward tracking based on the feature point set P c1 of the current frame current, to obtain the feature point set P c0 ;
[0060] S23, calculate the distance between the feature points of the feature point sets P0 and P c0 , and remove the feature points with a distance greater than a preset distance threshold.
[0061] Ideally, the feature point sets P0 and P c0 should be the same, and if the optical flow tracking is not ideal, some points of P0 and P c0 may deviate greatly, and if the deviation is too large, the feature of the point is considered unqualified and should be removed. Specifically, a distance threshold can be preset, and if the distance between the matching feature points in P0 and Pc0 is greater than the preset distance threshold, the feature point pair is removed.
[0062] If the detected feature points in a frame are too few, re-detection is performed, and the matching feature point sets P_previous and P_current of the previous frame and the current frame are obtained through step S2.
[0063] S3, calculate the fundamental matrix F and the homography matrix H according to the matching point sets of the current frame and the previous frame previous, and calculate the GRIC (Geometric Robust Information Criterion) values of the fundamental matrix F and the homography matrix H respectively.
[0064] The application is based on the principle that the GRIC value of the motion F with a larger displacement is smaller than the GRIC value of the motion H, and the GRIC values of the fundamental matrix F and the homography matrix H are calculated and compared respectively, so as to judge the vehicle motion state.
[0065] Let M represent F or H, and the GRIC value GRIC F of the fundamental matrix F and the GRIC value GRIC H of the homography matrix H are calculated respectively by the following formula:
[0066]
[0067] λ1=log(r)
[0068] λ2=log(r*n)
[0069] wherein n is the number of matched point pairs, e i corresponding to the i th matched point, i = 1, 2, …, n, representing the probability distribution of the distance between the i th matched point, when the vehicle is straight, it obeys a straight line distribution, and when the vehicle is turning, it obeys a normal distribution, and σ is the standard deviation when the probability distribution is a normal distribution.
[0070] λ1, λ2, λ3 are coefficients, k, d, r are constants, and r can be taken as 4 and λ3 = 4. When M = F, d = 3 and k = 7, and when M = H, d = 2 and k = 8. T is the transpose of M.
[0071] m0 is a coordinate matrix of the feature points in P_previous, which is a 3-row n-column matrix, the first row is the horizontal coordinates of the feature points in P_previous, the second row is the vertical coordinates of the feature points in P_previous, and the third row is all 1.
[0072] m1 is a coordinate matrix of the feature points in P_current, which is also a 3-row n-column matrix, the first row is the horizontal coordinates of the feature points in P_current, the second row is the vertical coordinates of the feature points in P_current, and the third row is all 1, representing the transpose of m1.
[0073] The application comprehensively considers the differences in the probability distribution of the matched points in the image when the vehicle is straight and when the vehicle is turning when calculating the GRIC value of the fundamental matrix F and the homography matrix H, which can ensure accurate and stable judgment.
[0074] S3, judging whether the vehicle is in a motion state or a stationary state according to the comparison result of the GRIC value of the fundamental matrix F and the GRIC value of the homography matrix H.
[0075] If GRIC H > GRIC F , it is judged that the current motion state of the vehicle is motion, otherwise it is judged that the current motion state of the vehicle is stationary.
[0076] Meanwhile, after judging as motion, the outliers can be removed according to the calculated H, and the points with small displacement in the point pair are removed to obtain reliable matched point pairs.
[0077] S4, when the vehicle is in a motion state, the FOE point of the background optical flow is calculated according to the matched point set of the current frame and the previous frame, and the distance between the FOE point and the matched point pair is used to judge whether the vehicle is in a forward state or a backward state.
[0078] When the vehicle is in motion, it is necessary to determine whether the vehicle is in forward or reverse state. Step S4 specifically includes the following steps:
[0079] S41, FOE point of background optical flow is calculated.
[0080] Each matching point pair of the front and rear frames can determine a straight line, and the intersection points of two straight lines are accumulated, and the points outside the image are removed. If the points accumulated at a certain position are the most and exceed a quantity threshold, it is considered that the point is the current FOE (Focal Of Expansion), and the FOE is the intersection point of the background optical flow, which can also be obtained by the method of rasanc. If the number of accumulated points does not exceed the quantity threshold, it is considered that the vehicle is rotating or moving left and right at a large angle.
[0081] According to different use scenes, the FOE point can be tracked and smoothed to prevent mutation.
[0082] S42, the distance from the FOE point to each feature point is calculated.
[0083] The distance from the FOE point to the straight line composed of each matching point pair is calculated, if the distance is less than a preset distance threshold, the distance D_previous from the point of the previous frame in the current matching point pair to the FOE and the distance D_current from the point of the current frame to the FOE are calculated.
[0084] S43, the advance and retreat of each matching point pair are judged.
[0085] If D_current>D_previous, it is judged that the motion state corresponding to the current matching point pair is the reverse state, otherwise it is the forward state.
[0086] S44, the advance and retreat of the vehicle are judged.
[0087] The number of matching point pairs corresponding to all forward and reverse states is counted, if the number of matching point pairs in the forward state exceeds half of the total, it is determined that the final motion state of the vehicle is the forward state, if the number of matching point pairs in the reverse state exceeds half of the total, it is determined that the final motion state of the vehicle is the reverse state.
[0088] The present application only needs the information of the image itself to realize the vehicle motion state judgment, does not need to rely on the camera internal parameter and other information, the algorithm is executed fast, the real-time performance is higher, and the vehicle motion state can be quickly fed back.
[0089] S5, the speed of the vehicle in the motion state is calculated.
[0090] If the motion state corresponding to each matching point pair is determined as the backward state or the forward state in step S4, the backward speed or the forward speed can be further determined according to the backward state or the forward state.
[0091] Specifically, if the motion state corresponding to the current matching point pair is the backward state, the corresponding backward speed is (D_current-D_previous) / D_current.
[0092] If the motion state corresponding to the current matching point pair is the forward state, the corresponding forward speed is (D_previous-D_current) / D_previous.
[0093] The speed corresponding to each matching point pair is calculated and composed into a speed set, the speed set is sorted, and the median of the speed set is taken as the final speed of the vehicle. The median is defined as the middle element of the sorted list.
[0094] The motion state and the speed corresponding to each matching point pair are calculated, the speed set is composed, and the median of the speed set is taken as the final speed of the vehicle, so that the forward or backward speed can be objectively evaluated after the forward or backward state is determined, and the accuracy of the determination is improved.
[0095] Corresponding to the above method embodiment, the present application proposes a vehicle motion state determination system based on background flow, which comprises:
[0096] A preprocessing module is configured to collect frame images around the vehicle in real time and perform preprocessing.
[0097] A feature calculation module is configured to perform feature matching on the current frame and the previous frame image by using the optical flow tracking method, and eliminate the point pairs with reverse optical flow tracking, to obtain the matching point set of the current frame and the previous frame respectively; calculate the fundamental matrix F and the homography matrix H according to the matching point set of the current frame and the previous frame, and calculate the GRIC values of the fundamental matrix F and the homography matrix H respectively.
[0098] A state determination module is configured to determine whether the vehicle is in a motion state or a static state according to the comparison result of the GRIC values of the fundamental matrix F and the homography matrix H; when the vehicle is in a motion state, calculate the FOE point of the background flow according to the matching point set of the current frame and the previous frame, and determine whether the vehicle is in a forward state or a backward state according to the distance between the FOE point and the matching point pair.
[0099] The above system embodiment and the method embodiment are one-to-one corresponding, and the system embodiment can be referred to the method embodiment for a brief description.
[0100] The application further discloses an electronic device, comprising at least one processor, at least one memory, a communication interface and a bus; wherein the processor, the memory and the communication interface complete mutual communication through the bus; the memory stores program instructions which can be executed by the processor; and the processor calls the program instructions to realize the foregoing method of the application.
[0101] The application further discloses a computer readable storage medium which stores computer instructions, and the computer instructions make the computer realize all or part of steps of the method according to the embodiments of the application. The storage medium comprises a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk and various storage program codes.
[0102] The system embodiments described above are only illustrative, wherein the units described as separate units can or can not be physically separated, and the units displayed as units can or can not be physical units, that is, can be distributed to multiple network units. A person of ordinary skill in the art can select part or all of the modules to realize the purpose of the embodiments according to actual needs without creative labor.
[0103] The above only describes the preferred embodiments of the application and is not intended to limit the application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the application shall be included in the protection scope of the application.
Claims
1. A method for determining a vehicle motion state based on a background flow, characterized by The method comprises: Real-time acquisition of frame images around the vehicle and pre-processing; Obtaining the current frame and the previous frame image, performing feature matching by using the optical flow tracking method, and eliminating the point pairs of reverse optical flow tracking, to obtain the matching point sets of the current frame and the previous frame respectively; Calculating the fundamental matrix F and the homography matrix H according to the matching point sets of the current frame and the previous frame, and calculating the GRIC values of the fundamental matrix F and the homography matrix H respectively; Judging whether the vehicle is in a motion state or a static state according to the comparison result of the GRIC value of the fundamental matrix F and the GRIC value of the homography matrix H; When the vehicle is in a motion state, calculating the FOE point of the background optical flow according to the matching point sets of the current frame and the previous frame, and judging whether the vehicle is in a forward state or a backward state according to the distance between the FOE point and the matching point pairs; The pre-processing comprises: Extracting the GFT feature points of the real-time acquired frame images, judging whether the number of the GFT feature points is greater than a preset number threshold, if not, dividing each frame image into image blocks by using a grid, extracting a set number of GFT feature points for each image block, if the specified number of GFT feature points cannot be extracted, reducing the set GFT feature detection threshold, re-extracting, and filtering out the GFT feature points in the mask by using the mask generated by target detection; The detection target of the target detection comprises pedestrians and vehicles; The elimination of the point pairs of reverse optical flow tracking specifically comprises: Let the set of GFT feature points detected in the previous frame be P0, and based on the feature point set P0, optical flow forward tracking is performed to obtain the feature point set P of the current frame c1 ; Based on the feature point set P of the current frame c1 Carrying out optical flow reverse tracking to obtain the feature point set P of the previous frame c0 ; Calculate the distance between the feature points of the feature point sets P0 and P c0 , and eliminate the feature points with distance greater than a preset distance threshold. The calculation of the FOE point of the background optical flow according to the matching point sets of the current frame and the previous frame, and the judgment of whether the vehicle is in a forward state or a backward state according to the distance between the FOE point and the matching point pairs specifically comprises: Calculating the distance from the FOE point to the straight line formed by each matching point pair, if the distance is less than a preset distance threshold, calculating the distance D_previous from the point of the previous frame in the current matching point pair to the FOE and the distance D_current from the point of the current frame to the FOE; If D_current>D_previous, judging that the motion state corresponding to the current matching point pair is a backward state, otherwise, a forward state; Counting the number of matching point pairs corresponding to all forward states and backward states, if the number of matching point pairs in the forward state exceeds half of the total, determining that the final motion state of the vehicle is a forward state, and if the number of matching point pairs in the backward state exceeds half of the total, determining that the final motion state of the vehicle is a backward state.
2. The background flow-based vehicle motion state determination method according to claim 1, characterized by, The method further comprises: If the motion state corresponding to the current matching point pair is a backward state, the corresponding backward speed is (D_current-D_previous) / D_current; If the motion state corresponding to the current matching point pair is a forward state, the corresponding forward speed is (D_previous-D_current) / D_previous; Calculating the speed corresponding to each matching point pair and forming a speed set, sorting the speed set, and taking the median value of the speed set as the final speed of the vehicle.
3. A vehicle motion state determination system based on a background flow, based on the method of claim 1 or 2, characterized by The system comprises: A pre-processing module for real-time acquisition of frame images around the vehicle and pre-processing; The feature calculation module is configured to perform feature matching on the current frame and the previous frame image by using an optical flow tracking method, and eliminate point pairs with reverse optical flow tracking failure, to obtain a matching point set of the current frame and a matching point set of the previous frame respectively; calculate a fundamental matrix F and a homography matrix H according to the matching point set of the current frame and the matching point set of the previous frame, and calculate a GRIC value of the fundamental matrix F and a GRIC value of the homography matrix H respectively; The state judgment module is configured to judge whether the vehicle is in a motion state or a static state according to a comparison result of the GRIC value of the fundamental matrix F and the GRIC value of the homography matrix H; when the vehicle is in the motion state, calculate a FOE point of the background optical flow according to the matching point set of the current frame and the matching point set of the previous frame, and judge whether the vehicle is in a forward state or a backward state according to a distance between the FOE point and the matching point pairs.
4. An electronic device, comprising: The method comprises the following steps: at least one processor, at least one memory, a communication interface and a bus; wherein the processor, the memory and the communication interface communicate with each other through the bus; the memory stores program instructions executable by the processor, and the processor invokes the program instructions to implement the method of any one of claims 1-2.
5. A computer readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions enable the computer to implement the method of any one of claims 1-2.
Citation Information
Patent Citations
Light stream based vehicle motion state estimating method
CN102999759A
Video key frame extraction method and device, equipment and storage medium
CN115393761A