meinen senf zu franks teil abgegeben
This commit is contained in:
@@ -67,32 +67,32 @@
|
|||||||
cannot be strictly ruled out. We will therefore describe a system that is able to deal with such variants
|
cannot be strictly ruled out. We will therefore describe a system that is able to deal with such variants
|
||||||
as well as present an algorithm to calculate realistic routes based on the aforementioned grid.
|
as well as present an algorithm to calculate realistic routes based on the aforementioned grid.
|
||||||
|
|
||||||
As discussed in section \ref{sec:relatedWork}, simply running a shortest-path algorithm as Dijkstra or A* using the previously created graph would obviously lead to non-realistic paths sticking to the walls and walking many diagonals.
|
|
||||||
In order to calculate paths the resemble pedestrian walking behavior we thus need some adjustments to the route calculation.
|
|
||||||
|
|
||||||
\subsection{Wall Avoidance}
|
\subsection{Wall Avoidance}
|
||||||
\label{sec:wallAvoidance}
|
\label{sec:wallAvoidance}
|
||||||
|
|
||||||
As already mentioned, shortest-path calculation usually sticks close to walls to reduce the path's length.
|
As discussed in section \ref{sec:relatedWork}, simply running a shortest-path algorithm as Dijkstra or A* using the previously created graph would obviously lead to non-realistic paths sticking to the walls and walking many diagonals.
|
||||||
Pedestrian's however, walk either somewhere near (but not close to) a wall or, for larger hallways/rooms,
|
Pedestrian's however, walk either somewhere near (but not close to) a wall or, for larger open spaces, somewhere far from the walls.
|
||||||
somewhere far from the walls. Based on those assumptions, an importance factor is derived for each vertex
|
In order to calculate paths the resemble pedestrian walking behavior, an importance factor is derived for each vertex within the graph.
|
||||||
within the graph.
|
|
||||||
|
|
||||||
To get the distance of each vertex from the nearest wall, an inverted version $G' = (V', E')$ of the graph $G$
|
To get the distance of each vertex from the nearest wall, an inverted version $G' = (V', E')$ of the graph $G$
|
||||||
is built. A nearest-neighbor search \todo{cite} $\mNN(v_{x,y,z}, G')$ will then provide the nearest wall-vertex
|
is built. A nearest-neighbor search $\mNN(v_{x,y,z}, G')$ will then provide the nearest wall-vertex
|
||||||
$v'_{x,y,z} \in V'$ from the inverted graph. The wall avoidance is calculated as follows:
|
$v'_{x,y,z} \in V'$ from the inverted graph \cite{Cover1967}. The wall avoidance is calculated as follows:
|
||||||
|
%
|
||||||
\begin{align}
|
\begin{equation}
|
||||||
d &= \text{dist}(v, v'), \enskip 0.0 < d < 2.2 \\
|
d_{v, v'} = d(v_{x,y,z}, v'_{x,y,z}), \enskip 0.0 < d_{v, v'} < 2.2 \\
|
||||||
\text{wa}_{x,y,z} = & - 0.30 \enspace \mathcal{N}(d \mid 0.0, 0.5^2) \label{eq:wallAvoidanceDownvote} \\
|
\end{equation}
|
||||||
& + 0.15 \enspace \mathcal{N}(d \mid 0.9, 0.5^2) \\
|
\begin{equation}
|
||||||
& + 0.15 \enspace \mathcal{N}(d \mid 2.2, 0.5^2)
|
\begin{array}{ll}
|
||||||
\label{eq:wallAvoidance}
|
\text{wa}_{x,y,z} = & - 0.30 \cdot \mathcal{N}(d_{v, v'} \mid 0.0, 0.5^2) \\
|
||||||
\end{align}
|
& + 0.15 \cdot \mathcal{N}(d_{v, v'} \mid 0.9, 0.5^2) \\
|
||||||
|
& + 0.15 \cdot \mathcal{N}(d_{v, v'} \mid 2.2, 0.5^2)
|
||||||
The $\mu$, $\sigma$ and scaling-factors were chosen empirically.
|
\end{array}
|
||||||
|
\label{eq:wallAvoidance}
|
||||||
|
\end{equation}
|
||||||
|
%
|
||||||
|
The parameters of the normal distribution and the scaling-factors were chosen empirically.
|
||||||
While this approach provides good results for most areas, doors are downvoted by
|
While this approach provides good results for most areas, doors are downvoted by
|
||||||
\refeq{eq:wallAvoidanceDownvote}, as they have only vertices that are close to walls.
|
\refeq{eq:wallAvoidance}, as they have only vertices that are close to walls.
|
||||||
Door detection thus is the next conducted step.
|
Door detection thus is the next conducted step.
|
||||||
|
|
||||||
|
|
||||||
@@ -103,25 +103,26 @@
|
|||||||
|
|
||||||
Doors are usually anchored between two (thin) walls and have a normed width. Examining only a limited region
|
Doors are usually anchored between two (thin) walls and have a normed width. Examining only a limited region
|
||||||
around the door, its surrounding walls describe a flat ellipse with the same center as the door itself. It is thus
|
around the door, its surrounding walls describe a flat ellipse with the same center as the door itself. It is thus
|
||||||
possible to detect doors within the floorplan using a PCA \todo{cite}.
|
possible to detect doors within the floorplan using a PCA.
|
||||||
|
|
||||||
To decide whether a vertex $v_{x,y,z}$ within the (non-inverted) grid $G$ belongs to a door, we use $k$-NN \todo{cite} to fetch its
|
To decide whether a vertex $v_{x,y,z}$ within the (non-inverted) grid $G$ belongs to a door, we use $k$-NN to fetch its
|
||||||
$k$ nearest neighbors $N'$ within the inverted grid $G'$. For this neighborhood the centroid $\vec{c} \in \R^3$ is calculated.
|
$k$ nearest neighbors $N'$ within the inverted grid $G'$. For this neighborhood the centroid $\vec{c} \in \R^3$ is calculated.
|
||||||
If the distance $\| \vec{c} - v_{x,y,z} \|$ between the centroid and the vertex-in-question is above certain threshold,
|
If the distance $\| \vec{c} - v_{x,y,z} \|$ between the centroid and the vertex-in-question is above certain threshold,
|
||||||
the node does not belong to a door.
|
the node does not belong to a door.
|
||||||
\todo{diese distanzformel oder dist(a,b)?}
|
\todo{diese distanzformel oder dist(a,b)?}
|
||||||
|
\commentByToni{dist gibt es doch net, oder? In der Graphentheorie schreibt man einfach d(v, v) (ist im prinzip shortest path). ansonsten müssten wir dist(..) irgendwo einführen als euklidische distanz oder so, find ich aber irgendwie doof. musst du wissen, was dir beser gefällt}
|
||||||
%ugly...
|
%ugly...
|
||||||
%\begin{equation}
|
%\begin{equation}
|
||||||
% \vec{c} = \frac{ \sum_{v_{x,y,z} \in N'} v_{x,y,z} }{k}
|
% \vec{c} = \frac{ \sum_{v_{x,y,z} \in N'} v_{x,y,z} }{k}
|
||||||
%\end{equation}
|
%\end{equation}
|
||||||
|
|
||||||
Assuming the distance was fine, we compare the two eigenvalues $\{\lambda_1, \lambda_2 \mid \lambda_1 > \lambda_2\}$ , determined by the PCA.
|
Assuming the distance was fine, we compare the two eigenvalues $\{\lambda_1, \lambda_2 \mid \lambda_1 > \lambda_2\}$, determined by the PCA.
|
||||||
If their ratio $\frac{\lambda_1}{\lambda_2}$ is above a certain threshold (flat ellipse)
|
If their ratio $\frac{\lambda_1}{\lambda_2}$ is above a certain threshold (flat ellipse)
|
||||||
the node-in-question belongs to a door or some kind of narrow passage.
|
the node-in-question belongs to a door or some kind of narrow passage.
|
||||||
|
|
||||||
\begin{figure}
|
\begin{figure}
|
||||||
\includegraphics[width=\columnwidth]{door_pca}
|
\includegraphics[width=\columnwidth]{door_pca}
|
||||||
\caption{Detect doors within the floorplan using k-NN and PCA. While the white nodes are walkable, the black ones represent walls. The grey node is the one in question.}
|
\caption{Detect doors within the floorplan using $k$-NN and PCA. While the white nodes are walkable, the black ones represent walls. The gray node is the one in question.}
|
||||||
\label{fig:doorPCA}
|
\label{fig:doorPCA}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
@@ -129,12 +130,13 @@
|
|||||||
(left) the node is part of a door,
|
(left) the node is part of a door,
|
||||||
(middle) the distance between node and k-NN centroid is above the threshold and
|
(middle) the distance between node and k-NN centroid is above the threshold and
|
||||||
(right) the ration between $e_1$ and $e_2$ is below the threshold.
|
(right) the ration between $e_1$ and $e_2$ is below the threshold.
|
||||||
|
\commentByToni{was ist $e_1$ und $e_2$?}
|
||||||
|
|
||||||
Like before, we apply a distribution based on the distance from the nearest door to determine
|
Like before, we apply a distribution based on the distance from the nearest door to determine
|
||||||
an importance-factor for each node:
|
an importance-factor for each node:
|
||||||
|
%
|
||||||
\begin{equation}
|
\begin{equation}
|
||||||
\text{dd}_{x,y,z} = 0.8 \enspace \mathcal{N}( \text{dist}(\vec{c}, v_{x,y,z}) \mid, 0.0, 1.0 )
|
\text{dd}_{x,y,z} = 0.8 \cdot \mathcal{N}( \| \vec{c} - v_{x,y,z} \| \mid 0.0, 1.0 )
|
||||||
\end{equation}
|
\end{equation}
|
||||||
|
|
||||||
|
|
||||||
@@ -143,13 +145,13 @@
|
|||||||
\subsection{Path Estimation}
|
\subsection{Path Estimation}
|
||||||
\label{sec:pathEstimation}
|
\label{sec:pathEstimation}
|
||||||
|
|
||||||
Based on aforementioned assumptions, the final importance for each node is
|
Based on aforementioned assumptions, the final importance for each node is given by
|
||||||
|
%
|
||||||
\begin{equation}
|
\begin{equation}
|
||||||
\text{imp}_{x,y,z} = 1.0 + \text{wa}_{x,y,z} + \text{dd}_{x,y,z} ,
|
\text{imp}_{x,y,z} = 1.0 + \text{wa}_{x,y,z} + \text{dd}_{x,y,z} \enspace ,
|
||||||
\end{equation}
|
\end{equation}
|
||||||
|
%
|
||||||
and can be seen in fig. \ref{fig:importance}.
|
A good visualization of the importance factors can be seen in fig. \ref{fig:importance}.
|
||||||
|
|
||||||
\begin{figure}
|
\begin{figure}
|
||||||
\includegraphics[angle=-90, width=\columnwidth, trim=20 19 17 9, clip]{floorplan_importance}
|
\includegraphics[angle=-90, width=\columnwidth, trim=20 19 17 9, clip]{floorplan_importance}
|
||||||
@@ -159,12 +161,12 @@
|
|||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
To estimate the shortest path to the pedestrian's desired target, we use a modified version
|
To estimate the shortest path to the pedestrian's desired target, we use a modified version
|
||||||
of Dijkstra's algorithm \cite{todo}. Instead of calculating the shortest path from the start to the end,
|
of Dijkstra's algorithm. Instead of calculating the shortest path from the start to the end,
|
||||||
we swap start/end and do not terminate the calculation until every single node was evaluated.
|
we swap start/end and do not terminate the calculation until every single node was evaluated.
|
||||||
Thus, every node in the grid knows the shortest path to the pedestrian's target.
|
Thus, every node in the grid knows the shortest path to the pedestrian's target.
|
||||||
|
|
||||||
As weighting-function we use
|
As weighting-function we use
|
||||||
|
%
|
||||||
\begin{equation}
|
\begin{equation}
|
||||||
\begin{split}
|
\begin{split}
|
||||||
\text{weight}(v_{x,y,z}, v_{x',y',z'}) =
|
\text{weight}(v_{x,y,z}, v_{x',y',z'}) =
|
||||||
@@ -174,7 +176,7 @@
|
|||||||
,
|
,
|
||||||
\end{split}
|
\end{split}
|
||||||
\end{equation}
|
\end{equation}
|
||||||
|
%
|
||||||
whereby $\text{stretch}(\cdots)$ is a scaling function (linear or non-linear) used to adjust
|
whereby $\text{stretch}(\cdots)$ is a scaling function (linear or non-linear) used to adjust
|
||||||
the impact of the previously calculated importance-factors.
|
the impact of the previously calculated importance-factors.
|
||||||
%
|
%
|
||||||
@@ -189,33 +191,52 @@
|
|||||||
%\end{figure}
|
%\end{figure}
|
||||||
|
|
||||||
|
|
||||||
|
\subsection{Guidance}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\subsection{guidance}
|
|
||||||
|
|
||||||
Based on the previous calculations, we propose two approaches to incorporate the prior
|
Based on the previous calculations, we propose two approaches to incorporate the prior
|
||||||
knowledge into the transiton model.
|
knowledge into the transiton model.
|
||||||
|
|
||||||
\subsubsection{Shortest Path}
|
\subsubsection{Shortest Path}
|
||||||
|
|
||||||
Before every transition, the centroid $\vec{c}$ of the current sample-set is calculated:
|
Before every transition, the centroid $\vec{c}$ of the current sample-set $\Upsilon_{t-1}$, representing the posterior distribution at time $t-1$, is calculated:
|
||||||
\todo{summe laesst sich so nicht schreiben. ideen?}
|
%
|
||||||
\begin{equation}
|
\begin{equation}
|
||||||
\vec{c} = \frac
|
\vec{c} = \frac
|
||||||
{ \sum_{\mStateVec_{t-1}} (\mState_{t-1}^x, \mState_{t-1}^y, \mState_{t-1}^z)^T }
|
%{ \sum_{\mStateVec_{t-1}} (\mState_{t-1}^x, \mState_{t-1}^y, \mState_{t-1}^z)^T }
|
||||||
|
{ \sum_{i=1}^N \Upsilon_{t-1}^{x,y,z} }
|
||||||
|
{N}
|
||||||
|
\end{equation}
|
||||||
|
%
|
||||||
|
oder
|
||||||
|
%
|
||||||
|
\begin{equation}
|
||||||
|
\vec{c} = \frac
|
||||||
|
{ \sum_{i=1}^N \{(\mState_{t-1}^x, \mState_{t-1}^y, \mState_{t-1}^z)^T\}^i }
|
||||||
|
{N}
|
||||||
|
\end{equation}
|
||||||
|
%
|
||||||
|
oder: the centroid $\vec{c}$ of the current sample-set's 3D positions $\Upsilon_{t-1}^i = \{(\mState_{t-1}^x, \mState_{t-1}^y, \mState_{t-1}^z)^T\}_{i=0}^N$ is calculated:
|
||||||
|
%
|
||||||
|
\begin{equation}
|
||||||
|
\vec{c} = \frac
|
||||||
|
%{ \sum_{\mStateVec_{t-1}} (\mState_{t-1}^x, \mState_{t-1}^y, \mState_{t-1}^z)^T }
|
||||||
|
{ \sum_{i=1}^N \Upsilon_{t-1}^{i} }
|
||||||
{N}
|
{N}
|
||||||
\end{equation}
|
\end{equation}
|
||||||
|
|
||||||
\newcommand{\pathRef}{v_{\hat{x},\hat{y},\hat{z}}}
|
\newcommand{\pathRef}{v_{\hat{x},\hat{y},\hat{z}}}
|
||||||
|
\todo{summe laesst sich so nicht schreiben. ideen?}
|
||||||
|
\commentByToni{Das ist gar nicht so einfach... wir haben nie ein Sample Set eingefuehrt. Nicht mal einen Sample. Wir haben immer nur diesen State... Man könnte natuerlich einfach sagen das $\Upsilon_t$ an set of random samples representing the posterior distribution ist oder einfach nur ein set von partikeln. habs mal eingefuegt wie ich denke}
|
||||||
|
|
||||||
This center is used as starting-point for the shortest path. As it is not necessarily part of
|
This center is used as starting-point for the shortest path. As it is not necessarily part of
|
||||||
the grid, its nearest-grid-neighbor is determined and used instead.
|
the grid, its nearest-grid-neighbor is determined and used instead.
|
||||||
The resulting vertex already knows its way to the pedestrian's destination, but is located somewhere
|
The resulting vertex already knows its way to the pedestrian's destination, but is located somewhere
|
||||||
within the sample-set. We thus calculate the standard deviation for the distance
|
within the sample-set. We thus calculate the standard deviation for the distance
|
||||||
of all states from the center. After advancing the starting-vertex by three times the deviation
|
of all states from the center. After advancing the starting-vertex by three times the deviation
|
||||||
we get a new point outside of the sample-set and closer to the desired destination.
|
we get a new point outside of the sample-set and closer to the desired destination.
|
||||||
|
\commentByToni{Worauf liegt der Punkt? Sollte man dazu schreiben. }
|
||||||
This new reference node $\pathRef$ serves as a comparison base:
|
This new reference node $\pathRef$ serves as a comparison base:
|
||||||
|
\commentByToni{Allgemein mal zur Schreibweise der Vertices. Irgendwie finde ich dieses $v_{x,y,z}$ nicht so gut. Ich denke jeder sieht das wir 3D haben und deswegen könntem man doch schlicht $v$, $v'$, $\hat{v}$ ... nutzen, oder was denkst du?}
|
||||||
|
|
||||||
\todo{bessere ideen fuer die schreibweise?}
|
\todo{bessere ideen fuer die schreibweise?}
|
||||||
\begin{equation}
|
\begin{equation}
|
||||||
@@ -241,6 +262,7 @@
|
|||||||
|
|
||||||
The Dijkstra calculation mentioned in \ref{sec:pathEstimation} already calculated the
|
The Dijkstra calculation mentioned in \ref{sec:pathEstimation} already calculated the
|
||||||
cumulative distance $\text{cdst}_{x,y,z}$ to the pedestrian's target for each vertex.
|
cumulative distance $\text{cdst}_{x,y,z}$ to the pedestrian's target for each vertex.
|
||||||
|
\commentByToni{falls wir dist() nutzen sollten wir hier auch cdist machen. }
|
||||||
We thus apply the same assumption as above and downvote steps not decreasing
|
We thus apply the same assumption as above and downvote steps not decreasing
|
||||||
the distance to the destination:
|
the distance to the destination:
|
||||||
|
|
||||||
|
|||||||
@@ -2686,4 +2686,21 @@ volume = {2003-Janua},
|
|||||||
year = {2003}
|
year = {2003}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@article{Cover1967,
|
||||||
|
abstract = {The nearest neighbor decision rule assigns to an unclassified sample point the classification of the nearest of a set of previously classified points. This rule is independent of the underlying joint distribution on the sample points and their classifications, and hence the probability of errorRof such a rule must be at least as great as the Bayes probability of errorR{\^{}}{\{}$\backslash$ast{\}}--the minimum probability of error over all decision rules taking underlying probability structure into account. However, in a large sample analysis, we will show in theM-category case thatR{\^{}}{\{}$\backslash$ast{\}} $\backslash$leq R $\backslash$leq R{\^{}}{\{}$\backslash$ast{\}}(2 --MR{\^{}}{\{}$\backslash$ast{\}}/(M-1)), where these bounds are the tightest possible, for all suitably smooth underlying distributions. Thus for any number of categories, the probability of error of the nearest neighbor rule is bounded above by twice the Bayes probability of error. In this sense, it may be said that half the classification information in an infinite sample set is contained in the nearest neighbor.},
|
||||||
|
author = {Cover, T. M. and Hart, P. E.},
|
||||||
|
doi = {10.1109/TIT.1967.1053964},
|
||||||
|
isbn = {0018-9448},
|
||||||
|
issn = {15579654},
|
||||||
|
journal = {IEEE Transactions on Information Theory},
|
||||||
|
keywords = {Pattern classification},
|
||||||
|
month = {jan},
|
||||||
|
number = {1},
|
||||||
|
pages = {21--27},
|
||||||
|
pmid = {21919855},
|
||||||
|
shorttitle = {Information Theory, IEEE Transactions on},
|
||||||
|
title = {{Nearest Neighbor Pattern Classification}},
|
||||||
|
volume = {13},
|
||||||
|
year = {1967}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user