A mobile object trajectory extraction method and device, electronic equipment and medium
By acquiring multidimensional spatiotemporal signals through a grating sensor array and performing connected component analysis and linear fitting, combined with Hough transform and clustering algorithms, the problem of detecting the position and velocity of moving objects in existing technologies has been solved, achieving real-time and accurate trajectory extraction and monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN FENGLI OPTOELECTRONICS TECH CO LTD
- Filing Date
- 2022-12-30
- Publication Date
- 2026-05-12
AI Technical Summary
It is difficult to detect the position and speed of moving objects in real time and accurately in existing technologies. Traditional methods such as traffic monitoring video and radar detection have limited detection range and high cost, making it difficult to achieve real-time and accurate tracking with full coverage.
Multidimensional spatiotemporal signal data is acquired using a grating sensor array. By combining connected component analysis and linear fitting with Hough transform and clustering algorithms, the trajectory of moving objects is identified and extracted, enabling real-time matching of position and velocity.
It enables real-time and accurate output of the position and speed of moving objects, providing a new approach for intelligent monitoring across all times and areas, with a detection accuracy rate of over 95%.
Smart Images

Figure CN116244624B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fiber optic sensing technology, and in particular to a method, apparatus, electronic device, and medium for extracting the trajectory of a moving object. Background Technology
[0002] With the rapid improvement of productivity, positioning devices, mobile sensing devices, and wireless communication devices have been continuously developed and widely applied, greatly expanding the ways to acquire various trajectory data. The spatiotemporal trajectory data of various moving objects can be conveniently and reliably collected in real time to form signals. In-depth analysis of these signals and extraction of valuable information is of great significance. Moving target trajectory recognition and extraction is a typical interdisciplinary research problem involving transportation engineering and intelligent science and technology. It has important theoretical research and practical application value in fields such as intelligent traffic supervision, abnormal behavior detection, and autonomous navigation of unmanned aerial vehicles.
[0003] Compared to traditional sensing technologies, grating array sensing technology is a novel sensing technology that combines the advantages of distributed optical fibers and fiber Bragg gratings. It offers many inherent advantages in traffic monitoring, primarily including: strong resistance to electromagnetic interference (optical fiber itself is resistant to electromagnetic interference, ensuring stable signals and minimal interference during long-distance transmission); and suitability for harsh environments (grating array sensing technology detects vibration signals distributed along the optical fiber, unaffected by light or extreme weather conditions; it ensures that vibration sensing can track and measure the real-time trajectory of moving objects even at night on highways and in adverse weather conditions such as rain, snow, and fog).
[0004] In the transportation sector, vehicle trajectories can provide all the dynamic information needed for traffic. Therefore, vehicle trajectory extraction is the primary goal in studying most traffic problems. Currently, vehicle trajectory recognition and extraction are mainly achieved through traffic monitoring videos or radar. Monitoring videos involve the field of computer vision, while radar involves the field of point cloud processing. However, both monitoring videos and radar have very limited detection ranges, the cost of full coverage is too high, and the subsequent processing is also quite complex, making it even more difficult to achieve real-time and accurate vehicle detection and tracking. Summary of the Invention
[0005] In view of this, it is necessary to provide a method, apparatus, electronic device and medium for extracting the trajectory of a moving object, so as to solve the problem of difficulty in real-time and accurate detection of the position and speed of a moving object in the prior art.
[0006] To address the above problems, this invention provides a method for extracting the trajectory of a moving object, comprising:
[0007] Multidimensional spatiotemporal signal data is acquired based on a grating sensor array, and a multidimensional spatiotemporal signal matrix is obtained by preprocessing.
[0008] By performing connected component analysis on the multidimensional spatiotemporal signal matrix, several different connected components are obtained;
[0009] Linear fitting is performed on the trajectory of the moving object in each of the several different connected components;
[0010] The trajectory position of the moving object is matched with the data of the previous frame to obtain several complete trajectories.
[0011] In some possible implementations, acquiring multidimensional spatiotemporal signal data includes:
[0012] Optical fiber grating sensor arrays are laid out longitudinally along each lane of the highway, with each optical fiber grating sensor array including multiple fiber grating sensors.
[0013] The continuous vibration signals of the moving object are acquired based on the multiple fiber optic grating sensors, and the continuous vibration signals constitute multidimensional spatiotemporal signal data.
[0014] In some possible implementations, the linear fitting of the trajectory of the moving object in each of the several different connected components includes:
[0015] The trajectories of moving objects in each of the several different connected domains are linearly fitted based on the Hough transform algorithm and clustering algorithm.
[0016] In some possible implementations, the linear fitting of the trajectory of the moving object in each of the several different connected components based on the Hough transform algorithm and clustering algorithm includes:
[0017] Based on the Hough transform algorithm, the polar coordinates of the trajectory points of the moving objects in each of the several different connected components that appear more than a preset threshold are extracted to form a first set.
[0018] The polar coordinates of the first set that meet the preset conditions are extracted based on the clustering algorithm to obtain the second set;
[0019] All polar coordinates in the second set are converted into straight lines in a rectangular coordinate system to determine the position and average speed of the moving object.
[0020] In some possible implementations, based on the Hough transform algorithm, the polar coordinates of the moving object trajectory points in each of the several different connected components that appear more than a preset threshold times are extracted to form a first set, including:
[0021] Convert the rectangular coordinates of points in each of the several different connected domains to polar coordinates;
[0022] The polar coordinates of curves that intersect at a point more than a preset threshold are extracted to form the first set.
[0023] In some possible implementations, the step of extracting the polar coordinates of the first set that satisfy preset conditions based on a clustering algorithm to obtain the second set includes:
[0024] Step 1: Randomly select several points based on the first set to obtain several initial cluster centers;
[0025] The second step is to divide the points into clusters formed by the nearest initial cluster centers based on the distance of each point in the first set to the initial cluster centers.
[0026] The third step is to calculate the center point of each cluster and determine whether it is equal to the original initial cluster center point. If they are equal, the first cluster center point is obtained; if they are not equal, the second step is executed.
[0027] The fourth step is to obtain a second set consisting of several first cluster centers.
[0028] In some possible implementations, the trajectory position of the moving object is matched with the data of the previous frame to obtain several complete trajectories, including:
[0029] The trajectory position of the moving object is matched with the data of the previous frame;
[0030] Based on the data distribution obtained from different channels at different times, the channel where the moving object is located is determined, and several complete trajectories are identified.
[0031] On the other hand, the present invention provides a moving object trajectory extraction device, comprising:
[0032] The multidimensional spatiotemporal signal matrix acquisition unit is used to acquire multidimensional spatiotemporal signal data based on a grating sensor array and perform preprocessing to obtain a multidimensional spatiotemporal signal matrix.
[0033] The connected component acquisition unit is used to perform connected component analysis on the multidimensional spatiotemporal signal matrix to obtain several different connected components.
[0034] The trajectory fitting unit is used to linearly fit the trajectory of the moving object in each of the several different connected components;
[0035] The trajectory acquisition unit is used to match the trajectory position of the moving object with the data of the previous frame to obtain several complete trajectories.
[0036] On the other hand, the present invention also provides an electronic device, including a memory and a processor, wherein,
[0037] The memory is used to store programs;
[0038] The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the moving object trajectory extraction method described in any of the above implementations.
[0039] On the other hand, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instructions, which, when executed by a processor, can implement the steps in the moving object trajectory extraction method described in any of the above implementations.
[0040] The beneficial effects of the above embodiments are as follows: The present invention provides a method for extracting the trajectory of a moving object. This method uses a grating array sensor to acquire multidimensional spatiotemporal signals of moving objects on a channel and preprocesses them to obtain a multidimensional spatiotemporal signal matrix. Then, connected component analysis is performed on the multidimensional spatiotemporal signal matrix to obtain several different connected components. The trajectory of the moving object in each of these connected components is then linearly fitted, and the trajectory position of the moving object is matched with the data from the previous frame to obtain several complete trajectories. This invention utilizes grating array sensing technology to identify and extract vibration signals from moving objects, and outputs the position and speed of vehicles on the road surface in real time, providing a new approach for all-time, all-domain, and intelligent monitoring of road surfaces. Attached Figure Description
[0041] Figure 1 This is a schematic flowchart of an embodiment of a method for extracting the trajectory of a moving object provided by the present invention;
[0042] Figure 2 A schematic diagram of a multidimensional spatiotemporal signal matrix for one channel of a grating array;
[0043] Figure 3 This is a schematic diagram of an embodiment of a moving object trajectory extraction device provided by the present invention;
[0044] Figure 4 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation
[0045] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0046] Figure 1 This is a schematic flowchart of an embodiment of a method for extracting the trajectory of a moving object provided by the present invention, as shown below. Figure 1 As shown, a method for extracting the trajectory of a moving object includes:
[0047] S101. Acquire multi-dimensional spatiotemporal signal data based on grating sensor array, and preprocess it to obtain multi-dimensional spatiotemporal signal matrix;
[0048] S102. Perform connected component analysis on the multidimensional spatiotemporal signal matrix to obtain several different connected components;
[0049] S103. Perform linear fitting on the trajectory of the moving object in each of the several different connected components;
[0050] S104. Match the trajectory position of the moving object with the data of the previous frame to obtain several complete trajectories.
[0051] Compared with existing technologies, this embodiment provides a method for extracting the trajectory of a moving object. It employs a grating array sensor to acquire multidimensional spatiotemporal signals of moving objects on a channel and preprocesses them to obtain a multidimensional spatiotemporal signal matrix. Then, it performs connected component analysis on the multidimensional spatiotemporal signal matrix to obtain several different connected components. Next, it linearly fits the trajectory of the moving object in each of these connected components and matches the trajectory position of the moving object with the data from the previous frame to obtain several complete trajectories. This invention utilizes grating array sensing technology to identify and extract vibration signals from moving objects, and outputs the position and speed of vehicles on the road surface in real time, providing a new approach for all-time, all-domain, and intelligent monitoring of road surfaces.
[0052] It should be noted that moving objects include, but are not limited to, vehicles on highways and aircraft on airport runways.
[0053] In some embodiments of the present invention, the acquisition of multidimensional spatiotemporal signal data in step S101 includes:
[0054] Optical fiber grating sensor arrays are laid out longitudinally along each lane of the highway, with each optical fiber grating sensor array including multiple fiber grating sensors.
[0055] The continuous vibration signals of the moving object are acquired based on the multiple fiber optic grating sensors, and the continuous vibration signals constitute multidimensional spatiotemporal signal data.
[0056] It should be noted that each grating sensor array is a channel.
[0057] In a specific embodiment of the invention Figure 2 This is a schematic diagram of a multidimensional spatiotemporal signal matrix for one channel of a grating array. The X-axis is the time scale direction, denoted by T1, T2, ..., T... n The Y-axis represents the number of gratings, which is related to the length of the optical fiber sensing cable for the grating array. It is represented by X1, X2, ..., X... NThe number of gratings, N = L ÷ D, where L is the length of the optical cable to be laid, and D is the spacing width of the sensing areas of the grating array. The spacing width of the sensing areas of the grating array can vary depending on the accuracy requirements of different application scenarios. The acquired single-channel multidimensional spatiotemporal signal at each moment is a T×N matrix, with a sliding window of t, and so on, to obtain the multidimensional spatiotemporal signal data for each moment of all channels. Step 1 preprocesses the acquired multidimensional spatiotemporal signal data, i.e., enhances the signal, including gamma correction, Sobel transform, binarization, and closing operations.
[0058] In some embodiments of the present invention, step S103, which involves linearly fitting the trajectory of the moving object in each of the several different connected components, includes:
[0059] The trajectories of moving objects in each of the several different connected domains are linearly fitted based on the Hough transform algorithm and clustering algorithm.
[0060] In some embodiments of the present invention, the linear fitting of the trajectory of the moving object in each of the several different connected components based on the Hough transform algorithm and clustering algorithm includes:
[0061] Based on the Hough transform algorithm, the polar coordinates of the trajectory points of the moving objects in each of the several different connected components that appear more than a preset threshold are extracted to form a first set.
[0062] The polar coordinates of the first set that meet the preset conditions are extracted based on the clustering algorithm to obtain the second set;
[0063] All polar coordinates in the second set are converted into straight lines in a rectangular coordinate system to determine the position and average speed of the moving object.
[0064] In some embodiments of the present invention, based on the Hough transform algorithm, the polar coordinates of the moving object trajectory points in each of the several different connected components that appear more than a preset threshold are extracted to form a first set, including:
[0065] Convert the rectangular coordinates of points in each of the several different connected domains to polar coordinates;
[0066] The polar coordinates of curves that intersect at a point more than a preset threshold are extracted to form the first set.
[0067] In a specific embodiment of the present invention, based on the Hough transform algorithm, the polar coordinates of the moving object trajectory points in each of the several different connected components that appear more than a preset threshold are extracted to form a first set, including:
[0068] Step 1: Convert the rectangular coordinates within the connected domain to polar coordinates. (p, q) = (rcosθ, rsinθ). The converted polar coordinate equation is:
[0069] r = xcosθ + ysinθ
[0070] For a point (x0, y0), a family of lines passing through this point can be uniformly defined as...
[0071] r θ =x0·cosθ+y0·sinθ
[0072] Step 2: Perform the above operation on all points in the image. If two points are on a straight line, then the two sine curves will intersect at one point. A straight line can be detected by finding the number of curves that intersect at one point in the θ-r plane. The more curves that intersect at one point, the more points the straight line represented by this intersection point is composed of. Take out (θ,r) that appear more than the threshold, that is, obtain the first set through the Hough transform algorithm.
[0073] In some embodiments of the present invention, the step of extracting the polar coordinates of the first set that satisfy preset conditions based on a clustering algorithm to obtain the second set includes:
[0074] Step 1: Randomly select several points based on the first set to obtain several initial cluster centers;
[0075] The second step is to divide the points into clusters formed by the nearest initial cluster centers based on the distance of each point in the first set to the initial cluster centers.
[0076] The third step is to calculate the center point of each cluster and determine whether it is equal to the original initial cluster center point. If they are equal, the first cluster center point is obtained; if they are not equal, the second step is executed.
[0077] The fourth step is to obtain a second set consisting of several first cluster centers.
[0078] In a specific embodiment of the present invention, the K-means clustering algorithm is used to extract the polar coordinates of the first set that satisfy preset conditions to obtain the second set, including the following steps:
[0079] Step 3: From the first set (θ1, r1), (θ2, r2), ..., (θ... n ,r n M points are randomly selected from the data as initial cluster centers.
[0080] Step 4: Calculate the distance from each point to the cluster center to divide the cluster. The distance from the i-th sample to the j-th cluster center is calculated as follows: According to dij The size of the cluster is used to determine which cluster each point is assigned to the nearest initial cluster center;
[0081] Step 5: Next, recalculate the new center point (average value) for each of the marked clusters; if the calculated new center point is the same as the original center point (the centroid no longer moves), then the process ends; otherwise, repeat step 4.
[0082] Finally, N cluster centers (θ1, r1), (θ2, r2), ..., (θ) that meet the conditions are obtained. M ,r M That is, the second set of cluster centers is obtained by using the K-means clustering algorithm.
[0083] In a specific embodiment of the invention, all polar coordinates in the second set are transformed into straight lines in a Cartesian coordinate system to determine the position and average speed of the moving object, including:
[0084] Transform the polar coordinates in the second set into polar coordinates (θ1, r1), (θ2, r2), ..., (θ...). M ,r M Transform the given information into straight lines (k1, b1), (k2, b2), ..., (k...) in a Cartesian coordinate system. M ,b M This gives the position of different moving objects within time T, where k represents the average velocity within time T.
[0085] Repeat the above process for each connected component to obtain the position and speed of all moving objects in the entire region in real time.
[0086] It should be noted that, in order to output information such as the position and speed of the moving object in real time, in some embodiments of the present invention, in step S104, the trajectory position of the moving object is matched with the data of the previous frame to obtain several complete trajectories, including:
[0087] The trajectory position of the moving object is matched with the data of the previous frame;
[0088] The channel where the moving object is located is determined based on the data distribution acquired at different times from different channels, that is, the channel where the moving object is located is determined based on different energy distributions, and several complete trajectories are determined.
[0089] It should be noted that, based on the trajectory, several parameters on the road surface can be estimated, including traffic flow statistics, average speed, space occupancy, and all other parameters calculable based on the trajectory. Furthermore, on highways, events can be identified in real time, such as illegal parking, speeding, prolonged low-speed driving, illegal use of the emergency lane, and illegal driving against traffic. Practical verification shows that the method of this invention achieves an accuracy rate of over 95% in tracking the trajectory of moving objects based on grating array sensing technology.
[0090] To better implement the moving object trajectory extraction method in this embodiment of the invention, based on the moving object trajectory extraction method, correspondingly, as follows: Figure 3 As shown, this embodiment of the invention also provides a moving object trajectory extraction device. A moving object trajectory extraction device 300 includes:
[0091] The multidimensional spatiotemporal signal matrix acquisition unit 301 is used to acquire multidimensional spatiotemporal signal data based on a grating sensor array and perform preprocessing to obtain a multidimensional spatiotemporal signal matrix.
[0092] The connected component acquisition unit 302 is used to perform connected component analysis on the multidimensional spatiotemporal signal matrix to obtain several different connected components.
[0093] The trajectory fitting unit 303 is used to linearly fit the trajectory of the moving object in each of the several different connected components;
[0094] The trajectory acquisition unit 304 is used to match the trajectory position of the moving object with the data of the previous frame to obtain several complete trajectories.
[0095] The moving object trajectory extraction device 300 provided in the above embodiments can realize the technical solution described in the above embodiments of the moving object trajectory extraction method. The specific implementation principle of each module or unit can be found in the corresponding content in the above embodiments of the moving object trajectory extraction method, and will not be repeated here.
[0096] like Figure 4 As shown, the present invention also provides an electronic device 400. The electronic device 400 includes a processor 401, a memory 402, and a display 403. Figure 4 Only some components of the electronic device 400 are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
[0097] In some embodiments, processor 401 may be a central processing unit (CPU), microprocessor or other data processing chip, used to run program code stored in memory 402 or process data, such as a method for extracting the trajectory of a moving object in this invention.
[0098] In some embodiments, processor 401 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 401 may be local or remote. In some embodiments, processor 401 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, intranet, multi-cloud, etc., or any combination thereof.
[0099] In some embodiments, memory 402 may be an internal storage unit of electronic device 400, such as a hard disk or memory of electronic device 400. In other embodiments, memory 402 may also be an external storage device of electronic device 400, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 400.
[0100] Furthermore, the memory 402 may include both internal storage units of the electronic device 400 and external storage devices. The memory 402 is used to store application software and various types of data installed on the electronic device 400.
[0101] In some embodiments, display 403 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 403 is used to display information from electronic device 400 and to display a visual user interface. Components 401-403 of electronic device 400 communicate with each other via a system bus.
[0102] In one embodiment, when processor 401 executes a moving object trajectory extraction program stored in memory 402, the following steps may be performed:
[0103] Multidimensional spatiotemporal signal data is acquired based on a grating sensor array, and a multidimensional spatiotemporal signal matrix is obtained by preprocessing.
[0104] By performing connected component analysis on the multidimensional spatiotemporal signal matrix, several different connected components are obtained;
[0105] Linear fitting is performed on the trajectory of the moving object in each of the several different connected components;
[0106] The trajectory position of the moving object is matched with the data of the previous frame to obtain several complete trajectories.
[0107] It should be understood that when the processor 401 executes a moving object trajectory extraction program in the memory 402, in addition to the functions mentioned above, it can also perform other functions, as can be found in the description of the corresponding method embodiments above.
[0108] Furthermore, this embodiment of the invention does not specifically limit the type of electronic device 400 mentioned. Electronic device 400 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the invention, electronic device 400 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0109] Accordingly, this application also provides a computer-readable storage medium for storing a computer-readable program or instruction. When the program or instruction is executed by a processor, it can implement the steps or functions of the moving object trajectory extraction method provided in the above-described method embodiments.
[0110] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0111] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for extracting the trajectory of a moving object, characterized in that, include: Multidimensional spatiotemporal signal data is acquired based on a grating sensor array, and a multidimensional spatiotemporal signal matrix is obtained by preprocessing. By performing connected component analysis on the multidimensional spatiotemporal signal matrix, several different connected components are obtained; Linear fitting is performed on the trajectory of the moving object in each of the several different connected components; The trajectory position of the moving object is matched with the data of the previous frame to obtain several complete trajectories; The step of linearly fitting the trajectory of the moving object in each of the several different connected components includes: Based on the Hough transform algorithm and clustering algorithm, the trajectory of the moving object in each of the several different connected components is linearly fitted; The linear fitting of the trajectory of the moving object in each of the several different connected components based on the Hough transform algorithm and clustering algorithm includes: Based on the Hough transform algorithm, the polar coordinates of the trajectory points of the moving objects in each of the several different connected components that appear more than a preset threshold are extracted to form a first set. The polar coordinates of the first set that meet the preset conditions are extracted based on the clustering algorithm to obtain the second set; Transform all polar coordinates in the second set into straight lines in a rectangular coordinate system to obtain the position and average speed of different moving objects within a preset time. Repeat the above process for each connected component to obtain the position and average speed of all moving objects in the entire domain in real time. Based on the Hough transform algorithm, the polar coordinates of the moving object trajectory points in each of the several different connected components that appear more than a preset threshold are extracted to form a first set, including: Convert the rectangular coordinates of points in each of the several different connected domains to polar coordinates; The polar coordinates of curves that intersect at a point more than a preset threshold are extracted to form the first set.
2. The method for extracting the trajectory of a moving object according to claim 1, characterized in that, The acquisition of multidimensional spatiotemporal signal data includes: Optical fiber grating sensor arrays are laid out longitudinally along each lane of the highway, with each optical fiber grating sensor array including multiple fiber grating sensors. The continuous vibration signals of the moving object are acquired based on the multiple fiber optic grating sensors, and the continuous vibration signals constitute multidimensional spatiotemporal signal data.
3. The method for extracting the trajectory of a moving object according to claim 1, characterized in that, The step of extracting the polar coordinates of the first set that satisfy preset conditions based on a clustering algorithm to obtain the second set includes: Step 1: Randomly select several points based on the first set to obtain several initial cluster centers; The second step is to divide the points into clusters formed by the nearest initial cluster centers based on the distance of each point in the first set to the initial cluster centers. The third step is to calculate the center point of each cluster and determine whether it is equal to the original initial cluster center point. If they are equal, the first cluster center point is obtained; if they are not equal, the second step is executed. The fourth step is to obtain a second set consisting of several first cluster centers.
4. The method for extracting the trajectory of a moving object according to claim 1, characterized in that, The trajectory position of the moving object is matched with the data of the previous frame to obtain several complete trajectories, including: The trajectory position of the moving object is matched with the data of the previous frame; Based on the data distribution obtained from different channels at different times, the channel where the moving object is located is determined, and several complete trajectories are identified.
5. A device for extracting the trajectory of a moving object, characterized in that, include: The multidimensional spatiotemporal signal matrix acquisition unit is used to acquire multidimensional spatiotemporal signal data based on a grating sensor array and perform preprocessing to obtain a multidimensional spatiotemporal signal matrix. The connected component acquisition unit is used to perform connected component analysis on the multidimensional spatiotemporal signal matrix to obtain several different connected components. The trajectory fitting unit is used to linearly fit the trajectory of the moving object in each of the several different connected components; The trajectory acquisition unit is used to match the trajectory position of the moving object with the data of the previous frame to obtain several complete trajectories; The step of linearly fitting the trajectory of the moving object in each of the several different connected components includes: Based on the Hough transform algorithm and clustering algorithm, the trajectory of the moving object in each of the several different connected components is linearly fitted; The linear fitting of the trajectory of the moving object in each of the several different connected components based on the Hough transform algorithm and clustering algorithm includes: Based on the Hough transform algorithm, the polar coordinates of the trajectory points of the moving objects in each of the several different connected components that appear more than a preset threshold are extracted to form a first set. The polar coordinates of the first set that meet the preset conditions are extracted based on the clustering algorithm to obtain the second set; Transform all polar coordinates in the second set into straight lines in a rectangular coordinate system to obtain the position and average speed of different moving objects within a preset time. Repeat the above process for each connected component to obtain the position and average speed of all moving objects in the entire domain in real time. Based on the Hough transform algorithm, the polar coordinates of the moving object trajectory points in each of the several different connected components that appear more than a preset threshold are extracted to form a first set, including: Convert the rectangular coordinates of points in each of the several different connected domains to polar coordinates; The polar coordinates of curves that intersect at a point more than a preset threshold are extracted to form the first set.
6. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the moving object trajectory extraction method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the moving object trajectory extraction method according to any one of claims 1 to 4.