Object motion state detection method and device, and storage medium
By employing sliding windows and dynamic hidden Markov models to process image frames in video streams within smart logistics parks, the problem of inaccurate vehicle motion state recognition was solved, achieving a higher recognition accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-13
- Publication Date
- 2026-03-20
AI Technical Summary
Existing technologies cannot accurately identify the movement status of vehicles in smart logistics parks, especially in complex platform scenarios where the accuracy rate is low.
The sliding window method is used to acquire video streams in real time. The position coordinate information of the image frames is processed by a dynamic hidden Markov model. The motion state of the vehicle is determined by combining the observation sequence value and the state sequence value.
It improves the accuracy of vehicle motion state recognition, effectively filters out interference factors caused by misidentification and omission, and addresses the difficulties faced by standard Hidden Markov Models.
Smart Images

Figure CN115187904B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of motion detection, and particularly relate to a method and device for detecting motion state of an object and a storage medium. BACKGROUND
[0002] In an intelligent logistics park, the management of vehicles and the management of loading and unloading need efficient cooperation to fully guarantee the efficiency of logistics operation. Vehicle recognition is a very important link in vehicle management, and vehicle state recognition itself also has different scenarios, such as vehicle recognition of a barrier gate and vehicle recognition of a platform. Usually, a computer vision method is used. For example, a vehicle body is recognized, and when the position of the vehicle body and the distance from the platform are below a certain threshold, it is judged that the vehicle has arrived. If the platform area cannot recognize the vehicle body, it is judged that the vehicle has left. The main disadvantage of the current technology is that it can only judge whether there is a vehicle in the platform area, but cannot recognize the motion state of the vehicle. In addition, due to the complex scene of the platform, there are many interferences, and the recognition accuracy of the motion state of the vehicle is low. SUMMARY
[0003] The method and device for detecting motion state of an object and the storage medium provided by the embodiments of the present application can improve the recognition accuracy of the motion state of a vehicle.
[0004] The technical solution of the present application is implemented as follows:
[0005] The embodiments of the present application provide a method for detecting motion state of an object, comprising:
[0006] Real-time video stream of a predetermined area is collected, and N image frames corresponding to a current time are extracted from the video stream based on a sliding window method; N is an integer greater than 1;
[0007] N position coordinate information corresponding to a calibration object in the N image frames is processed, and an observation sequence value set after excluding a predetermined observation sequence value is determined in combination with the N image frames; wherein the predetermined observation sequence value is an observation sequence value corresponding to predetermined position coordinate information; the predetermined position coordinate information is position coordinate information obtained by processing an image frame not including the calibration object;
[0008] A state sequence value set is obtained based on a dynamic hidden Markov model corresponding to the observation sequence value set;
[0009] A motion state of a target object in the N image frames at the current time is determined through the observation sequence value set and the state sequence value set; the calibration object belongs to the target object.
[0010] In the above solution, the state sequence value set is obtained based on a dynamic hidden Markov model corresponding to the observation sequence value set, comprising:
[0011] detecting subscript continuity between an i-th observation sequence value and a previous observation sequence value in the set of observation sequence values, processing the i-th observation sequence value, a first preset state transition probability matrix and a first preset observation probability matrix by a preset dynamic programming algorithm to obtain an i-th group of M state sequences corresponding to the i-th observation sequence value; i is an integer greater than or equal to 1; M is an integer greater than 1;
[0012] detecting a number T of subscript intervals between an i+1-th observation sequence value and the i-th observation sequence value, calculating a third state transition probability matrix based on a second preset state transition probability matrix corresponding to the i+1-th observation sequence value; the second preset state transition probability matrix represents a set of transition probabilities between M state sequence values when corresponding to the i+1-th observation sequence value; T is an integer greater than or equal to 1;
[0013] processing the i+1-th observation sequence value, the third state transition probability matrix and a third preset observation probability matrix by the preset dynamic programming algorithm based on the i-th group of M state sequences to obtain an i+1-th group of M state sequences corresponding to the i+1-th observation sequence value, until M final state sequences corresponding to a last observation sequence value in the set of observation sequence values are obtained;
[0014] determining a last state sequence value of a target state sequence with the largest transition probability in the M final state sequences;
[0015] combining the last state sequence value and a preset state sequence matrix to determine a plurality of state sequence values to obtain the set of state sequence values.
[0016] In the above scheme, the third state transition probability matrix is calculated based on the second preset state transition probability matrix corresponding to the i+1-th observation sequence value, including:
[0017] combining the second preset state transition probability matrix to calculate probability values corresponding to the first state sequence value and the M state sequence values respectively to form a first row of the third state transition probability matrix;
[0018] until combining the second preset state transition probability matrix to calculate probability values corresponding to the Mth state sequence value and the M state sequence values respectively to form an Mth row of the third state transition probability matrix, and further obtaining the third state transition probability matrix.
[0019] In the scheme, the first state sequence value and the M state sequence values are multiplied in the second preset state transition probability matrix to obtain a first product.
[0020] In the second preset state transition probability matrix, the transition probabilities between the first state sequence value and the M state sequence values are multiplied to obtain a first product.
[0021] When T is 1, the Kth product corresponding to the M state sequence values and the Kth state sequence value is calculated, the first product and the Kth product are added to form the Kth probability value of the first row in the third state transition probability matrix, until the Mth probability value of the first row of the third state transition probability matrix is obtained, to form the first row of the third state transition probability matrix; K is an integer greater than or equal to 1 and less than or equal to M.
[0022] In the scheme, after the first state sequence value and the M state sequence values are multiplied in the second preset state transition probability matrix to obtain a first product, the method further comprises:
[0023] When T is greater than 1, the transition probabilities between any two state sequence values in the M state sequence values are multiplied to obtain a second product.
[0024] The Kth product corresponding to the M state sequence values and the Kth state sequence value is calculated, the first product, T-1 second products and the Kth product are added to form the Kth probability value of the first row in the third state transition probability matrix, until the Mth probability value of the first row of the third state transition probability matrix is obtained, to form the first row of the third state transition probability matrix.
[0025] In the scheme, based on the i group of M state sequences, the i+1 observation sequence value, the third state transition probability matrix and the third preset observation probability matrix are processed by the preset dynamic programming algorithm to obtain the i+1 group of M state sequences corresponding to the i+1 observation sequence value, until the M final state sequences corresponding to the last observation sequence value in the observation sequence value set are obtained. Before the combination of the last state sequence value and the preset state sequence matrix corresponding to the target state sequence determines a plurality of state sequence values to obtain the state sequence value set, the method further comprises:
[0026] The M final state sequences are arranged in column order to obtain the preset state sequence matrix.
[0027] In the scheme, the combination of the last state sequence value and the preset state sequence matrix determines a plurality of state sequence values to obtain the state sequence value set, including:
[0028] In the last row of the preset state sequence matrix, a target sequence value matching the last state sequence value is determined, and the final state sequence of the column corresponding to the target sequence value is determined as the plurality of state sequence values.
[0029] In the scheme, the method based on the sliding window extracts N image frames corresponding to the current time from the video stream, including:
[0030] In the video stream, a current image frame corresponding to the current time is extracted;
[0031] In the video stream, starting from the current image frame, an image frame is extracted every predetermined time length or predetermined number of image frames along the time axis until N-1 image frames are extracted;
[0032] The current image frame and the N-1 image frames are combined along the time axis to obtain the N image frames.
[0033] In the scheme, the processing obtains N position coordinate information corresponding to the calibration object in the N image frames, and determines an observation sequence value set after excluding a predetermined observation sequence value in combination with the N image frames, including:
[0034] The N image frames are processed by a preset detection model to obtain the N position coordinate information;
[0035] The N image frames are respectively regionally divided, and for each position coordinate information, an observation sequence value of the belonging region in the corresponding image frame is determined to obtain N observation sequence values corresponding to the N position coordinate information;
[0036] The predetermined observation sequence value is excluded from the N observation sequence values to obtain the observation sequence value set.
[0037] In the scheme, the N image frames are respectively regionally divided, and for each position coordinate information, an observation sequence value of the belonging region in the corresponding image frame is determined to obtain N observation sequence values corresponding to the N position coordinate information, including:
[0038] The N image frames are respectively divided into U regions along the longitudinal coordinate to obtain U regions corresponding to each image frame; U is an integer greater than 1;
[0039] For each position coordinate information, the belonging region is determined in the U regions;
[0040] determining a longitudinal order of the belonging region in the U regions, taking the longitudinal order as an observation sequence value of the each position coordinate information, and further obtaining the N observation sequence values.
[0041] In the above scheme, the determining of the motion state of the target object in the current moment in the N image frames by the observation sequence value set and the state sequence value set comprises:
[0042] combining the state sequence value set and the observation sequence value set, eliminating the interference position coordinate information in the N position coordinate information, and obtaining a plurality of target position coordinate information;
[0043] determining the motion state by using the plurality of target position coordinate information.
[0044] In the above scheme, the combining the state sequence value set and the observation sequence value set, eliminating the interference position coordinate information in the N position coordinate information, and obtaining a plurality of target position coordinate information comprises:
[0045] sequentially comparing a plurality of state sequence values in the state sequence value set with a plurality of observation sequence values in the observation sequence value set one by one, if it is determined that at least one state sequence value is different from at least one observation sequence value in the corresponding order, then eliminating at least one second position coordinate information corresponding to the at least one observation sequence value from the N position coordinate information, and obtaining a plurality of intermediate position coordinate information;
[0046] eliminating predetermined position coordinate information in the plurality of intermediate position coordinate information, and obtaining the plurality of target position coordinate information.
[0047] In the above scheme, the determining of the motion state by using the plurality of target position coordinate information comprises:
[0048] linearly fitting a plurality of target longitudinal coordinate information in the plurality of target position coordinate information along a time axis, and obtaining a slope value of the plurality of target longitudinal coordinate information;
[0049] determining the motion state according to the size of the slope value.
[0050] In the above scheme, the determining of the motion state according to the size of the slope value comprises one of:
[0051] if the slope value is greater than a preset threshold value, then determining that the motion state is a close state;
[0052] if the slope value is less than the preset threshold value, then determining that the motion state is an away state.
[0053] The embodiment of the present application also provides an object motion state detection device, comprising:
[0054] An acquisition and extraction unit is configured to acquire a video stream of a predetermined area in real time, and extract N image frames corresponding to a current time from the video stream based on a sliding window method; N is an integer greater than 1;
[0055] A processing unit is configured to process N position coordinate information corresponding to a calibration object in the N image frames, and determine an observation sequence value set after excluding a predetermined observation sequence value in combination with the N image frames; the predetermined observation sequence value is an observation sequence value corresponding to predetermined position coordinate information; the predetermined position coordinate information is position coordinate information obtained by processing an image frame not including the calibration object;
[0056] The processing unit is further configured to obtain a state sequence value set based on a dynamic hidden Markov model and the observation sequence value set;
[0057] A determination unit is configured to determine a motion state of a target object in the N image frames at the current time based on the observation sequence value set and the state sequence value set; the calibration object belongs to the target object.
[0058] The embodiment of the present application also provides an object motion state detection device, comprising a memory and a processor, the memory stores a computer program capable of running on the processor, and the processor implements the steps in the above method when executing the program.
[0059] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps in the above method.
[0060] In the embodiment of the present application, video stream of a predetermined area is collected in real time, and N image frames corresponding to the current time are extracted from the video stream based on a sliding window method; N is an integer greater than 1; N position coordinate information corresponding to the calibration object in the N image frames is obtained by processing, and the observation sequence value set after excluding the predetermined observation sequence value is determined in combination with the N image frames; wherein the predetermined observation sequence value is the observation sequence value corresponding to the predetermined position coordinate information; the predetermined position coordinate information is the position coordinate information obtained by processing the image frame not including the calibration object; the state sequence value set is obtained based on the dynamic hidden Markov model corresponding to the observation sequence value set; the motion state of the target object in the N image frames at the current time is determined through the observation sequence value set and the state sequence value set; and the calibration object belongs to the target object. Since the present scheme filters out the interference factors caused by misrecognition and missed recognition based on the dynamic hidden Markov model, and can better handle the difficulties faced by the standard hidden Markov model, the recognition accuracy of the vehicle motion state can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0061] Figure 1 An optional flowchart of the object motion state detection method provided by the embodiment of the present application is shown in the figure;
[0062] Figure 2 An optional effect diagram of the object motion state detection method provided by the embodiment of the present application is shown in the figure;
[0063] Figure 3 An optional flowchart of the object motion state detection method provided by the embodiment of the present application is shown in the figure;
[0064] Figure 4 An optional flowchart of the object motion state detection method provided by the embodiment of the present application is shown in the figure;
[0065] Figure 5 An optional flowchart of the object motion state detection method provided by the embodiment of the present application is shown in the figure;
[0066] Figure 6 An optional flowchart of the object motion state detection method provided by the embodiment of the present application is shown in the figure;
[0067] Figure 7 An optional effect diagram of the object motion state detection method provided by the embodiment of the present application is shown in the figure;
[0068] Figure 8 A structure diagram of the object motion state detection device provided by the embodiment of the present application is shown in the figure;
[0069] Figure 9 A hardware entity diagram of the object motion state detection device provided by the embodiment of the present application is shown in the figure. Detailed Implementation
[0070] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be regarded as limitations on the present invention. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0071] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0072] If similar descriptions such as "first / second" appear in the invention document, the following explanation shall be added: In the following description, the terms "first / second / third" are used only to distinguish similar objects and do not represent a specific order of objects. It is understood that "first / second / third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of the invention described herein can be implemented in an order other than that illustrated or described herein.
[0073] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.
[0074] This invention provides a method for detecting the motion state of an object. Please refer to [link / reference]. Figure 1 This is an optional flowchart illustrating the object motion state detection method provided in an embodiment of the present invention, which will be combined with... Figure 1 The steps shown are explained.
[0075] S101. Real-time acquisition of video stream from a predetermined area, and extraction of N image frames corresponding to the current moment from the video stream based on a sliding window method.
[0076] In this embodiment of the invention, the object motion state detection device acquires a video stream of a predetermined area in real time, and extracts N image frames corresponding to the current moment from the video stream based on a sliding window method. Here, N is an integer greater than 1.
[0077] In this embodiment of the invention, the object motion state detection device acquires a video stream of a predetermined area using a camera positioned within that area. The object motion state detection device extracts one image frame every predetermined number of image frames and uses a sliding window method to determine the N image frames corresponding to the current moment.
[0078] In the embodiment of the present application, the object motion state detection device extracts the image frame corresponding to the current time from the video stream, and extracts a plurality of image frames along the time axis forward by a predetermined time length to obtain N image frames.
[0079] In the embodiment of the present application, the object motion state detection device can be a terminal or a server connected with the camera of the predetermined area.
[0080] In the embodiment of the present application, the predetermined area captured by the camera is unchanged, and the camera captures the video stream of the predetermined area in real time. When the object motion state detection device detects that the object (i.e. the vehicle) enters the predetermined area, the object motion state detection device extracts N image frames corresponding to the current time from the video stream based on the sliding window method.
[0081] S102, process N position coordinate information corresponding to the calibration object in the N image frames, and determine the observation sequence value set after excluding the predetermined observation sequence value in combination with the N image frames.
[0082] In the embodiment of the present application, the object motion state detection device processes N position coordinate information corresponding to the calibration object in the N image frames, and determines the observation sequence value set after excluding the predetermined observation sequence value in combination with the N image frames. The predetermined observation sequence value is the observation sequence value corresponding to the predetermined position coordinate information. The predetermined position coordinate information is the position coordinate information obtained by processing the image frame not including the calibration object. For example, the predetermined position coordinate information can be (-1, -1).
[0083] In the embodiment of the present application, the object motion state detection device processes the N image frames through a preset detection model to obtain N position coordinate information corresponding to the calibration object in the N image frames.
[0084] In the embodiment of the present application, the object motion state detection device can process the N image frames through a warped planar object detection network model (WPOD-NET) to obtain N position coordinate information corresponding to the calibration object in the N image frames. In the embodiment of the present application, the object motion state detection device can also process the N image frames through other preset detection models, which are not limited in the embodiment of the present application.
[0085] In the embodiment of the present application, the object motion detection device divides N image frames respectively into regions. The object motion detection device determines the region to which each position coordinate information belongs in the corresponding image frame. The object motion detection device determines N observation sequence values of N position coordinate information through the corresponding region to which N position coordinate information respectively belongs. The object motion detection device eliminates a predetermined observation sequence value in the N observation sequence values to obtain an observation sequence value set.
[0086] In the embodiment of the present application, the target object in the N image frames includes a target object, and the target object has a calibration object. For example, the target object can be a car, and the corresponding calibration object can be a license plate, a door or a wheel. The target object can also be any moving object, and the calibration object can be a predetermined part on the any moving object.
[0087] In the embodiment of the present application, the object motion state detection device uses the method of computer vision to identify the arrival and departure of the vehicle 13 at the platform scene. In the process of identification, the camera 12 is arranged above the warehouse door 11 of the platform 10, and identification is performed during the process that the vehicle 13 reverses to approach the warehouse door 11 of the platform 10, as shown in FIG. 2. Figure 2 For the video stream collected by the camera 12, the present scheme considers the algorithm power requirement of different algorithms, and collects and identifies at a frequency of taking 1 frame every 5 frames. The overall scheme can judge the action of the vehicle by identifying the dynamics of the vehicle body itself or the dynamics of the license plate 13. Considering that the license plate is unique information of the vehicle 13, license plate identification can exclude some other objects that are easily mistaken for the vehicle 13, and the ultimate purpose of vehicle 13 identification is still to identify the license plate. Directly using license plate information for identification can reduce the module of vehicle body identification. Therefore, the present scheme performs license plate detection on each collected picture, and judges the dynamic of the arrival and departure of the vehicle through the change of the position of the license plate identified in each frame.
[0088] In the embodiment of the present application, after a given image frame, the object motion state detection device can return the range of the region corresponding to the license plate in the picture through the preset detection model. The object motion state detection device determines the four vertex coordinates of the license plate through the WPOD-NET algorithm model. If no license plate is detected in any image frame, the detection result is empty. For each image frame, the object motion state detection device determines the horizontal and vertical coordinates of the center point of the license plate region through the WPOD-NET algorithm model combined with the four vertex coordinates. If no license plate is detected in any image frame, the corresponding horizontal and vertical coordinates are represented by -1. Then, under the condition of continuous collection of the camera, the object motion state detection device can obtain two coordinate sequences corresponding to the horizontal coordinates and the vertical coordinates, respectively.
[0089] S103, obtaining a state sequence value set based on the dynamic hidden Markov model corresponding to the observation sequence value set.
[0090] In the embodiment of the present application, the object motion state detection device obtains a state sequence value set based on a dynamic hidden Markov model corresponding to the observation sequence value set.
[0091] In the embodiment of the present application, the object motion state detection device detects the subscript continuity between the i th observation sequence value in the observation sequence value set and the previous observation sequence value, processes the i th observation sequence value based on the i th observation sequence value, the first preset state transition probability matrix and the first preset observation probability matrix by using a preset dynamic programming algorithm to obtain the i th group of M state sequences corresponding to the i th observation sequence value; i is an integer greater than or equal to 1; M is an integer greater than 1; the object motion state detection device detects the subscript interval T number of values between the i+1 th observation sequence value and the i th observation sequence value, calculates the third state transition probability matrix based on the second preset state transition probability matrix corresponding to the i+1 th observation sequence value, processes the i+1 th observation sequence value based on the i th group of M state sequences, the third state transition probability matrix and the third preset observation probability matrix by using the preset dynamic programming algorithm to obtain the i+1 th group of M state sequences corresponding to the i+1 th observation sequence value, until M final state sequences corresponding to the last observation sequence value in the observation sequence value set are obtained; the last state sequence value of the target state sequence with the maximum transition probability is determined from the M final state sequences; the plurality of state sequence values are determined in combination with the last state sequence value and the preset state sequence matrix to obtain the state sequence value set.
[0092] S103, the current motion state of the target object in the N image frames is determined by the observation sequence value set and the state sequence value set.
[0093] In the embodiment of the present application, the object motion state detection device determines the current motion state of the target object in the N image frames by using the observation sequence value set and the state sequence value set. The calibration object belongs to the target object.
[0094] In the embodiment of the present application, the object motion state detection device combines the N image frames, eliminates the interference position coordinate information in the N position coordinate information to obtain a plurality of target position coordinate information. The object motion state detection device determines the current motion state of the target object in the N image frames by using the plurality of target position coordinate information.
[0095] The object motion detection device compares the state sequence value in the state sequence value set and the plurality of observation sequence values in order one by one to determine the abnormal observation sequence value, and then the object motion detection device can eliminate the position coordinate information corresponding to the abnormal observation sequence value in the N position coordinate information to obtain a plurality of target position coordinate information.
[0096] In the embodiment of the present application, the object motion state detection device can eliminate the predetermined position coordinate information representing the image frame in which the license plate is not detected from the N position coordinate information, and further obtain a plurality of target position coordinate information.
[0097] In the embodiment of the present application, the object motion state detection device linearly fits the plurality of target position coordinate information to obtain a slope value. The object motion state detection device determines the motion state of the target object at the current time according to the size of the slope value.
[0098] For example, the arbitrary position coordinate information can be (X, Y). Wherein, X represents the horizontal coordinate of the midpoint of the calibration object in the corresponding image frame, and Y represents the vertical coordinate of the midpoint of the calibration object in the corresponding image frame.
[0099] In the embodiment of the present application, the object motion state detection device only retains the N position coordinate information collected at the current time, and therefore, the sequences of the horizontal and vertical coordinates are represented as X and Y respectively. The lengths of the two sequences are both N, and the present scheme takes N as 20. The dynamic judgment mode of the present scheme for the vehicle to arrive or leave is to judge the trend of Y. If the vehicle is from far to near, the value of the element in Y shows an upward trend, and if the vehicle is from near to far, the value of the element in Y shows a downward trend. In order to realize this logic, the present scheme adds a time subscript sequence t, and linearly fits Y and t, that is, y=at+b. If the slope a of the fitting is greater than a certain threshold value, it is judged that the vehicle is in the entering state, and if a is less than a certain threshold value, it is judged that the vehicle is in the leaving state. Since the license plate cannot be recognized in all pictures, the element with the value of -1 in Y needs to be removed before fitting. Assuming that the length after removal is M, then t=[1, 2……..M], and then linear fitting is performed. If the value of M is too small, that is, the effective data is too little, such as less than 10, fitting is not performed, and the motion state of the vehicle is not judged.
[0100] In this embodiment of the invention, a video stream of a predetermined area is acquired in real time, and N image frames corresponding to the current moment are extracted from the video stream using a sliding window method; N is an integer greater than 1. The N image frames are processed to obtain N position coordinate information corresponding to the calibrated object, and combined with the N image frames, a set of observation sequence values after removing predetermined observation sequence values is determined; wherein, the predetermined observation sequence values are the observation sequence values corresponding to predetermined position coordinate information; the predetermined position coordinate information is the position coordinate information obtained by processing the image frames that do not include the calibrated object; a set of state sequence values is obtained based on the set of observation sequence values corresponding to the dynamic Hidden Markov Model; the current motion state of the target object in the N image frames is determined through the set of observation sequence values and the set of state sequence values; the calibrated object belongs to the target object. Since this scheme filters out interference factors caused by misidentification and missed identification based on the dynamic Hidden Markov Model, and can better handle the difficulties faced by the standard Hidden Markov Model, it can improve the accuracy of vehicle motion state recognition.
[0101] In some embodiments, see Figure 3 , Figure 3 This is a schematic diagram of an optional process for the object motion state detection method provided in an embodiment of the present invention. Figure 1 The shown S103 can also be implemented by S105 to S109, which will be explained in conjunction with each step.
[0102] S105. Detect the continuity of the indices between the i-th observation sequence value and the previous observation sequence value in the set of observed sequence values. Based on the i-th observation sequence value, the first preset state transition probability matrix and the first preset observation probability matrix, process them through a preset dynamic programming algorithm to obtain the i-th group of M state sequences corresponding to the i-th observation sequence value.
[0103] In this embodiment of the invention, the object motion state detection device detects that the indices of the i-th observation sequence value in the set of observation sequence values are continuous with those of the previous observation sequence value. Based on the i-th observation sequence value, the first preset state transition probability matrix, and the first preset observation probability matrix, a preset dynamic programming algorithm is used to process the data to obtain the i-th group of M state sequences corresponding to the i-th observation sequence value. i is an integer greater than or equal to 1; M is an integer greater than 1.
[0104] In the embodiment of the present application, the object motion detection device can process each observation sequence value through a viterbi algorithm to obtain M state sequences corresponding to each observation sequence value. When the object motion detection device detects that the index interval between the i th observation sequence value and the previous observation sequence value is continuous (that is, the interval time length between the image frame corresponding to the i th observation sequence value and the image frame of the previous observation sequence value is unchanged), the object motion detection device processes the i th observation sequence value, the first preset state transition probability matrix and the first preset observation probability matrix through a preset dynamic programming algorithm to obtain the i th set of M state sequences corresponding to the i th observation sequence value. The first preset state transition probability matrix and the first preset observation probability matrix corresponding to adjacent two observation sequence values are different.
[0105] In the embodiment of the present application, the preset dynamic programming algorithm is not limited, and the object motion state detection device can also obtain a state sequence through other preset dynamic programming algorithms. The first preset state transition probability matrix represents a set of transition probabilities between any two state sequence values; and the first preset observation probability matrix represents a set of transition probabilities between any state sequence value and observation sequence value.
[0106] The first preset state transition probability matrix is an empirical probability matrix obtained artificially. When there are M state sequence values, the transition probability between any two state sequence values is confirmed artificially, and then M*M probabilities can be obtained to obtain the preset state transition probability matrix. The transition probability in any row of the first preset state transition probability matrix represents the transition probability between the corresponding two state sequence values.
[0107] The first preset observation probability matrix is a probability matrix obtained by a preset detection model during training. When there are M state sequence values and M observation sequence values, the preset detection model obtains the transition probability between any state sequence value and observation sequence value during training, and then M*M probabilities can be obtained to obtain the preset observation probability matrix. The transition probability in any row of the first preset observation probability matrix represents the transition probability between the corresponding state sequence value and observation sequence value.
[0108] S106, detecting the number of index intervals T between the i th observation sequence value and the i+1 th observation sequence value, and calculating a third state transition probability matrix based on the second preset state transition probability matrix corresponding to the i+1 th observation sequence value.
[0109] In the embodiment of the present application, the object motion state detection device detects the number of index intervals T between the i th observation sequence value and the i+1 th observation sequence value, and calculates a third state transition probability matrix based on the second preset state transition probability matrix corresponding to the i+1 th observation sequence value. T is an integer greater than or equal to 1.
[0110] The second preset state transition probability matrix represents a transition probability set between M state sequence values corresponding to the (i+1)th observation sequence value.
[0111] For example, the observation sequence value set can be o x (1) o x (2) … o x (N). Wherein, o x (i) has subscript Θ. If two observation sequence values are observation sequence values corresponding to two continuous image frames, the subscripts of the two observation sequence values are continuous (that is, the subscript of the latter is greater than the subscript of the former by 1). If two observation sequence values are not observation sequence values corresponding to two continuous image frames, the subscripts of the two observation sequence values are not continuous (that is, the subscript of the latter is greater than the subscript of the former by at least 2). If the subscript of the latter is greater than the subscript of the former by 2, it means that there is one sequence value between the two observation sequence values, and if the subscript of the latter is greater than the subscript of the former by 3, it means that there are two sequence values between the two observation sequence values.
[0112] S107, based on the i-th group of M state sequences, the (i+1)th observation sequence value, the third state transition probability matrix and the third preset observation probability matrix, the preset dynamic programming algorithm is processed to obtain the (i+1)th observation sequence value corresponding to the (i+1)th group of M state sequences, until the last observation sequence value in the observation sequence value set corresponding to the M final state sequence is obtained.
[0113] In the embodiment of the application, the object motion state detection device processes the i-th group of M state sequences, the (i+1)th observation sequence value, the third state transition probability matrix and the third preset observation probability matrix based on the preset dynamic programming algorithm to obtain the (i+1)th observation sequence value corresponding to the (i+1)th group of M state sequences, until the last observation sequence value in the observation sequence value set corresponding to the M final state sequence is obtained.
[0114] S108, determining the last state sequence value of the target state sequence with the maximum transition probability in the M final state sequences.
[0115] In the embodiment of the application, the object motion state detection device determines the last state sequence value of the target state sequence with the maximum transition probability in the M final state sequences.
[0116] In the embodiment of the present application, the object motion state detection device can calculate the probability of each final state sequence by the multiple state sequence values in each final state sequence and the multiple observation sequence values in the observation sequence value set. The object motion state detection device can multiply the multiple state transition probabilities corresponding to the multiple state sequence values to obtain a product. The object motion state detection device can multiply the multiple observation probabilities between the multiple observation sequence values and the multiple state sequence values in the corresponding order to obtain another product. The object motion state detection device obtains the product of the two products to obtain the probability of each final state sequence.
[0117] In the embodiment of the present application, the object motion state detection device arranges the M final state sequences in the order of columns to obtain the preset state sequence matrix.
[0118] S109, in combination with the last state sequence value and the preset state sequence matrix, a plurality of state sequence values are determined to obtain a state sequence value set.
[0119] In the embodiment of the present application, the object motion state detection device combines the last state sequence value with the preset state sequence matrix to determine the multiple state sequence values to obtain the state sequence value set.
[0120] In the embodiment of the present application, the object motion state detection device determines the corresponding column matched with the last state sequence value in the last row of the preset state sequence matrix to obtain the multiple state sequence values.
[0121] In the embodiment of the present application, the state sequence value set includes: a set of actual region information of the calibration object in the corresponding image frame in the N image frames predicted for the observation sequence value set.
[0122] In the embodiment of the present application, the object motion state detection device calculates the third state transition probability matrix through the second preset state transition probability matrix corresponding to the i+1 observation sequence value, that is, determines the third state transition probability matrix based on the idea of dynamic hidden Markov model to grow the state sequence. Further, the interference factor corresponding to O0 is eliminated to obtain a more accurate state sequence value set.
[0123] In some embodiments, referring to Figure 4 , Figure 4 An optional flowchart of the object motion state detection method provided in the embodiment of the present application is shown in Figure 3 S106 shown can also be implemented by S110 to S111, which will be described in combination with each step.
[0124] S110, detecting T values of the index interval between the (i+1)th observation sequence value and the ith observation sequence value, calculating probability values corresponding to the first state sequence value and the M state sequence values based on the second preset state transition probability matrix to form the first row of the third state transition probability matrix.
[0125] In the embodiment of the present application, the object motion state detection device detects T values of the index interval between the (i+1)th observation sequence value and the ith observation sequence value, extracts the transition probabilities between the first state sequence value and the M state sequence values in the second preset state transition probability matrix, and multiplies the transition probabilities to obtain a first product. When T is 1, the object motion state detection device calculates Kth products corresponding to the M state sequence values and the Kth state sequence value, adds the first product and the Kth product to form a Kth probability value in the first row of the third state transition probability matrix, and obtains an Mth probability value in the first row of the third state transition probability matrix to form the first row of the third state transition probability matrix. K is an integer greater than or equal to 1 and less than or equal to M.
[0126] In the embodiment of the present application, the object motion state detection device detects T values of the index interval between the (i+1)th observation sequence value and the ith observation sequence value, extracts the transition probabilities between the first state sequence value and the M state sequence values in the second preset state transition probability matrix, and multiplies the transition probabilities to obtain a first product. When T is 1, the object motion state detection device calculates Kth products corresponding to the M state sequence values and the Kth state sequence value, adds the first product and the Kth product to form a Kth probability value in the first row of the third state transition probability matrix, and obtains an Mth probability value in the first row of the third state transition probability matrix to form the first row of the third state transition probability matrix. K is an integer greater than or equal to 1 and less than or equal to M.
[0127] In the embodiment of the present application, the object motion state detection device detects T values of the index interval between the (i+1)th observation sequence value and the ith observation sequence value, extracts the transition probabilities between the first state sequence value and the M state sequence values in the second preset state transition probability matrix, and multiplies the transition probabilities to obtain a first product. When T is 1, the object motion state detection device calculates Kth products corresponding to the M state sequence values and the Kth state sequence value, adds the first product and the Kth product to form a Kth probability value in the first row of the third state transition probability matrix, and obtains an Mth probability value in the first row of the third state transition probability matrix to form the first row of the third state transition probability matrix. K is an integer greater than or equal to 1 and less than or equal to M.
[0128] In the embodiment of the present application, the object motion state detection device detects T values of the index interval between the (i+1)th observation sequence value and the ith observation sequence value, extracts the transition probabilities between the first state sequence value and the M state sequence values in the second preset state transition probability matrix, and multiplies the transition probabilities to obtain a first product. When T is 1, the object motion state detection device calculates Kth products corresponding to the M state sequence values and the Kth state sequence value, adds the first product and the Kth product to form a Kth probability value in the first row of the third state transition probability matrix, and obtains an Mth probability value in the first row of the third state transition probability matrix to form the first row of the third state transition probability matrix. K is an integer greater than or equal to 1 and less than or equal to M.
[0129] S111, until the second preset state transition probability matrix is combined, the probability values corresponding to the Mth state sequence value and the M state sequence values are calculated to form the Mth row of the third state transition probability matrix, and then the third state transition probability matrix is obtained.
[0130] In the embodiment of the present application, the object motion state detection device combines the second preset state transition probability matrix, calculates the probability values corresponding to the Mth state sequence value and the M state sequence values, forms the Mth row of the third state transition probability matrix, and then obtains the third state transition probability matrix.
[0131] In the embodiment of the present application, the object motion state detection device extracts the transition probabilities between the Mth state sequence value and the M state sequence values in the second preset state transition probability matrix, and obtains the Mth product by multiplying the transition probabilities. When T is 1, the object motion state detection device calculates the Kth product corresponding to the M state sequence value and the Kth state sequence value, adds the Mth product and the Kth product to form the Kth probability value in the first row of the third state transition probability matrix, and then obtains the Mth probability value in the Mth row of the third state transition probability matrix to form the Mth row of the third state transition probability matrix.
[0132] In the embodiment of the present application, the object motion state detection device extracts the transition probabilities between the Mth state sequence value and the M state sequence values in the second preset state transition probability matrix, and obtains the Mth product by multiplying the transition probabilities. When T is 1, the object motion state detection device calculates the Kth product corresponding to the M state sequence value and the Kth state sequence value, adds the Mth product and the Kth product to form the Kth probability value in the first row of the third state transition probability matrix, and then obtains the Mth probability value in the Mth row of the third state transition probability matrix to form the Mth row of the third state transition probability matrix.
[0133] In the embodiment of the present application, the object motion state detection device calculates the third state transition probability matrix based on the dynamic hidden Markov model, filters the interference caused by misrecognition and missed recognition in the scene of the platform vehicle state recognition, and can better handle the difficulties faced by the standard hidden Markov model. Further, the detection accuracy of the object motion state is improved.
[0134] In some embodiments, referring to Figure 4 , Figure 4 An optional flowchart of the object motion state detection method provided by the embodiment of the present application is shown in Figure 3 S109 shown can also be implemented by S112 to S113, which will be described in combination with each step.
[0135] S112. Arrange the M final state sequences in column order to obtain the preset state sequence matrix.
[0136] In this embodiment of the invention, the object motion state detection device arranges M final state sequences in column order to obtain a preset state sequence matrix.
[0137] S113. In the last row of the preset state sequence matrix, determine the target sequence value that matches the final state sequence value, and then determine that the final state sequence of the column corresponding to the target sequence value is multiple state sequence values to obtain a set of state sequence values.
[0138] In this embodiment of the invention, the object motion state detection device determines the target sequence value that matches the final state sequence value in the last row of the preset state sequence matrix, and then determines that the final state sequence of the column corresponding to the target sequence value is multiple state sequence values, so as to obtain a set of state sequence values.
[0139] In this embodiment of the invention, due to the influence of some factors at the scene, the object motion state detection device may misidentify other objects as license plates, thus causing misidentification of the overall vehicle dynamics. Therefore, the object motion state detection device can judge some misidentifications based on the trend of the entire observation sequence. For example, due to the motion characteristics of vehicles, the position of a license plate cannot move too much in a short period of time. This characteristic can be described by Markov state transitions: if the license plate appears in a position at the current moment, then at the next moment, there is a high probability that it will appear in the original position or a nearby position, while the probability of appearing in a more distant position will decrease with increasing distance. Therefore, this scheme uses a Hidden Markov Model to estimate the true license plate position sequence through the observed license plate position sequence.
[0140] In this embodiment of the invention, the object motion state detection device can divide the monitored area into M regions along the vertical axis and set M states, each state representing that the license plate has appeared in the corresponding region, denoted as {s1, s2, ..., s...}. m} indicates that s i ∈{s1,s2,…,s m} indicates that the license plate appears in the i-th region. For each state, there is a corresponding observation, denoted by {o1, o2, ..., o...}. m} indicates that O i ∈{o1,o2,…,o m} indicates that a license plate was detected in the i-th region. In a Hidden Markov Model, given an observation sequence, the state transition probability and the observation probability are needed. The state transition probability P(s) j |s i) is defined as the probability of the state being s i at the last time and s j at the next time. The observation probability P(O j |s i ) is the probability of the state being s i and the observation being O j . In the standard hidden Markov model, given the observation sequence o(1), o(2), …, o(N), O(τ)∈{o(1), o(2), …, o(N)} within a time window, the actual state sequence S(1), S(2), …, S(N), S(τ)∈{S(1), S(2), …, S(N)} can be estimated using the Viterbi algorithm according to the state transition probability and the observation probability. Further, if S(τ) and O(τ) do not match each other at a time τ, the license plate position coordinate information Y(τ) at this time is removed, and the linear model y = at + b is fitted again. However, in the case of the dynamic hidden Markov model, since S0(no license plate in the monitoring area) and O0(no detected license plate) are not set, the time corresponding to the observation value O0must be deleted from the sequence o(1), o(2), …, o(N), and the related state transition is also not considered. In order to solve this problem, the present scheme considers the state transition corresponding to the variable length sampling time. For example, due to the different time elapsed, P(S(τ+η) = s j |s(τ) = s i ) ≠ P(s j |s i ), η > 1. But formula (1) can be obtained from the Chapman-Kolmogorov equation:
[0141] P(S(τ+η) = s j |s(τ) = s i ) = ∑ k P(S(τ+η-1) = s k |s(τ) = s i )P(s j |s k ) (1)
[0142] where P(s j |s k ) represents the transition probability of the Kth and jth state sequence values, P(S(τ+η-1) represents the state transition probability of the sequence value at the τ+η-1 time, s(τ) represents the first state sequence value, s i represents the i th state sequence value, and s k represents the kth state sequence value.
[0143] Therefore, in the dynamic hidden Markov model, it is necessary to maximize
[0144] ∏ τ P(O(θτ)|S(θτ)) x ∑ τ θ-1P(S(θτ+1)|S(θτ)) (2)
[0145] where P(O(θτ)|S(θτ)) represents the observation transition probability between the τth state sequence value and the τth observation sequence value. P(S(θτ+1)|S(θτ)) represents the state transition probability between the τth state sequence value and the τ+1th state sequence value.
[0146] The object motion state detection device solves the corresponding state sequence, where Θ = [θ1, θ2,...] is the subscript of the observation left after the period of observation O0 is removed.
[0147] In order to solve the problem of dynamic hidden Markov model, the Viterbi algorithm also needs to be modified to form a dynamic Viterbi algorithm. Given the observation sequence and state transition probability, the state probability is as follows:
[0148] 1. Create matrices A[|Θ|, M], B[|Θ|, M] to record the probability of subsequence and the last state corresponding to each state at the current time in the subsequence.
[0149] 2. At the first time, A[θ1, M] = P(O(θτ)|S(θτ)), B[θ1, M] = <start> , <start>The system state is represented to start.
[0150] 3. At time θ2 to θ|Θ|, the current state transition probability is calculated using formula (1), A[θτ,i]=max j P(O(θτ)|S(θ τ ))=S i )P(S(θ τ )=S i |S(θ τ-1 )=s j )A[θ τ-1 ,s j ],B[θτ,i]=argmax j P(S(θ τ )=S i |S(θ τ-1 )=s j )A[θ τ-1 ,s j ]。
[0151] 4. Find the i that makes the A[θ|Θ|,i] transition probability maximum, and the last sequence value in the estimated final state sequence, S(θ|Θ|)=S i .
[0152] 5. According to the direction of the matrix B[|Θ|,M], the estimated state sequence is obtained from back to front.
[0153] In some embodiments, referring to Figure 5 , Figure 5 an optional flowchart of the object motion state detection method provided by the embodiments of the present application is shown, Figure 1 S101 to S102 shown can also be implemented by S114 to S119, which will be described in combination with the steps.
[0154] S114, a current image frame corresponding to the current time in the video stream is extracted.
[0155] In the embodiments of the present application, the object motion state detection device extracts a current image frame corresponding to the current time in the video stream.
[0156] Illustratively, the camera collects the video stream of the current predetermined area in real time and transmits it to the object motion state detection device. After receiving the real-time video stream, the object motion state detection device extracts the image frame corresponding to the current time.
[0157] S115, starting from the current image frame in the video stream, an image frame is extracted every predetermined time length or predetermined number of image frames along the time axis until N-1 image frames are extracted.
[0158] In the embodiment of the present application, the object motion state detection device extracts an image frame every predetermined time length or predetermined number of image frames along the time axis from the current image frame as a starting point until N-1 image frames are extracted.
[0159] In the embodiment of the present application, the video stream includes a plurality of image frames distributed along the time axis. The object motion state detection device can extract an image frame every 1 second from the current image frame as a starting point until N-1 image frames are extracted. In the embodiment of the present application, the predetermined time length is not limited.
[0160] In the embodiment of the present application, the video stream includes a plurality of image frames distributed along the time axis. The object motion state detection device can extract an image frame every 5 image frames from the current image frame as a starting point until N-1 image frames are extracted. In the embodiment of the present application, the predetermined number is not limited.
[0161] S116, combining the current image frame and N-1 image frames along the time axis to obtain N image frames.
[0162] In the embodiment of the present application, the object motion state detection device combines the current image frame and N-1 image frames along the time axis to obtain N image frames.
[0163] In the embodiment of the present application, the object motion state detection device combines the current image frame and N-1 image frames along the time axis to obtain N image frames.
[0164] S117, processing N image frames through a preset detection model to obtain N position coordinate information.
[0165] In the embodiment of the present application, the object motion state detection device processes N image frames through a preset detection model to obtain N position coordinate information.
[0166] The preset detection model can be a WPOD-NET algorithm model, and the preset detection model is not limited in the embodiment of the present application.
[0167] S118, regionally dividing N image frames, and determining the observation sequence value of the belonging region for each position coordinate information in the corresponding image frame to obtain N observation sequence values corresponding to N position coordinate information.
[0168] In the embodiment of the present application, the object motion state detection device regionally divides N image frames, and determines the observation sequence value of the belonging region for each position coordinate information in the corresponding image frame to obtain N observation sequence values corresponding to N position coordinate information.
[0169] In the embodiment of the present application, the object motion state detection device divides N image frames according to certain rules to obtain a plurality of regions corresponding to each image frame. The object motion state detection device determines the region to which each position coordinate information belongs in the corresponding image frame, and then obtains the observation sequence value by combining the order of the region, and finally obtains N observation sequence values.
[0170] S119, removing predetermined observation sequence values from the N observation sequence values to obtain an observation sequence value set.
[0171] In the embodiment of the present application, the object motion state detection device removes predetermined observation sequence values from the N observation sequence values to obtain an observation sequence value set.
[0172] In the embodiment of the present application, the object motion state detection device extracts N image frames at the current time based on the sliding window method, and uses the dynamic characteristics of the N image frames to accurately determine whether a vehicle has arrived or left the platform.
[0173] In some embodiments, referring to Figure 5 , Figure 5 An optional flowchart of the object motion state detection method provided by the embodiment of the present application is shown in Figure 1 S104 shown can also be implemented by S120 to S121, which will be described in combination with each step.
[0174] S120, combining the state sequence value set and the observation sequence value set, removing the interference position coordinate information from the N position coordinate information to obtain a plurality of target position coordinate information.
[0175] In the embodiment of the present application, the object motion state detection device combines the state sequence value set and the observation sequence value set, removes the interference position coordinate information from the N position coordinate information to obtain a plurality of target position coordinate information.
[0176] In the embodiment of the present application, the object motion state detection device compares the plurality of state sequence values in the state sequence value set with the plurality of observation sequence values in the observation sequence value set in order. If at least one observation sequence value is detected to be different from the corresponding state sequence value, the object motion state detection device removes the position coordinate information corresponding to the observation sequence value from the N position coordinate information, and further obtains a plurality of target position coordinate information.
[0177] S121, determining the motion state by using the plurality of target position coordinate information.
[0178] In the embodiment of the present application, the object motion state detection device determines the motion state by using the plurality of target position coordinate information.
[0179] In the embodiment of the present application, the object motion state detection device linearly fits the plurality of target position coordinate information to obtain a slope value, and determines the motion state according to the size of the slope value.
[0180] In the embodiment of the present application, the object motion state detection device combines the state sequence value set and the observation sequence value set, eliminates the interference position coordinate information in the N position coordinate information, and further calculates a more accurate motion state.
[0181] In some embodiments, referring to Figure 6 , Figure 6 An optional flowchart of the object motion state detection method provided by the embodiment of the present application is shown in Figure 5 S118 shown can also be implemented by S122 to S124, which will be described in combination with each step.
[0182] S122, the N image frames are respectively divided into U regions along the longitudinal coordinate to obtain U regions corresponding to each image frame.
[0183] In the embodiment of the present application, the object motion state detection device divides the N image frames into U regions along the longitudinal coordinate to obtain U regions corresponding to each image frame. U is an integer greater than 1.
[0184] In the embodiment of the present application, the object motion state detection device divides each image frame into 10 regions along the longitudinal coordinate. Further, 10 regions corresponding to each image frame can be obtained.
[0185] S123, for each position coordinate information, the belonging region is determined in the corresponding U regions.
[0186] In the embodiment of the present application, the object motion state detection device determines the belonging region of each position coordinate information in the corresponding plurality of regions.
[0187] Each region includes a certain number of position coordinate information. The object motion state detection device can determine the belonging region of the corresponding position coordinate information in the U regions of each image frame.
[0188] S124, the longitudinal order of the belonging region is determined in the U regions, the longitudinal order is taken as the observation sequence value of each position coordinate information, and further N observation sequence values are obtained.
[0189] In the embodiment of the present application, the object motion state detection device determines the longitudinal order of the belonging region in the U regions, takes the longitudinal order as the observation sequence value of each position coordinate information, and further obtains N observation sequence values.
[0190] For example, in combination with Figure 7 , the object motion state detection device divides each image frame into 10 regions along the longitudinal coordinate, and then can obtain 10 regions corresponding to each image frame. The object motion state detection device determines the belonging region (marked by a bold solid line in Figure 5 ) in the 10 regions according to the position coordinate information of the center point of the license plate 14 of the vehicle. The object motion state detection device determines the order 5 corresponding to the belonging region in the 10 regions divided along the longitudinal coordinate, and then obtains the longitudinal observation sequence value 5 corresponding to the position coordinate information.
[0191] In the embodiment of the present application, the object motion state detection device divides N image frames into U regions along the longitudinal coordinate respectively, to obtain the observation sequence value corresponding to each position coordinate information. By the method of dividing the N image frames into regions, the region of the position coordinate information can be accurately determined, and the obtained observation sequence value is also more accurate.
[0192] In some embodiments, referring to Figure 6 , Figure 6 An optional flowchart of the object motion state detection method provided by the embodiment of the present application is shown as Figure 5 S120 to S121 shown in the figure can also be implemented by S125 to S128, which will be described in combination with each step.
[0193] S125, compare the plurality of state sequence values in the state sequence value set with the plurality of observation sequence values in the observation sequence value set in order, and if it is determined that at least one state sequence value is different from at least one observation sequence value corresponding to the order, eliminate at least one second position coordinate information corresponding to the at least one observation sequence value from the N position coordinate information, to obtain a plurality of intermediate position coordinate information.
[0194] In the embodiment of the present application, the object motion state detection device compares the plurality of state sequence values in the state sequence value set with the plurality of observation sequence values in the observation sequence value set in order, and if it is determined that at least one state sequence value is different from at least one observation sequence value corresponding to the order, eliminates at least one second position coordinate information corresponding to the at least one observation sequence value from the N position coordinate information, to obtain a plurality of intermediate position coordinate information.
[0195] S126, eliminate the predetermined position coordinate information in the plurality of intermediate position coordinate information, to obtain a plurality of target position coordinate information.
[0196] In the embodiment of the present application, the object motion state detection device eliminates the predetermined position coordinate information in the plurality of intermediate position coordinate information, to obtain a plurality of target position coordinate information.
[0197] S127, linearly fitting the plurality of target longitudinal coordinate information in the plurality of target position coordinate information along a time axis to obtain a slope value of the plurality of target longitudinal coordinate information.
[0198] In the embodiment of the present application, the object motion state detection device linearly fits the plurality of target longitudinal coordinate information in the plurality of target position coordinate information along a time axis to obtain a slope value of the plurality of target longitudinal coordinate information.
[0199] S128, determining the motion state according to the size of the slope value.
[0200] In the embodiment of the present application, the object motion state detection device determines the motion state according to the size of the slope value
[0201] If the slope value is greater than a preset threshold value, it is determined that the motion state is a close state.
[0202] If the slope value is less than the preset threshold value, it is determined that the motion state is an away state.
[0203] The threshold value can be any numerical value, and the size of the threshold value is not limited in the embodiment of the present application.
[0204] In actual use, the process of the present scheme is as follows:
[0205] Configuration: The staff adjusts the position and angle of the camera, sets the monitoring area, and divides the grid area in the horizontal and vertical coordinates.
[0206] The object motion state detection device continuously collects data using the camera, extracts and retains the latest N frames obtained at each time.
[0207] The object motion state detection device uses the WPOD-NET algorithm to detect the license plate of each picture and saves the position (horizontal and vertical coordinates) of the license plate (actually, only the current obtained frame needs to be detected at each time, because the previous detection result has been saved).
[0208] The object motion state detection device corresponds the vertical coordinates of the license plate of each frame of picture to the observation {o1, o2, …, o m}。
[0209] The object motion state detection device removes O0 in the observation sequence o(1), o(2), …, o(N) to obtain o(θ1), o(θ2), …, o(θ|Θ|).
[0210] The object motion state detection device uses a dynamic hidden Markov model to correspond the observation sequence o(θ1), o(θ2), …, o(θ|Θ|) to a state sequence.
[0211] The object motion state detection device removes elements of positions of inconsistent state values and observation values in a license plate longitudinal coordinate sequence Y, and updates Y.
[0212] The object motion state detection device performs least square fitting on Y and t to obtain a slope value.
[0213] The object motion state detection device determines whether a vehicle arrives or leaves the platform according to a comparison of the slope value and a preset threshold value.
[0214] In the embodiment of the application, the object motion state detection device extracts N image frames by using a sliding window method, determines the motion state by using dynamic characteristics of the vehicle, and improves the accuracy of the determination of the arrival / departure of the vehicle. Meanwhile, the interference factor is removed based on the idea of the dynamic hidden Markov model, and the detection efficiency is improved.
[0215] Referring to Figure 8 , Figure 8 A structure diagram of an object motion state detection device provided in the embodiment of the application is shown.
[0216] The embodiment of the application further provides an object motion state detection device 800, which comprises a collection and extraction unit 803, a processing unit 804 and a determination unit 805.
[0217] The collection and extraction unit 803 is used for collecting a video stream of a predetermined area in real time, and extracting N image frames corresponding to a current time from the video stream based on a sliding window method; N is an integer greater than 1.
[0218] The processing unit 804 is used for processing N position coordinate information corresponding to a calibration object in the N image frames, and determining an observation sequence value set after a predetermined observation sequence value is removed in combination with the N image frames; the predetermined observation sequence value is an observation sequence value corresponding to predetermined position coordinate information; the predetermined position coordinate information is position coordinate information obtained by processing an image frame not including the calibration object.
[0219] The processing unit 804 is further used for obtaining a state sequence value set corresponding to the observation sequence value set based on a dynamic hidden Markov model.
[0220] The determination unit 805 is used for determining a motion state of a target object in the N image frames at the current time through the observation sequence value set and the state sequence value set; the calibration object belongs to the target object.
[0221] In the embodiment of the present application, the processing unit 804 in the object motion state detection device 800 is configured to detect the index continuity between the i th observation sequence value and the previous observation sequence value in the observation sequence value set, process the i th observation sequence value, a first preset state transition probability matrix and a first preset observation probability matrix based on a preset dynamic programming algorithm to obtain an i th group of M state sequences corresponding to the i th observation sequence value, i is an integer greater than or equal to 1, M is an integer greater than 1, detect the number T of index intervals between the i+1 th observation sequence value and the i th observation sequence value, calculate a third state transition probability matrix based on a second preset state transition probability matrix corresponding to the i+1 th observation sequence value, the second preset state transition probability matrix represents a transition probability set between M state sequence values corresponding to the i+1 th observation sequence value, T is an integer greater than or equal to 1, and the i+1 th observation sequence value, the third state transition probability matrix and a third preset observation probability matrix are processed based on the i th group of M state sequences by the preset dynamic programming algorithm to obtain an i+1 th group of M state sequences corresponding to the i+1 th observation sequence value, until M final state sequences corresponding to the last observation sequence value in the observation sequence value set are obtained, the last state sequence value of a target state sequence with the maximum transition probability is determined in the M final state sequences, a plurality of state sequence values are determined in combination with the last state sequence value and a preset state sequence matrix to obtain the state sequence value set.
[0222] In the embodiment of the present application, the processing unit 804 in the object motion state detection device 800 is configured to calculate the probability values corresponding to the M state sequence values respectively from the first state sequence value in combination with the second preset state transition probability matrix to form the first row of the third state transition probability matrix, until the probability values corresponding to the M state sequence values respectively from the M th state sequence value in combination with the second preset state transition probability matrix to form the M th row of the third state transition probability matrix, and then the third state transition probability matrix is obtained.
[0223] In the embodiment of the present application, the processing unit 804 in the object motion state detection device 800 is configured to multiply the transition probabilities between the M state sequence values respectively from the first state sequence value in the second preset state transition probability matrix to obtain a first product, when T is 1, calculate the K th product corresponding to the M state sequence values respectively from the K th state sequence value, add the first product and the K th product to form the K th probability value in the first row of the third state transition probability matrix, until the M th probability value in the first row of the third state transition probability matrix is obtained to form the first row of the third state transition probability matrix, and K is an integer greater than or equal to 1 and less than or equal to M.
[0224] In the embodiment of the present application, the processing unit 804 in the object motion state detection device 800 is configured to, when T is greater than 1, multiply the transition probabilities between any two of the M state sequence values to obtain a second product; calculate the Kth product corresponding to the Kth state sequence value of the M state sequence values, and add the first product, T-1 second products and the Kth product to form the Kth probability value in the first row of the third state transition probability matrix, until the Mth probability value in the first row of the third state transition probability matrix is obtained, so as to form the first row of the third state transition probability matrix.
[0225] In the embodiment of the present application, the processing unit 804 in the object motion state detection device 800 is configured to arrange the M final state sequences in the order of columns, and further obtain the preset state sequence matrix.
[0226] In the embodiment of the present application, the processing unit 804 in the object motion state detection device 800 is configured to determine the target sequence value matching the last state sequence value in the last row of the preset state sequence matrix, and further determine that the final state sequence of the column corresponding to the target sequence value is the plurality of state sequence values.
[0227] In the embodiment of the present application, the acquisition and extraction unit 803 in the object motion state detection device 800 is configured to extract a current image frame corresponding to the current time from the video stream; extract an image frame every predetermined time length or predetermined number of image frames along the time axis starting from the current image frame in the video stream, until N-1 image frames are extracted; and combine the current image frame and the N-1 image frames along the time axis to obtain the N image frames.
[0228] In the embodiment of the present application, the processing unit 804 in the object motion state detection device 800 is configured to process the N image frames by using a preset detection model to obtain the N position coordinate information; divide the N image frames respectively, and determine the observation sequence value of the region to which each position coordinate information belongs in the corresponding image frame to obtain N observation sequence values corresponding to the N position coordinate information; and eliminate the predetermined observation sequence value from the N observation sequence values to obtain the observation sequence value set.
[0229] In the embodiment of the present application, the processing unit 804 in the object motion state detection device 800 is configured to divide the N image frames along the longitudinal coordinate into U regions respectively, to obtain U regions corresponding to each image frame; U is an integer greater than 1; for each position coordinate information, the belonging region is determined in the corresponding U regions; the longitudinal order of the belonging region is determined in the U regions, and the longitudinal order is taken as the observation sequence value of the each position coordinate information, and then the N observation sequence values are obtained.
[0230] In the embodiment of the present application, the determining unit 805 in the object motion state detection device 800 is configured to combine the state sequence value set and the observation sequence value set, to eliminate the interference position coordinate information in the N position coordinate information, and to obtain a plurality of target position coordinate information.
[0231] The motion state is determined by using the plurality of target position coordinate information.
[0232] In the embodiment of the present application, the determining unit 805 in the object motion state detection device 800 is configured to compare the plurality of state sequence values in the state sequence value set and the plurality of observation sequence values in the observation sequence value set in order, and if it is determined that at least one state sequence value is different from at least one observation sequence value in the corresponding order, the at least one second position coordinate information corresponding to the at least one observation sequence value is eliminated from the N position coordinate information, to obtain a plurality of intermediate position coordinate information; and the predetermined position coordinate information in the plurality of intermediate position coordinate information is eliminated, to obtain the plurality of target position coordinate information.
[0233] In the embodiment of the present application, the determining unit 805 in the object motion state detection device 800 is configured to linearly fit the plurality of target longitudinal coordinate information in the plurality of target position coordinate information along the time axis, to obtain the slope value of the plurality of target longitudinal coordinate information; and the motion state is determined according to the size of the slope value.
[0234] In the embodiment of the present application, the determining unit 805 in the object motion state detection device 800 is configured to determine that the motion state is the approaching state if the slope value is greater than a preset threshold value; and determine that the motion state is the moving away state if the slope value is less than the preset threshold value.
[0235] In the embodiment of the present application, the video stream of the predetermined area is collected in real time by the collection and extraction unit 803, and N image frames corresponding to the current time are extracted from the video stream based on the sliding window method; N is an integer greater than 1; the N position coordinate information corresponding to the calibration object in the N image frames is obtained by the processing unit 804, and the observation sequence value set after excluding the predetermined observation sequence value is determined in combination with the N image frames; wherein the predetermined observation sequence value is the observation sequence value corresponding to the predetermined position coordinate information; the predetermined position coordinate information is the position coordinate information obtained by processing the image frame not including the calibration object; the state sequence value set is obtained by the processing unit 804 based on the dynamic hidden Markov model corresponding to the observation sequence value set; the motion state of the target object in the N image frames at the current time is determined by the determination unit 805 through the observation sequence value set and the state sequence value set; the calibration object belongs to the target object. Since the present scheme filters out the interference factors caused by misrecognition and missed recognition based on the dynamic hidden Markov model, and can better handle the difficulties faced by the standard hidden Markov model, the recognition accuracy of the vehicle motion state can be improved.
[0236] It should be noted that in the embodiment of the present application, if the above-mentioned object motion state detection method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing an object motion state detection device (which can be a personal computer, etc.) to execute all or part of the methods described in the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read Only Memory, ROM), a magnetic disk or an optical disk, and various storage medium capable of storing program codes. Therefore, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0237] Correspondingly, the embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps in the above method.
[0238] Correspondingly, the embodiment of the present application provides an object motion state detection device, which includes a memory 802 and a processor 801, the memory 802 stores a computer program capable of running on the processor 801, and the processor 801 realizes the steps in the above method when executing the program.
[0239] It should be noted that the above description of the storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0240] It should be noted that, Figure 9 A hardware entity schematic diagram of the object motion state detection device provided by the embodiment of the present application is shown in Figure 9 The hardware entity of the object motion state detection device 800 includes a processor 801 and a memory 802, wherein
[0241] The processor 801 generally controls the overall operation of the object motion state detection device 800.
[0242] The memory 802 is configured to store instructions and applications executable by the processor 801, and can also cache data (for example, image data, audio data, voice communication data and video communication data) to be processed by the processor 801 and each module in the object motion state detection device 800, which can be realized by FLASH or RAM.
[0243] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above sequence number of the embodiment of the present application is only for description, not representing the pros and cons of the embodiment.
[0244] It should be noted that in this paper, the term "includes", "contains" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or device. Without more limitations, the element defined by the sentence "includes a…" does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0245] In several embodiments provided by the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. The apparatus embodiments described above are merely illustrative, for example, the division of the units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed components can be indirect coupling or communication connection through some interfaces, apparatuses or units, which can be electrical, mechanical or other forms.
[0246] The units described above as separate components can or can not be physically separate, and the components shown as units can or can not be physical units; they can be located in one place or distributed on a plurality of network units; and part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0247] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be realized in the form of hardware or hardware plus software functional unit.
[0248] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium, and the program executes the steps including the above-mentioned method embodiments when executed; and the foregoing storage medium includes mobile storage device, read only memory (Read Only Memory, ROM), magnetic disc or optical disc and various storage program codes.
[0249] Alternatively, the integrated unit of the present application, if implemented in the form of a software function module and sold or used as an independent product, can also be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present application. The foregoing storage medium includes mobile storage devices, ROM, magnetic discs or optical discs and various storage program codes.
[0250] The above merely describes the embodiments of the present application, and the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.< / start> < / start>
Claims
1. A method for detecting the motion state of an object, characterized in that, include: The video stream of a predetermined area is acquired in real time, and N image frames corresponding to the current moment are extracted from the video stream based on the sliding window method. N is an integer greater than 1; The process obtains N position coordinate information corresponding to the calibrated object in the N image frames, and combines the N image frames to determine a set of observation sequence values after removing predetermined observation sequence values; wherein, the predetermined observation sequence values are the observation sequence values corresponding to predetermined position coordinate information; the predetermined position coordinate information is the position coordinate information obtained by processing the image frames that do not include the calibrated object; The state sequence value set is obtained based on the observation sequence value set corresponding to the dynamic hidden Markov model; The motion state of the target object at the current moment in the N image frames is determined by the observation sequence value set and the state sequence value set; the calibrated object belongs to the target object; The process of obtaining the state sequence value set based on the observation sequence value set corresponding to the dynamic hidden Markov model includes: The indices of the i-th observation sequence value and the previous observation sequence value in the set of observation sequence values are detected to be continuous. Based on the i-th observation sequence value, the first preset state transition probability matrix and the first preset observation probability matrix, a preset dynamic programming algorithm is used to process the i-th observation sequence value to obtain the i-th group of M state sequences; i is an integer greater than or equal to 1; M is an integer greater than 1. The index interval T values between the (i+1)th observation sequence value and the i-th observation sequence value are detected. Based on the second preset state transition probability matrix corresponding to the (i+1)th observation sequence value, a third state transition probability matrix is calculated. The second preset state transition probability matrix represents the set of transition probabilities among M state sequence values corresponding to the (i+1)th observation sequence value. T is an integer greater than or equal to 1. Based on the i-th group of M state sequences, the i+1-th observation sequence value, the third state transition probability matrix, and the third preset observation probability matrix are processed by the preset dynamic programming algorithm to obtain the i+1-th group of M state sequences corresponding to the i+1-th observation sequence value, until the M final state sequences corresponding to the last observation sequence value in the set of observation sequence values are obtained. Determine the final state sequence value of the target state sequence with the highest transition probability from the M final state sequences; By combining the final state sequence value with the preset state sequence matrix, multiple state sequence values are determined to obtain the set of state sequence values.
2. The object motion state detection method according to claim 1, characterized in that, The calculation of the third state transition probability matrix based on the second preset state transition probability matrix corresponding to the (i+1)th observation sequence value includes: Based on the second preset state transition probability matrix, calculate the probability values corresponding to the first state sequence value and the M state sequence values respectively, so as to form the first row of the third state transition probability matrix; Until the second preset state transition probability matrix is combined, the probability values corresponding to the Mth state sequence value and the Mth state sequence values are calculated respectively to form the Mth row of the third state transition probability matrix, and thus the third state transition probability matrix is obtained.
3. The object motion state detection method according to claim 2, characterized in that, The step of combining the second preset state transition probability matrix to calculate the probability values corresponding to the first state sequence value and the M state sequence values, to form the first row of the third state transition probability matrix, includes: Extract the first state sequence value from the second preset state transition probability matrix and multiply it by the transition probabilities between the first state sequence value and the M state sequence values to obtain the first product; When T is 1, calculate the Kth product of each of the M state sequence values with the Kth state sequence value, add the first product to the Kth product to form the Kth probability value in the first row of the third state transition probability matrix, until the Mth probability value in the first row of the third state transition probability matrix is obtained, so as to form the first row of the third state transition probability matrix; K is an integer greater than or equal to 1 and less than or equal to M.
4. The object motion state detection method according to claim 3, characterized in that, After extracting the first state sequence value from the second preset state transition probability matrix and multiplying it by the transition probabilities of the M state sequence values to obtain a first product, the method further includes: When T is greater than 1, the transition probabilities between any two state sequence values in the M state sequence values are extracted and multiplied to obtain the second product; Calculate the Kth product of each of the M state sequence values with the corresponding Kth state sequence value. Add the first product, T-1 second products, and the Kth product to form the Kth probability value in the first row of the third state transition probability matrix. Continue until the Mth probability value in the first row of the third state transition probability matrix is obtained, so as to form the first row of the third state transition probability matrix.
5. The method for detecting the motion state of an object according to claim 1, characterized in that, The method further includes the following steps: Based on the i-th group of M state sequences, the (i+1)-th observation sequence value, the third state transition probability matrix, and the third preset observation probability matrix are processed by the preset dynamic programming algorithm to obtain the (i+1)-th group of M state sequences corresponding to the (i+1)-th observation sequence value. This process continues until the last observation sequence value in the set of observation sequence values is obtained, followed by the method of combining the last state sequence value with the preset state sequence matrix corresponding to the target state sequence to determine multiple state sequence values before obtaining the set of state sequence values. The M final state sequences are arranged in column order to obtain the preset state sequence matrix.
6. The object motion state detection method according to claim 5, characterized in that, The process of combining the final state sequence value with a preset state sequence matrix to determine multiple state sequence values, thereby obtaining the set of state sequence values, includes: In the last row of the preset state sequence matrix, a target sequence value that matches the final state sequence value is determined, and then the final state sequence of the column corresponding to the target sequence value is determined to be the plurality of state sequence values.
7. The method for detecting the motion state of an object according to claim 1, characterized in that, The sliding window-based method extracts N image frames corresponding to the current moment from the video stream, including: Extract the current image frame corresponding to the current moment from the video stream; Starting from the current image frame in the video stream, an image frame is extracted along the time axis at predetermined intervals or predetermined number of image frames until N-1 image frames are extracted. The current image frame and the N-1 image frames are combined along the time axis to obtain the N image frames.
8. The method for detecting the motion state of an object according to claim 1, characterized in that, The processing obtains N position coordinates corresponding to the calibrated object in the N image frames, and combines these with the N image frames to determine a set of observation sequence values after removing predetermined observation sequence values, including: The N image frames are processed by a preset detection model to obtain the N position coordinate information; The N image frames are divided into regions, and for each location coordinate information, the observation sequence value of the region to which it belongs is determined in the corresponding image frame, so as to obtain N observation sequence values corresponding to the N location coordinate information; The predetermined observation sequence value is removed from the N observation sequence values to obtain the set of observation sequence values.
9. The object motion state detection method according to claim 8, characterized in that, The step of dividing the N image frames into regions and determining the observation sequence value of the region belonging to each location coordinate information in the corresponding image frame to obtain N observation sequence values corresponding to the N location coordinate information includes: The N image frames are divided along the vertical axis into... By dividing the region into regions, we obtain U regions corresponding to each image frame; It is an integer greater than 1; For each location coordinate information, the corresponding region is determined within the U regions; The vertical order of the regions to which the region belongs is determined in the U regions, and the vertical order is used as the observation sequence value of each location coordinate information, thereby obtaining the N observation sequence values.
10. The method for detecting the motion state of an object according to claim 1, characterized in that, Determining the motion state of the target object at the current moment in the N image frames using the observation sequence value set and the state sequence value set includes: By combining the state sequence value set and the observation sequence value set, interfering position coordinate information is removed from the N position coordinate information to obtain multiple target position coordinate information; The motion state is determined using the coordinate information of the multiple target positions.
11. The method for detecting the motion state of an object according to claim 10, characterized in that, By combining the state sequence value set and the observation sequence value set, and removing interfering position coordinate information from the N position coordinate information, multiple target position coordinate information is obtained, including: The multiple state sequence values in the state sequence value set are compared one by one with the multiple observation sequence values in the observation sequence value set in order. If it is determined that at least one state sequence value is different from at least one observation sequence value in the corresponding order, then at least one second position coordinate information corresponding to the at least one observation sequence value is removed from the N position coordinate information to obtain multiple intermediate position coordinate information. The predetermined position coordinate information is removed from the multiple intermediate position coordinate information to obtain the multiple target position coordinate information.
12. The object motion state detection method according to claim 10, characterized in that, Determining the motion state using the multiple target position coordinate information includes: The slope values of the multiple target ordinate information are obtained by linearly fitting multiple target ordinate information along the time axis; The motion state is determined based on the magnitude of the slope value.
13. The object motion state detection method according to claim 12, characterized in that, Determining the motion state based on the magnitude of the slope value includes one of the following: If the slope value is greater than a preset threshold, the motion state is determined to be a proximity state; If the slope value is less than the preset threshold, the motion state is determined to be a moving-away state.
14. A device for detecting the motion state of an object, characterized in that, include: The acquisition and extraction unit is used to acquire video streams of a predetermined area in real time and extract N image frames corresponding to the current moment from the video stream based on a sliding window method. N is an integer greater than 1; The processing unit is used to process and obtain N position coordinate information corresponding to the calibrated object in the N image frames, and combine the N image frames to determine a set of observation sequence values after removing predetermined observation sequence values; wherein, the predetermined observation sequence values are the observation sequence values corresponding to predetermined position coordinate information; the predetermined position coordinate information is the position coordinate information obtained by processing the image frames that do not include the calibrated object; The processing unit is also used to obtain a set of state sequence values based on the set of observation sequence values corresponding to the dynamic hidden Markov model; The determining unit is used to determine the motion state of the target object at the current moment in the N image frames through the observation sequence value set and the state sequence value set; the calibrated object belongs to the target object; The processing unit is further configured to: detect the continuity of indices between the i-th observation sequence value and the previous observation sequence value in the set of observation sequence values; process the i-th observation sequence value, the first preset state transition probability matrix, and the first preset observation probability matrix using a preset dynamic programming algorithm to obtain the i-th group of M state sequences corresponding to the i-th observation sequence value; where i is an integer greater than or equal to 1; and M is an integer greater than 1; detect the index interval T values between the (i+1)-th observation sequence value and the i-th observation sequence value; and calculate the third state transition probability matrix based on the second preset state transition probability matrix corresponding to the (i+1)-th observation sequence value; the second preset state transition probability matrix represents the state sequence value corresponding to the (i+1)-th observation sequence value. The set of transition probabilities among M state sequence values; T is an integer greater than or equal to 1; based on the i-th group of M state sequences, the (i+1)-th observation sequence value, the third state transition probability matrix, and the third preset observation probability matrix are processed by the preset dynamic programming algorithm to obtain the (i+1)-th group of M state sequences corresponding to the (i+1)-th observation sequence value, until the M final state sequences corresponding to the last observation sequence value in the set of observation sequence values are obtained; the final state sequence value of the target state sequence with the highest transition probability is determined from the M final state sequences; combined with the final state sequence value and the preset state sequence matrix, multiple state sequence values are determined to obtain the set of state sequence values.
15. A device for detecting the motion state of an object, characterized in that, It includes a memory and a processor, the memory storing a computer program that can run on the processor, the processor executing the program to implement the steps of the method according to any one of claims 1 to 13.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program performs the steps of the method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Black-smoke vehicle detection method based on multi-scale block LBP and hidden Markov model
CN108960181A
System and method for searching functions having symbols
WO2012059879A2