WO2018107748A1 - 一种路径检测方法及装置 - Google Patents

一种路径检测方法及装置 Download PDF

Info

Publication number
WO2018107748A1
WO2018107748A1 PCT/CN2017/093483 CN2017093483W WO2018107748A1 WO 2018107748 A1 WO2018107748 A1 WO 2018107748A1 CN 2017093483 W CN2017093483 W CN 2017093483W WO 2018107748 A1 WO2018107748 A1 WO 2018107748A1
Authority
WO
WIPO (PCT)
Prior art keywords
path
normal
new
new path
data
Prior art date
Application number
PCT/CN2017/093483
Other languages
English (en)
French (fr)
Inventor
何凌飞
Original Assignee
威创集团股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 威创集团股份有限公司 filed Critical 威创集团股份有限公司
Publication of WO2018107748A1 publication Critical patent/WO2018107748A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Definitions

  • the present invention relates to the field of path detection technologies, and in particular, to a path detection method and apparatus.
  • Path testing is a technique for designing test cases based on paths and is often used in state transition tests.
  • the basic path test method is based on the program control flow graph. By analyzing the loop complexity of the control structure, the basic executable path set is derived, and the test case is designed.
  • the test case is designed to ensure that each executable statement of the program is executed at least once during the test.
  • the current path detection is mainly based on spatial features. Due to the high complexity of the current path detection algorithm, the technical problem of low accuracy is caused.
  • the method and device for detecting a path provided by the embodiment of the present invention solve the problem that the current path detection is mainly based on spatial features. Due to the high complexity of the current path detection algorithm, the technical problem of low accuracy is caused.
  • the spatial path feature and/or the velocity feature and/or the curvature feature are compared with the normal path policy to compare the new path data, if the new path data does not satisfy the normal path
  • the policy is that the new path corresponding to the new path data is an illegal path.
  • acquiring the normal motion data that is collected and determining the normal motion trajectory corresponding to the normal path data includes:
  • the normal motion trajectory is trained to obtain a corresponding Huasdorff distance
  • the minimum map segmentation algorithm is processed by using the Huasdorff distance Huasdorff map, and the minimum map segmentation algorithm is processed.
  • the Huasdorff graph is clustered by a recursive algorithm to determine a plurality of the normal path data.
  • the normal path strategy specifically includes:
  • the Huasdorff distance Huasdorff graph is processed by a minimum map segmentation algorithm, and the Huasdorff graph processed by the minimum graph segmentation algorithm is clustered by a recursive algorithm to determine a plurality of locations.
  • a normal path policy for normal path data is provided.
  • the normal path policy is that the new path corresponding to the new path data is an illegal path, and specifically includes:
  • v' i is the velocity of the new path
  • m p is the velocity mean of the normal path strategy
  • is the covariance matrix of the path velocity distribution
  • the velocity is v' i
  • the acceleration is v" i
  • x' and y' are the first derivatives of x and y, respectively.
  • the path detection method further includes:
  • the illegal path is monitored.
  • An acquiring unit configured to acquire and collect a plurality of normal path data, and determine a normal motion track corresponding to the normal path data
  • a training unit configured to train the normal motion trajectory, obtain a corresponding Huasdorff distance, and perform a minimum map segmentation algorithm including a plurality of the Huasdorff distance Huasdorff maps,
  • the Huasdorff graph processed by the thumbnail segmentation algorithm is clustered by a recursive algorithm to determine a normal path strategy of the plurality of normal path data;
  • a new path determining unit configured to perform spatial feature and/or velocity feature and/or curvature feature to compare the new path data according to the normal path policy when acquiring the acquired new path data, if the new path is If the data does not satisfy the normal path policy, the new path corresponding to the new path data is an illegal path.
  • the acquiring unit specifically includes:
  • a processing subunit configured to perform a moving mean filtering on the normal motion track according to a normal motion trajectory corresponding to the normal path data in an entire field of view of the object in the normal path deal with.
  • the training unit specifically includes:
  • a Huasdorff distance subunit configured to train the normal motion trajectory to obtain a Huasdorff distance corresponding to the normal motion trajectory spacing of the two pairs;
  • a minimum map segmentation sub-unit configured to perform a minimum map segmentation algorithm process according to a preset path space extension threshold comprising a plurality of the Huasdorff distance Huasdorff graphs, and the Huasdorff graph processed by the minimum graph segmentation algorithm is recursively processed
  • the algorithm performs clustering to determine a plurality of normal path strategies of the normal path data.
  • the new path determining unit specifically includes:
  • a spatial feature sub-unit configured to perform, for acquiring the acquired new path data, whether 90% of the new path path points are in the path space extension range, and performing a new path of the new path data and the path space extension range Whether the Hausdorff distance of the median path is smaller than the Hausdorff distance of the edge path of the new path and the extended path of the path space. If yes, the new path is determined to be a normal path, otherwise the new path is illegal. path;
  • a speed feature sub-unit configured to calculate a new path speed of the acquired new path data, model the new path speed by a Gaussian distribution, and follow the first formula And determining, by the Mahalanobis distance, whether the new path is similar to the normal path of the normal path policy, and if similar, determining that the new path is a normal path, otherwise the new path is an illegal path;
  • v' i is the velocity of the new path
  • m p is the velocity mean of the normal path strategy
  • is the covariance matrix of the path velocity distribution
  • a curvature feature sub-unit for calculating a new path speed, a new path acceleration, and a discontinuity of the new path position of the acquired new path data by the second formula Calculating a new path curvature, and comparing whether the new path curvature is similar to a curvature mean corresponding to the Gaussian distribution fitted to the normal path strategy, and if the similarity is the same, determining that the new path is a normal path, no
  • the new path is illegal path, wherein the velocity v 'i, acceleration v "i, x' and y 'are the first derivative of x and y.
  • it also includes:
  • a monitoring unit is configured to monitor the illegal path.
  • a method and device for detecting a path includes: acquiring a plurality of normal path data, and determining a normal motion trajectory corresponding to the normal path data; and training the normal motion trajectory,
  • the corresponding Huasdorff distance is obtained, and the minimum map segmentation algorithm is processed for the Huasdorff map containing several Huasdorff distances.
  • the Huasdorff graph processed by the minimum graph segmentation algorithm is clustered by recursive algorithm to determine the normal path strategy of several normal path data.
  • the spatial path feature and/or the velocity feature and/or the curvature feature are compared with the normal path strategy to compare the new path data.
  • the new path data is used.
  • the corresponding new path is an illegal path.
  • the Huasdorff distance is obtained, and the Huasdorff map containing several Huasdorff distances is processed by the minimum graph segmentation algorithm, and the Huasdorff graph processed by the minimum graph segmentation algorithm is passed the recursive algorithm.
  • clustering to determine a number of normal path data normal path strategies when acquiring the acquired new path data, combining the normal path strategy to perform spatial feature and/or velocity feature and/or curvature feature to compare the new path data, if new If the path data does not satisfy the normal path policy, the new path corresponding to the new path data is an illegal path.
  • the current path detection is mainly based on spatial features. Due to the high complexity of the current path detection algorithm, the accuracy is low. Technical problem.
  • FIG. 1 is a schematic flowchart diagram of an embodiment of a path detection method according to an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart diagram of another embodiment of a path detecting method according to an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of an embodiment of a path detecting apparatus according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of another embodiment of a path detecting apparatus according to an embodiment of the present invention.
  • 5 and 6 are schematic diagrams of an application example of FIG. 2.
  • the method and device for detecting a path provided by the embodiment of the present invention solve the problem that the current path detection is mainly based on spatial features. Due to the high complexity of the current path detection algorithm, the technical problem of low accuracy is caused.
  • an embodiment of a path detection method according to an embodiment of the present invention includes:
  • path detection when path detection is required, first, it is necessary to acquire and collect a plurality of normal path data, and determine a normal motion trajectory corresponding to the normal path data.
  • the minimum graph segmentation algorithm processes the Huasdorff graph processed by the minimum graph segmentation algorithm to perform clustering by recursive algorithm to determine a number of normal path data normal path strategies.
  • the new path is The new path corresponding to the data is an illegal path.
  • the normal motion trajectory When the normal motion trajectory is trained, the corresponding Huasdorff distance is obtained, and the Huasdorff map containing several Huasdorff distances is processed by the minimum graph segmentation algorithm.
  • the Huasdorff graph processed by the minimum graph segmentation algorithm is clustered by recursive algorithm.
  • the spatial path feature and/or the velocity feature and/or the curvature feature are compared with the normal path strategy to compare the new path data, if the new path data is not satisfied In the normal path policy, the new path corresponding to the new path data is an illegal path.
  • the corresponding Huasdorff distance is obtained, and the Huasdorff map containing several Huasdorff distances is processed by the minimum graph segmentation algorithm, and the Huasdorff graph processed by the minimum graph segmentation algorithm is passed the recursive algorithm.
  • Performing clustering to determine a number of normal path data normal path strategies when acquiring the acquired new path data, combining the normal path strategy to perform spatial feature and/or velocity feature and/or curvature feature to compare the new path data, if new If the path data does not satisfy the normal path policy, the new path corresponding to the new path data is an illegal path.
  • the current path detection is mainly based on spatial features. Due to the high complexity of the current path detection algorithm, the accuracy is low. Technical problem.
  • FIG. 2 another embodiment of a path detection method according to an embodiment of the present invention includes:
  • a plurality of normal path data collections are performed by using a plurality of image acquisition devices disposed on a plurality of normal paths.
  • normal motion corresponding to normal path data in the entire field of view of the image capturing device in the normal path is required.
  • the trajectory is subjected to moving average filtering processing on the normal motion trajectory.
  • the normal motion trajectory After the normal motion trajectory corresponding to the normal path data in the entire field of view of the image capturing device in the normal path and the moving average filtering process on the normal motion trajectory, the normal motion trajectory needs to be trained to obtain The Huasdorff distance corresponding to the distance between the two normal motion trajectories.
  • the Huasdorff distance Huandorff graph is used to perform the minimum graph segmentation algorithm, and the Huasdorff graph processed by the minimum graph segmentation algorithm is clustered by the recursive algorithm to determine the normality of several normal path data.
  • Path strategy the Huasdorff distance Huandorff graph is used to perform the minimum graph segmentation algorithm, and the Huasdorff graph processed by the minimum graph segmentation algorithm is clustered by the recursive algorithm to determine the normality of several normal path data.
  • the threshold of the spatial extension range of the preset path includes several Huasdorff distance Huasdorff maps.
  • the minimum graph segmentation algorithm processes the Huasdorff graph processed by the minimum graph segmentation algorithm to perform clustering by recursive algorithm to determine a number of normal path data normal path strategies.
  • the Huasdorff graph processed by the minimum graph segmentation algorithm is clustered by the recursive algorithm to determine the normal path of several normal path data.
  • the spatial path feature and/or the velocity feature and/or the curvature feature are compared with the normal path strategy to compare the new path data. If the new path data does not satisfy the normal path policy, the new path is new.
  • the new path corresponding to the path data is an illegal path.
  • the new path data is compared with the normal path policy by performing spatial feature and/or velocity feature and/or curvature feature. If the new path data does not satisfy the normal path policy, the new path corresponding to the new path data is an illegal path. :
  • the Mahalanobis distance is used to determine whether the new path is similar to the normal path of the normal path policy. If it is similar, it is determined that the new path is a normal path, otherwise the new path is an illegal path;
  • v' i is the velocity of the new path
  • m p is the velocity mean of the normal path strategy
  • is the covariance matrix of the path velocity distribution
  • Calculating the new path speed, the new path acceleration, and the discontinuity of the new path position of the acquired new path data through the second formula Calculate the curvature of the new path, and compare the curvature of the new path with the curvature mean corresponding to the Gaussian distribution fitted to the normal path strategy. If the Markov distance is similar, determine if the new path is a normal path, otherwise the new path is an illegal path.
  • the velocity is v' i
  • the acceleration is v" i
  • x' and y' are the first derivatives of x and y, respectively.
  • the illegal path is monitored.
  • the new path data is compared with the normal path strategy by using the spatial feature and/or the velocity feature and/or the curvature feature, if the new path data does not satisfy the normal path policy, the new path corresponding to the new path data is an illegal path, and then Monitor illegal routes.
  • the application examples include:
  • Path detection is a relatively new problem.
  • This patent proposes a simple multi-feature based path detection and monitoring method, which can distinguish different route strategies.
  • the system is mainly used in the monitoring scene of monocular vision, and of course can also be used in a system of multi-vision vision.
  • the detector can give the path of motion of our object in the motion field of view.
  • T i ⁇ (x 1 ,y 1 ), (x 2 ,y 2 ),...,(x n ,y n ) ⁇
  • each node represents a path strategy, and each vertex is connected to other vertices, and the resulting whole is a complete picture.
  • the weight of each edge (the weight of the edge is the distance value obtained by the two vertices according to an algorithm.
  • the similarity between the two vertices is the similarity of the two paths) Hausdorff through the two vertices
  • the distance (a measure describing the degree of similarity between the two sets of points) is calculated.
  • the Hausdorff distance D(A, B) is,
  • the advantage of using the Hausdorff distance is that it can compare sequences of two different cardinalities. So we can use this distance to represent two paths. As shown in Fig. 5, in the Hausdorff diagram, if the distance is small, the weight must be small, and vice versa.
  • the minimum graph segmentation algorithm we can recursively divide the graph into two parts, each of which represents a set of the same path strategy (the path strategy is actually a classifier, and subsequently input any path to the classifier, the classifier is based on Previous results, predicting whether the given path is an illegal path.). (The minimum graph segmentation is to divide the data into two different parts according to a certain threshold), and the graph of the five nodes in Figure 5.
  • the weight of each edge is the Hausdorff distance, and the curve represents the smallest possible cut for the graph. Define a range (as shown in Figure 6, the middle dotted line is the path strategy, and the two solid lines are the largest range) as the spatial extension of the path.
  • the threshold can be set dynamically.
  • the first step focus on the spatial location of each path strategy.
  • the path of each object is compared to the path already in the database. Two conditions are used to determine the similarity of the space: the first is that 90% of the paths tested are within the maximum range of the path. The second is that the Hausdorff distance of the median path of the new path and the compared path is smaller than the Hausdorff distance of the two edge paths of the path. If the new path does not satisfy these two conditions, the new path is considered abnormal.
  • the aforementioned median path is the dotted line path in FIG. 6.
  • the path of the two solid lines is divided by the scene according to the scene. Just like any road, the solid line is the two edges of the road, and the dotted line is the middle of the road.
  • a new path is considered similar if the speed of the new path is similar to the speed of a path that already has a normal path policy.
  • the path velocity P i (x i , y i , t i ) is calculated as
  • the Gaussian distribution is used to model the speed of the path, and then the Mahalanobis distance (the covariance distance of the data) is used to determine whether the speeds of the two paths are similar.
  • v' i is the velocity of the new path
  • m p is its mean value
  • is the covariance matrix of the path velocity distribution.
  • the third step is to find the speed, acceleration, and discontinuity of the new path, so that you can determine whether a person is taking a straight line and whether a person is taking the wrong path. Can be obtained by the curvature of the path velocity v 'i and the acceleration v "i, is calculated as follows:
  • x' and y' are the first derivatives of x and y, respectively.
  • some abnormal movements can be obtained. For example, a drunken person takes a zigzag path, or a person suddenly slows down or turns around.
  • Object tracking is the most basic function in many systems such as video surveillance and behavior detection.
  • the purpose of this patent is to learn the most likely behavioral path of an object in a video scene, and to register some unusual behaviors (such as a strange behavioral path of a person in the scene, a car in a zig-zag route, and most people Run on the normal walking road). Because there are some sidewalks, rest areas or already designed roads, most people in the area follow a similar strategy, so the algorithm studied in this area can be extended to other similar areas. Belongs to the scope of protection of this patent.
  • This embodiment uses spatial, velocity, and curvature features to detect abnormal behavior.
  • Abnormal behaviors include: a path that a person has never walked before, a person walking in the area at a different speed than usual, or a random walk in the scene.
  • the corresponding Huasdorff distance is obtained, and the Huasdorff map containing several Huasdorff distances is processed by the minimum graph segmentation algorithm, and the Huasdorff graph processed by the minimum graph segmentation algorithm is passed the recursive algorithm.
  • Performing clustering to determine a number of normal path data normal path strategies when acquiring the acquired new path data, combining the normal path strategy to perform spatial feature and/or velocity feature and/or curvature feature to compare the new path data, if new If the path data does not satisfy the normal path policy, the new path corresponding to the new path data is an illegal path.
  • the current path detection is mainly based on spatial features. Due to the high complexity of the current path detection algorithm, the accuracy is low. Technical problem.
  • an embodiment of a path detecting apparatus includes:
  • the obtaining unit 301 is configured to acquire and collect a plurality of normal path data, and determine a normal motion track corresponding to the normal path data;
  • the training unit 302 is configured to train the normal motion trajectory, obtain the corresponding Huasdorff distance, and perform a minimum graph segmentation algorithm for the Huasdorff map including several Huasdorff distances, and the recursive algorithm for the Huasdorff graph processed by the minimum graph segmentation algorithm. Performing a clustering to determine a normal path strategy for a plurality of normal path data;
  • the new path determining unit 303 is configured to compare the new path data by using the spatial feature and/or the velocity feature and/or the curvature feature when the acquired new path data is acquired, if the new path data does not satisfy the normal path.
  • the new path corresponding to the new path data is an illegal path.
  • the corresponding Huasdorff distance is obtained, and the Huasdorff map containing several Huasdorff distances is processed by the minimum graph segmentation algorithm, and the Huasdorff graph processed by the minimum graph segmentation algorithm is passed the recursive algorithm.
  • Performing clustering to determine a number of normal path data normal path strategies when acquiring the acquired new path data, combining the normal path strategy to perform spatial feature and/or velocity feature and/or curvature feature to compare the new path data, if new If the path data does not satisfy the normal path policy, the new path corresponding to the new path data is an illegal path.
  • the current path detection is mainly based on spatial features. Due to the high complexity of the current path detection algorithm, the accuracy is low. Technical problem.
  • FIG. 4 another embodiment of a path detecting device according to an embodiment of the present invention includes:
  • the obtaining unit 401 is configured to acquire and collect a plurality of normal path data, and determine a normal motion track corresponding to the normal path data;
  • the obtaining unit 401 specifically includes:
  • the obtaining sub-unit 4011 is configured to collect a plurality of normal path data by using a plurality of image capturing devices disposed on the plurality of normal paths;
  • the processing sub-unit 4012 is configured to perform a moving average filtering process on the normal motion trajectory according to the normal motion trajectory corresponding to the normal path data in the entire field of view of the object in the normal path.
  • the training unit 402 is configured to train the normal motion trajectory, obtain the corresponding Huasdorff distance, and perform a minimum graph segmentation algorithm for the Huasdorff map including several Huasdorff distances, and the recursive algorithm for the Huasdorff graph processed by the minimum graph segmentation algorithm. Performing a clustering to determine a normal path strategy for a plurality of normal path data;
  • the training unit 402 specifically includes:
  • the Huasdorff distance sub-unit 4021 is configured to train the normal motion trajectory to obtain a Huasdorff distance corresponding to the distance between the two normal motion trajectories;
  • the minimum map segmentation sub-unit 4022 is configured to perform minimum map segmentation algorithm according to a preset path space extension threshold including a plurality of Huasdorff distance Huasdorff graphs, and determine the Huasdorff graph processed by the minimum graph segmentation algorithm by using a recursive algorithm.
  • a preset path space extension threshold including a plurality of Huasdorff distance Huasdorff graphs, and determine the Huasdorff graph processed by the minimum graph segmentation algorithm by using a recursive algorithm.
  • the new path determining unit 403 is configured to compare the new path data with the spatial feature and/or the velocity feature and/or the curvature feature when the acquired new path data is acquired, if the new path data does not satisfy the positive For a common path policy, the new path corresponding to the new path data is an illegal path.
  • the new path determining unit 403 specifically includes:
  • the spatial feature sub-unit 4031 is configured to perform, for acquiring the acquired new path data, whether 90% of the new path path points are in the path space extension range, and the median path of the new path and the path space extension range of the new path data is Hausdorff Whether the distance is smaller than the Hausdorff distance of any edge path of the new path and the path space extension. If yes, it is determined that the new path is a normal path, otherwise the new path is an illegal path;
  • the speed feature sub-unit 4032 is configured to calculate a new path speed of the acquired new path data, model the new path speed by a Gaussian distribution, and follow the first formula. Then, the Mahalanobis distance is used to determine whether the new path is similar to the normal path of the normal path policy. If it is similar, it is determined that the new path is a normal path, otherwise the new path is an illegal path;
  • v' i is the velocity of the new path
  • m p is the velocity mean of the normal path strategy
  • is the covariance matrix of the path velocity distribution
  • the curvature feature sub-unit 4033 is configured to calculate a new path speed, a new path acceleration, and a discontinuity of the new path position of the acquired new path data by using the second formula Calculate the new path curvature, and compare the curvature of the new path with the curvature mean corresponding to the Gaussian distribution fitted to the normal path strategy. If the Markov distance is similar, determine if the new path is a normal path, otherwise the new path is illegal path, wherein the velocity v 'i, acceleration v "i, x' and y 'are the first derivative of x and y.
  • the monitoring unit 404 is configured to monitor an illegal path.
  • the corresponding Huasdorff distance is obtained, and the Huasdorff map containing several Huasdorff distances is processed by the minimum graph segmentation algorithm, and the Huasdorff graph processed by the minimum graph segmentation algorithm is passed the recursive algorithm.
  • Performing clustering to determine a number of normal path data normal path strategies when acquiring the acquired new path data, combining the normal path strategy to perform spatial feature and/or velocity feature and/or curvature feature to compare the new path data, if new If the path data does not satisfy the normal path policy, the new path corresponding to the new path data is an illegal path.
  • the current path detection is mainly based on spatial features. Due to the high complexity of the current path detection algorithm, the accuracy is low. Technical problem.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)

Abstract

一种路径检测方法及装置,解决了目前的路径检测都以空间特征为主,由于目前的路径检测算法的复杂度高,导致了准确率低的技术问题。路径检测方法包括:获取到采集若干个正常路径数据,并确定与正常路径数据相对应的正常运动轨迹(101);对正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略(102);当获取到采集的新路径数据时,结合正常路径策略进行空间特征和/或速度特征和/或曲率特征对新路径数据进行比较,若新路径数据不满足正常路径策略,则对新路径数据对应的新路径为非法路径(103)。

Description

一种路径检测方法及装置
本申请要求于2016年12月14日提交中国专利局、申请号为201611153636.5、发明名称为“一种路径检测方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及路径检测技术领域,尤其涉及一种路径检测方法及装置。
背景技术
路径测试(path testing)是指根据路径设计测试用例的一种技术,经常用于状态转换测试中。基本路径测试法是在程序控制流图的基础上,通过分析控制构造的环路复杂性,导出基本可执行路径集合,从而设计测试用例的方法。设计出的测试用例要保证在测试中程序的每个可执行语句至少执行一次。
目前的路径检测都以空间特征为主,由于目前的路径检测算法的复杂度高,导致了准确率低的技术问题。
发明内容
本发明实施例提供的一种路径检测方法及装置,解决了目前的路径检测都以空间特征为主,由于目前的路径检测算法的复杂度高,导致了准确率低的技术问题。
本发明实施例提供的一种路径检测方法,包括:
获取到采集若干个正常路径数据,并确定与所述正常路径数据相对应的正常运动轨迹;
对所述正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个所述Huasdorff距离Huasdorff图进行最小图分割算法处理,对所述最小图分割算法处理后的所述Huasdorff图通过递归算法进行聚类确定若干个所述正常路径数据的正常路径策略;
当获取到采集的新路径数据时,结合所述正常路径策略进行空间特征和/或速度特征和/或曲率特征对所述新路径数据进行比较,若所述新路径数据不满足所述正常路径策略,则对所述新路径数据对应的新路径为非法路径。
可选地,获取到采集若干个正常路径数据,并确定与所述正常路径数据相对应的正常运动轨迹具体包括:
通过若干个设置于若干个正常路径的影像采集装置进行若干个所述正常路径数据的采集;
根据在所述正常路径中物体于所述影像采集装置的整个视场中的与所述正常路径数据相对应的正常运动轨迹,并对所述正常运动轨迹进行移动均值滤波处理。
可选地,对所述正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个所述Huasdorff距离Huasdorff图进行最小图分割算法处理,对所述最小图分割算法处理后的所述Huasdorff图通过递归算法进行聚类确定若干个所述正常路径数据 的正常路径策略具体包括:
对所述正常运动轨迹进行训练,获取到两两所述正常运动轨迹间距对应的Huasdorff距离;
根据预置的路径空间延伸范围阈值包含有若干个所述Huasdorff距离Huasdorff图进行最小图分割算法处理,对所述最小图分割算法处理后的所述Huasdorff图通过递归算法进行聚类确定若干个所述正常路径数据的正常路径策略。
可选地,当获取到采集的新路径数据时,结合所述正常路径策略进行空间特征和/或速度特征和/或曲率特征对所述新路径数据进行比较,若所述新路径数据不满足所述正常路径策略,则对所述新路径数据对应的新路径为非法路径具体包括:
对获取到采集的新路径数据进行是否90%的新路径路径点在所述路径空间延伸范围中,及进行所述新路径数据的新路径与所述路径空间延伸范围的中值路径Hausdorff距离是否小于所述新路径与所述路径空间延伸范围的任一边缘路径的Hausdorff距离,若均为是,则确定所述新路径为正常路径,否则所述新路径为非法路径;
和/或
计算获取到采集的新路径数据的新路径速度,通过高斯分布对所述新路径速度进行建模处理,并按照第一公式
Figure PCTCN2017093483-appb-000001
再用马氏距离确定所述新路径与所述正常路径策略的所述正常路径是否相似,若相似,则确定所述新路径为正常路径,否则所述新路径为非法路径;
其中,v′i为新路径的速度,mp则为所述正常路径策略的速度均值,∑为路径速度分布的协方差矩阵;
和/或
计算获取到采集的新路径数据的新路径速度、新路径加速度以及新路径位置的不连续处通过第二公式
Figure PCTCN2017093483-appb-000002
计算新路径曲率,并将所述新路径曲率与对所述正常路径策略拟合的高斯分布对应的曲率均值进行马氏距离是否相似的比较,若相似,则确定所述新路径为正常路径,否则所述新路径为非法路径,
其中,速度为v′i、加速度为v″i,x′和y′分别为x和y的一阶导数。
可选地,所述的路径检测方法还包括:
当所述新路径为非法路径时,则对所述非法路径进行监控。
本发明实施例提供的一种路径检测装置,包括:
获取单元,用于获取到采集若干个正常路径数据,并确定与所述正常路径数据相对应的正常运动轨迹;
训练单元,用于对所述正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个所述Huasdorff距离Huasdorff图进行最小图分割算法处理,对所述最 小图分割算法处理后的所述Huasdorff图通过递归算法进行聚类确定若干个所述正常路径数据的正常路径策略;
新路径确定单元,用于当获取到采集的新路径数据时,结合所述正常路径策略进行空间特征和/或速度特征和/或曲率特征对所述新路径数据进行比较,若所述新路径数据不满足所述正常路径策略,则对所述新路径数据对应的新路径为非法路径。
可选地,获取单元具体包括:
获取子单元,用于通过若干个设置于若干个正常路径的影像采集装置进行若干个所述正常路径数据的采集;
处理子单元,用于根据在所述正常路径中物体于所述影像采集装置的整个视场中的与所述正常路径数据相对应的正常运动轨迹,并对所述正常运动轨迹进行移动均值滤波处理。
可选地,训练单元具体包括:
Huasdorff距离子单元,用于对所述正常运动轨迹进行训练,获取到两两所述正常运动轨迹间距对应的Huasdorff距离;
最小图分割子单元,用于根据预置的路径空间延伸范围阈值包含有若干个所述Huasdorff距离Huasdorff图进行最小图分割算法处理,对所述最小图分割算法处理后的所述Huasdorff图通过递归算法进行聚类确定若干个所述正常路径数据的正常路径策略。
可选地,新路径确定单元具体包括:
空间特征子单元,用于对获取到采集的新路径数据进行是否90%的新路径路径点在所述路径空间延伸范围中,及进行所述新路径数据的新路径与所述路径空间延伸范围的中值路径Hausdorff距离是否小于所述新路径与所述路径空间延伸范围的任一边缘路径的Hausdorff距离,若均为是,则确定所述新路径为正常路径,否则所述新路径为非法路径;
和/或
速度特征子单元,用于计算获取到采集的新路径数据的新路径速度,通过高斯分布对所述新路径速度进行建模处理,并按照第一公式
Figure PCTCN2017093483-appb-000003
再用马氏距离确定所述新路径与所述正常路径策略的所述正常路径是否相似,若相似,则确定所述新路径为正常路径,否则所述新路径为非法路径;
其中,v′i为新路径的速度,mp则为所述正常路径策略的速度均值,∑为路径速度分布的协方差矩阵;
和/或
曲率特征子单元,用于计算获取到采集的新路径数据的新路径速度、新路径加速 度以及新路径位置的不连续处通过第二公式
Figure PCTCN2017093483-appb-000004
计算新路径曲率,并将所述新路径曲率与对所述正常路径策略拟合的高斯分布对应的曲率均值进行马氏距离是否相似的比较,若相似,则确定所述新路径为正常路径,否
则所述新路径为非法路径,其中,速度为v′i、加速度为v″i,x′和y′分别为x和y的一阶导数。
可选地,还包括:
监控单元,用于对所述非法路径进行监控。
从以上技术方案可以看出,本发明实施例具有以下优点:
本发明实施例提供的一种路径检测方法及装置,其中,路径检测方法包括:获取到采集若干个正常路径数据,并确定与正常路径数据相对应的正常运动轨迹;对正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略;当获取到采集的新路径数据时,结合正常路径策略进行空间特征和/或速度特征和/或曲率特征对新路径数据进行比较,若新路径数据不满足正常路径策略,则对新路径数据对应的新路径为非法路径。本实施例中,通过对正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略;当获取到采集的新路径数据时,结合正常路径策略进行空间特征和/或速度特征和/或曲率特征对新路径数据进行比较,若新路径数据不满足正常路径策略,则对新路径数据对应的新路径为非法路径,解决了目前的路径检测都以空间特征为主,由于目前的路径检测算法的复杂度高,导致了准确率低的技术问题。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。
图1为本发明实施例提供的一种路径检测方法的一个实施例的流程示意图;
图2为本发明实施例提供的一种路径检测方法的另一个实施例的流程示意图;
图3为本发明实施例提供的一种路径检测装置的一个实施例的结构示意图;
图4为本发明实施例提供的一种路径检测装置的另一个实施例的结构示意图;
图5和图6为图2的应用例示意图。
具体实施方式
本发明实施例提供的一种路径检测方法及装置,解决了目前的路径检测都以空间特征为主,由于目前的路径检测算法的复杂度高,导致了准确率低的技术问题。
为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,下面所描述的实施例仅仅是本发明一部分实施例,而非全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
请参阅图1,本发明实施例提供的一种路径检测方法的一个实施例包括:
101、获取到采集若干个正常路径数据,并确定与正常路径数据相对应的正常运动轨迹;
本实施例中,当需要进行路径检测时,首先需要获取到采集若干个正常路径数据,并确定与正常路径数据相对应的正常运动轨迹。
102、对正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略;
当获取到采集若干个正常路径数据,并确定与正常路径数据相对应的正常运动轨迹之后,需要对正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略。
103、当获取到采集的新路径数据时,结合正常路径策略进行空间特征和/或速度特征和/或曲率特征对新路径数据进行比较,若新路径数据不满足正常路径策略,则对新路径数据对应的新路径为非法路径。
当对正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略之后,当获取到采集的新路径数据时,结合正常路径策略进行空间特征和/或速度特征和/或曲率特征对新路径数据进行比较,若新路径数据不满足正常路径策略,则对新路径数据对应的新路径为非法路径。
本实施例中,通过对正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略;当获取到采集的新路径数据时,结合正常路径策略进行空间特征和/或速度特征和/或曲率特征对新路径数据进行比较,若新路径数据不满足正常路径策略,则对新路径数据对应的新路径为非法路径,解决了目前的路径检测都以空间特征为主,由于目前的路径检测算法的复杂度高,导致了准确率低的技术问题。
上面是对路径检测方法的过程进行的描述,下面将对详细的过程进行详细的描述,请参阅图2,本发明实施例提供的一种路径检测方法的另一个实施例包括:
201、通过若干个设置于若干个正常路径的影像采集装置进行若干个正常路径数据的采集;
本实施例中,当需要进行路径检测时,首先需要通过若干个设置于若干个正常路径的影像采集装置进行若干个正常路径数据的采集。
202、根据在正常路径中物体于影像采集装置的整个视场中的与正常路径数据相对应的正常运动轨迹,并对正常运动轨迹进行移动均值滤波处理;
当通过若干个设置于若干个正常路径的影像采集装置进行若干个正常路径数据的采集之后,需要根据在正常路径中物体于影像采集装置的整个视场中的与正常路径数据相对应的正常运动轨迹,并对正常运动轨迹进行移动均值滤波处理。
203、对正常运动轨迹进行训练,获取到两两正常运动轨迹间距对应的Huasdorff距离;
当根据在正常路径中物体于影像采集装置的整个视场中的与正常路径数据相对应的正常运动轨迹,并对正常运动轨迹进行移动均值滤波处理之后,需要对正常运动轨迹进行训练,获取到两两正常运动轨迹间距对应的Huasdorff距离。
204、根据预置的路径空间延伸范围阈值包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略;
当对正常运动轨迹进行训练,获取到两两正常运动轨迹间距对应的Huasdorff距离之后,当获取到采集的新路径数据时,根据预置的路径空间延伸范围阈值包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略。
205、当获取到采集的新路径数据时,结合正常路径策略进行空间特征和/或速度特征和/或曲率特征对新路径数据进行比较,若新路径数据不满足正常路径策略,则对新路径数据对应的新路径为非法路径;
当根据预置的路径空间延伸范围阈值包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略之后,当获取到采集的新路径数据时,结合正常路径策略进行空间特征和/或速度特征和/或曲率特征对新路径数据进行比较,若新路径数据不满足正常路径策略,则对新路径数据对应的新路径为非法路径。
具体地,结合正常路径策略进行空间特征和/或速度特征和/或曲率特征对新路径数据进行比较,若新路径数据不满足正常路径策略,则对新路径数据对应的新路径为非法路径包括:
对获取到采集的新路径数据进行是否90%的新路径路径点在路径空间延伸范围中,及进行新路径数据的新路径与路径空间延伸范围的中值路径Hausdorff距离是否小于新路径与路径空间延伸范围的任一边缘路径的Hausdorff距离,若均为是,则确定新 路径为正常路径,否则新路径为非法路径;
和/或
计算获取到采集的新路径数据的新路径速度,通过高斯分布对新路径速度进行建模处理,并按照第一公式
Figure PCTCN2017093483-appb-000005
再用马氏距离确定新路径与正常路径策略的正常路径是否相似,若相似,则确定新路径为正常路径,否则新路径为非法路径;
其中,v′i为新路径的速度,mp则为正常路径策略的速度均值,∑为路径速度分布的协方差矩阵;
和/或
计算获取到采集的新路径数据的新路径速度、新路径加速度以及新路径位置的不连续处通过第二公式
Figure PCTCN2017093483-appb-000006
计算新路径曲率,并将新路径曲率与对正常路径策略拟合的高斯分布对应的曲率均值进行马氏距离是否相似的比较,若相似,则确定新路径为正常路径,否则新路径为非法路径,其中,速度为v′i、加速度为v″i,x′和y′分别为x和y的一阶导数。
206、当新路径为非法路径时,则对非法路径进行监控。
当结合正常路径策略进行空间特征和/或速度特征和/或曲率特征对新路径数据进行比较,若新路径数据不满足正常路径策略,则对新路径数据对应的新路径为非法路径之后,需要对非法路径进行监控。
下面以一具体应用场景进行描述,如图5和图6所示,应用例包括:
可应用于各种各样的情况,比如,视频监控。在很多公共场合,如机场,我们需要确定人们是否远离某些区域,或者在某个道路上,是否有人醉酒走路。该系统也可用于指示一个新的路径,如果我们发现经常有很多人从某个未开发的路线走路,该学习模型可以推荐给道路建设部门一个新的建设路线。
路径检测是个比较新的问题,本专利提出了一种简单的,基于多特征的路径检测及监控方法,该方法可以很好的区分不同的路线策略。目前该系统主要用于单目视觉的监控场景中,当然也可以用于多目视觉的系统中。
一、路径检测结果训练
检测器可以给定我们物体在运动视场中的运动路径。我们用固定相机采集到的数据来训练我们的系统。根据物体在整个视场中的运动轨迹,假设从第i帧到第n帧,物体运动的二维坐标为
Ti={(x1,y1),(x2,y2),...,(xn,yn)}
由于位置以及速度的不同,每个人的路径的长度是不同的,并且,由于通过检测器检测到的结果是带有噪声的,因此,我们用移动均值滤波对该路径进行平滑。
为了训练我们的系统,我们得到人们在场景中的运动轨迹。对于相似的路径,我们采用min-cut图算法递归来聚类。图中(完整的图里的图指的是图论里面的图,是一 种结构。用于图像分割。在本专利中,就是为了找到合适的路径),每个节点代表一种路径策略,且每个顶点都是与其他顶点相连的,得到的整体就是一个完整的图。每个边缘的权值(边缘的权值就是该两个顶点按照某个算法所得到的距离值。表示两个顶点的相似度。本专利为两条路径的相似度)通过两个顶点的Hausdorff距离(描述两组点集之间相似程度的一种量度)计算得到。对于路径A和B,Hausdorff距离D(A,B)为,
D(A,B)=max(d(A,B),d(B,A))
其中,
Figure PCTCN2017093483-appb-000007
运用Hausdorff距离的好处就是,它可以比较两个不同基数的序列。所以我们就可以用该距离来表示两个路径。如图5,在Hausdorff图中,如果距离小,则其权值也一定很小,反之则相反。经过最小图分割算法,我们可以递归的将该图划分为两部分,其中每一部分代表一组相同的路径策略(路径策略其实就是分类器,后续输入任何的路径给该分类器,该分类器根据以前的结果,预测所给的路径是否是违法的路径。)。(最小图分割就是将数据按照某个阈值分为两个不同的部分),图5中5个节点的图。每个边缘的权值就是Hausdorff距离,曲线表示可能的关于图的最小切割。定义一个范围(如图6,中间的虚线为路径策略,两条实线则为最大的范围)来作为路径的空间延伸范围。可以通过动态设定阈值。
二、场景模型
针对一些比较类似的场景如:场景类似、场景类似但速度不一样、直线或者曲线,我们需要建立一个路径模型来区分这些。为了达到这样的目标,我们首先通过图分割算法只对常规路径进行学习。一旦这些路径学习完后,我们进行如下的三步操作:
1、空间特征
2、速度特征
3、曲率特征
从第一个步骤开始,只有当前步骤符合学习的内容时,才转到下一步。在第一步中,关注每个路径策略的空间位置。每个物体的路径会与数据库中已经存在的路径进行比较。用两个条件来判断空间的相似度:第一个是测试的路径90%的点都在路径的最大范围内。第二个就是新路径与比较的路径的的中值路径的Hausdorff距离要小于该路径的两个边缘路径的Hausdorff距离。如果新路径不满足这两个条件,就认为新路径是异常的。
需要说明的是,前述的中值路径就是图6中那条虚线的路径。两条实线的路径,是我们通过根据场景来划分的,就跟任何一条路一样,实线是路的两个边缘,虚线则是路中间。
第二个步骤中,需要区别不同策略的运动特征。如果新路径的速度与已经存在正常路径策略的某个路径的速度相似,则认为新路径是相似的。路径的速度Pi(xi,yi,ti)计 算公式为
Figure PCTCN2017093483-appb-000008
采用高斯分布来对路径的速度进行建模,然后用马氏距离(数据的协方差距离)来判断两个路径的速度是否相似。
Figure PCTCN2017093483-appb-000009
v′i为新路径的速度,mp则为其均值,∑为路径速度分布的协方差矩阵。
第三步则需要找到新路径的速度、加速度以及位置的不连续处,这样就可以判断一个人是否是走直线以及一个人是否走的是错误的路径。可以通过速度v′i以及加速度v″i来得到路径的曲率,计算公式如下:
Figure PCTCN2017093483-appb-000010
其中x′和y′分别为x和y的一阶导数。我们利用模型就是最小图分割所得到的正确的路径结果的路径策略的K的均值以及方差来拟合一个高斯分布。然后,我们将新路径的曲率与我们的高斯分布进行马氏距离比较。通过对比,可以得到一些非正常的运动。比如,一个喝醉酒的人走z字形的路,或者一个人突然减速下来或者掉头。
因此,最初,我们通过空间轨迹的一致性来检测一些异常情况。如果空间轨迹是类似的,我们则通过速度特征来进行比较。如果速度特征也是类似的,最后,我们再确认曲率特征。
物体跟踪是很多系统如视频监控、行为检测中的最基本的功能。本专利的目的就是学习物体在视频场景中最可能的行为路径,并且登记一些不寻常的行为(如某个人在场景中奇怪的行为路径、汽车按照z字型路线来开、在大部分人都在正常行走的路上跑动)。由于存在一些如人行道、休息区或已经设计好的道路,所以绝大多数人在该区域的行为都是按照类似的策略的,所以对该区域研究的算法,可以推广到其他类似的区域,也属于本专利的保护范围。
本实施例采用空间、速度以及曲率特征来进行异常行为的检测。异常的行为包括:一个人走之前从没走过的路径、一个人按照往常不同的速度在该区域行走或者在该场景中没有规则的乱走。
本实施例中,通过对正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略;当获取到采集的新路径数据时,结合正常路径策略进行空间特征和/或速度特征和/或曲率特征对新路径数据进行比较,若新路径数据不满足正常路径策略,则对新路径数据对应的新路径为非法路径,解决了目前的路径检测都以空间特征为主,由于目前的路径检测算法的复杂度高,导致了准确率低的技术问题。
请参阅图3,本发明实施例提供的一种路径检测装置的一个实施例包括:
获取单元301,用于获取到采集若干个正常路径数据,并确定与正常路径数据相对应的正常运动轨迹;
训练单元302,用于对正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略;
新路径确定单元303,用于当获取到采集的新路径数据时,结合正常路径策略进行空间特征和/或速度特征和/或曲率特征对新路径数据进行比较,若新路径数据不满足正常路径策略,则对新路径数据对应的新路径为非法路径。
本实施例中,通过对正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略;当获取到采集的新路径数据时,结合正常路径策略进行空间特征和/或速度特征和/或曲率特征对新路径数据进行比较,若新路径数据不满足正常路径策略,则对新路径数据对应的新路径为非法路径,解决了目前的路径检测都以空间特征为主,由于目前的路径检测算法的复杂度高,导致了准确率低的技术问题。
上面是对路径检测装置的各单元进行的描述,下面将对子单元进行面试,请参阅图4,本发明实施例提供的一种路径检测装置的另一个实施例包括:
获取单元401,用于获取到采集若干个正常路径数据,并确定与正常路径数据相对应的正常运动轨迹;
获取单元401具体包括:
获取子单元4011,用于通过若干个设置于若干个正常路径的影像采集装置进行若干个正常路径数据的采集;
处理子单元4012,用于根据在正常路径中物体于影像采集装置的整个视场中的与正常路径数据相对应的正常运动轨迹,并对正常运动轨迹进行移动均值滤波处理。
训练单元402,用于对正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略;
训练单元402具体包括:
Huasdorff距离子单元4021,用于对正常运动轨迹进行训练,获取到两两正常运动轨迹间距对应的Huasdorff距离;
最小图分割子单元4022,用于根据预置的路径空间延伸范围阈值包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略。
新路径确定单元403,用于当获取到采集的新路径数据时,结合正常路径策略进行空间特征和/或速度特征和/或曲率特征对新路径数据进行比较,若新路径数据不满足正 常路径策略,则对新路径数据对应的新路径为非法路径。
新路径确定单元403具体包括:
空间特征子单元4031,用于对获取到采集的新路径数据进行是否90%的新路径路径点在路径空间延伸范围中,及进行新路径数据的新路径与路径空间延伸范围的中值路径Hausdorff距离是否小于新路径与路径空间延伸范围的任一边缘路径的Hausdorff距离,若均为是,则确定新路径为正常路径,否则新路径为非法路径;
和/或
速度特征子单元4032,用于计算获取到采集的新路径数据的新路径速度,通过高斯分布对新路径速度进行建模处理,并按照第一公式
Figure PCTCN2017093483-appb-000011
再用马氏距离确定新路径与正常路径策略的正常路径是否相似,若相似,则确定新路径为正常路径,否则新路径为非法路径;
其中,v′i为新路径的速度,mp则为正常路径策略的速度均值,∑为路径速度分布的协方差矩阵;
和/或
曲率特征子单元4033,用于计算获取到采集的新路径数据的新路径速度、新路径加速度以及新路径位置的不连续处通过第二公式
Figure PCTCN2017093483-appb-000012
计)算新路径曲率,并将新路径曲率与对正常路径策略拟合的高斯分布对应的曲率均值进行马氏距离是否相似的比较,若相似,则确定新路径为正常路径,否则新路径为非法路径,其中,速度为v′i、加速度为v″i,x′和y′分别为x和y的一阶导数。
监控单元404,用于对非法路径进行监控。
本实施例中,通过对正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个Huasdorff距离Huasdorff图进行最小图分割算法处理,对最小图分割算法处理后的Huasdorff图通过递归算法进行聚类确定若干个正常路径数据的正常路径策略;当获取到采集的新路径数据时,结合正常路径策略进行空间特征和/或速度特征和/或曲率特征对新路径数据进行比较,若新路径数据不满足正常路径策略,则对新路径数据对应的新路径为非法路径,解决了目前的路径检测都以空间特征为主,由于目前的路径检测算法的复杂度高,导致了准确率低的技术问题。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (10)

  1. 一种路径检测方法,其特征在于,包括:
    获取到采集若干个正常路径数据,并确定与所述正常路径数据相对应的正常运动轨迹;
    对所述正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个所述Huasdorff距离Huasdorff图进行最小图分割算法处理,对所述最小图分割算法处理后的所述Huasdorff图通过递归算法进行聚类确定若干个所述正常路径数据的正常路径策略;
    当获取到采集的新路径数据时,结合所述正常路径策略进行空间特征和/或速度特征和/或曲率特征对所述新路径数据进行比较,若所述新路径数据不满足所述正常路径策略,则对所述新路径数据对应的新路径为非法路径。
  2. 根据权利要求1所述的路径检测方法,其特征在于,获取到采集若干个正常路径数据,并确定与所述正常路径数据相对应的正常运动轨迹具体包括:
    通过若干个设置于若干个正常路径的影像采集装置进行若干个所述正常路径数据的采集;
    根据在所述正常路径中物体于所述影像采集装置的整个视场中的与所述正常路径数据相对应的正常运动轨迹,并对所述正常运动轨迹进行移动均值滤波处理。
  3. 根据权利要求2所述的路径检测方法,其特征在于,对所述正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个所述Huasdorff距离Huasdorff图进行最小图分割算法处理,对所述最小图分割算法处理后的所述Huasdorff图通过递归算法进行聚类确定若干个所述正常路径数据的正常路径策略具体包括:
    对所述正常运动轨迹进行训练,获取到两两所述正常运动轨迹间距对应的Huasdorff距离;
    根据预置的路径空间延伸范围阈值包含有若干个所述Huasdorff距离Huasdorff图进行最小图分割算法处理,对所述最小图分割算法处理后的所述Huasdorff图通过递归算法进行聚类确定若干个所述正常路径数据的正常路径策略。
  4. 根据权利要求3所述的路径检测方法,其特征在于,当获取到采集的新路径数据时,结合所述正常路径策略进行空间特征和/或速度特征和/或曲率特征对所述新路径数据进行比较,若所述新路径数据不满足所述正常路径策略,则对所述新路径数据对应的新路径为非法路径具体包括:
    对获取到采集的新路径数据进行是否90%的新路径路径点在所述路径空间延伸范围中,及进行所述新路径数据的新路径与所述路径空间延伸范围的中值路径Hausdorff距离是否小于所述新路径与所述路径空间延伸范围的任一边缘路径的Hausdorff距离,若均为是,则确定所述新路径为正常路径,否则所述新路径为非法路径;
    和/或
    计算获取到采集的新路径数据的新路径速度,通过高斯分布对所述新路径速度进行建 模处理,并按照第一公式
    Figure PCTCN2017093483-appb-100001
    再用马氏距离确定所述新路径与所述正常路径策略的所述正常路径是否相似,若相似,则确定所述新路径为正常路径,否则所述新路径为非法路径;
    其中,v′i为新路径的速度,mp则为所述正常路径策略的速度均值,Σ为路径速度分布的协方差矩阵;
    和/或
    计算获取到采集的新路径数据的新路径速度、新路径加速度以及新路径位置的不连续处通过第二公式
    Figure PCTCN2017093483-appb-100002
    计算新路径曲率,并将所述新路径曲率与对所述正常路径策略拟合的高斯分布对应的曲率均值进行马氏距离是否相似的比较,若相似,则确定所述新路径为正常路径,否则所述新路径为非法路径,其中,速度为v′i
    加速度为v″i,x′和y′分别为x和y的一阶导数。
  5. 根据权利要求4所述的路径检测方法,其特征在于,所述的路径检测方法还包括:
    当所述新路径为非法路径时,则对所述非法路径进行监控。
  6. 一种路径检测装置,其特征在于,包括:
    获取单元,用于获取到采集若干个正常路径数据,并确定与所述正常路径数据相对应的正常运动轨迹;
    训练单元,用于对所述正常运动轨迹进行训练,获取到对应的Huasdorff距离,并对包含有若干个所述Huasdorff距离Huasdorff图进行最小图分割算法处理,对所述最小图分割算法处理后的所述Huasdorff图通过递归算法进行聚类确定若干个所述正常路径数据的正常路径策略;
    新路径确定单元,用于当获取到采集的新路径数据时,结合所述正常路径策略进行空间特征和/或速度特征和/或曲率特征对所述新路径数据进行比较,若所述新路径数据不满足所述正常路径策略,则对所述新路径数据对应的新路径为非法路径。
  7. 根据权利要求6所述的路径检测装置,其特征在于,获取单元具体包括:
    获取子单元,用于通过若干个设置于若干个正常路径的影像采集装置进行若干个所述正常路径数据的采集;
    处理子单元,用于根据在所述正常路径中物体于所述影像采集装置的整个视场中的与所述正常路径数据相对应的正常运动轨迹,并对所述正常运动轨迹进行移动均值滤波处理。
  8. 根据权利要求7所述的路径检测装置,其特征在于,训练单元具体包括:
    Huasdorff距离子单元,用于对所述正常运动轨迹进行训练,获取到两两所述正常运动轨迹间距对应的Huasdorff距离;
    最小图分割子单元,用于根据预置的路径空间延伸范围阈值包含有若干个所述 Huasdorff距离Huasdorff图进行最小图分割算法处理,对所述最小图分割算法处理后的所述Huasdorff图通过递归算法进行聚类确定若干个所述正常路径数据的正常路径策略。
  9. 根据权利要求8所述的路径检测装置,其特征在于,新路径确定单元具体包括:
    空间特征子单元,用于对获取到采集的新路径数据进行是否90%的新路径路径点在所述路径空间延伸范围中,及进行所述新路径数据的新路径与所述路径空间延伸范围的中值路径Hausdorff距离是否小于所述新路径与所述路径空间延伸范围的任一边缘路径的Hausdorff距离,若均为是,则确定所述新路径为正常路径,否则所述新路径为非法路径;
    和/或
    速度特征子单元,用于计算获取到采集的新路径数据的新路径速度,通过高斯分布对所述新路径速度进行建模处理,并按照第一公式
    Figure PCTCN2017093483-appb-100003
    再用马氏距离确定所述新路径与所述正常路径策略的所述正常路径是否相似,若相似,则确定所述新路径为正常路径,否则所述新路径为非法路径;
    其中,v′i为新路径的速度,mp则为所述正常路径策略的速度均值,Σ为路径速度分布的协方差矩阵;
    和/或
    曲率特征子单元,用于计算获取到采集的新路径数据的新路径速度、新路径加速度以及新路径位置的不连续处通过第二公式
    Figure PCTCN2017093483-appb-100004
    计算新路径曲率,并将所述新路径曲率与对所述正常路径策略拟合的高斯分布对应的曲率均值进行马氏距离是否相似的比较,若相似,则确定所述新路径为正常路径,否则所述新路径为非法路径,其中,速度为v′i、加速度为v″i,x′和y′分别为x和y的一阶导数。
  10. 根据权利要求9所述的路径检测装置,其特征在于,还包括:
    监控单元,用于对所述非法路径进行监控。
PCT/CN2017/093483 2016-12-14 2017-07-19 一种路径检测方法及装置 WO2018107748A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611153636.5 2016-12-14
CN201611153636.5A CN106598856B (zh) 2016-12-14 2016-12-14 一种路径检测方法及装置

Publications (1)

Publication Number Publication Date
WO2018107748A1 true WO2018107748A1 (zh) 2018-06-21

Family

ID=58802837

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/093483 WO2018107748A1 (zh) 2016-12-14 2017-07-19 一种路径检测方法及装置

Country Status (2)

Country Link
CN (1) CN106598856B (zh)
WO (1) WO2018107748A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598856B (zh) * 2016-12-14 2019-03-01 威创集团股份有限公司 一种路径检测方法及装置
CN109241291B (zh) * 2018-07-18 2022-02-15 华南师范大学 基于深度强化学习的知识图谱最优路径查询系统及其方法
CN110175633B (zh) * 2019-04-29 2020-12-15 杭州电子科技大学 一种基于北斗卫星传输数据的渔船轨迹异常检测方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120170802A1 (en) * 2010-12-30 2012-07-05 Pelco Inc. (Clovis, CA) Scene activity analysis using statistical and semantic features learnt from object trajectory data
CN103517042A (zh) * 2013-10-17 2014-01-15 吉林大学 一种养老院老人危险行为监测方法
CN103854027A (zh) * 2013-10-23 2014-06-11 北京邮电大学 一种人群行为识别方法
CN103942533A (zh) * 2014-03-24 2014-07-23 河海大学常州校区 一种基于视频监控系统的城市交通违规行为检测方法
CN106598856A (zh) * 2016-12-14 2017-04-26 广东威创视讯科技股份有限公司 一种路径检测方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120170802A1 (en) * 2010-12-30 2012-07-05 Pelco Inc. (Clovis, CA) Scene activity analysis using statistical and semantic features learnt from object trajectory data
CN103517042A (zh) * 2013-10-17 2014-01-15 吉林大学 一种养老院老人危险行为监测方法
CN103854027A (zh) * 2013-10-23 2014-06-11 北京邮电大学 一种人群行为识别方法
CN103942533A (zh) * 2014-03-24 2014-07-23 河海大学常州校区 一种基于视频监控系统的城市交通违规行为检测方法
CN106598856A (zh) * 2016-12-14 2017-04-26 广东威创视讯科技股份有限公司 一种路径检测方法及装置

Also Published As

Publication number Publication date
CN106598856B (zh) 2019-03-01
CN106598856A (zh) 2017-04-26

Similar Documents

Publication Publication Date Title
JP6494253B2 (ja) 物体検出装置、物体検出方法、画像認識装置及びコンピュータプログラム
US9971942B2 (en) Object detection in crowded scenes using context-driven label propagation
CN106557723B (zh) 一种带交互式活体检测的人脸身份认证系统及其方法
KR101360349B1 (ko) 객체의 특징 정보에 기반한 객체 추적 방법 및 장치
JP6488083B2 (ja) 駐車区画占有率判定のための映像および視覚ベースのアクセス制御のハイブリッド方法およびシステム
WO2015131734A1 (zh) 一种前视监视场景下的行人计数方法、装置和存储介质
Zaki et al. Automated analysis of pedestrian group behavior in urban settings
JP2008542922A (ja) 保安用途向けの人間の検出及び追跡
US20140161319A1 (en) Information processing apparatus, method for tracking object and program storage medium
JP7069667B2 (ja) 推定プログラム、推定システム、及び推定方法
WO2018107748A1 (zh) 一种路径检测方法及装置
KR101840167B1 (ko) 클라우드 상에서 멀티 카메라 간의 핸드오버를 통한 관심 객체의 연계추적 장치 및 그 방법
JP2018028784A (ja) 移動体群検出プログラム、移動体群検出装置、及び移動体群検出方法
JP6255944B2 (ja) 画像解析装置、画像解析方法及び画像解析プログラム
EP4184431A1 (en) Information processing device, information processing method, and program
WO2015102711A2 (en) A method and system of enforcing privacy policies for mobile sensory devices
JP6798609B2 (ja) 映像解析装置、映像解析方法およびプログラム
WO2020217812A1 (ja) 被写体の状態を認識する画像処理装置及びその方法
KR20170012191A (ko) 영상 처리 방법 및 영상 처리 장치
JP7383435B2 (ja) 画像処理装置、画像処理方法、及びプログラム
CN103065302A (zh) 一种基于离群数据挖掘的图像显著性检测方法
CN116092193A (zh) 一种基于人体运动状态识别的行人航迹推算方法
CN109753854A (zh) 一种通过视频监控进行骚乱检测的方法
KR20180111150A (ko) 영상에서 전경을 추출하는 장치 및 그 방법
JP6539720B1 (ja) 画像処理装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17880645

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 18.11.2019)

122 Ep: pct application non-entry in european phase

Ref document number: 17880645

Country of ref document: EP

Kind code of ref document: A1