A trajectory similarity determination method and system
Patent Information
- Application Number
- CN202311316103.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-11
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2043-10-11
AI Technical Summary
由于目前常见的轨迹相似判断方法在进行多轨迹相似判断时,都涉及到较大数量的计算,不仅增加了对计算与内存资源需求,降低了用户轨迹应用实时化的可能,且轨迹相似判断时缺乏一套合理的轨迹相似判断评分机制来辅助用户更好的明确轨迹之间的相似程度
[0063]The advantages of this invention are: it proposes a new trajectory similarity judgment method, which uses trajectory corner points to realize shape similarity judgment, angle similarity judgment, and geometric similarity judgment between trajectories, and formulates a complete trajectory similarity judgment scoring mechanism based on this judgment, which can quickly obtain the degree of similarity between trajectories, and also gets rid of the limitations of conventional trajectory similarity judgment on computation and memory resource requirements, and improves the possibility of real-time performance.
Smart Images

Figure CN117475176B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology and proposes a trajectory similarity judgment method using trajectory corner points. This method establishes a complete trajectory similarity judgment scoring mechanism, which can quickly obtain the degree of similarity between trajectories and belongs to the field of navigation and positioning. Background Technology
[0002] User trajectory information plays a vital role in fields such as motion analysis, traffic management, urban planning, environmental monitoring, resource allocation, social media analysis, health monitoring, autonomous driving, robot navigation, and crime analysis. Trajectory similarity assessment is crucial for ensuring the effective use of user trajectory information in these applications. However, current common trajectory similarity assessment methods involve a significant amount of computation when performing multi-trajectory similarity checks. This not only increases the demands on computational and memory resources, reducing the real-time capability of user trajectory applications, but also lacks a reasonable trajectory similarity scoring mechanism to help users better understand the degree of similarity between trajectories. Summary of the Invention
[0003] This invention proposes a trajectory similarity judgment method based on corner points (bending points, turning points, etc.) of trajectories. Based on this method, a complete trajectory similarity judgment scoring mechanism is formulated, which can quickly obtain the degree of similarity between trajectories.
[0004] The technical solution of this invention is a trajectory similarity judgment method based on trajectory corner points. This method establishes a complete trajectory similarity judgment scoring mechanism, which can quickly obtain the degree of similarity between trajectories, including the following steps:
[0005] Step 1: Extract the corner points of the two trajectories;
[0006] Step 2, complete the similarity determination between trajectory M1 and trajectory M2, including the following sub-steps:
[0007] Step 2.1, calculate the number of corner points SN1 for trajectory M1 and the number of corner points SN2 for trajectory M2 respectively;
[0008] Step 2.2: Using the number of corner points of the trajectory as the criterion, obtain the shape similarity coefficient kSN between the two.
[0009] Step 2.3: Calculate the azimuth position of the previous corner point in each corner of trajectory M1 and trajectory M2, excluding the first and last corner points, and use the calculated azimuth position as the azimuth feature of the current corner.
[0010] Step 2.4: Summarize the directional features of each corner in trajectory M1 and trajectory M2 in the order in which the trajectories pass through the corners, and use the summarized directional features as the directional features of the two trajectories themselves.
[0011] Step 2.5: Compare the orientation features of trajectory M1 with those of trajectory M2, count the number AN of identical orientation features between the two trajectories, and calculate the angular similarity coefficient kAN between them.
[0012] Step 2.6: Calculate the geometric distance between each corner point in trajectory M1 and trajectory M2 (excluding the starting corner point) and its previous corner point, and use the calculated geometric distance as the geometric feature of the current corner point;
[0013] Step 2.7: Compare the geometric features of trajectory M1 with those of trajectory M2, and calculate the geometric similarity coefficient kGN between the two.
[0014] Step 2.8: Calculate the similarity between trajectory M1 and trajectory M2, as shown in Equation 5 below.
[0015] k=kSN*kAN*kGN
[0016] Where k represents the similarity between the two trajectories. The closer the value of k is to 1, the more similar the two trajectories are. kSN represents the similarity in shape between the two trajectories, kAN represents the similarity in angle between the two trajectories, and kGN represents the similarity in geometry between the two trajectories.
[0017] Furthermore, the specific implementation method of step 1 is as follows:
[0018] Step 1.1, set the shortest distance threshold for the trajectory to M;
[0019] Step 1.2: Based on the given distance threshold M, the trajectory is processed using Douglas-Puk, transforming the complex curved trajectory into an approximately simplified curve that retains the key features of the trajectory.
[0020] After processing the trajectory in steps 1.3 and 1.2, the remaining points that retain the key features of the trajectory are the corner points of each trajectory.
[0021] Furthermore, the formula for calculating the shape similarity coefficient kSN in step 2.2 is as follows:
[0022]
[0023] Where SN1 is the number of corner points of trajectory M1, and SN2 is the number of corner points corresponding to trajectory M2.
[0024] Furthermore, in step 2.3, the directional positions include up, down, left, right, upper right, lower right, upper left, and lower left.
[0025] Furthermore, the angular similarity coefficient kAN in step 2.5 is shown in equation (2):
[0026]
[0027] MAX(SN1,SN2) represents the highest number of corner points in trajectories M1 and M2, MAX(SN1,SN2)-2 represents the number of first and last corner points after removing the highest corner point in the trajectory, and AN represents the number of trajectories M1 and M2 with the same directional features.
[0028] Furthermore, the specific implementation of the geometric similarity coefficient kGN is as follows;
[0029] First, the geometric features of trajectory M1 are summarized in order of the corners the trajectory passes through. The summarized geometric features are used as its own geometric features dm11, ..., dm1i, ..., dm1n. The number of geometric features is judged. If the number of geometric features is less than MAX(SN1, SN2)-1, the missing part is supplemented in the summarized geometric features with a length N, where N is a user-defined value.
[0030] Then, the geometric features of trajectory M2 are summarized in order of the corners the trajectory passes through. The summarized geometric features are used as its own geometric features dm21, ..., dm2i, ..., dm2n. The number of geometric features is judged. If the number of geometric features is less than MAX(SN1, SN2)-1, the missing part is supplemented by length N in the summarized geometric features.
[0031] Then, the geometric features of trajectory M1 and trajectory M2 are compared and the sum of the differences is calculated, as shown in equation (3) below.
[0032]
[0033] Where i is the maximum number of geometric features of trajectory M1 and trajectory M2, and kgi is the absolute value of the difference between the geometric features of each corner point of trajectory M1 and the corresponding corner point of trajectory M2;
[0034] Finally, the geometric similarity coefficient kGN between the two is calculated, as shown in equation (4) below.
[0035]
[0036] The present invention also provides a trajectory similarity judgment system, comprising the following modules:
[0037] The trajectory corner point extraction module is used to extract the trajectory corner points on two trajectories;
[0038] The similarity determination module is used to determine the similarity between trajectory M1 and trajectory M2, and includes the following sub-modules:
[0039] The corner point count calculation submodule is used to calculate the number of corner points SN1 for trajectory M1 and the number of corner points SN2 for trajectory M2, respectively.
[0040] The shape similarity coefficient calculation submodule is used to obtain the shape similarity coefficient kSN between the two trajectories by using the number of corner points as the criterion.
[0041] The azimuth position acquisition submodule is used to calculate the azimuth position of the previous corner point in each corner of trajectory M1 and trajectory M2, excluding the first and last corner points, and use the calculated azimuth position as the azimuth feature of the current corner.
[0042] The orientation feature extraction submodule is used to summarize the orientation features of each corner in trajectory M1 and trajectory M2 in the order in which the trajectory passes through the corners, and use the summarized orientation features as the orientation features of the two trajectories themselves.
[0043] The angle similarity coefficient calculation submodule is used to compare the orientation features of trajectory M1 with those of trajectory M2, count the number AN of identical orientation features between the two trajectories, and calculate the angle similarity coefficient kAN between them.
[0044] The geometric feature calculation module is used to calculate the geometric distance between each corner point in trajectory M1 and trajectory M2 (excluding the starting corner point) and its previous corner point, and to use the calculated geometric distance as the geometric feature of the current corner point.
[0045] The geometric similarity coefficient calculation submodule is used to compare the geometric features of trajectory M1 with the geometric features of trajectory M2 and calculate the geometric similarity coefficient kGN between the two.
[0046] The similarity determination submodule is used to calculate the similarity between trajectory M1 and trajectory M2, as shown in Equation 5 below.
[0047] k=kSN*kAN*kGN
[0048] Where k represents the similarity between the two trajectories. The closer the value of k is to 1, the more similar the two trajectories are. kSN represents the similarity in shape between the two trajectories, kAN represents the similarity in angle between the two trajectories, and kGN represents the similarity in geometry between the two trajectories.
[0049] Furthermore, the formula for calculating the shape similarity coefficient kSN is as follows:
[0050]
[0051] Where SN1 is the number of corner points of trajectory M1, and SN2 is the number of corner points corresponding to trajectory M2.
[0052] Furthermore, the angular similarity coefficient kAN is shown in equation (2):
[0053]
[0054] MAX(SN1,SN2) represents the highest number of corner points in trajectories M1 and M2, MAX(SN1,SN2)-2 represents the number of first and last corner points after removing the highest corner point in the trajectory, and AN represents the number of trajectories M1 and M2 with the same directional features.
[0055] Furthermore, the specific implementation of the geometric similarity coefficient kGN is as follows;
[0056] First, the geometric features of trajectory M1 are summarized in order of the corners the trajectory passes through. The summarized geometric features are used as its own geometric features dm11, ..., dm1i, ..., dm1n. The number of geometric features is judged. If the number of geometric features is less than MAX(SN1, SN2)-1, the missing part is supplemented in the summarized geometric features with a length N, where N is a user-defined value.
[0057] Then, the geometric features of trajectory M2 are summarized in order of the corners the trajectory passes through. The summarized geometric features are used as its own geometric features dm21, ..., dm2i, ..., dm2n. The number of geometric features is judged. If the number of geometric features is less than MAX(SN1, SN2)-1, the missing part is supplemented by length N in the summarized geometric features.
[0058] Then, the geometric features of trajectory M1 and trajectory M2 are compared and the sum of the differences is calculated, as shown in equation (3) below.
[0059]
[0060] Where i is the maximum number of geometric features of trajectory M1 and trajectory M2, and kgi is the absolute value of the difference between the geometric features of each corner point of trajectory M1 and the corresponding corner point of trajectory M2;
[0061] Finally, the geometric similarity coefficient kGN between the two is calculated, as shown in equation (4) below.
[0062]
[0063] The advantages of this invention are: it proposes a new trajectory similarity judgment method, which uses trajectory corner points to realize shape similarity judgment, angle similarity judgment, and geometric similarity judgment between trajectories, and formulates a complete trajectory similarity judgment scoring mechanism based on this judgment, which can quickly obtain the degree of similarity between trajectories, and also gets rid of the limitations of conventional trajectory similarity judgment on computation and memory resource requirements, and improves the possibility of real-time performance. Attached Figure Description
[0064] Figure 1 This is a flowchart of the corner point extraction and trajectory similarity judgment method according to an embodiment of the present invention.
[0065] Figure 2 The motion trajectories M1 and M2 collected in this embodiment of the invention.
[0066] Figure 3 These are the trajectories of M1 and M2 after step 1 in this embodiment of the invention. Detailed Implementation
[0067] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0068] The key to this invention lies in constructing a new method for judging trajectory similarity based on corner points that represent key features of the trajectory. By utilizing the corner points of the trajectory, the method can judge the shape similarity, angle similarity, and geometric similarity between trajectories. This method establishes a complete trajectory similarity judgment scoring mechanism, which can quickly obtain the degree of similarity between trajectories. At the same time, it gets rid of the limitations of conventional trajectory similarity judgment on computational and memory resource requirements and increases the possibility of real-time performance.
[0069] See Figure 1 The embodiment uses the user motion trajectories M1 and M2, collected by the microelectromechanical system inertial measurement unit (containing a triaxial accelerometer, a triaxial gyroscope, a magnetometer, etc.), moving from the upper right to the lower left, to specifically illustrate the trajectory similarity judgment method of the present invention:
[0070] Step 1: Extract the corner points of the trajectory, including the following sub-steps.
[0071] Step 1.1: Set the shortest distance threshold for the trajectory to 3.
[0072] Step 1.2: Based on the given distance threshold 3, process the trajectories M1 and M2 using Douglas-Puk.
[0073] After processing trajectories M1 and M2 in steps 1.3 and 1.2, the remaining points are the corner points of each trajectory.
[0074] Step 2, complete the similarity determination between trajectory M1 and trajectory M2, including the following sub-steps,
[0075] Step 2.1: Calculate the number of corner points for trajectory M1 (10) and trajectory M2 (8).
[0076] Step 2.2: Using the number of corner points of the trajectories as the criterion, the shape similarity coefficient kSN between the two is obtained, as shown in the following formula.
[0077]
[0078] Where SN1 is the number of corner points of trajectory M1, and SN2 is the number of corner points corresponding to trajectory M2.
[0079] Step 2.3: Calculate the azimuth position (up, down, left, right, upper right, lower right, upper left, lower left) of the previous corner point in each of the trajectories M1 and M2, excluding the first and last corner points, and use the calculated azimuth position as the azimuth feature of the current corner.
[0080] Step 2.4: Summarize the directional features of each corner in trajectory M1 and trajectory M2 in the order in which the trajectories pass through the corners. Use the summarized directional features as the directional features of the two trajectories themselves. The directional features of trajectory M1 are (upper right, upper left, upper left, upper right, upper right, upper left, upper left, upper right), and the directional features of trajectory M2 are (upper right, upper left, upper left, upper right, upper right, upper, top).
[0081] Step 2.5: Compare the azimuth features of trajectory M1 with those of trajectory M2, and count the number of azimuth features that are equal between the two trajectories, AN = 5. Calculate the angular similarity coefficient kAN between the two trajectories, as shown in the following formula.
[0082]
[0083] MAX(SN1,SN2) represents the highest number of corner points in trajectories M1 and M2, MAX(SN1,SN2)-2 represents the number of first and last corner points after removing the highest corner point in the trajectory, and AN represents the number of trajectories M1 and M2 with the same directional features.
[0084] Step 2.6: Calculate the geometric distance between each corner point in trajectory M1 and trajectory M2 (excluding the starting corner point) and its previous corner point, and use the calculated geometric distance as the geometric feature of the current corner point.
[0085] Step 2.7: Summarize the geometric features of trajectory M1 in the order in which the trajectory passes through the corners, and use the summarized geometric features as its own geometric features [45.6m, 18.4m, 45.6m, 17.6m, 55.5m, 19.6m, 55.5m, 18.4m, 55.5m]. Determine the number of geometric features. If the number of geometric features is less than MAX(SN1, SN2)-1=10-1=9, then the missing part is supplemented by 0.1 in the summarized geometric features.
[0086] Step 2.8: Summarize the geometric features of trajectory M2 in the order in which the trajectory passes through corners, and use the summarized geometric features as its own geometric features [45.6m, 18.4m, 45.6m, 17.6m, 55.5m, 19.6m, 18.4m]. If the geometric feature is less than MAX(SN1, SN2) - 1 = 10 - 1 = 9, then the missing part is supplemented by 0.1 in the summarized geometric features, i.e., [45.6m, 18.4m, 45.6m, 17.6m, 55.5m, 19.6m, 18.4m, 0.1m, 0.1m].
[0087] Step 2.9: Calculate the difference between the geometric features of trajectory M1 and trajectory M2, and sum the differences as shown in the following formula.
[0088] kgi=|dm1i-dm2i|
[0089] kg1 = |45.6 - 45.6|
[0090] kg2=|18.4-18.4|
[0091] kg3 = |45.6 - 45.6|
[0092] kg4 = |17.6 - 17.6|
[0093] kg5 = |55.5 - 55.5|
[0094] kg6 = |19.6 - 19.6|
[0095] kg7 = |55.5 - 18.4|
[0096] kg8 = |18.4 - 0.1|
[0097] kg9 = |55.5 - 0.1|
[0098] kgsum=kg1+...+kg9=0+0+0+0+0+0+37.1+18.3+55.4=110.8
[0099] Where i is the maximum number of geometric features of trajectory M1 and trajectory M2, and kgi is the absolute value of the difference between the geometric features of each corner point of trajectory M1 and the geometric features of the corresponding sequential corner points of trajectory M2.
[0100] Step 2.10: Calculate the geometric similarity coefficient kGN between the two, as shown in the following formula.
[0101]
[0102] Step 2.11, calculate the similarity between trajectory M1 and trajectory M2, as shown in the following formula.
[0103] k=kSN*kAN*kGN=0.8*0.625*0.00902527=0.00451264
[0104] Where k represents the similarity between the two trajectories, and the value of k is approximately 0.0045, indicating that the similarity between trajectories M1 and M2 is not high. Figure 2 and Figure 3 It can also be seen intuitively that the two trajectories are not very similar. kSN represents the similarity of their shapes, kAN represents the similarity of their angles, and kGN represents the similarity of their geometry.
[0105] The method provided by this invention can be implemented using computer software technology. Embodiments of this invention also provide a trajectory similarity judgment system, comprising the following modules:
[0106] The trajectory corner point extraction module is used to extract the trajectory corner points on two trajectories;
[0107] The similarity determination module is used to determine the similarity between trajectory M1 and trajectory M2, and includes the following sub-modules:
[0108] The corner point count calculation submodule is used to calculate the number of corner points SN1 for trajectory M1 and the number of corner points SN2 for trajectory M2, respectively.
[0109] The shape similarity coefficient calculation submodule is used to obtain the shape similarity coefficient kSN between the two trajectories by using the number of corner points as the criterion.
[0110] The azimuth position acquisition submodule is used to calculate the azimuth position of the previous corner point in each corner of trajectory M1 and trajectory M2, excluding the first and last corner points, and use the calculated azimuth position as the azimuth feature of the current corner.
[0111] The orientation feature extraction submodule is used to summarize the orientation features of each corner in trajectory M1 and trajectory M2 in the order in which the trajectory passes through the corners, and use the summarized orientation features as the orientation features of the two trajectories themselves.
[0112] The angle similarity coefficient calculation submodule is used to compare the orientation features of trajectory M1 with those of trajectory M2, count the number AN of identical orientation features between the two trajectories, and calculate the angle similarity coefficient kAN between them.
[0113] The geometric feature calculation module is used to calculate the geometric distance between each corner point in trajectory M1 and trajectory M2 (excluding the starting corner point) and its previous corner point, and to use the calculated geometric distance as the geometric feature of the current corner point.
[0114] The geometric similarity coefficient calculation submodule is used to compare the geometric features of trajectory M1 with the geometric features of trajectory M2 and calculate the geometric similarity coefficient kGN between the two.
[0115] The similarity determination submodule is used to calculate the similarity between trajectory M1 and trajectory M2, as shown in Equation 5 below.
[0116] k=kSN*kAN*kGN
[0117] Where k represents the similarity between the two trajectories. The closer the value of k is to 1, the more similar the two trajectories are. kSN represents the similarity in shape between the two trajectories, kAN represents the similarity in angle between the two trajectories, and kGN represents the similarity in geometry between the two trajectories.
[0118] The specific implementation methods of each module are the same as those of each step, and will not be described in this invention.
[0119] Although the trajectory microelectromechanical system inertial measurement unit (containing a triaxial accelerometer, triaxial gyroscope, magnetometer, etc.) used in the examples of this invention collects the user's motion trajectory, it is equally applicable to other motion trajectories. While the examples of this invention illustrate the use of differences in corresponding geometric features for geometric calculations, proportional calculations or other methods are also possible. Although the examples of this invention only illustrate a similarity judgment and scoring mechanism between one-to-one trajectories, it is equally applicable to one-to-many and many-to-many relationships. The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art can make various modifications or additions to the described specific embodiments or use similar methods to replace them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.
Claims
1. A method for determining trajectory similarity, characterized in that, Includes the following steps: Step 1: Extract the corner points of the two trajectories; Step 2, complete the similarity determination between trajectory M1 and trajectory M2, including the following sub-steps: Step 2.1, calculate the number of corner points SN1 for trajectory M1 and the number of corner points SN2 for trajectory M2 respectively; Step 2.2: Using the number of corner points of the trajectory as the criterion, obtain the shape similarity coefficient kSN between the two. Step 2.3: Calculate the azimuth position of the previous corner point in each corner of trajectory M1 and trajectory M2, excluding the first and last corner points, and use the calculated azimuth position as the azimuth feature of the current corner. Step 2.4: Summarize the directional features of each corner in trajectory M1 and trajectory M2 in the order in which the trajectories pass through the corners, and use the summarized directional features as the directional features of the two trajectories themselves. Step 2.5: Compare the orientation features of trajectory M1 with those of trajectory M2, count the number AN of identical orientation features between the two trajectories, and calculate the angular similarity coefficient kAN between them. Step 2.6: Calculate the geometric distance between each corner point in trajectory M1 and trajectory M2 (excluding the starting corner point) and its previous corner point, and use the calculated geometric distance as the geometric feature of the current corner point; Step 2.7: Compare the geometric features of trajectory M1 with those of trajectory M2, and calculate the geometric similarity coefficient kGN between the two. Step 2.8, calculate the similarity between trajectory M1 and trajectory M2, as shown in the following formula. k=kSN*kAN*kGN Where k represents the similarity between the two trajectories. The closer the value of k is to 1, the more similar the two trajectories are. kSN represents the similarity in shape between the two trajectories, kAN represents the similarity in angle between the two trajectories, and kGN represents the similarity in geometry between the two trajectories.
2. The trajectory similarity judgment method as described in claim 1, characterized in that: The specific implementation method of step 1 is as follows: Step 1.1, set the shortest distance threshold for the trajectory to M; Step 1.2: Based on the given distance threshold M, the trajectory is processed using Douglas-Puk, transforming the complex curved trajectory into an approximately simplified curve that retains the key features of the trajectory. After processing the trajectory in steps 1.3 and 1.2, the remaining points that retain the key features of the trajectory are the corner points of each trajectory.
3. The trajectory similarity judgment method as described in claim 1, characterized in that: The formula for calculating the shape similarity coefficient kSN in step 2.2 is as follows: Where SN1 is the number of corner points of trajectory M1, and SN2 is the number of corner points corresponding to trajectory M2.
4. The trajectory similarity judgment method as described in claim 1, characterized in that: Step 2.3 The directional positions include up, down, left, right, upper right, lower right, upper left, and lower left.
5. The trajectory similarity judgment method as described in claim 1, characterized in that: The angular similarity coefficient kAN in step 2.5 is shown in equation (2): MAX(SN1,SN2) represents the highest number of corner points in trajectories M1 and M2, MAX(SN1,SN2)-2 represents the number of first and last corner points after removing the highest corner point in the trajectory, and AN represents the number of trajectories M1 and M2 with the same directional features.
6. The trajectory similarity judgment method as described in claim 1, characterized in that: The specific implementation of the geometric similarity coefficient kGN is as follows; First, the geometric features of trajectory M1 are summarized in order of the corners the trajectory passes through. The summarized geometric features are used as its own geometric features dm11,...,dm1i,...,dm1n. The number of geometric features is judged. If the number of geometric features is less than MAX(SN1,SN2)-1, the missing part is supplemented in the summarized geometric features with a length N, where N is a user-defined value. Then, the geometric features of trajectory M2 are summarized in order of the corners the trajectory passes through. The summarized geometric features are used as its own geometric features dm21,...,dm2i,...,dm2n. The number of geometric features is judged. If the number of geometric features is less than MAX(SN1,SN2)-1, the missing part is supplemented by length N in the summarized geometric features. Then, the geometric features of trajectory M1 and trajectory M2 are compared and the sum of the differences is calculated, as shown in equation (3) below. Where i is the maximum number of geometric features of trajectory M1 and trajectory M2, and kgi is the absolute value of the difference between the geometric features of each corner point of trajectory M1 and the corresponding corner point of trajectory M2; Finally, the geometric similarity coefficient kGN between the two is calculated, as shown in equation (4) below.
7. A trajectory similarity judgment system, characterized in that, Includes the following modules: The trajectory corner point extraction module is used to extract the trajectory corner points on two trajectories; The similarity determination module is used to determine the similarity between trajectory M1 and trajectory M2, and includes the following sub-modules: The corner point count calculation submodule is used to calculate the number of corner points SN1 for trajectory M1 and the number of corner points SN2 for trajectory M2, respectively. The shape similarity coefficient calculation submodule is used to obtain the shape similarity coefficient kSN between the two trajectories by using the number of corner points as the criterion. The azimuth position acquisition submodule is used to calculate the azimuth position of the previous corner point in each corner of trajectory M1 and trajectory M2, excluding the first and last corner points, and use the calculated azimuth position as the azimuth feature of the current corner. The orientation feature extraction submodule is used to summarize the orientation features of each corner in trajectory M1 and trajectory M2 in the order in which the trajectory passes through the corners, and use the summarized orientation features as the orientation features of the two trajectories themselves. The angle similarity coefficient calculation submodule is used to compare the orientation features of trajectory M1 with those of trajectory M2, count the number AN of identical orientation features between the two trajectories, and calculate the angle similarity coefficient kAN between them. The geometric feature calculation module is used to calculate the geometric distance between each corner point in trajectory M1 and trajectory M2 (excluding the starting corner point) and its previous corner point, and to use the calculated geometric distance as the geometric feature of the current corner point. The geometric similarity coefficient calculation submodule is used to compare the geometric features of trajectory M1 with the geometric features of trajectory M2 and calculate the geometric similarity coefficient kGN between the two. The similarity determination submodule is used to calculate the similarity between trajectory M1 and trajectory M2, as shown in the following formula. k=kSN*kAN*kGN Where k represents the similarity between the two trajectories. The closer the value of k is to 1, the more similar the two trajectories are. kSN represents the similarity in shape between the two trajectories, kAN represents the similarity in angle between the two trajectories, and kGN represents the similarity in geometry between the two trajectories.
8. The trajectory similarity judgment system as described in claim 7, characterized in that: The formula for calculating the shape similarity coefficient kSN is as follows: Where SN1 is the number of corner points of trajectory M1, and SN2 is the number of corner points corresponding to trajectory M2.
9. The trajectory similarity judgment system as described in claim 7, characterized in that: The angular similarity coefficient kAN is shown in equation (2): MAX(SN1,SN2) represents the highest number of corner points in trajectories M1 and M2, MAX(SN1,SN2)-2 represents the number of first and last corner points after removing the highest corner point in the trajectory, and AN represents the number of trajectories M1 and M2 with the same directional features.
10. The trajectory similarity judgment system as described in claim 7, characterized in that: The specific implementation of the geometric similarity coefficient kGN is as follows; First, the geometric features of trajectory M1 are summarized in order of the corners the trajectory passes through. The summarized geometric features are used as its own geometric features dm11,...,dm1i,...,dm1n. The number of geometric features is judged. If the number of geometric features is less than MAX(SN1,SN2)-1, the missing part is supplemented in the summarized geometric features with a length N, where N is a user-defined value. Then, the geometric features of trajectory M2 are summarized in order of the corners the trajectory passes through. The summarized geometric features are used as its own geometric features dm21,...,dm2i,...,dm2n. The number of geometric features is judged. If the number of geometric features is less than MAX(SN1,SN2)-1, the missing part is supplemented by length N in the summarized geometric features. Then, the geometric features of trajectory M1 and trajectory M2 are compared and the sum of the differences is calculated, as shown in equation (3) below. Where i is the maximum number of geometric features of trajectory M1 and trajectory M2, and kgi is the absolute value of the difference between the geometric features of each corner point of trajectory M1 and the corresponding corner point of trajectory M2; Finally, the geometric similarity coefficient kGN between the two is calculated, as shown in equation (4) below.
Citation Information
Patent Citations
Similar trajectory judgment method with important point constraints
CN111967504A
Generation method, generation system and application method of font writing stroke order
CN113657330A