瀏覽代碼

minor improvements for testing
added missing documentation files

Helge Wrede 9 年之前
父節點
當前提交
0121063911

文件差異過大導致無法顯示
+ 90 - 0
Documentation/html/KShortestPaths_8h_source.html


+ 107 - 0
Documentation/html/classalgo_1_1KShortestPaths-members.html

@@ -0,0 +1,107 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.12"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>Tracore: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">Tracore
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.12 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
+      <li><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
+      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
+      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
+      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
+    </ul>
+  </div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+  <ul>
+<li class="navelem"><b>algo</b></li><li class="navelem"><a class="el" href="classalgo_1_1KShortestPaths.html">KShortestPaths</a></li>  </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+  <div class="headertitle">
+<div class="title">algo::KShortestPaths Member List</div>  </div>
+</div><!--header-->
+<div class="contents">
+
+<p>This is the complete list of members for <a class="el" href="classalgo_1_1KShortestPaths.html">algo::KShortestPaths</a>, including all inherited members.</p>
+<table class="directory">
+  <tr class="even"><td class="entry"><a class="el" href="classalgo_1_1KShortestPaths.html#a2805f56b9abb112f10c752d125d623d8">KShortestPaths</a>(DirectedGraph graph, Vertex source, Vertex sink)</td><td class="entry"><a class="el" href="classalgo_1_1KShortestPaths.html">algo::KShortestPaths</a></td><td class="entry"></td></tr>
+  <tr><td class="entry"><a class="el" href="classalgo_1_1KShortestPaths.html#ae77137136462303e951f631ba7db6adf">Run</a>(size_t max_path_count)</td><td class="entry"><a class="el" href="classalgo_1_1KShortestPaths.html">algo::KShortestPaths</a></td><td class="entry"></td></tr>
+</table></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.12
+</small></address>
+</body>
+</html>

+ 185 - 0
Documentation/html/classalgo_1_1KShortestPaths.html

@@ -0,0 +1,185 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.12"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>Tracore: algo::KShortestPaths Class Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">Tracore
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.12 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
+      <li><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
+      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
+      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
+      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
+    </ul>
+  </div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+  <ul>
+<li class="navelem"><b>algo</b></li><li class="navelem"><a class="el" href="classalgo_1_1KShortestPaths.html">KShortestPaths</a></li>  </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+  <div class="summary">
+<a href="#pub-methods">Public Member Functions</a> &#124;
+<a href="classalgo_1_1KShortestPaths-members.html">List of all members</a>  </div>
+  <div class="headertitle">
+<div class="title">algo::KShortestPaths Class Reference</div>  </div>
+</div><!--header-->
+<div class="contents">
+
+<p><code>#include &lt;<a class="el" href="KShortestPaths_8h_source.html">KShortestPaths.h</a>&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
+Public Member Functions</h2></td></tr>
+<tr class="memitem:a2805f56b9abb112f10c752d125d623d8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classalgo_1_1KShortestPaths.html#a2805f56b9abb112f10c752d125d623d8">KShortestPaths</a> (DirectedGraph graph, Vertex source, Vertex sink)</td></tr>
+<tr class="separator:a2805f56b9abb112f10c752d125d623d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae77137136462303e951f631ba7db6adf"><td class="memItemLeft" align="right" valign="top">MultiPredecessorMap&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classalgo_1_1KShortestPaths.html#ae77137136462303e951f631ba7db6adf">Run</a> (size_t max_path_count)</td></tr>
+<tr class="separator:ae77137136462303e951f631ba7db6adf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Class providing a k-shortest-paths algorithm implementation. </p>
+</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="a2805f56b9abb112f10c752d125d623d8"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">algo::KShortestPaths::KShortestPaths </td>
+          <td>(</td>
+          <td class="paramtype">DirectedGraph&#160;</td>
+          <td class="paramname"><em>graph</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">Vertex&#160;</td>
+          <td class="paramname"><em>source</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">Vertex&#160;</td>
+          <td class="paramname"><em>sink</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p>Initializes the k-shortest-paths algorithm for the given graph. Uses the source vertex as starting and the sink vertex as target vertex. </p><dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">graph</td><td>The graph to work with </td></tr>
+    <tr><td class="paramname">source</td><td>The starting vertex </td></tr>
+    <tr><td class="paramname">sink</td><td>The target vertex </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<h2 class="groupheader">Member Function Documentation</h2>
+<a class="anchor" id="ae77137136462303e951f631ba7db6adf"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">MultiPredecessorMap algo::KShortestPaths::Run </td>
+          <td>(</td>
+          <td class="paramtype">size_t&#160;</td>
+          <td class="paramname"><em>max_path_count</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p>Runs the algorithm to find the given number of shortest paths. The actual number of paths found is the number of entries in the MultiPredecessorMap with the sink vertex as the key. </p><dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramname">max_path_count</td><td>The maximum number of paths to find </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following files:<ul>
+<li>algo/<a class="el" href="KShortestPaths_8h_source.html">KShortestPaths.h</a></li>
+<li>algo/KShortestPaths.cpp</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.12
+</small></address>
+</body>
+</html>

+ 26 - 0
Documentation/html/search/all_10.html

@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.12"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_10.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>

+ 4 - 0
Documentation/html/search/all_10.js

@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['writecsvmatlab',['WriteCSVMatlab',['../classutil_1_1FileIO.html#a862586aced240e732ecd35773b57c267',1,'util::FileIO']]]
+];

+ 26 - 0
Documentation/html/search/all_f.html

@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.12"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_f.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>

+ 4 - 0
Documentation/html/search/all_f.js

@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['visualize',['Visualize',['../classcore_1_1ObjectData.html#aae2c4fceddc529570dbe8909309f9961',1,'core::ObjectData::Visualize()'],['../classcore_1_1ObjectData3D.html#a86216fae3dc86f1107eb1b4530b574d2',1,'core::ObjectData3D::Visualize()'],['../classcore_1_1ObjectDataAngular.html#acb4265f6de511238460df118148bc85c',1,'core::ObjectDataAngular::Visualize()'],['../classcore_1_1ObjectDataMap.html#a8a0f71318dd58e0d527a63b904c6afac',1,'core::ObjectDataMap::Visualize()'],['../classcore_1_1Tracklet.html#a85f92a4059bf89f24a83f28935675181',1,'core::Tracklet::Visualize(cv::Mat &amp;image, cv::Scalar &amp;color) const override'],['../classcore_1_1Tracklet.html#a3a2b241939559e47aef701d2e2c4d4bd',1,'core::Tracklet::Visualize(cv::Mat &amp;image, cv::Scalar &amp;color, size_t frame, size_t predecessor_count, size_t successor_count) const']]]
+];

+ 26 - 0
Documentation/html/search/classes_7.html

@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.12"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="classes_7.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>

+ 5 - 0
Documentation/html/search/classes_7.js

@@ -0,0 +1,5 @@
+var searchData=
+[
+  ['tracklet',['Tracklet',['../classcore_1_1Tracklet.html',1,'core']]],
+  ['twostage',['NStage',['../classalgo_1_1TwoStage.html',1,'algo']]]
+];

+ 26 - 0
Documentation/html/search/functions_e.html

@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.12"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_e.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>

+ 4 - 0
Documentation/html/search/functions_e.js

@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['visualize',['Visualize',['../classcore_1_1ObjectData.html#aae2c4fceddc529570dbe8909309f9961',1,'core::ObjectData::Visualize()'],['../classcore_1_1ObjectData3D.html#a86216fae3dc86f1107eb1b4530b574d2',1,'core::ObjectData3D::Visualize()'],['../classcore_1_1ObjectDataAngular.html#acb4265f6de511238460df118148bc85c',1,'core::ObjectDataAngular::Visualize()'],['../classcore_1_1ObjectDataMap.html#a8a0f71318dd58e0d527a63b904c6afac',1,'core::ObjectDataMap::Visualize()'],['../classcore_1_1Tracklet.html#a85f92a4059bf89f24a83f28935675181',1,'core::Tracklet::Visualize(cv::Mat &amp;image, cv::Scalar &amp;color) const override'],['../classcore_1_1Tracklet.html#a3a2b241939559e47aef701d2e2c4d4bd',1,'core::Tracklet::Visualize(cv::Mat &amp;image, cv::Scalar &amp;color, size_t frame, size_t predecessor_count, size_t successor_count) const']]]
+];

+ 26 - 0
Documentation/html/search/functions_f.html

@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.12"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_f.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>

+ 4 - 0
Documentation/html/search/functions_f.js

@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['writecsvmatlab',['WriteCSVMatlab',['../classutil_1_1FileIO.html#a862586aced240e732ecd35773b57c267',1,'util::FileIO']]]
+];

+ 58 - 0
Documentation/latex/classalgo_1_1KShortestPaths.tex

@@ -0,0 +1,58 @@
+\hypertarget{classalgo_1_1KShortestPaths}{}\section{algo\+:\+:K\+Shortest\+Paths Class Reference}
+\label{classalgo_1_1KShortestPaths}\index{algo\+::\+K\+Shortest\+Paths@{algo\+::\+K\+Shortest\+Paths}}
+
+
+{\ttfamily \#include $<$K\+Shortest\+Paths.\+h$>$}
+
+\subsection*{Public Member Functions}
+\begin{DoxyCompactItemize}
+\item 
+\hyperlink{classalgo_1_1KShortestPaths_a2805f56b9abb112f10c752d125d623d8}{K\+Shortest\+Paths} (Directed\+Graph graph, Vertex source, Vertex sink)
+\item 
+Multi\+Predecessor\+Map \hyperlink{classalgo_1_1KShortestPaths_ae77137136462303e951f631ba7db6adf}{Run} (size\+\_\+t max\+\_\+path\+\_\+count)
+\end{DoxyCompactItemize}
+
+
+\subsection{Detailed Description}
+Class providing a k-\/shortest-\/paths algorithm implementation. 
+
+\subsection{Constructor \& Destructor Documentation}
+\index{algo\+::\+K\+Shortest\+Paths@{algo\+::\+K\+Shortest\+Paths}!K\+Shortest\+Paths@{K\+Shortest\+Paths}}
+\index{K\+Shortest\+Paths@{K\+Shortest\+Paths}!algo\+::\+K\+Shortest\+Paths@{algo\+::\+K\+Shortest\+Paths}}
+\subsubsection[{\texorpdfstring{K\+Shortest\+Paths(\+Directed\+Graph graph, Vertex source, Vertex sink)}{KShortestPaths(DirectedGraph graph, Vertex source, Vertex sink)}}]{\setlength{\rightskip}{0pt plus 5cm}algo\+::\+K\+Shortest\+Paths\+::\+K\+Shortest\+Paths (
+\begin{DoxyParamCaption}
+\item[{Directed\+Graph}]{graph, }
+\item[{Vertex}]{source, }
+\item[{Vertex}]{sink}
+\end{DoxyParamCaption}
+)}\hypertarget{classalgo_1_1KShortestPaths_a2805f56b9abb112f10c752d125d623d8}{}\label{classalgo_1_1KShortestPaths_a2805f56b9abb112f10c752d125d623d8}
+Initializes the k-\/shortest-\/paths algorithm for the given graph. Uses the source vertex as starting and the sink vertex as target vertex. 
+\begin{DoxyParams}{Parameters}
+{\em graph} & The graph to work with \\
+\hline
+{\em source} & The starting vertex \\
+\hline
+{\em sink} & The target vertex \\
+\hline
+\end{DoxyParams}
+
+
+\subsection{Member Function Documentation}
+\index{algo\+::\+K\+Shortest\+Paths@{algo\+::\+K\+Shortest\+Paths}!Run@{Run}}
+\index{Run@{Run}!algo\+::\+K\+Shortest\+Paths@{algo\+::\+K\+Shortest\+Paths}}
+\subsubsection[{\texorpdfstring{Run(size\+\_\+t max\+\_\+path\+\_\+count)}{Run(size\_t max\_path\_count)}}]{\setlength{\rightskip}{0pt plus 5cm}Multi\+Predecessor\+Map algo\+::\+K\+Shortest\+Paths\+::\+Run (
+\begin{DoxyParamCaption}
+\item[{size\+\_\+t}]{max\+\_\+path\+\_\+count}
+\end{DoxyParamCaption}
+)}\hypertarget{classalgo_1_1KShortestPaths_ae77137136462303e951f631ba7db6adf}{}\label{classalgo_1_1KShortestPaths_ae77137136462303e951f631ba7db6adf}
+Runs the algorithm to find the given number of shortest paths. The actual number of paths found is the number of entries in the Multi\+Predecessor\+Map with the sink vertex as the key. 
+\begin{DoxyParams}{Parameters}
+{\em max\+\_\+path\+\_\+count} & The maximum number of paths to find \\
+\hline
+\end{DoxyParams}
+
+
+The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
+\item 
+algo/K\+Shortest\+Paths.\+h\item 
+algo/K\+Shortest\+Paths.\+cpp\end{DoxyCompactItemize}

+ 5 - 2
algo/Berclaz.cpp

@@ -163,8 +163,11 @@ namespace algo
             ExtractTracks(graph, ksp_result, sink, tracks);
         }
 
-        util::Logger::LogDebug("connect tracks");
-        ConnectTracks(tracks);
+        if (batch_size < sequence.GetFrameCount())
+        {
+            util::Logger::LogDebug("connect tracks");
+            ConnectTracks(tracks);
+        }
     }
 
     void Berclaz::ConnectTracks(std::vector<core::TrackletPtr>& tracks)

+ 84 - 50
main/main.cpp

@@ -12,6 +12,8 @@
 #include "../algo/Berclaz.h"
 #include "../algo/KShortestPaths2.h"
 #include <boost/program_options.hpp>
+#include <boost/graph/named_function_params.hpp>
+#include <boost/graph/bellman_ford_shortest_paths.hpp>
 
 struct
 {
@@ -113,14 +115,10 @@ void RunBerclaz(core::DetectionSequence& sequence,
 void Run(int argc, char** argv)
 {
     // Algorithm independent values
-    std::string input_file, output_file, images_folder, algorithm, config_path;
+    std::string input_file, output_file, images_folder, algorithm, config_path, header, input_format;
     bool info, debug, display;
-
-    // Input dependent variables
-    std::string header, input_format;
-    char input_delimiter;
-    double temporal_weight, spatial_weight, angular_weight;
-    double image_width, image_height;
+    char input_delimiter, output_delimiter;
+    double temporal_weight, spatial_weight, angular_weight, image_width, image_height;
 
     boost::program_options::options_description opts("Allowed options");
     opts.add_options()
@@ -147,22 +145,17 @@ void Run(int argc, char** argv)
             ("output-file",
              boost::program_options::value<std::string>(&output_file),
              "set the output file path")
+            ("output-delimiter",
+             boost::program_options::value<char>(&output_delimiter)
+                    ->default_value(';'),
+             "the delimiter used to separate values in the specified output file")
             ("images-folder",
              boost::program_options::value<std::string>(&images_folder),
              "set images folder path")
             ("input-header",
-             boost::program_options::value<std::string>(&header)
-                    ->default_value(""),
+             boost::program_options::value<std::string>(&header),
              "sets the input header, this value is optional if the input file has a header labeling the values,"
                      "the delimiter used for the header needs to be the same as for the rest of the file")
-            ("image-width",
-             boost::program_options::value<double>(&image_width)
-                     ->default_value(1),
-             "the width of the image")
-            ("image-height",
-             boost::program_options::value<double>(&image_height)
-                     ->default_value(1),
-             "the height of the image")
             ("input-format",
              boost::program_options::value<std::string>(&input_format)
                      ->default_value("ObjectData"),
@@ -172,6 +165,14 @@ void Run(int argc, char** argv)
              boost::program_options::value<char>(&input_delimiter)
                      ->default_value(';'),
              "the delimiter used to separate values in the specified input file")
+            ("image-width",
+             boost::program_options::value<double>(&image_width)
+                     ->default_value(1),
+             "the width of the image")
+            ("image-height",
+             boost::program_options::value<double>(&image_height)
+                     ->default_value(1),
+             "the height of the image")
             ("algorithm",
              boost::program_options::value<std::string>(&algorithm),
              "set the algorithm to use, current viable options: n-stage berclaz")
@@ -359,8 +360,11 @@ void Run(int argc, char** argv)
     end_time = time(0);
     util::Logger::LogInfo("Time measurement stopped");
     util::Logger::LogInfo("Time passed: "
-                          + std::to_string(difftime(end_time, begin_time))
-                          + " seconds");
+                          + std::to_string(difftime(end_time, begin_time) / 60.0)
+                          + " minutes");
+
+    // Write the output file
+    //util::FileIO::WriteCSV(tracks, output_file, output_delimiter);
 
     // Display the tracking data
     if (display)
@@ -448,28 +452,33 @@ void CreateTestGraph(DirectedGraph& graph, Vertex& source, Vertex& sink)
     for (int i = 1; i < vertices.size() - 1; ++i)
     {
         boost::add_edge(source, vertices[i], 0.0, graph);
-        boost::add_edge(vertices[i], sink, 0.0, graph);
     }
 
     boost::add_edge(vertices[1], vertices[4], -1.0, graph);
     boost::add_edge(vertices[1], vertices[5], -1.0, graph);
+    boost::add_edge(vertices[1], vertices[10], 0.0, graph);
     boost::add_edge(vertices[4], vertices[7], -1.0, graph);
     boost::add_edge(vertices[4], vertices[8], -1.0, graph);
-//    boost::add_edge(vertices[7], vertices[10], -1.0, graph);
+    boost::add_edge(vertices[4], vertices[10], 0.0, graph);
+    boost::add_edge(vertices[7], vertices[10], -1.0, graph);
 
     boost::add_edge(vertices[2], vertices[4], -2.0, graph);
     boost::add_edge(vertices[2], vertices[5], -2.0, graph);
     boost::add_edge(vertices[2], vertices[6], -2.0, graph);
+    boost::add_edge(vertices[2], vertices[10], 0.0, graph);
     boost::add_edge(vertices[5], vertices[7], -2.0, graph);
     boost::add_edge(vertices[5], vertices[8], -2.0, graph);
     boost::add_edge(vertices[5], vertices[9], -2.0, graph);
-//    boost::add_edge(vertices[8], vertices[10], -2.0, graph);
+    boost::add_edge(vertices[5], vertices[10], 0.0, graph);
+    boost::add_edge(vertices[8], vertices[10], -2.0, graph);
 
     boost::add_edge(vertices[3], vertices[5], -3.0, graph);
     boost::add_edge(vertices[3], vertices[6], -3.0, graph);
+    boost::add_edge(vertices[3], vertices[10], 0.0, graph);
     boost::add_edge(vertices[6], vertices[8], -3.0, graph);
     boost::add_edge(vertices[6], vertices[9], -3.0, graph);
-//    boost::add_edge(vertices[9], vertices[10], -3.0, graph);
+    boost::add_edge(vertices[6], vertices[10], 0.0, graph);
+    boost::add_edge(vertices[9], vertices[10], -3.0, graph);
 
 
 //     Connect all with source and sink
@@ -490,22 +499,48 @@ void CreateTestGraph(DirectedGraph& graph, Vertex& source, Vertex& sink)
 //    boost::add_edge(vertices[8], vertices[7], 0.0, graph);
 }
 
-void TestKSP()
+void TestKSP(DirectedGraph& graph, Vertex& source, Vertex& sink, size_t n_paths)
 {
-    Vertex source, sink;
-    DirectedGraph graph;
+    algo::KShortestPaths2 ksp;
+    MultiPredecessorMap paths = ksp.Run(graph, source, sink, n_paths);
 
-    util::Logger::SetDebug(true);
-    util::Logger::SetInfo(true);
+    util::FileIO::WriteCSVMatlab(paths, source, sink, "/home/wrede/Dokumente/paths_ksp.csv");
+}
 
-    CreateTestGraph(graph, source, sink);
+void TestKBellmanFord(DirectedGraph& graph, Vertex& source, Vertex& sink, size_t n_paths)
+{
+    util::FileIO::WriteCSVMatlab(graph, "/home/wrede/Dokumente/graph_kbf.csv");
 
-    algo::KShortestPaths2 ksp;
-    MultiPredecessorMap paths = ksp.Run(graph, source, sink, 10);
+    MultiPredecessorMap paths;
+    for (size_t i = 0; i < n_paths; ++i)
+    {
+        // Prepare variables for path finding
+        size_t graph_size = boost::num_vertices(graph);
+        std::vector<Vertex> pred_list(graph_size);
+        std::vector<double> dist_list(graph_size);
+        VertexIndexMap graph_indices = boost::get(boost::vertex_index, graph);
+        EdgeWeightMap weight_map = boost::get(boost::edge_weight, graph);
+        PredecessorMap pred_map(&pred_list[0], graph_indices);
+        DistanceMap dist_map(&dist_list[0], graph_indices);
+
+        // Find the shortest path
+        boost::bellman_ford_shortest_paths(graph, graph_size,
+                                           boost::root_vertex(source)
+                                                   .weight_map(weight_map)
+                                                   .predecessor_map(pred_map)
+                                                   .distance_map(dist_map));
+
+        // Add path
+        for (Vertex u = sink, v = pred_map[u]; u != v; u = v, v = pred_map[v])
+        {
+            paths[u].insert(v);
 
-    util::FileIO::WriteCSVMatlab(graph, "/home/wrede/Dokumente/graph.csv");
-    util::FileIO::WriteCSVMatlab(paths, source, sink,
-                                 "/home/wrede/Dokumente/paths.csv");
+            if (u != sink && u != source)
+                boost::clear_out_edges(u, graph);
+        }
+    }
+
+    util::FileIO::WriteCSVMatlab(paths, source, sink, "/home/wrede/Dokumente/paths_kbf.csv");
 }
 
 void TestGrid()
@@ -569,7 +604,7 @@ void TestGrid()
     }
 }
 
-void TestBerclazGraph()
+void CreateBerclazGraph(DirectedGraph& graph, Vertex& source, Vertex& sink)
 {
     util::Logger::SetDebug(true);
     util::Logger::SetInfo(true);
@@ -625,7 +660,7 @@ void TestBerclazGraph()
     util::Logger::LogDebug("add vertices");
 
     // Add grid vertices
-    DirectedGraph graph;
+    graph.clear();
     for (int z = 0; z < grid.GetDepthCount(); ++z)
     {
         for (int y = 0; y < grid.GetHeightCount(); ++y)
@@ -641,8 +676,8 @@ void TestBerclazGraph()
     util::Logger::LogDebug("edge count " + std::to_string(boost::num_edges(graph)));
 
     // Add source and sink vertex
-    Vertex source = boost::add_vertex(core::ObjectDataPtr(new core::ObjectData()), graph);
-    Vertex sink = boost::add_vertex(core::ObjectDataPtr(new core::ObjectData()), graph);
+    source = boost::add_vertex(core::ObjectDataPtr(new core::ObjectData()), graph);
+    sink = boost::add_vertex(core::ObjectDataPtr(new core::ObjectData()), graph);
 
     util::Logger::LogDebug("add edges");
 
@@ -714,27 +749,26 @@ void TestBerclazGraph()
 
     util::Logger::LogDebug("vertex count " + std::to_string(boost::num_vertices(graph)));
     util::Logger::LogDebug("edge count " + std::to_string(boost::num_edges(graph)));
-
-    // Running KSP with 5 possible paths although only 3 are worth it
-    algo::KShortestPaths2 ksp;
-    MultiPredecessorMap ksp_result = ksp.Run(graph, source, sink, 5);
-
-    util::FileIO::WriteCSVMatlab(graph, "/home/wrede/Dokumente/graph.csv");
-    util::FileIO::WriteCSVMatlab(ksp_result, source, sink,
-                                 "/home/wrede/Dokumente/paths.csv");
 }
 
 int main(int argc, char** argv)
 {
+    //TODO load with frame offset
+
     Run(argc, argv);
 
-    //TestTracklet();
+//    TestTracklet();
+
+//    DirectedGraph graph;
+//    Vertex source, sink;
+//    CreateBerclazGraph(graph, source, sink);
 
-    //TestKSP();
+//    util::FileIO::WriteCSVMatlab(graph, "/home/wrede/Dokumente/graph.csv");
 
-    //TestGrid();
+//    TestKBellmanFord(graph, source, sink, 3);
+//    TestKSP(graph, source, sink, 10);
 
-    //TestBerclazGraph();
+//    TestGrid();
 
     return 0;
 }

+ 29 - 4
util/FileIO.cpp

@@ -182,14 +182,12 @@ namespace util
     {
         char delimiter = ',';
 
-        std::ofstream out("/home/wrede/Dokumente/paths.csv", std::ofstream::out);
+        std::ofstream out(file_name, std::ofstream::out);
         for (Vertex first : map[sink])
         {
             out << (sink + 1) << delimiter << (first + 1);
 
-            //TODO change (count index)
-            for (Vertex u = first, v = (*map[u].begin());
-                 u != v; u = v, v = (*map[v].begin()))
+            for (Vertex u = first, v = (*map[u].begin()); u != v; u = v, v = (*map[v].begin()))
             {
                 out << delimiter << (v + 1);
 
@@ -319,5 +317,32 @@ namespace util
 
         in.close();
     }
+
+    void FileIO::WriteCSV(std::vector<core::TrackletPtr>& tracks, const std::string& file_name,
+                          char delimiter)
+    {
+        // Get the frame range
+        size_t first_frame = tracks[0]->GetFirstFrameIndex();
+        size_t last_frame = tracks[0]->GetLastFrameIndex();
+        for (auto track : tracks)
+        {
+            if (track->GetFirstFrameIndex() < first_frame)
+                first_frame = track->GetFirstFrameIndex();
+            if (track->GetLastFrameIndex() > last_frame)
+                last_frame = track->GetLastFrameIndex();
+        }
+
+        std::ofstream out(file_name, std::ios::out);
+
+        if (!out.is_open())
+        {
+            util::Logger::LogError("Unable to open the the file: " + file_name);
+            return;
+        }
+
+        //TODO
+
+        out.close();
+    }
 }
 

+ 16 - 19
util/FileIO.h

@@ -10,6 +10,7 @@
 #include <vector>
 #include "../core/ObjectData.h"
 #include "../graph/Definitions.h"
+#include "../core/Tracklet.h"
 
 namespace util
 {
@@ -31,33 +32,31 @@ namespace util
          * single vector.
          * The second dimension is the row in the row bundle.
          * The third dimension is the value in that row.
+         *
          * @param values The 3D array of values to store the read values in
          * @param file_name The name of the file to read
          * @param delimiter The value delimiter of the file
          */
-        static void ReadCSV(Vector3d& values,
-                            const std::string& file_name,
-                            char delimiter);
+        static void ReadCSV(Vector3d& values, const std::string& file_name, char delimiter);
 
         /**
          * Reads a CSV file and stores the values in a 2D array.
          * The first dimension is the row and the second the value in that row.
+         *
          * @param values The 2D array of values to store the read values in
          * @param file_name The name of the file to read
          * @param delimiter The value delimiter of the file
          */
-        static void ReadCSV(Vector2d& values,
-                            const std::string& file_name,
-                            char delimiter);
+        static void ReadCSV(Vector2d& values, const std::string& file_name, char delimiter);
 
         /**
          * Lists all file names in the given folder.
+         *
          * @param folder The folder to look into
          * @param file_names The name of the files in the folder
          * @param sort True, if the files should be sorted alphabetically
          */
-        static void ListFiles(const std::string& folder,
-                              std::vector<std::string>& file_names,
+        static void ListFiles(const std::string& folder, std::vector<std::string>& file_names,
                               bool sort = true);
 
         /**
@@ -67,8 +66,7 @@ namespace util
          * @param graph The graph to write
          * @param file_name The name of the file to write
          */
-        static void WriteCSVMatlab(DirectedGraph& graph,
-                                   const std::string& file_name);
+        static void WriteCSVMatlab(DirectedGraph& graph, const std::string& file_name);
 
         /**
          * Writes the specified multi predecessor map into a CSV format
@@ -79,8 +77,7 @@ namespace util
          * @param sink The sink, this is the vertex where all paths end
          * @param file_name The name of the file to write
          */
-        static void  WriteCSVMatlab(MultiPredecessorMap& map,
-                                    Vertex& source, Vertex& sink,
+        static void  WriteCSVMatlab(MultiPredecessorMap& map, Vertex& source, Vertex& sink,
                                     const std::string& file_name);
 
         /**
@@ -92,9 +89,7 @@ namespace util
          * @param file_name The name of the file to read
          * @param delimiter The value delimiter of the file
          */
-        static void ReadCSV(ValueMapVector& values,
-                            const std::string& file_name,
-                            char delimiter);
+        static void ReadCSV(ValueMapVector& values, const std::string& file_name, char delimiter);
 
         /**
          * Reads a CSV file.
@@ -106,10 +101,12 @@ namespace util
          * @param file_name The name of the file to read
          * @param delimiter The value delimiter of the file
          */
-        static void ReadCSV(ValueMapVector& values,
-                            const std::string& header,
-                            const std::string& file_name,
-                            char delimiter);
+        static void ReadCSV(ValueMapVector& values, const std::string& header,
+                            const std::string& file_name, char delimiter);
+
+        //TODO comment
+        static void WriteCSV(std::vector<core::TrackletPtr>& tracks, const std::string& file_name,
+                             char delimiter);
     };
 }
 

部分文件因文件數量過多而無法顯示