Commit dcee929d authored by Patrik Huber's avatar Patrik Huber

Uploaded the current eos doxygen documentation

parent 71cf9b06
<!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.10"/>
<title>eos: include/eos/core/Landmark.hpp Source File</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_bfe318604057f18fe4ea65f858b9b42f.html">core</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">Landmark.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Eos - A 3D Morphable Model fitting library written in modern C++11/14.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * File: include/eos/core/Landmark.hpp</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright 2014, 2015 Patrik Huber</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * limitations under the License.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#ifndef EOS_LANDMARK_HPP_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#define EOS_LANDMARK_HPP_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> {</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; <span class="keyword">namespace </span>core {</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">class</span> LandmarkType&gt;</div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="structeos_1_1core_1_1_landmark.html"> 37</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structeos_1_1core_1_1_landmark.html">Landmark</a></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;{</div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="structeos_1_1core_1_1_landmark.html#a85c0f001e311e994314e900dcb284ad3"> 39</a></span>&#160; std::string <a class="code" href="structeos_1_1core_1_1_landmark.html#a85c0f001e311e994314e900dcb284ad3">name</a>; </div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="structeos_1_1core_1_1_landmark.html#aa3ffa0bd40290634e485e3c5ca99229c"> 40</a></span>&#160; LandmarkType <a class="code" href="structeos_1_1core_1_1_landmark.html#aa3ffa0bd40290634e485e3c5ca99229c">coordinates</a>; </div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;};</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;</div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="namespaceeos_1_1core.html#a6d6a8533690b5860236f55afafa14d2b"> 46</a></span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">class</span> LandmarkType&gt; <span class="keyword">using</span> <a class="code" href="namespaceeos_1_1core.html#a6d6a8533690b5860236f55afafa14d2b">LandmarkCollection</a> = std::vector&lt;Landmark&lt;LandmarkType&gt;&gt;;</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="namespaceeos_1_1core.html#aacf41dc417a1dbfc929c9cc7f2c7feeb"> 57</a></span>&#160;<a class="code" href="namespaceeos_1_1core.html#a6d6a8533690b5860236f55afafa14d2b">LandmarkCollection&lt;T&gt;</a> <a class="code" href="namespaceeos_1_1core.html#aacf41dc417a1dbfc929c9cc7f2c7feeb">filter</a>(<span class="keyword">const</span> <a class="code" href="namespaceeos_1_1core.html#a6d6a8533690b5860236f55afafa14d2b">LandmarkCollection&lt;T&gt;</a>&amp; landmarks, <span class="keyword">const</span> std::vector&lt;std::string&gt;&amp; <a class="code" href="namespaceeos_1_1core.html#aacf41dc417a1dbfc929c9cc7f2c7feeb">filter</a>)</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;{</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <a class="code" href="namespaceeos_1_1core.html#a6d6a8533690b5860236f55afafa14d2b">LandmarkCollection&lt;T&gt;</a> filtered_landmarks;</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <span class="keyword">using</span> std::begin;</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keyword">using</span> std::end;</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; std::copy_if(begin(landmarks), end(landmarks), std::back_inserter(filtered_landmarks),</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; [&amp;](<span class="keyword">const</span> <a class="code" href="structeos_1_1core_1_1_landmark.html">Landmark&lt;T&gt;</a>&amp; lm) { <span class="keywordflow">return</span> std::find(begin(filter), end(filter), lm.<a class="code" href="structeos_1_1core_1_1_landmark.html#a85c0f001e311e994314e900dcb284ad3">name</a>) != end(filter); }</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; );</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keywordflow">return</span> filtered_landmarks;</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;};</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; } <span class="comment">/* namespace core */</span></div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;} <span class="comment">/* namespace eos */</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* EOS_LANDMARK_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="structeos_1_1core_1_1_landmark_html_a85c0f001e311e994314e900dcb284ad3"><div class="ttname"><a href="structeos_1_1core_1_1_landmark.html#a85c0f001e311e994314e900dcb284ad3">eos::core::Landmark::name</a></div><div class="ttdeci">std::string name</div><div class="ttdoc">Name of the landmark, often used as identifier. </div><div class="ttdef"><b>Definition:</b> Landmark.hpp:39</div></div>
<div class="ttc" id="namespaceeos_1_1core_html_a6d6a8533690b5860236f55afafa14d2b"><div class="ttname"><a href="namespaceeos_1_1core.html#a6d6a8533690b5860236f55afafa14d2b">eos::core::LandmarkCollection</a></div><div class="ttdeci">std::vector&lt; Landmark&lt; LandmarkType &gt;&gt; LandmarkCollection</div><div class="ttdoc">A trivial collection of landmarks that belong together. </div><div class="ttdef"><b>Definition:</b> Landmark.hpp:46</div></div>
<div class="ttc" id="structeos_1_1core_1_1_landmark_html_aa3ffa0bd40290634e485e3c5ca99229c"><div class="ttname"><a href="structeos_1_1core_1_1_landmark.html#aa3ffa0bd40290634e485e3c5ca99229c">eos::core::Landmark::coordinates</a></div><div class="ttdeci">LandmarkType coordinates</div><div class="ttdoc">The position or coordinates of the landmark. </div><div class="ttdef"><b>Definition:</b> Landmark.hpp:40</div></div>
<div class="ttc" id="namespaceeos_1_1core_html_aacf41dc417a1dbfc929c9cc7f2c7feeb"><div class="ttname"><a href="namespaceeos_1_1core.html#aacf41dc417a1dbfc929c9cc7f2c7feeb">eos::core::filter</a></div><div class="ttdeci">LandmarkCollection&lt; T &gt; filter(const LandmarkCollection&lt; T &gt; &amp;landmarks, const std::vector&lt; std::string &gt; &amp;filter)</div><div class="ttdoc">Filters the given LandmarkCollection and returns a new LandmarkCollection containing all landmarks wh...</div><div class="ttdef"><b>Definition:</b> Landmark.hpp:57</div></div>
<div class="ttc" id="structeos_1_1core_1_1_landmark_html"><div class="ttname"><a href="structeos_1_1core_1_1_landmark.html">eos::core::Landmark</a></div><div class="ttdoc">Representation of a landmark, consisting of a landmark name and coordinates of the given type...</div><div class="ttdef"><b>Definition:</b> Landmark.hpp:37</div></div>
<div class="ttc" id="namespaceeos_html"><div class="ttname"><a href="namespaceeos.html">eos</a></div><div class="ttdoc">Namespace containing all of eos&#39;s 3D model fitting functionality. </div></div>
</div><!-- fragment --></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: include/eos/core/LandmarkMapper.hpp Source File</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_bfe318604057f18fe4ea65f858b9b42f.html">core</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">LandmarkMapper.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Eos - A 3D Morphable Model fitting library written in modern C++11/14.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * File: include/eos/core/LandmarkMapper.hpp</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright 2014, 2015 Patrik Huber</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * limitations under the License.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#ifndef LANDMARKMAPPER_HPP_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#define LANDMARKMAPPER_HPP_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#ifdef WIN32</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor"> #define BOOST_ALL_DYN_LINK // Link against the dynamic boost lib. Seems to be necessary because we use /MD, i.e. link to the dynamic CRT.</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor"> #define BOOST_ALL_NO_LIB // Don&#39;t use the automatic library linking by boost with VS2010 (#pragma ...). Instead, we specify everything in cmake.</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &quot;boost/optional.hpp&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &quot;boost/filesystem/path.hpp&quot;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;boost/property_tree/ptree.hpp&quot;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#include &quot;boost/property_tree/info_parser.hpp&quot;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor">#include &lt;map&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> {</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keyword">namespace </span>core {</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classeos_1_1core_1_1_landmark_mapper.html"> 56</a></span>&#160;<span class="keyword">class </span><a class="code" href="classeos_1_1core_1_1_landmark_mapper.html">LandmarkMapper</a> {</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <a class="code" href="classeos_1_1core_1_1_landmark_mapper.html#ab31ea1ec78c463ce54e2372fce103889">LandmarkMapper</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;</div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classeos_1_1core_1_1_landmark_mapper.html#a7da2756a772bd7dd7708bf20fcc95fc4"> 75</a></span>&#160; <a class="code" href="classeos_1_1core_1_1_landmark_mapper.html#a7da2756a772bd7dd7708bf20fcc95fc4">LandmarkMapper</a>(boost::filesystem::path filename)</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; {</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <span class="keyword">using</span> std::string;</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keyword">using</span> boost::property_tree::ptree;</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; ptree configtree;</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; boost::property_tree::info_parser::read_info(filename.string(), configtree);</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; }</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="keywordflow">catch</span> (<span class="keyword">const</span> boost::property_tree::ptree_error&amp; error) {</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <span class="keywordflow">throw</span> std::runtime_error(<span class="keywordtype">string</span>(<span class="stringliteral">&quot;LandmarkMapper: Error reading landmark-mappings file: &quot;</span>) + error.what());</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; }</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; ptree pt_landmark_mappings = configtree.get_child(<span class="stringliteral">&quot;landmarkMappings&quot;</span>);</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp;&amp; mapping : pt_landmark_mappings) {</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; landmark_mappings.insert(make_pair(mapping.first, mapping.second.get_value&lt;<span class="keywordtype">string</span>&gt;()));</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; }</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; }</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keywordflow">catch</span> (<span class="keyword">const</span> boost::property_tree::ptree_error&amp; error) {</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="keywordflow">throw</span> std::runtime_error(<span class="keywordtype">string</span>(<span class="stringliteral">&quot;LandmarkMapper: Error while parsing the mappings file: &quot;</span>) + error.what());</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; }</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::runtime_error&amp; error) {</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <span class="keywordflow">throw</span> std::runtime_error(<span class="keywordtype">string</span>(<span class="stringliteral">&quot;LandmarkMapper: Error while parsing the mappings file: &quot;</span>) + error.what());</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; }</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; };</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;</div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classeos_1_1core_1_1_landmark_mapper.html#aa0d5463e00e3b8f074b1f81dbd9390a7"> 109</a></span>&#160; boost::optional&lt;std::string&gt; <a class="code" href="classeos_1_1core_1_1_landmark_mapper.html#aa0d5463e00e3b8f074b1f81dbd9390a7">convert</a>(std::string landmark_name)<span class="keyword"> const</span></div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keywordflow">if</span> (landmark_mappings.empty()) {</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="comment">// perform identity mapping, i.e. return the input</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="keywordflow">return</span> landmark_name;</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; }</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="keyword">auto</span>&amp;&amp; converted_landmark = landmark_mappings.find(landmark_name);</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="keywordflow">if</span> (converted_landmark != std::end(landmark_mappings)) {</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="comment">// landmark mapping found, return it</span></div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keywordflow">return</span> converted_landmark-&gt;second;</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; }</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="keywordflow">else</span> { <span class="comment">// landmark_name does not match the key of any element in the map</span></div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <span class="keywordflow">return</span> boost::none;</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; }</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; }</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; };</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;</div>
<div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="classeos_1_1core_1_1_landmark_mapper.html#a7e3a46e6aeb522d96066a3d73f4c92c6"> 132</a></span>&#160; <span class="keyword">auto</span> <a class="code" href="classeos_1_1core_1_1_landmark_mapper.html#a7e3a46e6aeb522d96066a3d73f4c92c6">size</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordflow">return</span> landmark_mappings.size();</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; };</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; std::map&lt;std::string, std::string&gt; landmark_mappings; </div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;};</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; } <span class="comment">/* namespace core */</span></div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;} <span class="comment">/* namespace eos */</span></div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* LANDMARKMAPPER_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="classeos_1_1core_1_1_landmark_mapper_html_ab31ea1ec78c463ce54e2372fce103889"><div class="ttname"><a href="classeos_1_1core_1_1_landmark_mapper.html#ab31ea1ec78c463ce54e2372fce103889">eos::core::LandmarkMapper::LandmarkMapper</a></div><div class="ttdeci">LandmarkMapper()=default</div><div class="ttdoc">Constructs a new landmark mapper that performs an identity mapping, that is, its output is the same a...</div></div>
<div class="ttc" id="classeos_1_1core_1_1_landmark_mapper_html_a7e3a46e6aeb522d96066a3d73f4c92c6"><div class="ttname"><a href="classeos_1_1core_1_1_landmark_mapper.html#a7e3a46e6aeb522d96066a3d73f4c92c6">eos::core::LandmarkMapper::size</a></div><div class="ttdeci">auto size() const </div><div class="ttdoc">Returns the number of loaded landmark mappings. </div><div class="ttdef"><b>Definition:</b> LandmarkMapper.hpp:132</div></div>
<div class="ttc" id="namespaceeos_html"><div class="ttname"><a href="namespaceeos.html">eos</a></div><div class="ttdoc">Namespace containing all of eos&#39;s 3D model fitting functionality. </div></div>
<div class="ttc" id="classeos_1_1core_1_1_landmark_mapper_html_aa0d5463e00e3b8f074b1f81dbd9390a7"><div class="ttname"><a href="classeos_1_1core_1_1_landmark_mapper.html#aa0d5463e00e3b8f074b1f81dbd9390a7">eos::core::LandmarkMapper::convert</a></div><div class="ttdeci">boost::optional&lt; std::string &gt; convert(std::string landmark_name) const </div><div class="ttdoc">Converts the given landmark name to the mapped name. </div><div class="ttdef"><b>Definition:</b> LandmarkMapper.hpp:109</div></div>
<div class="ttc" id="classeos_1_1core_1_1_landmark_mapper_html_a7da2756a772bd7dd7708bf20fcc95fc4"><div class="ttname"><a href="classeos_1_1core_1_1_landmark_mapper.html#a7da2756a772bd7dd7708bf20fcc95fc4">eos::core::LandmarkMapper::LandmarkMapper</a></div><div class="ttdeci">LandmarkMapper(boost::filesystem::path filename)</div><div class="ttdoc">Constructs a new landmark mapper from a file containing mappings from one set of landmark identifiers...</div><div class="ttdef"><b>Definition:</b> LandmarkMapper.hpp:75</div></div>
<div class="ttc" id="classeos_1_1core_1_1_landmark_mapper_html"><div class="ttname"><a href="classeos_1_1core_1_1_landmark_mapper.html">eos::core::LandmarkMapper</a></div><div class="ttdoc">Represents a mapping from one kind of landmarks to a different format (e.g. model vertices)...</div><div class="ttdef"><b>Definition:</b> LandmarkMapper.hpp:56</div></div>
</div><!-- fragment --></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: include/eos/render/Mesh.hpp Source File</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_fab380b22e1724065a4c65606be96940.html">render</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">Mesh.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Eos - A 3D Morphable Model fitting library written in modern C++11/14.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * File: include/eos/render/Mesh.hpp</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright 2014, 2015 Patrik Huber</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * limitations under the License.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#ifndef MESH_HPP_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#define MESH_HPP_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &quot;opencv2/core/core.hpp&quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#ifdef WIN32</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor"> #define BOOST_ALL_DYN_LINK // Link against the dynamic boost lib. Seems to be necessary because we use /MD, i.e. link to the dynamic CRT.</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor"> #define BOOST_ALL_NO_LIB // Don&#39;t use the automatic library linking by boost with VS2010 (#pragma ...). Instead, we specify everything in cmake.</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;boost/filesystem/path.hpp&quot;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#include &lt;array&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="preprocessor">#include &lt;cassert&gt;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#include &lt;fstream&gt;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> {</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; <span class="keyword">namespace </span><a class="code" href="namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5">render</a> {</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;</div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="structeos_1_1render_1_1_mesh.html"> 49</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structeos_1_1render_1_1_mesh.html">Mesh</a></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;{</div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e"> 51</a></span>&#160; std::vector&lt;cv::Vec4f&gt; <a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>; </div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b"> 52</a></span>&#160; std::vector&lt;cv::Vec3f&gt; <a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>; </div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4"> 53</a></span>&#160; std::vector&lt;cv::Vec2f&gt; <a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>; </div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b"> 55</a></span>&#160; std::vector&lt;std::array&lt;int, 3&gt;&gt; <a class="code" href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">tvi</a>; </div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="structeos_1_1render_1_1_mesh.html#a81c47a35a1b0a6a6cb440cfbb67b8c28"> 56</a></span>&#160; std::vector&lt;std::array&lt;int, 3&gt;&gt; <a class="code" href="structeos_1_1render_1_1_mesh.html#a81c47a35a1b0a6a6cb440cfbb67b8c28">tci</a>; </div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;};</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="namespaceeos_1_1render.html#a9b4673997fae6d670d7a9cc23543e8d7"> 67</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespaceeos_1_1render.html#a9b4673997fae6d670d7a9cc23543e8d7">write_obj</a>(<a class="code" href="structeos_1_1render_1_1_mesh.html">Mesh</a> mesh, std::string filename)</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;{</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; assert(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>.size() == mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>.size() || mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>.empty());</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; std::ofstream obj_file(filename);</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="keywordflow">if</span> (mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>.empty()) {</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordflow">for</span> (std::size_t i = 0; i &lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>.size(); ++i) {</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; obj_file &lt;&lt; <span class="stringliteral">&quot;v &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[i][0] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[i][1] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[i][2] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; }</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; }</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keywordflow">for</span> (std::size_t i = 0; i &lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>.size(); ++i) {</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; obj_file &lt;&lt; <span class="stringliteral">&quot;v &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[i][0] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[i][1] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[i][2] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>[i][0] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>[i][1] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>[i][2] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; }</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; }</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp;&amp; v : mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">tvi</a>) {</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="comment">// Add one because obj starts counting triangle indices at 1</span></div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; obj_file &lt;&lt; <span class="stringliteral">&quot;f &quot;</span> &lt;&lt; v[0] + 1 &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; v[1] + 1 &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; v[2] + 1 &lt;&lt; std::endl;</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; }</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;}</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;</div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="namespaceeos_1_1render.html#afd6561b065b9c0dd6815580ab12c3204"> 103</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespaceeos_1_1render.html#afd6561b065b9c0dd6815580ab12c3204">write_textured_obj</a>(<a class="code" href="structeos_1_1render_1_1_mesh.html">Mesh</a> mesh, std::string filename)</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;{</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; assert((mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>.size() == mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>.size() || mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>.empty()) &amp;&amp; !mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>.empty());</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; std::ofstream obj_file(filename);</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; boost::filesystem::path mtl_filename(filename);</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; mtl_filename.replace_extension(<span class="stringliteral">&quot;.mtl&quot;</span>);</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; obj_file &lt;&lt; <span class="stringliteral">&quot;mtllib &quot;</span> &lt;&lt; mtl_filename.string() &lt;&lt; std::endl; <span class="comment">// first line of the obj file</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="comment">// same as in write_obj():</span></div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="keywordflow">if</span> (mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>.empty()) {</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="keywordflow">for</span> (std::size_t i = 0; i &lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>.size(); ++i) {</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; obj_file &lt;&lt; <span class="stringliteral">&quot;v &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[i][0] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[i][1] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[i][2] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; }</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; }</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="keywordflow">for</span> (std::size_t i = 0; i &lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>.size(); ++i) {</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; obj_file &lt;&lt; <span class="stringliteral">&quot;v &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[i][0] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[i][1] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[i][2] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>[i][0] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>[i][1] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>[i][2] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; }</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; }</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <span class="comment">// end</span></div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="keywordflow">for</span> (std::size_t i = 0; i &lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>.size(); ++i) {</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; obj_file &lt;&lt; <span class="stringliteral">&quot;vt &quot;</span> &lt;&lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[i][0] &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; 1.0f - mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[i][1] &lt;&lt; std::endl;</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <span class="comment">// We invert y because Meshlab&#39;s uv origin (0, 0) is on the bottom-left</span></div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; }</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; obj_file &lt;&lt; <span class="stringliteral">&quot;usemtl FaceTexture&quot;</span> &lt;&lt; std::endl; <span class="comment">// the name of our texture (material) will be &#39;FaceTexture&#39;</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp;&amp; v : mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">tvi</a>) {</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="comment">// This assumes mesh.texcoords.size() == mesh.vertices.size(). The texture indices could theoretically be different (for example in the cube-mapped 3D scan)</span></div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="comment">// Add one because obj starts counting triangle indices at 1</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; obj_file &lt;&lt; <span class="stringliteral">&quot;f &quot;</span> &lt;&lt; v[0] + 1 &lt;&lt; <span class="stringliteral">&quot;/&quot;</span> &lt;&lt; v[0] + 1 &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; v[1] + 1 &lt;&lt; <span class="stringliteral">&quot;/&quot;</span> &lt;&lt; v[1] + 1 &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; v[2] + 1 &lt;&lt; <span class="stringliteral">&quot;/&quot;</span> &lt;&lt; v[2] + 1 &lt;&lt; std::endl;</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; }</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; std::ofstream mtl_file(mtl_filename.string());</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; boost::filesystem::path texture_filename(filename);</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; texture_filename.replace_extension(<span class="stringliteral">&quot;.isomap.png&quot;</span>);</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; mtl_file &lt;&lt; <span class="stringliteral">&quot;newmtl FaceTexture&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; mtl_file &lt;&lt; <span class="stringliteral">&quot;map_Kd &quot;</span> &lt;&lt; texture_filename.string() &lt;&lt; std::endl;</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;};</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160;</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; } <span class="comment">/* namespace render */</span></div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;} <span class="comment">/* namespace eos */</span></div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* MESH_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_a81c47a35a1b0a6a6cb440cfbb67b8c28"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#a81c47a35a1b0a6a6cb440cfbb67b8c28">eos::render::Mesh::tci</a></div><div class="ttdeci">std::vector&lt; std::array&lt; int, 3 &gt; &gt; tci</div><div class="ttdoc">Triangle color indices. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:56</div></div>
<div class="ttc" id="namespaceeos_1_1render_html_a9b4673997fae6d670d7a9cc23543e8d7"><div class="ttname"><a href="namespaceeos_1_1render.html#a9b4673997fae6d670d7a9cc23543e8d7">eos::render::write_obj</a></div><div class="ttdeci">void write_obj(Mesh mesh, std::string filename)</div><div class="ttdoc">Writes the given Mesh to an obj file that for example can be read by Meshlab. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:67</div></div>
<div class="ttc" id="namespaceeos_html"><div class="ttname"><a href="namespaceeos.html">eos</a></div><div class="ttdoc">Namespace containing all of eos&#39;s 3D model fitting functionality. </div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_a305d17e6453f6be320331e00e8c8816e"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">eos::render::Mesh::vertices</a></div><div class="ttdeci">std::vector&lt; cv::Vec4f &gt; vertices</div><div class="ttdoc">3D vertex positions. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:51</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_ae3b0e946a77b4f434b382b315ea7c24b"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">eos::render::Mesh::colors</a></div><div class="ttdeci">std::vector&lt; cv::Vec3f &gt; colors</div><div class="ttdoc">Colour information for each vertex. Expected to be in RGB order. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:52</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html">eos::render::Mesh</a></div><div class="ttdoc">This class represents a 3D mesh consisting of vertices, vertex colour information and texture coordin...</div><div class="ttdef"><b>Definition:</b> Mesh.hpp:49</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_ab6fb80c460656bf7830a526f0692681b"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">eos::render::Mesh::tvi</a></div><div class="ttdeci">std::vector&lt; std::array&lt; int, 3 &gt; &gt; tvi</div><div class="ttdoc">Triangle vertex indices. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:55</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_a64fddf0a7200e7f66b0426773542eea4"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">eos::render::Mesh::texcoords</a></div><div class="ttdeci">std::vector&lt; cv::Vec2f &gt; texcoords</div><div class="ttdoc">Texture coordinates for each vertex. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:53</div></div>
<div class="ttc" id="namespaceeos_1_1render_html_afd6561b065b9c0dd6815580ab12c3204"><div class="ttname"><a href="namespaceeos_1_1render.html#afd6561b065b9c0dd6815580ab12c3204">eos::render::write_textured_obj</a></div><div class="ttdeci">void write_textured_obj(Mesh mesh, std::string filename)</div><div class="ttdoc">Writes an obj file of the given Mesh, including texture coordinates, and an mtl file containing a ref...</div><div class="ttdef"><b>Definition:</b> Mesh.hpp:103</div></div>
<div class="ttc" id="namespaceeos_1_1render_html_a7628a42875570658bea6ffb4f46723e5"><div class="ttname"><a href="namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5">eos::render::render</a></div><div class="ttdeci">std::pair&lt; cv::Mat, cv::Mat &gt; render(Mesh mesh, cv::Mat model_view_matrix, cv::Mat projection_matrix, int viewport_width, int viewport_height, const Texture &amp;texture, bool enable_backface_culling=false, bool enable_near_clipping=true, bool enable_far_clipping=true)</div><div class="ttdef"><b>Definition:</b> render.hpp:129</div></div>
</div><!-- fragment --></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: include/eos/morphablemodel/MorphableModel.hpp Source File</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_a487f496b1daaab0ce4d44d536b7440b.html">morphablemodel</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">MorphableModel.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Eos - A 3D Morphable Model fitting library written in modern C++11/14.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * File: include/eos/morphablemodel/MorphableModel.hpp</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright 2014, 2015 Patrik Huber</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * limitations under the License.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#ifndef MORPHABLEMODEL_HPP_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#define MORPHABLEMODEL_HPP_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &quot;eos/morphablemodel/PcaModel.hpp&quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &quot;eos/render/Mesh.hpp&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &quot;eos/morphablemodel/io/mat_cerealisation.hpp&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &quot;cereal/cereal.hpp&quot;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;cereal/access.hpp&quot;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#include &quot;cereal/types/vector.hpp&quot;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#include &quot;cereal/archives/binary.hpp&quot;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="preprocessor">#include &lt;array&gt;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#include &lt;cstdint&gt;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="comment">// Forward declaration of an internal function</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> { <span class="keyword">namespace </span>morphablemodel { <span class="keyword">namespace </span>detail {</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <a class="code" href="structeos_1_1render_1_1_mesh.html">eos::render::Mesh</a> sample_to_mesh(cv::Mat shape, cv::Mat color, std::vector&lt;std::array&lt;int, 3&gt;&gt; tvi, std::vector&lt;std::array&lt;int, 3&gt;&gt; tci, std::vector&lt;cv::Vec2f&gt; texture_coordinates = std::vector&lt;cv::Vec2f&gt;());</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;} } }</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> {</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <span class="keyword">namespace </span>morphablemodel {</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_morphable_model.html"> 54</a></span>&#160;<span class="keyword">class </span><a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a></div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;{</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a438898cd4578c1998e452de7d521f8cc"> 67</a></span>&#160; <a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a438898cd4578c1998e452de7d521f8cc">MorphableModel</a>(<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a> shape_model, <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a> color_model, std::vector&lt;cv::Vec2f&gt; texture_coordinates = std::vector&lt;cv::Vec2f&gt;()) : shape_model(shape_model), color_model(color_model), texture_coordinates(texture_coordinates)</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; {</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; };</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;</div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a990bf9c518307c811691facb8c1daa11"> 77</a></span>&#160; <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a> <a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a990bf9c518307c811691facb8c1daa11">get_shape_model</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keywordflow">return</span> shape_model;</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; };</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; </div>
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a1fff16d5d749831fa90049199101298c"> 87</a></span>&#160; <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a> <a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a1fff16d5d749831fa90049199101298c">get_color_model</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keywordflow">return</span> color_model;</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; };</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;</div>
<div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a43dcaaff84e217ea9643e37705136f31"> 97</a></span>&#160; <a class="code" href="structeos_1_1render_1_1_mesh.html">render::Mesh</a> <a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a43dcaaff84e217ea9643e37705136f31">get_mean</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; assert(shape_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d">get_data_dimension</a>() == color_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d">get_data_dimension</a>() || !<a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a253ca65b7f6c6cb48d4abd7b9a7f9a83">has_color_model</a>()); <span class="comment">// The number of vertices (= model.getDataDimension() / 3) has to be equal for both models, or, alternatively, it has to be a shape-only model.</span></div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; cv::Mat shape = shape_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#af05c96c2a5d3936503b961a9b4238495">get_mean</a>();</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; cv::Mat color = color_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#af05c96c2a5d3936503b961a9b4238495">get_mean</a>();</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <a class="code" href="structeos_1_1render_1_1_mesh.html">render::Mesh</a> mesh;</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <span class="keywordflow">if</span> (has_texture_coordinates()) {</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; mesh = detail::sample_to_mesh(shape, color, shape_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">get_triangle_list</a>(), color_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">get_triangle_list</a>(), texture_coordinates);</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; }</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; mesh = detail::sample_to_mesh(shape, color, shape_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">get_triangle_list</a>(), color_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">get_triangle_list</a>());</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; }</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keywordflow">return</span> mesh;</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; };</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;</div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a5fd1b15edc89e89808339859570a4c09"> 123</a></span>&#160; <a class="code" href="structeos_1_1render_1_1_mesh.html">render::Mesh</a> <a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a5fd1b15edc89e89808339859570a4c09">draw_sample</a>(<span class="keywordtype">float</span> shape_sigma = 1.0f, <span class="keywordtype">float</span> color_sigma = 1.0f)</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; {</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; assert(shape_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d">get_data_dimension</a>() == color_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d">get_data_dimension</a>()); <span class="comment">// The number of vertices (= model.getDataDimension() / 3) has to be equal for both models.</span></div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; cv::Mat shapeSample = shape_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8dfc5fa04f9853f2e06b971b90415538">draw_sample</a>(shape_sigma);</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; cv::Mat colorSample = color_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8dfc5fa04f9853f2e06b971b90415538">draw_sample</a>(color_sigma);</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <a class="code" href="structeos_1_1render_1_1_mesh.html">render::Mesh</a> mesh;</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="keywordflow">if</span> (has_texture_coordinates()) {</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; mesh = detail::sample_to_mesh(shapeSample, colorSample, shape_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">get_triangle_list</a>(), color_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">get_triangle_list</a>(), texture_coordinates);</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; }</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; mesh = detail::sample_to_mesh(shapeSample, colorSample, shape_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">get_triangle_list</a>(), color_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">get_triangle_list</a>());</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; }</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keywordflow">return</span> mesh;</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; };</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;</div>
<div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a14787e8e29f390277b10f2d0e19aa587"> 153</a></span>&#160; <a class="code" href="structeos_1_1render_1_1_mesh.html">render::Mesh</a> <a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a14787e8e29f390277b10f2d0e19aa587">draw_sample</a>(std::vector&lt;float&gt; shape_coefficients, std::vector&lt;float&gt; color_coefficients)</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; {</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; assert(shape_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d">get_data_dimension</a>() == color_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d">get_data_dimension</a>() || !<a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a253ca65b7f6c6cb48d4abd7b9a7f9a83">has_color_model</a>()); <span class="comment">// The number of vertices (= model.getDataDimension() / 3) has to be equal for both models, or, alternatively, it has to be a shape-only model.</span></div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; cv::Mat shape_sample;</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; cv::Mat color_sample;</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160;</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="keywordflow">if</span> (shape_coefficients.empty()) {</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; shape_sample = shape_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#af05c96c2a5d3936503b961a9b4238495">get_mean</a>();</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; }</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; shape_sample = shape_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8dfc5fa04f9853f2e06b971b90415538">draw_sample</a>(shape_coefficients);</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; }</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <span class="keywordflow">if</span> (color_coefficients.empty()) {</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; color_sample = color_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#af05c96c2a5d3936503b961a9b4238495">get_mean</a>();</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; }</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; color_sample = color_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8dfc5fa04f9853f2e06b971b90415538">draw_sample</a>(color_coefficients);</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; }</div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160;</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <a class="code" href="structeos_1_1render_1_1_mesh.html">render::Mesh</a> mesh;</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <span class="keywordflow">if</span> (has_texture_coordinates()) {</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; mesh = detail::sample_to_mesh(shape_sample, color_sample, shape_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">get_triangle_list</a>(), color_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">get_triangle_list</a>(), texture_coordinates);</div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; }</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; mesh = detail::sample_to_mesh(shape_sample, color_sample, shape_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">get_triangle_list</a>(), color_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">get_triangle_list</a>());</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; }</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <span class="keywordflow">return</span> mesh;</div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; };</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160;</div>
<div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a253ca65b7f6c6cb48d4abd7b9a7f9a83"> 189</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a253ca65b7f6c6cb48d4abd7b9a7f9a83">has_color_model</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; <span class="keywordflow">return</span> !color_model.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#af05c96c2a5d3936503b961a9b4238495">get_mean</a>().empty();</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; };</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160;</div>
<div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_morphable_model.html#aeffacfcafaf7dff6e21b047a2a6d22ae"> 199</a></span>&#160; std::vector&lt;cv::Vec2f&gt; <a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html#aeffacfcafaf7dff6e21b047a2a6d22ae">get_texture_coordinates</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; <span class="keywordflow">return</span> texture_coordinates;</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; };</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a> shape_model; </div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a> color_model; </div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; std::vector&lt;cv::Vec2f&gt; texture_coordinates; </div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160;</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; <span class="keywordtype">bool</span> has_texture_coordinates()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; <span class="keywordflow">return</span> texture_coordinates.size() &gt; 0 ? <span class="keyword">true</span> : <span class="keyword">false</span>;</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; };</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <span class="keyword">friend</span> <span class="keyword">class </span>cereal::access;</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">class</span> Archive&gt;</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; <span class="keywordtype">void</span> serialize(Archive&amp; archive, <span class="keyword">const</span> std::uint32_t version)</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; {</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; archive(shape_model, color_model, texture_coordinates);</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; };</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160;};</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160;</div>
<div class="line"><a name="l00240"></a><span class="lineno"><a class="line" href="namespaceeos_1_1morphablemodel.html#a0da6e35ec49f1ebdf55f9596540cf8f8"> 240</a></span>&#160;<a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a> <a class="code" href="namespaceeos_1_1morphablemodel.html#a0da6e35ec49f1ebdf55f9596540cf8f8">load_model</a>(std::string filename)</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160;{</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; <a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a> model;</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160;</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; std::ifstream file(filename, std::ios::binary);</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <span class="keywordflow">if</span> (file.fail()) {</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;Error opening given file: &quot;</span> + filename);</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; }</div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; cereal::BinaryInputArchive input_archive(file);</div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; input_archive(model);</div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160;</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; <span class="keywordflow">return</span> model;</div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160;};</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160;</div>
<div class="line"><a name="l00261"></a><span class="lineno"><a class="line" href="namespaceeos_1_1morphablemodel.html#aad09e0fd0788cb7fea41ed799c653e71"> 261</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespaceeos_1_1morphablemodel.html#aad09e0fd0788cb7fea41ed799c653e71">save_model</a>(<a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a> model, std::string filename)</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160;{</div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; std::ofstream file(filename, std::ios::binary);</div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; cereal::BinaryOutputArchive output_archive(file);</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; output_archive(model);</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160;};</div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160;</div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160;</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160;<span class="keyword">namespace </span>detail { <span class="comment">/* eos::morphablemodel::detail */</span></div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;<a class="code" href="structeos_1_1render_1_1_mesh.html">eos::render::Mesh</a> sample_to_mesh(cv::Mat shape, cv::Mat color, std::vector&lt;std::array&lt;int, 3&gt;&gt; tvi, std::vector&lt;std::array&lt;int, 3&gt;&gt; tci, std::vector&lt;cv::Vec2f&gt; texture_coordinates <span class="comment">/* = std::vector&lt;cv::Vec2f&gt;() */</span>)</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160;{</div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; assert(shape.rows == color.rows || color.empty()); <span class="comment">// The number of vertices (= model.getDataDimension() / 3) has to be equal for both models, or, alternatively, it has to be a shape-only model.</span></div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160;</div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; <span class="keyword">auto</span> num_vertices = shape.rows / 3;</div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160;</div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; <a class="code" href="structeos_1_1render_1_1_mesh.html">eos::render::Mesh</a> mesh;</div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160;</div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; <span class="comment">// Construct the mesh vertices:</span></div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>.resize(num_vertices);</div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> i = 0; i &lt; num_vertices; ++i) {</div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[i] = cv::Vec4f(shape.at&lt;<span class="keywordtype">float</span>&gt;(i * 3 + 0), shape.at&lt;<span class="keywordtype">float</span>&gt;(i * 3 + 1), shape.at&lt;<span class="keywordtype">float</span>&gt;(i * 3 + 2), 1.0f);</div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; }</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;</div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; <span class="comment">// Assign the vertex color information if it&#39;s not a shape-only model:</span></div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; <span class="keywordflow">if</span> (!color.empty()) {</div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>.resize(num_vertices);</div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> i = 0; i &lt; num_vertices; ++i) {</div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>[i] = cv::Vec3f(color.at&lt;<span class="keywordtype">float</span>&gt;(i * 3 + 0), color.at&lt;<span class="keywordtype">float</span>&gt;(i * 3 + 1), color.at&lt;<span class="keywordtype">float</span>&gt;(i * 3 + 2)); <span class="comment">// order in hdf5: RGB. Order in OCV: BGR. But order in vertex.color: RGB</span></div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; }</div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; }</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160;</div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; <span class="comment">// Assign the triangle lists:</span></div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">tvi</a> = tvi;</div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a81c47a35a1b0a6a6cb440cfbb67b8c28">tci</a> = tci; <span class="comment">// tci will be empty in case of a shape-only model</span></div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160;</div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; <span class="comment">// Texture coordinates, if the model has them:</span></div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; <span class="keywordflow">if</span> (!texture_coordinates.empty()) {</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>.resize(num_vertices);</div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span> i = 0; i &lt; num_vertices; ++i) {</div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[i] = texture_coordinates[i];</div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; }</div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160; }</div>
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160;</div>
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; <span class="keywordflow">return</span> mesh;</div>
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160;};</div>
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160;} <span class="comment">/* namespace eos::morphablemodel::detail */</span></div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160;</div>
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; } <span class="comment">/* namespace morphablemodel */</span></div>
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160;} <span class="comment">/* namespace eos */</span></div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160;</div>
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160;CEREAL_CLASS_VERSION(<a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a>, 0);</div>
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160;</div>
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* MORPHABLEMODEL_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_a81c47a35a1b0a6a6cb440cfbb67b8c28"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#a81c47a35a1b0a6a6cb440cfbb67b8c28">eos::render::Mesh::tci</a></div><div class="ttdeci">std::vector&lt; std::array&lt; int, 3 &gt; &gt; tci</div><div class="ttdoc">Triangle color indices. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:56</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></div><div class="ttdoc">This class represents a PCA-model that consists of: </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:54</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_morphable_model_html_a1fff16d5d749831fa90049199101298c"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_morphable_model.html#a1fff16d5d749831fa90049199101298c">eos::morphablemodel::MorphableModel::get_color_model</a></div><div class="ttdeci">PcaModel get_color_model() const </div><div class="ttdef"><b>Definition:</b> MorphableModel.hpp:87</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_morphable_model_html_a43dcaaff84e217ea9643e37705136f31"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_morphable_model.html#a43dcaaff84e217ea9643e37705136f31">eos::morphablemodel::MorphableModel::get_mean</a></div><div class="ttdeci">render::Mesh get_mean() const </div><div class="ttdef"><b>Definition:</b> MorphableModel.hpp:97</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_a8dfc5fa04f9853f2e06b971b90415538"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#a8dfc5fa04f9853f2e06b971b90415538">eos::morphablemodel::PcaModel::draw_sample</a></div><div class="ttdeci">cv::Mat draw_sample(float sigma=1.0f)</div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:145</div></div>
<div class="ttc" id="namespaceeos_1_1morphablemodel_html_aad09e0fd0788cb7fea41ed799c653e71"><div class="ttname"><a href="namespaceeos_1_1morphablemodel.html#aad09e0fd0788cb7fea41ed799c653e71">eos::morphablemodel::save_model</a></div><div class="ttdeci">void save_model(MorphableModel model, std::string filename)</div><div class="ttdef"><b>Definition:</b> MorphableModel.hpp:261</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_morphable_model_html_a14787e8e29f390277b10f2d0e19aa587"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_morphable_model.html#a14787e8e29f390277b10f2d0e19aa587">eos::morphablemodel::MorphableModel::draw_sample</a></div><div class="ttdeci">render::Mesh draw_sample(std::vector&lt; float &gt; shape_coefficients, std::vector&lt; float &gt; color_coefficients)</div><div class="ttdef"><b>Definition:</b> MorphableModel.hpp:153</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_acdf68d929079eab57ab4990c468a9e0d"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d">eos::morphablemodel::PcaModel::get_data_dimension</a></div><div class="ttdeci">int get_data_dimension() const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:97</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_aab14825974f9512ba3b7b88afd2521b3"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">eos::morphablemodel::PcaModel::get_triangle_list</a></div><div class="ttdeci">std::vector&lt; std::array&lt; int, 3 &gt; &gt; get_triangle_list() const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:108</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_morphable_model_html_aeffacfcafaf7dff6e21b047a2a6d22ae"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_morphable_model.html#aeffacfcafaf7dff6e21b047a2a6d22ae">eos::morphablemodel::MorphableModel::get_texture_coordinates</a></div><div class="ttdeci">std::vector&lt; cv::Vec2f &gt; get_texture_coordinates() const </div><div class="ttdef"><b>Definition:</b> MorphableModel.hpp:199</div></div>
<div class="ttc" id="namespaceeos_html"><div class="ttname"><a href="namespaceeos.html">eos</a></div><div class="ttdoc">Namespace containing all of eos&#39;s 3D model fitting functionality. </div></div>
<div class="ttc" id="namespaceeos_1_1morphablemodel_html_a0da6e35ec49f1ebdf55f9596540cf8f8"><div class="ttname"><a href="namespaceeos_1_1morphablemodel.html#a0da6e35ec49f1ebdf55f9596540cf8f8">eos::morphablemodel::load_model</a></div><div class="ttdeci">MorphableModel load_model(std::string filename)</div><div class="ttdef"><b>Definition:</b> MorphableModel.hpp:240</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_a305d17e6453f6be320331e00e8c8816e"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">eos::render::Mesh::vertices</a></div><div class="ttdeci">std::vector&lt; cv::Vec4f &gt; vertices</div><div class="ttdoc">3D vertex positions. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:51</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_ae3b0e946a77b4f434b382b315ea7c24b"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">eos::render::Mesh::colors</a></div><div class="ttdeci">std::vector&lt; cv::Vec3f &gt; colors</div><div class="ttdoc">Colour information for each vertex. Expected to be in RGB order. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:52</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_morphable_model_html_a253ca65b7f6c6cb48d4abd7b9a7f9a83"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_morphable_model.html#a253ca65b7f6c6cb48d4abd7b9a7f9a83">eos::morphablemodel::MorphableModel::has_color_model</a></div><div class="ttdeci">bool has_color_model() const </div><div class="ttdef"><b>Definition:</b> MorphableModel.hpp:189</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_af05c96c2a5d3936503b961a9b4238495"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#af05c96c2a5d3936503b961a9b4238495">eos::morphablemodel::PcaModel::get_mean</a></div><div class="ttdeci">cv::Mat get_mean() const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:118</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html">eos::render::Mesh</a></div><div class="ttdoc">This class represents a 3D mesh consisting of vertices, vertex colour information and texture coordin...</div><div class="ttdef"><b>Definition:</b> Mesh.hpp:49</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_morphable_model_html_a438898cd4578c1998e452de7d521f8cc"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_morphable_model.html#a438898cd4578c1998e452de7d521f8cc">eos::morphablemodel::MorphableModel::MorphableModel</a></div><div class="ttdeci">MorphableModel(PcaModel shape_model, PcaModel color_model, std::vector&lt; cv::Vec2f &gt; texture_coordinates=std::vector&lt; cv::Vec2f &gt;())</div><div class="ttdef"><b>Definition:</b> MorphableModel.hpp:67</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_morphable_model_html_a990bf9c518307c811691facb8c1daa11"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_morphable_model.html#a990bf9c518307c811691facb8c1daa11">eos::morphablemodel::MorphableModel::get_shape_model</a></div><div class="ttdeci">PcaModel get_shape_model() const </div><div class="ttdef"><b>Definition:</b> MorphableModel.hpp:77</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_ab6fb80c460656bf7830a526f0692681b"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">eos::render::Mesh::tvi</a></div><div class="ttdeci">std::vector&lt; std::array&lt; int, 3 &gt; &gt; tvi</div><div class="ttdoc">Triangle vertex indices. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:55</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_a64fddf0a7200e7f66b0426773542eea4"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">eos::render::Mesh::texcoords</a></div><div class="ttdeci">std::vector&lt; cv::Vec2f &gt; texcoords</div><div class="ttdoc">Texture coordinates for each vertex. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:53</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_morphable_model_html_a5fd1b15edc89e89808339859570a4c09"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_morphable_model.html#a5fd1b15edc89e89808339859570a4c09">eos::morphablemodel::MorphableModel::draw_sample</a></div><div class="ttdeci">render::Mesh draw_sample(float shape_sigma=1.0f, float color_sigma=1.0f)</div><div class="ttdef"><b>Definition:</b> MorphableModel.hpp:123</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_morphable_model_html"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a></div><div class="ttdoc">A class representing a 3D Morphable Model, consisting of a shape- and colour (albedo) PCA model...</div><div class="ttdef"><b>Definition:</b> MorphableModel.hpp:54</div></div>
</div><!-- fragment --></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: include/eos/morphablemodel/PcaModel.hpp Source File</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_a487f496b1daaab0ce4d44d536b7440b.html">morphablemodel</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">PcaModel.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Eos - A 3D Morphable Model fitting library written in modern C++11/14.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * File: include/eos/morphablemodel/PcaModel.hpp</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright 2014, 2015 Patrik Huber</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * limitations under the License.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#ifndef PCAMODEL_HPP_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#define PCAMODEL_HPP_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &quot;eos/morphablemodel/io/mat_cerealisation.hpp&quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &quot;cereal/access.hpp&quot;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &quot;cereal/types/array.hpp&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &quot;cereal/types/vector.hpp&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &quot;opencv2/core/core.hpp&quot;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#include &lt;array&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor">#include &lt;random&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> {</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keyword">namespace </span>morphablemodel {</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="comment">// Forward declarations of free functions</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;cv::Mat <a class="code" href="namespaceeos_1_1morphablemodel.html#a73d9baeb67f25d4604fc291a23e5e2d8">normalise_pca_basis</a>(cv::Mat unnormalisedBasis, cv::Mat eigenvalues);</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;cv::Mat <a class="code" href="namespaceeos_1_1morphablemodel.html#a3d9ed5fa969cbd540ebe9587540f3607">unnormalise_pca_basis</a>(cv::Mat normalisedBasis, cv::Mat eigenvalues);</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_pca_model.html"> 54</a></span>&#160;<span class="keyword">class </span><a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a></div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;{</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a>() {}; <span class="comment">// workaround for a VS2015 RC bug. Change to &#39;=default&#39; in RTM.</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_pca_model.html#ab2e45689de5f00a6109ecf00b0625d2f"> 71</a></span>&#160; <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#ab2e45689de5f00a6109ecf00b0625d2f">PcaModel</a>(cv::Mat mean, cv::Mat pca_basis, cv::Mat eigenvalues, std::vector&lt;std::array&lt;int, 3&gt;&gt; triangle_list) : mean(mean), normalised_pca_basis(pca_basis), eigenvalues(eigenvalues), triangle_list(triangle_list)</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; {</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="keyword">const</span> <span class="keyword">auto</span> seed = std::random_device()();</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; engine.seed(seed);</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; unnormalised_pca_basis = <a class="code" href="namespaceeos_1_1morphablemodel.html#a3d9ed5fa969cbd540ebe9587540f3607">unnormalise_pca_basis</a>(normalised_pca_basis, eigenvalues);</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; };</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;</div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_pca_model.html#a309148e123fc5fecd3cf10513f75b657"> 83</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a309148e123fc5fecd3cf10513f75b657">get_num_principal_components</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="comment">// Note: we could assert(normalisedPcaBasis.cols==unnormalisedPcaBasis.cols)</span></div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keywordflow">return</span> normalised_pca_basis.cols;</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; };</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;</div>
<div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d"> 97</a></span>&#160; <span class="keywordtype">int</span> <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d">get_data_dimension</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="comment">// Note: we could assert(normalisedPcaBasis.rows==unnormalisedPcaBasis.rows)</span></div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="keywordflow">return</span> normalised_pca_basis.rows;</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; };</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;</div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3"> 108</a></span>&#160; std::vector&lt;std::array&lt;int, 3&gt;&gt; <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">get_triangle_list</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="keywordflow">return</span> triangle_list;</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; };</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;</div>
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_pca_model.html#af05c96c2a5d3936503b961a9b4238495"> 118</a></span>&#160; cv::Mat <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#af05c96c2a5d3936503b961a9b4238495">get_mean</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keywordflow">return</span> mean;</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; };</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;</div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_pca_model.html#a1820ad4e0b9719884811188f3c932592"> 129</a></span>&#160; cv::Vec4f <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a1820ad4e0b9719884811188f3c932592">get_mean_at_point</a>(<span class="keywordtype">int</span> vertex_index)<span class="keyword"> const</span></div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; vertex_index *= 3;</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keywordflow">if</span> (vertex_index &gt;= mean.rows) {</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="keywordflow">throw</span> std::out_of_range(<span class="stringliteral">&quot;The given vertex id is larger than the dimension of the mean.&quot;</span>);</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; }</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordflow">return</span> cv::Vec4f(mean.at&lt;<span class="keywordtype">float</span>&gt;(vertex_index), mean.at&lt;<span class="keywordtype">float</span>&gt;(vertex_index + 1), mean.at&lt;<span class="keywordtype">float</span>&gt;(vertex_index + 2), 1.0f);</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; };</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div>
<div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8dfc5fa04f9853f2e06b971b90415538"> 145</a></span>&#160; cv::Mat <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8dfc5fa04f9853f2e06b971b90415538">draw_sample</a>(<span class="keywordtype">float</span> sigma = 1.0f)</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; {</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; std::normal_distribution&lt;float&gt; distribution(0.0f, sigma); <span class="comment">// this constructor takes the stddev</span></div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; std::vector&lt;float&gt; alphas(<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a309148e123fc5fecd3cf10513f75b657">get_num_principal_components</a>());</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp;&amp; a : alphas) {</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; a = distribution(engine);</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; }</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8dfc5fa04f9853f2e06b971b90415538">draw_sample</a>(alphas);</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; };</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;</div>
<div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_pca_model.html#abb5f0c6f86ab0cf9b35016441d877745"> 166</a></span>&#160; cv::Mat <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#abb5f0c6f86ab0cf9b35016441d877745">draw_sample</a>(std::vector&lt;float&gt; coefficients)</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; {</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; <span class="comment">// Fill the rest with zeros if not all coefficients are given:</span></div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <span class="keywordflow">if</span> (coefficients.size() &lt; <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a309148e123fc5fecd3cf10513f75b657">get_num_principal_components</a>()) {</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; coefficients.resize(<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a309148e123fc5fecd3cf10513f75b657">get_num_principal_components</a>());</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; }</div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; cv::Mat alphas(coefficients);</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; cv::Mat model_sample = mean + normalised_pca_basis * alphas;</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160;</div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="keywordflow">return</span> model_sample;</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; };</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;</div>
<div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_pca_model.html#af0597eb2cf01c98e397773740f3a8258"> 190</a></span>&#160; cv::Mat <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#af0597eb2cf01c98e397773740f3a8258">get_normalised_pca_basis</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <span class="keywordflow">return</span> normalised_pca_basis.clone();</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; };</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160;</div>
<div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_pca_model.html#a66e4ef89182a98845a8a6804047f2b77"> 203</a></span>&#160; cv::Mat <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a66e4ef89182a98845a8a6804047f2b77">get_normalised_pca_basis</a>(<span class="keywordtype">int</span> vertex_id)<span class="keyword"> const</span></div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; vertex_id *= 3; <span class="comment">// the basis is stored in the format [x y z x y z ...]</span></div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; <span class="keywordflow">return</span> normalised_pca_basis.rowRange(vertex_id, vertex_id + 3);</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; };</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160;</div>
<div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8d0f31b08aca934b7cf86dd92a1abbe2"> 219</a></span>&#160; cv::Mat <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8d0f31b08aca934b7cf86dd92a1abbe2">get_unnormalised_pca_basis</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <span class="keywordflow">return</span> unnormalised_pca_basis.clone();</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; };</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160;</div>
<div class="line"><a name="l00231"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_pca_model.html#a059f3e3f68307fd97b3e4aa38e4b6d34"> 231</a></span>&#160; cv::Mat <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a059f3e3f68307fd97b3e4aa38e4b6d34">get_unnormalised_pca_basis</a>(<span class="keywordtype">int</span> vertex_id)<span class="keyword"> const</span></div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; vertex_id *= 3; <span class="comment">// the basis is stored in the format [x y z x y z ...]</span></div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; <span class="keywordflow">return</span> unnormalised_pca_basis.rowRange(vertex_id, vertex_id + 3);</div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; };</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160;</div>
<div class="line"><a name="l00243"></a><span class="lineno"><a class="line" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8315679e0893b1bcde4f9a9aa08a137d"> 243</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8315679e0893b1bcde4f9a9aa08a137d">get_eigenvalue</a>(<span class="keywordtype">int</span> index)<span class="keyword"> const</span></div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160;<span class="keyword"> </span>{</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <span class="keywordflow">return</span> eigenvalues.at&lt;<span class="keywordtype">float</span>&gt;(index);</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; };</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160;</div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; std::mt19937 engine; </div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160;</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; cv::Mat mean; </div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; cv::Mat normalised_pca_basis; </div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; cv::Mat unnormalised_pca_basis; </div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; cv::Mat eigenvalues; </div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160;</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; std::vector&lt;std::array&lt;int, 3&gt;&gt; triangle_list; </div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160;</div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; <span class="keyword">friend</span> <span class="keyword">class </span>cereal::access;</div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">class</span> Archive&gt;</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; <span class="keywordtype">void</span> serialize(Archive&amp; archive)</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; {</div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; archive(mean, normalised_pca_basis, unnormalised_pca_basis, eigenvalues, triangle_list);</div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; <span class="comment">// Note: If the files are too big, We could split this in save/load, only</span></div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; <span class="comment">// store one of the bases, and calculate the other one when loading.</span></div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; };</div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160;};</div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160;</div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160;</div>
<div class="line"><a name="l00284"></a><span class="lineno"><a class="line" href="namespaceeos_1_1morphablemodel.html#a73d9baeb67f25d4604fc291a23e5e2d8"> 284</a></span>&#160;<span class="keyword">inline</span> cv::Mat <a class="code" href="namespaceeos_1_1morphablemodel.html#a73d9baeb67f25d4604fc291a23e5e2d8">normalise_pca_basis</a>(cv::Mat unnormalised_basis, cv::Mat eigenvalues)</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160;{</div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; <span class="keyword">using</span> cv::Mat;</div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; Mat normalised_basis(unnormalised_basis.size(), unnormalised_basis.type()); <span class="comment">// empty matrix with the same dimensions</span></div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; Mat sqrt_of_eigenvalues = eigenvalues.clone();</div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; eigenvalues.rows; ++i) {</div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; sqrt_of_eigenvalues.at&lt;<span class="keywordtype">float</span>&gt;(i) = std::sqrt(eigenvalues.at&lt;<span class="keywordtype">float</span>&gt;(i));</div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; }</div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; <span class="comment">// Normalise the basis: We multiply each eigenvector (i.e. each column) with the square root of its corresponding eigenvalue</span></div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> basis = 0; basis &lt; unnormalised_basis.cols; ++basis) {</div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; Mat normalised_eigenvector = unnormalised_basis.col(basis).mul(sqrt_of_eigenvalues.at&lt;<span class="keywordtype">float</span>&gt;(basis));</div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; normalised_eigenvector.copyTo(normalised_basis.col(basis));</div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; }</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;</div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; <span class="keywordflow">return</span> normalised_basis;</div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160;};</div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160;</div>
<div class="line"><a name="l00311"></a><span class="lineno"><a class="line" href="namespaceeos_1_1morphablemodel.html#a3d9ed5fa969cbd540ebe9587540f3607"> 311</a></span>&#160;<span class="keyword">inline</span> cv::Mat <a class="code" href="namespaceeos_1_1morphablemodel.html#a3d9ed5fa969cbd540ebe9587540f3607">unnormalise_pca_basis</a>(cv::Mat normalised_basis, cv::Mat eigenvalues)</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160;{</div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; <span class="keyword">using</span> cv::Mat;</div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; Mat unnormalised_basis(normalised_basis.size(), normalised_basis.type()); <span class="comment">// empty matrix with the same dimensions</span></div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; Mat one_over_sqrt_of_eigenvalues = eigenvalues.clone();</div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; eigenvalues.rows; ++i) {</div>
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160; one_over_sqrt_of_eigenvalues.at&lt;<span class="keywordtype">float</span>&gt;(i) = 1.0f / std::sqrt(eigenvalues.at&lt;<span class="keywordtype">float</span>&gt;(i));</div>
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; }</div>
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160; <span class="comment">// De-normalise the basis: We multiply each eigenvector (i.e. each column) with 1 over the square root of its corresponding eigenvalue</span></div>
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> basis = 0; basis &lt; normalised_basis.cols; ++basis) {</div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160; Mat unnormalised_eigenvector = normalised_basis.col(basis).mul(one_over_sqrt_of_eigenvalues.at&lt;<span class="keywordtype">float</span>&gt;(basis));</div>
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; unnormalised_eigenvector.copyTo(unnormalised_basis.col(basis));</div>
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; }</div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160;</div>
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160; <span class="keywordflow">return</span> unnormalised_basis;</div>
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160;};</div>
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160;</div>
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; } <span class="comment">/* namespace morphablemodel */</span></div>
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160;} <span class="comment">/* namespace eos */</span></div>
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160;</div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* PCAMODEL_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></div><div class="ttdoc">This class represents a PCA-model that consists of: </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:54</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_af0597eb2cf01c98e397773740f3a8258"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#af0597eb2cf01c98e397773740f3a8258">eos::morphablemodel::PcaModel::get_normalised_pca_basis</a></div><div class="ttdeci">cv::Mat get_normalised_pca_basis() const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:190</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_a8dfc5fa04f9853f2e06b971b90415538"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#a8dfc5fa04f9853f2e06b971b90415538">eos::morphablemodel::PcaModel::draw_sample</a></div><div class="ttdeci">cv::Mat draw_sample(float sigma=1.0f)</div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:145</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_a309148e123fc5fecd3cf10513f75b657"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#a309148e123fc5fecd3cf10513f75b657">eos::morphablemodel::PcaModel::get_num_principal_components</a></div><div class="ttdeci">int get_num_principal_components() const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:83</div></div>
<div class="ttc" id="namespaceeos_1_1morphablemodel_html_a73d9baeb67f25d4604fc291a23e5e2d8"><div class="ttname"><a href="namespaceeos_1_1morphablemodel.html#a73d9baeb67f25d4604fc291a23e5e2d8">eos::morphablemodel::normalise_pca_basis</a></div><div class="ttdeci">cv::Mat normalise_pca_basis(cv::Mat unnormalisedBasis, cv::Mat eigenvalues)</div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:284</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_acdf68d929079eab57ab4990c468a9e0d"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d">eos::morphablemodel::PcaModel::get_data_dimension</a></div><div class="ttdeci">int get_data_dimension() const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:97</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_a059f3e3f68307fd97b3e4aa38e4b6d34"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#a059f3e3f68307fd97b3e4aa38e4b6d34">eos::morphablemodel::PcaModel::get_unnormalised_pca_basis</a></div><div class="ttdeci">cv::Mat get_unnormalised_pca_basis(int vertex_id) const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:231</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_aab14825974f9512ba3b7b88afd2521b3"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">eos::morphablemodel::PcaModel::get_triangle_list</a></div><div class="ttdeci">std::vector&lt; std::array&lt; int, 3 &gt; &gt; get_triangle_list() const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:108</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_a8315679e0893b1bcde4f9a9aa08a137d"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#a8315679e0893b1bcde4f9a9aa08a137d">eos::morphablemodel::PcaModel::get_eigenvalue</a></div><div class="ttdeci">float get_eigenvalue(int index) const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:243</div></div>
<div class="ttc" id="namespaceeos_html"><div class="ttname"><a href="namespaceeos.html">eos</a></div><div class="ttdoc">Namespace containing all of eos&#39;s 3D model fitting functionality. </div></div>
<div class="ttc" id="namespaceeos_1_1morphablemodel_html_a3d9ed5fa969cbd540ebe9587540f3607"><div class="ttname"><a href="namespaceeos_1_1morphablemodel.html#a3d9ed5fa969cbd540ebe9587540f3607">eos::morphablemodel::unnormalise_pca_basis</a></div><div class="ttdeci">cv::Mat unnormalise_pca_basis(cv::Mat normalisedBasis, cv::Mat eigenvalues)</div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:311</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_a66e4ef89182a98845a8a6804047f2b77"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#a66e4ef89182a98845a8a6804047f2b77">eos::morphablemodel::PcaModel::get_normalised_pca_basis</a></div><div class="ttdeci">cv::Mat get_normalised_pca_basis(int vertex_id) const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:203</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_a8d0f31b08aca934b7cf86dd92a1abbe2"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#a8d0f31b08aca934b7cf86dd92a1abbe2">eos::morphablemodel::PcaModel::get_unnormalised_pca_basis</a></div><div class="ttdeci">cv::Mat get_unnormalised_pca_basis() const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:219</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_abb5f0c6f86ab0cf9b35016441d877745"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#abb5f0c6f86ab0cf9b35016441d877745">eos::morphablemodel::PcaModel::draw_sample</a></div><div class="ttdeci">cv::Mat draw_sample(std::vector&lt; float &gt; coefficients)</div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:166</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_ab2e45689de5f00a6109ecf00b0625d2f"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#ab2e45689de5f00a6109ecf00b0625d2f">eos::morphablemodel::PcaModel::PcaModel</a></div><div class="ttdeci">PcaModel(cv::Mat mean, cv::Mat pca_basis, cv::Mat eigenvalues, std::vector&lt; std::array&lt; int, 3 &gt;&gt; triangle_list)</div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:71</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_af05c96c2a5d3936503b961a9b4238495"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#af05c96c2a5d3936503b961a9b4238495">eos::morphablemodel::PcaModel::get_mean</a></div><div class="ttdeci">cv::Mat get_mean() const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:118</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_a1820ad4e0b9719884811188f3c932592"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#a1820ad4e0b9719884811188f3c932592">eos::morphablemodel::PcaModel::get_mean_at_point</a></div><div class="ttdeci">cv::Vec4f get_mean_at_point(int vertex_index) const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:129</div></div>
</div><!-- fragment --></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: include/eos/fitting/affine_camera_estimation.hpp Source File</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_349d8dd52ed72e674b9a830f9a7a4dcc.html">fitting</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">affine_camera_estimation.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Eos - A 3D Morphable Model fitting library written in modern C++11/14.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * File: include/eos/fitting/affine_camera_estimation.hpp</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright 2014, 2015 Patrik Huber</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * limitations under the License.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#ifndef AFFINECAMERAESTIMATION_HPP_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#define AFFINECAMERAESTIMATION_HPP_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &quot;eos/render/utils.hpp&quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &quot;opencv2/core/core.hpp&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &quot;opencv2/core/core_c.h&quot;</span> <span class="comment">// for CV_REDUCE_AVG</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &lt;cassert&gt;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> {</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="keyword">namespace </span>fitting {</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="namespaceeos_1_1fitting.html#afce5f7297094056a04ad26785c94bbd8"> 53</a></span>&#160;cv::Mat <a class="code" href="namespaceeos_1_1fitting.html#afce5f7297094056a04ad26785c94bbd8">estimate_affine_camera</a>(std::vector&lt;cv::Vec2f&gt; image_points, std::vector&lt;cv::Vec4f&gt; model_points)</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;{</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="keyword">using</span> cv::Mat;</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; assert(image_points.size() == model_points.size());</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; assert(image_points.size() &gt;= 4); <span class="comment">// Number of correspondence points given needs to be equal to or larger than 4</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> num_correspondences = <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(image_points.size());</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; Mat matImagePoints; <span class="comment">// will be numCorrespondences x 2, CV_32FC1</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; Mat matModelPoints; <span class="comment">// will be numCorrespondences x 3, CV_32FC1</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; image_points.size(); ++i) {</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; Mat imgPoint(1, 2, CV_32FC1);</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; imgPoint.at&lt;<span class="keywordtype">float</span>&gt;(0, 0) = image_points[i][0];</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; imgPoint.at&lt;<span class="keywordtype">float</span>&gt;(0, 1) = image_points[i][1];</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; matImagePoints.push_back(imgPoint);</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; Mat mdlPoint(1, 3, CV_32FC1);</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; mdlPoint.at&lt;<span class="keywordtype">float</span>&gt;(0, 0) = model_points[i][0];</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; mdlPoint.at&lt;<span class="keywordtype">float</span>&gt;(0, 1) = model_points[i][1];</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; mdlPoint.at&lt;<span class="keywordtype">float</span>&gt;(0, 2) = model_points[i][2];</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; matModelPoints.push_back(mdlPoint);</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; }</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <span class="comment">// translate the centroid of the image points to the origin:</span></div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; Mat imagePointsMean; <span class="comment">// use non-homogeneous coords for the next few steps? (less submatrices etc overhead)</span></div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; cv::reduce(matImagePoints, imagePointsMean, 0, CV_REDUCE_AVG);</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; imagePointsMean = cv::repeat(imagePointsMean, matImagePoints.rows, 1); <span class="comment">// get T_13 and T_23 from imagePointsMean</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; matImagePoints = matImagePoints - imagePointsMean;</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="comment">// scale the image points such that the RMS distance from the origin is sqrt(2):</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="comment">// 1) calculate the average norm (root mean squared distance) of all vectors</span></div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <span class="keywordtype">float</span> average_norm = 0.0f;</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> row = 0; row &lt; matImagePoints.rows; ++row) {</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; average_norm += <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(cv::norm(matImagePoints.row(row), cv::NORM_L2));</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; }</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; average_norm /= matImagePoints.rows;</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="comment">// 2) multiply every vectors coordinate by sqrt(2)/average_norm</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <span class="keywordtype">float</span> scaleFactor = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(std::sqrt(2)) / average_norm;</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; matImagePoints *= scaleFactor; <span class="comment">// add unit homogeneous component here</span></div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="comment">// The points in matImagePoints now have a RMS distance from the origin of sqrt(2).</span></div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="comment">// The normalisation matrix so that the 2D points are mean-free and their norm is as described above.</span></div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; Mat T = Mat::zeros(3, 3, CV_32FC1);</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; T.at&lt;<span class="keywordtype">float</span>&gt;(0, 0) = scaleFactor; <span class="comment">// s_x</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; T.at&lt;<span class="keywordtype">float</span>&gt;(1, 1) = scaleFactor; <span class="comment">// s_y</span></div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; T.at&lt;<span class="keywordtype">float</span>&gt;(0, 2) = -imagePointsMean.at&lt;<span class="keywordtype">float</span>&gt;(0, 0) * scaleFactor; <span class="comment">// t_x</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; T.at&lt;<span class="keywordtype">float</span>&gt;(1, 2) = -imagePointsMean.at&lt;<span class="keywordtype">float</span>&gt;(0, 1) * scaleFactor; <span class="comment">// t_y</span></div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; T.at&lt;<span class="keywordtype">float</span>&gt;(2, 2) = 1;</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <span class="comment">// center the model points to the origin:</span></div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; Mat tmpOrigMdlPoints = matModelPoints.clone(); <span class="comment">// Temp for testing: Save the original coordinates.</span></div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="comment">// translate the centroid of the model points to the origin:</span></div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; Mat modelPointsMean; <span class="comment">// use non-homogeneous coords for the next few steps? (less submatrices etc overhead)</span></div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; cv::reduce(matModelPoints, modelPointsMean, 0, CV_REDUCE_AVG);</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; modelPointsMean = cv::repeat(modelPointsMean, matModelPoints.rows, 1);</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; matModelPoints = matModelPoints - modelPointsMean;</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <span class="comment">// scale the model points such that the RMS distance from the origin is sqrt(3):</span></div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="comment">// 1) calculate the average norm (root mean squared distance) of all vectors</span></div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; average_norm = 0.0f;</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> row = 0; row &lt; matModelPoints.rows; ++row) {</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; average_norm += <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(cv::norm(matModelPoints.row(row), cv::NORM_L2));</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; }</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; average_norm /= matModelPoints.rows;</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="comment">// 2) multiply every vectors coordinate by sqrt(3)/avgnorm</span></div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; scaleFactor = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(std::sqrt(3)) / average_norm;</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; matModelPoints *= scaleFactor; <span class="comment">// add unit homogeneous component here</span></div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="comment">// The points in matModelPoints now have a RMS distance from the origin of sqrt(3).</span></div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="comment">// The normalisation matrix so that the 3D points are mean-free and their norm is as described above.</span></div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; Mat U = Mat::zeros(4, 4, CV_32FC1);</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; U.at&lt;<span class="keywordtype">float</span>&gt;(0, 0) = scaleFactor; <span class="comment">// s_x</span></div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; U.at&lt;<span class="keywordtype">float</span>&gt;(1, 1) = scaleFactor; <span class="comment">// s_y</span></div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; U.at&lt;<span class="keywordtype">float</span>&gt;(2, 2) = scaleFactor; <span class="comment">// s_z</span></div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; U.at&lt;<span class="keywordtype">float</span>&gt;(0, 3) = -modelPointsMean.at&lt;<span class="keywordtype">float</span>&gt;(0, 0) * scaleFactor; <span class="comment">// t_x</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; U.at&lt;<span class="keywordtype">float</span>&gt;(1, 3) = -modelPointsMean.at&lt;<span class="keywordtype">float</span>&gt;(0, 1) * scaleFactor; <span class="comment">// t_y</span></div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; U.at&lt;<span class="keywordtype">float</span>&gt;(2, 3) = -modelPointsMean.at&lt;<span class="keywordtype">float</span>&gt;(0, 2) * scaleFactor; <span class="comment">// t_z</span></div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; U.at&lt;<span class="keywordtype">float</span>&gt;(3, 3) = 1;</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <span class="comment">// Estimate the normalised camera matrix (C tilde).</span></div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <span class="comment">// We are solving the system $A_8 * p_8 = b$</span></div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="comment">// The solution is obtained by the pseudo-inverse of A_8:</span></div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="comment">// $p_8 = A_8^+ * b$</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; Mat A_8 = Mat::zeros(num_correspondences * 2, 8, CV_32FC1);</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="comment">//Mat p_8(); // p_8 is 8 x 1. We are solving for it.</span></div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; Mat b(num_correspondences * 2, 1, CV_32FC1);</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; num_correspondences; ++i) {</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; A_8.at&lt;<span class="keywordtype">float</span>&gt;(2 * i, 0) = matModelPoints.at&lt;<span class="keywordtype">float</span>&gt;(i, 0); <span class="comment">// could maybe made faster by assigning the whole row/col-range if possible?</span></div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; A_8.at&lt;<span class="keywordtype">float</span>&gt;(2 * i, 1) = matModelPoints.at&lt;<span class="keywordtype">float</span>&gt;(i, 1);</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; A_8.at&lt;<span class="keywordtype">float</span>&gt;(2 * i, 2) = matModelPoints.at&lt;<span class="keywordtype">float</span>&gt;(i, 2);</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; A_8.at&lt;<span class="keywordtype">float</span>&gt;(2 * i, 3) = 1;</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; A_8.at&lt;<span class="keywordtype">float</span>&gt;((2 * i) + 1, 4) = matModelPoints.at&lt;<span class="keywordtype">float</span>&gt;(i, 0);</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; A_8.at&lt;<span class="keywordtype">float</span>&gt;((2 * i) + 1, 5) = matModelPoints.at&lt;<span class="keywordtype">float</span>&gt;(i, 1);</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; A_8.at&lt;<span class="keywordtype">float</span>&gt;((2 * i) + 1, 6) = matModelPoints.at&lt;<span class="keywordtype">float</span>&gt;(i, 2);</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; A_8.at&lt;<span class="keywordtype">float</span>&gt;((2 * i) + 1, 7) = 1;</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; b.at&lt;<span class="keywordtype">float</span>&gt;(2 * i, 0) = matImagePoints.at&lt;<span class="keywordtype">float</span>&gt;(i, 0);</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; b.at&lt;<span class="keywordtype">float</span>&gt;((2 * i) + 1, 0) = matImagePoints.at&lt;<span class="keywordtype">float</span>&gt;(i, 1);</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; }</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; Mat p_8 = A_8.inv(cv::DECOMP_SVD) * b;</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; Mat C_tilde = Mat::zeros(3, 4, CV_32FC1);</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; C_tilde.row(0) = p_8.rowRange(0, 4).t(); <span class="comment">// The first row of C_tilde consists of the first 4 entries of the col-vector p_8</span></div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; C_tilde.row(1) = p_8.rowRange(4, 8).t(); <span class="comment">// Second row = last 4 entries</span></div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; C_tilde.at&lt;<span class="keywordtype">float</span>&gt;(2, 3) = 1; <span class="comment">// the last row is [0 0 0 1]</span></div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; Mat P_Affine = T.inv() * C_tilde * U;</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keywordflow">return</span> P_Affine;</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;};</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;</div>
<div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="namespaceeos_1_1fitting.html#a3e99a34e412f0bb5b2c6568dd37ae413"> 177</a></span>&#160;<span class="keyword">inline</span> cv::Vec2f <a class="code" href="namespaceeos_1_1fitting.html#a3e99a34e412f0bb5b2c6568dd37ae413">project_affine</a>(cv::Vec4f vertex, cv::Mat affine_camera_matrix, <span class="keywordtype">int</span> screen_width, <span class="keywordtype">int</span> screen_height)</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;{</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; <span class="comment">// Transform to clip space:</span></div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; cv::Mat clip_coords = affine_camera_matrix * cv::Mat(vertex);</div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <span class="comment">// Take the x and y coordinates in clip space and apply the window transform:</span></div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; cv::Vec2f screen_coords = <a class="code" href="namespaceeos_1_1render.html#a04bb2f816e97ecb7f33cf8a50328e0db">render::clip_to_screen_space</a>(cv::Vec2f(clip_coords.rowRange(0, 2)), screen_width, screen_height);</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="keywordflow">return</span> screen_coords;</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;};</div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160;</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; } <span class="comment">/* namespace fitting */</span></div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160;} <span class="comment">/* namespace eos */</span></div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;</div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* AFFINECAMERAESTIMATION_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="namespaceeos_1_1fitting_html_afce5f7297094056a04ad26785c94bbd8"><div class="ttname"><a href="namespaceeos_1_1fitting.html#afce5f7297094056a04ad26785c94bbd8">eos::fitting::estimate_affine_camera</a></div><div class="ttdeci">cv::Mat estimate_affine_camera(std::vector&lt; cv::Vec2f &gt; image_points, std::vector&lt; cv::Vec4f &gt; model_points)</div><div class="ttdef"><b>Definition:</b> affine_camera_estimation.hpp:53</div></div>
<div class="ttc" id="namespaceeos_1_1fitting_html_a3e99a34e412f0bb5b2c6568dd37ae413"><div class="ttname"><a href="namespaceeos_1_1fitting.html#a3e99a34e412f0bb5b2c6568dd37ae413">eos::fitting::project_affine</a></div><div class="ttdeci">cv::Vec2f project_affine(cv::Vec4f vertex, cv::Mat affine_camera_matrix, int screen_width, int screen_height)</div><div class="ttdef"><b>Definition:</b> affine_camera_estimation.hpp:177</div></div>
<div class="ttc" id="namespaceeos_html"><div class="ttname"><a href="namespaceeos.html">eos</a></div><div class="ttdoc">Namespace containing all of eos&#39;s 3D model fitting functionality. </div></div>
<div class="ttc" id="namespaceeos_1_1render_html_a04bb2f816e97ecb7f33cf8a50328e0db"><div class="ttname"><a href="namespaceeos_1_1render.html#a04bb2f816e97ecb7f33cf8a50328e0db">eos::render::clip_to_screen_space</a></div><div class="ttdeci">cv::Vec2f clip_to_screen_space(const cv::Vec2f &amp;clip_coordinates, int screen_width, int screen_height)</div><div class="ttdef"><b>Definition:</b> utils.hpp:50</div></div>
</div><!-- fragment --></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: Class 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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 class="current"><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="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<!-- 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 class="header">
<div class="headertitle">
<div class="title">Class List</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><div class="directory">
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span><span onclick="javascript:toggleLevel(3);">3</span>]</div><table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespaceeos.html" target="_self">eos</a></td><td class="desc">Namespace containing all of eos's 3D model fitting functionality </td></tr>
<tr id="row_0_0_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_0_" class="arrow" onclick="toggleFolder('0_0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespaceeos_1_1core.html" target="_self">core</a></td><td class="desc">Essential functions and classes to work with 3D face models and landmarks </td></tr>
<tr id="row_0_0_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structeos_1_1core_1_1_landmark.html" target="_self">Landmark</a></td><td class="desc">Representation of a landmark, consisting of a landmark name and coordinates of the given type. Usually, the type would be <code>cv::Vec2f</code> </td></tr>
<tr id="row_0_0_1_"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html" target="_self">LandmarkMapper</a></td><td class="desc">Represents a mapping from one kind of landmarks to a different format (e.g. model vertices) </td></tr>
<tr id="row_0_1_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_1_" class="arrow" onclick="toggleFolder('0_1_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespaceeos_1_1fitting.html" target="_self">fitting</a></td><td class="desc">Pose and shape fitting of a 3D Morphable Model </td></tr>
<tr id="row_0_1_0_"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structeos_1_1fitting_1_1_frustum.html" target="_self">Frustum</a></td><td class="desc">A class representing a camera viewing frustum. At the moment used as orthographic camera only </td></tr>
<tr id="row_0_1_1_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html" target="_self">OrthographicRenderingParameters</a></td><td class="desc">Represents a set of estimated model parameters (rotation, translation) and camera parameters (viewing frustum) </td></tr>
<tr id="row_0_2_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_2_" class="arrow" onclick="toggleFolder('0_2_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespaceeos_1_1morphablemodel.html" target="_self">morphablemodel</a></td><td class="desc">Functionality to represent a Morphable Model, containing it's PCA models and loading functions </td></tr>
<tr id="row_0_2_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html" target="_self">MorphableModel</a></td><td class="desc">A class representing a 3D Morphable Model, consisting of a shape- and colour (albedo) PCA model </td></tr>
<tr id="row_0_2_1_"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html" target="_self">PcaModel</a></td><td class="desc">This class represents a PCA-model that consists of: </td></tr>
<tr id="row_0_3_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_3_" class="arrow" onclick="toggleFolder('0_3_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespaceeos_1_1render.html" target="_self">render</a></td><td class="desc">3D mesh and texture extraction functionality </td></tr>
<tr id="row_0_3_0_"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structeos_1_1render_1_1_mesh.html" target="_self">Mesh</a></td><td class="desc">This class represents a 3D mesh consisting of vertices, vertex colour information and texture coordinates </td></tr>
<tr id="row_0_3_1_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classeos_1_1render_1_1_texture.html" target="_self">Texture</a></td><td class="desc"></td></tr>
</table>
</div><!-- directory -->
</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.10
</small></address>
</body>
</html>
doc/bc_s.png

676 Bytes

doc/bdwn.png

147 Bytes

<!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.10"/>
<title>eos: 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1core.html">core</a></li><li class="navelem"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html">LandmarkMapper</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">eos::core::LandmarkMapper Member List</div> </div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="classeos_1_1core_1_1_landmark_mapper.html">eos::core::LandmarkMapper</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html#aa0d5463e00e3b8f074b1f81dbd9390a7">convert</a>(std::string landmark_name) const </td><td class="entry"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html">eos::core::LandmarkMapper</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html#ab31ea1ec78c463ce54e2372fce103889">LandmarkMapper</a>()=default</td><td class="entry"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html">eos::core::LandmarkMapper</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html#a7da2756a772bd7dd7708bf20fcc95fc4">LandmarkMapper</a>(boost::filesystem::path filename)</td><td class="entry"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html">eos::core::LandmarkMapper</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html#a7e3a46e6aeb522d96066a3d73f4c92c6">size</a>() const </td><td class="entry"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html">eos::core::LandmarkMapper</a></td><td class="entry"><span class="mlabel">inline</span></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: eos::core::LandmarkMapper 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1core.html">core</a></li><li class="navelem"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html">LandmarkMapper</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classeos_1_1core_1_1_landmark_mapper-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">eos::core::LandmarkMapper Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Represents a mapping from one kind of landmarks to a different format (e.g. model vertices).
<a href="classeos_1_1core_1_1_landmark_mapper.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_landmark_mapper_8hpp_source.html">LandmarkMapper.hpp</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:ab31ea1ec78c463ce54e2372fce103889"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab31ea1ec78c463ce54e2372fce103889"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html#ab31ea1ec78c463ce54e2372fce103889">LandmarkMapper</a> ()=default</td></tr>
<tr class="memdesc:ab31ea1ec78c463ce54e2372fce103889"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a new landmark mapper that performs an identity mapping, that is, its output is the same as the input. <br /></td></tr>
<tr class="separator:ab31ea1ec78c463ce54e2372fce103889"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7da2756a772bd7dd7708bf20fcc95fc4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html#a7da2756a772bd7dd7708bf20fcc95fc4">LandmarkMapper</a> (boost::filesystem::path filename)</td></tr>
<tr class="memdesc:a7da2756a772bd7dd7708bf20fcc95fc4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a new landmark mapper from a file containing mappings from one set of landmark identifiers to another. <a href="#a7da2756a772bd7dd7708bf20fcc95fc4">More...</a><br /></td></tr>
<tr class="separator:a7da2756a772bd7dd7708bf20fcc95fc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0d5463e00e3b8f074b1f81dbd9390a7"><td class="memItemLeft" align="right" valign="top">boost::optional&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html#aa0d5463e00e3b8f074b1f81dbd9390a7">convert</a> (std::string landmark_name) const </td></tr>
<tr class="memdesc:aa0d5463e00e3b8f074b1f81dbd9390a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts the given landmark name to the mapped name. <a href="#aa0d5463e00e3b8f074b1f81dbd9390a7">More...</a><br /></td></tr>
<tr class="separator:aa0d5463e00e3b8f074b1f81dbd9390a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e3a46e6aeb522d96066a3d73f4c92c6"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html#a7e3a46e6aeb522d96066a3d73f4c92c6">size</a> () const </td></tr>
<tr class="memdesc:a7e3a46e6aeb522d96066a3d73f4c92c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of loaded landmark mappings. <a href="#a7e3a46e6aeb522d96066a3d73f4c92c6">More...</a><br /></td></tr>
<tr class="separator:a7e3a46e6aeb522d96066a3d73f4c92c6"><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>Represents a mapping from one kind of landmarks to a different format (e.g. model vertices). </p>
<p>When fitting the 3D model to an image, a correspondence must be known from the 2D image landmarks to 3D vertex points in the Morphable Model. The 3D model defines all its points in the form of vertex ids. These mappings are stored in a file, see the <code>share/</code> folder for an example for mapping 2D ibug landmarks to 3D model vertex indices.</p>
<p>The <a class="el" href="classeos_1_1core_1_1_landmark_mapper.html" title="Represents a mapping from one kind of landmarks to a different format (e.g. model vertices)...">LandmarkMapper</a> thus has two main use cases:</p><ul>
<li>Mapping 2D landmark points to 3D vertices</li>
<li>Converting one set of 2D landmarks into another set of 2D landmarks with different identifiers. </li>
</ul>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7da2756a772bd7dd7708bf20fcc95fc4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">eos::core::LandmarkMapper::LandmarkMapper </td>
<td>(</td>
<td class="paramtype">boost::filesystem::path&#160;</td>
<td class="paramname"><em>filename</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a new landmark mapper from a file containing mappings from one set of landmark identifiers to another. </p>
<p>In case the file contains no mappings, a landmark mapper that performs an identity mapping is constructed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>A file with landmark mappings. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">runtime_error</td><td>if there is an error loading the mappings from the file. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aa0d5463e00e3b8f074b1f81dbd9390a7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">boost::optional&lt;std::string&gt; eos::core::LandmarkMapper::convert </td>
<td>(</td>
<td class="paramtype">std::string&#160;</td>
<td class="paramname"><em>landmark_name</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Converts the given landmark name to the mapped name. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">landmark_name</td><td>A landmark name to convert. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The mapped landmark name if a mapping exists, an empty optional otherwise. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">out_of_range</td><td>exception if there is no mapping for the given landmarkName. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a7e3a46e6aeb522d96066a3d73f4c92c6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">auto eos::core::LandmarkMapper::size </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of loaded landmark mappings. </p>
<dl class="section return"><dt>Returns</dt><dd>The number of landmark mappings. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/eos/core/<a class="el" href="_landmark_mapper_8hpp_source.html">LandmarkMapper.hpp</a></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1morphablemodel.html">morphablemodel</a></li><li class="navelem"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">eos::morphablemodel::MorphableModel Member List</div> </div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a>, including all inherited members.</p>
<table class="directory">
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>cereal::access</b> (defined in <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a>)</td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
<tr><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a5fd1b15edc89e89808339859570a4c09">draw_sample</a>(float shape_sigma=1.0f, float color_sigma=1.0f)</td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a14787e8e29f390277b10f2d0e19aa587">draw_sample</a>(std::vector&lt; float &gt; shape_coefficients, std::vector&lt; float &gt; color_coefficients)</td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a1fff16d5d749831fa90049199101298c">get_color_model</a>() const </td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a43dcaaff84e217ea9643e37705136f31">get_mean</a>() const </td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a990bf9c518307c811691facb8c1daa11">get_shape_model</a>() const </td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#aeffacfcafaf7dff6e21b047a2a6d22ae">get_texture_coordinates</a>() const </td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a253ca65b7f6c6cb48d4abd7b9a7f9a83">has_color_model</a>() const </td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>MorphableModel</b>()=default (defined in <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a>)</td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a438898cd4578c1998e452de7d521f8cc">MorphableModel</a>(PcaModel shape_model, PcaModel color_model, std::vector&lt; cv::Vec2f &gt; texture_coordinates=std::vector&lt; cv::Vec2f &gt;())</td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a></td><td class="entry"><span class="mlabel">inline</span></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: eos::morphablemodel::MorphableModel 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1morphablemodel.html">morphablemodel</a></li><li class="navelem"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classeos_1_1morphablemodel_1_1_morphable_model-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">eos::morphablemodel::MorphableModel Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A class representing a 3D Morphable Model, consisting of a shape- and colour (albedo) PCA model.
<a href="classeos_1_1morphablemodel_1_1_morphable_model.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_morphable_model_8hpp_source.html">MorphableModel.hpp</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:a438898cd4578c1998e452de7d521f8cc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a438898cd4578c1998e452de7d521f8cc">MorphableModel</a> (<a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a> shape_model, <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a> color_model, std::vector&lt; cv::Vec2f &gt; texture_coordinates=std::vector&lt; cv::Vec2f &gt;())</td></tr>
<tr class="separator:a438898cd4578c1998e452de7d521f8cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a990bf9c518307c811691facb8c1daa11"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a990bf9c518307c811691facb8c1daa11">get_shape_model</a> () const </td></tr>
<tr class="separator:a990bf9c518307c811691facb8c1daa11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fff16d5d749831fa90049199101298c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a1fff16d5d749831fa90049199101298c">get_color_model</a> () const </td></tr>
<tr class="separator:a1fff16d5d749831fa90049199101298c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43dcaaff84e217ea9643e37705136f31"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structeos_1_1render_1_1_mesh.html">render::Mesh</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a43dcaaff84e217ea9643e37705136f31">get_mean</a> () const </td></tr>
<tr class="separator:a43dcaaff84e217ea9643e37705136f31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fd1b15edc89e89808339859570a4c09"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structeos_1_1render_1_1_mesh.html">render::Mesh</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a5fd1b15edc89e89808339859570a4c09">draw_sample</a> (float shape_sigma=1.0f, float color_sigma=1.0f)</td></tr>
<tr class="separator:a5fd1b15edc89e89808339859570a4c09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14787e8e29f390277b10f2d0e19aa587"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structeos_1_1render_1_1_mesh.html">render::Mesh</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a14787e8e29f390277b10f2d0e19aa587">draw_sample</a> (std::vector&lt; float &gt; shape_coefficients, std::vector&lt; float &gt; color_coefficients)</td></tr>
<tr class="separator:a14787e8e29f390277b10f2d0e19aa587"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a253ca65b7f6c6cb48d4abd7b9a7f9a83"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a253ca65b7f6c6cb48d4abd7b9a7f9a83">has_color_model</a> () const </td></tr>
<tr class="separator:a253ca65b7f6c6cb48d4abd7b9a7f9a83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeffacfcafaf7dff6e21b047a2a6d22ae"><td class="memItemLeft" align="right" valign="top">std::vector&lt; cv::Vec2f &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#aeffacfcafaf7dff6e21b047a2a6d22ae">get_texture_coordinates</a> () const </td></tr>
<tr class="separator:aeffacfcafaf7dff6e21b047a2a6d22ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:ab2f44cbb59a08132f4c843e5225bba0e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab2f44cbb59a08132f4c843e5225bba0e"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>cereal::access</b></td></tr>
<tr class="separator:ab2f44cbb59a08132f4c843e5225bba0e"><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>A class representing a 3D Morphable Model, consisting of a shape- and colour (albedo) PCA model. </p>
<p>For the general idea of 3DMMs see T. Vetter, V. Blanz, 'A Morphable Model for the Synthesis of 3D Faces', SIGGRAPH 1999. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a438898cd4578c1998e452de7d521f8cc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">eos::morphablemodel::MorphableModel::MorphableModel </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a>&#160;</td>
<td class="paramname"><em>shape_model</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a>&#160;</td>
<td class="paramname"><em>color_model</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::vector&lt; cv::Vec2f &gt;&#160;</td>
<td class="paramname"><em>texture_coordinates</em> = <code>std::vector&lt;cv::Vec2f&gt;()</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a Morphable Model from a shape and a color PCA model, and optional texture coordinates.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape_model</td><td>A PCA model over the shape. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">color_model</td><td>A PCA model over the colour (albedo). </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">texture_coordinates</td><td>Optional texture coordinates for every vertex. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a5fd1b15edc89e89808339859570a4c09"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structeos_1_1render_1_1_mesh.html">render::Mesh</a> eos::morphablemodel::MorphableModel::draw_sample </td>
<td>(</td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>shape_sigma</em> = <code>1.0f</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>color_sigma</em> = <code>1.0f</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Draws a random sample from the model, where the coefficients for the shape- and color models are both drawn from a standard normal (or with the given standard deviation).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape_sigma</td><td>The shape model standard deviation. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">color_sigma</td><td>The color model standard deviation. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A random sample from the model. </dd></dl>
</div>
</div>
<a class="anchor" id="a14787e8e29f390277b10f2d0e19aa587"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structeos_1_1render_1_1_mesh.html">render::Mesh</a> eos::morphablemodel::MorphableModel::draw_sample </td>
<td>(</td>
<td class="paramtype">std::vector&lt; float &gt;&#160;</td>
<td class="paramname"><em>shape_coefficients</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::vector&lt; float &gt;&#160;</td>
<td class="paramname"><em>color_coefficients</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a sample from the model with the given shape- and colour PCA coefficients.</p>
<p>If one of the given vectors is empty, the mean is used. The coefficient vectors should contain normalised, i.e. standard normal distributed coefficients. If the Morphable Model is a shape-only model (without colour model), make sure to leave <code>color_coefficients</code> empty.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape_coefficients</td><td>The PCA coefficients used to generate the shape sample. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">color_coefficients</td><td>The PCA coefficients used to generate the vertex colouring. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A model instance with given coefficients. </dd></dl>
</div>
</div>
<a class="anchor" id="a1fff16d5d749831fa90049199101298c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a> eos::morphablemodel::MorphableModel::get_color_model </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the PCA color (albedo) model of this Morphable Model.</p>
<dl class="section return"><dt>Returns</dt><dd>The color model. </dd></dl>
</div>
</div>
<a class="anchor" id="a43dcaaff84e217ea9643e37705136f31"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structeos_1_1render_1_1_mesh.html">render::Mesh</a> eos::morphablemodel::MorphableModel::get_mean </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the mean of the shape- and color model as a Mesh.</p>
<dl class="section return"><dt>Returns</dt><dd>An mesh instance of the mean of the Morphable Model. </dd></dl>
</div>
</div>
<a class="anchor" id="a990bf9c518307c811691facb8c1daa11"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a> eos::morphablemodel::MorphableModel::get_shape_model </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the PCA shape model of this Morphable Model. as a Mesh.</p>
<dl class="section return"><dt>Returns</dt><dd>The shape model. </dd></dl>
</div>
</div>
<a class="anchor" id="aeffacfcafaf7dff6e21b047a2a6d22ae"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt;cv::Vec2f&gt; eos::morphablemodel::MorphableModel::get_texture_coordinates </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the texture coordinates for all the vertices in the model.</p>
<dl class="section return"><dt>Returns</dt><dd>The texture coordinates for the model vertices. </dd></dl>
</div>
</div>
<a class="anchor" id="a253ca65b7f6c6cb48d4abd7b9a7f9a83"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool eos::morphablemodel::MorphableModel::has_color_model </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if this Morphable Model contains a colour model. Returns false if it is a shape-only model.</p>
<dl class="section return"><dt>Returns</dt><dd>True if the Morphable Model has a colour model (i.e. is not a shape-only model). </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/eos/morphablemodel/<a class="el" href="_morphable_model_8hpp_source.html">MorphableModel.hpp</a></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1morphablemodel.html">morphablemodel</a></li><li class="navelem"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">eos::morphablemodel::PcaModel Member List</div> </div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a>, including all inherited members.</p>
<table class="directory">
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>cereal::access</b> (defined in <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a>)</td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
<tr><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8dfc5fa04f9853f2e06b971b90415538">draw_sample</a>(float sigma=1.0f)</td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#abb5f0c6f86ab0cf9b35016441d877745">draw_sample</a>(std::vector&lt; float &gt; coefficients)</td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d">get_data_dimension</a>() const </td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8315679e0893b1bcde4f9a9aa08a137d">get_eigenvalue</a>(int index) const </td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#af05c96c2a5d3936503b961a9b4238495">get_mean</a>() const </td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a1820ad4e0b9719884811188f3c932592">get_mean_at_point</a>(int vertex_index) const </td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#af0597eb2cf01c98e397773740f3a8258">get_normalised_pca_basis</a>() const </td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a66e4ef89182a98845a8a6804047f2b77">get_normalised_pca_basis</a>(int vertex_id) const </td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a309148e123fc5fecd3cf10513f75b657">get_num_principal_components</a>() const </td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">get_triangle_list</a>() const </td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8d0f31b08aca934b7cf86dd92a1abbe2">get_unnormalised_pca_basis</a>() const </td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a059f3e3f68307fd97b3e4aa38e4b6d34">get_unnormalised_pca_basis</a>(int vertex_id) const </td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>PcaModel</b>() (defined in <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a>)</td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#ab2e45689de5f00a6109ecf00b0625d2f">PcaModel</a>(cv::Mat mean, cv::Mat pca_basis, cv::Mat eigenvalues, std::vector&lt; std::array&lt; int, 3 &gt;&gt; triangle_list)</td><td class="entry"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></td><td class="entry"><span class="mlabel">inline</span></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: eos::morphablemodel::PcaModel 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1morphablemodel.html">morphablemodel</a></li><li class="navelem"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classeos_1_1morphablemodel_1_1_pca_model-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">eos::morphablemodel::PcaModel Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>This class represents a PCA-model that consists of:
<a href="classeos_1_1morphablemodel_1_1_pca_model.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_pca_model_8hpp_source.html">PcaModel.hpp</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:ab2e45689de5f00a6109ecf00b0625d2f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#ab2e45689de5f00a6109ecf00b0625d2f">PcaModel</a> (cv::Mat mean, cv::Mat pca_basis, cv::Mat eigenvalues, std::vector&lt; std::array&lt; int, 3 &gt;&gt; triangle_list)</td></tr>
<tr class="separator:ab2e45689de5f00a6109ecf00b0625d2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a309148e123fc5fecd3cf10513f75b657"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a309148e123fc5fecd3cf10513f75b657">get_num_principal_components</a> () const </td></tr>
<tr class="separator:a309148e123fc5fecd3cf10513f75b657"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdf68d929079eab57ab4990c468a9e0d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d">get_data_dimension</a> () const </td></tr>
<tr class="separator:acdf68d929079eab57ab4990c468a9e0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab14825974f9512ba3b7b88afd2521b3"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::array&lt; int, 3 &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">get_triangle_list</a> () const </td></tr>
<tr class="separator:aab14825974f9512ba3b7b88afd2521b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af05c96c2a5d3936503b961a9b4238495"><td class="memItemLeft" align="right" valign="top">cv::Mat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#af05c96c2a5d3936503b961a9b4238495">get_mean</a> () const </td></tr>
<tr class="separator:af05c96c2a5d3936503b961a9b4238495"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1820ad4e0b9719884811188f3c932592"><td class="memItemLeft" align="right" valign="top">cv::Vec4f&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a1820ad4e0b9719884811188f3c932592">get_mean_at_point</a> (int vertex_index) const </td></tr>
<tr class="separator:a1820ad4e0b9719884811188f3c932592"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8dfc5fa04f9853f2e06b971b90415538"><td class="memItemLeft" align="right" valign="top">cv::Mat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8dfc5fa04f9853f2e06b971b90415538">draw_sample</a> (float sigma=1.0f)</td></tr>
<tr class="separator:a8dfc5fa04f9853f2e06b971b90415538"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb5f0c6f86ab0cf9b35016441d877745"><td class="memItemLeft" align="right" valign="top">cv::Mat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#abb5f0c6f86ab0cf9b35016441d877745">draw_sample</a> (std::vector&lt; float &gt; coefficients)</td></tr>
<tr class="separator:abb5f0c6f86ab0cf9b35016441d877745"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0597eb2cf01c98e397773740f3a8258"><td class="memItemLeft" align="right" valign="top">cv::Mat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#af0597eb2cf01c98e397773740f3a8258">get_normalised_pca_basis</a> () const </td></tr>
<tr class="separator:af0597eb2cf01c98e397773740f3a8258"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66e4ef89182a98845a8a6804047f2b77"><td class="memItemLeft" align="right" valign="top">cv::Mat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a66e4ef89182a98845a8a6804047f2b77">get_normalised_pca_basis</a> (int vertex_id) const </td></tr>
<tr class="separator:a66e4ef89182a98845a8a6804047f2b77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d0f31b08aca934b7cf86dd92a1abbe2"><td class="memItemLeft" align="right" valign="top">cv::Mat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8d0f31b08aca934b7cf86dd92a1abbe2">get_unnormalised_pca_basis</a> () const </td></tr>
<tr class="separator:a8d0f31b08aca934b7cf86dd92a1abbe2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a059f3e3f68307fd97b3e4aa38e4b6d34"><td class="memItemLeft" align="right" valign="top">cv::Mat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a059f3e3f68307fd97b3e4aa38e4b6d34">get_unnormalised_pca_basis</a> (int vertex_id) const </td></tr>
<tr class="separator:a059f3e3f68307fd97b3e4aa38e4b6d34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8315679e0893b1bcde4f9a9aa08a137d"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8315679e0893b1bcde4f9a9aa08a137d">get_eigenvalue</a> (int index) const </td></tr>
<tr class="separator:a8315679e0893b1bcde4f9a9aa08a137d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:ab2f44cbb59a08132f4c843e5225bba0e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab2f44cbb59a08132f4c843e5225bba0e"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>cereal::access</b></td></tr>
<tr class="separator:ab2f44cbb59a08132f4c843e5225bba0e"><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>This class represents a PCA-model that consists of: </p>
<ul>
<li>a mean vector (y x z)</li>
<li>a PCA basis matrix (unnormalised and normalised)</li>
<li>a PCA variance vector.</li>
</ul>
<p>It also contains a list of triangles to built a mesh as well as a mapping from landmark points to the corresponding vertex-id in the mesh. It is able to return instances of the model as meshes. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab2e45689de5f00a6109ecf00b0625d2f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">eos::morphablemodel::PcaModel::PcaModel </td>
<td>(</td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>mean</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>pca_basis</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>eigenvalues</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::vector&lt; std::array&lt; int, 3 &gt;&gt;&#160;</td>
<td class="paramname"><em>triangle_list</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Construct a PCA model from given mean, normalised PCA basis, eigenvalues and triangle list.</p>
<p>See the documentation of the member variables for how the data should be arranged.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">mean</td><td>The mean used to build the PCA model. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pca_basis</td><td>The PCA basis (eigenvectors), normalised (multiplied by the eigenvalues). </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">eigenvalues</td><td>The eigenvalues used to build the PCA model. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">triangle_list</td><td>An index list of how to assemble the mesh. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a8dfc5fa04f9853f2e06b971b90415538"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">cv::Mat eos::morphablemodel::PcaModel::draw_sample </td>
<td>(</td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>sigma</em> = <code>1.0f</code></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Draws a random sample from the model, where the coefficients are drawn from a standard normal (or with the given standard deviation).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">sigma</td><td>The standard deviation. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A random sample from the model. </dd></dl>
</div>
</div>
<a class="anchor" id="abb5f0c6f86ab0cf9b35016441d877745"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">cv::Mat eos::morphablemodel::PcaModel::draw_sample </td>
<td>(</td>
<td class="paramtype">std::vector&lt; float &gt;&#160;</td>
<td class="paramname"><em>coefficients</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a sample from the model with the given PCA coefficients. The given coefficients should follow a standard normal distribution, i.e. not be "normalised" with their eigenvalues/variances.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">coefficients</td><td>The PCA coefficients used to generate the sample. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A model instance with given coefficients. </dd></dl>
</div>
</div>
<a class="anchor" id="acdf68d929079eab57ab4990c468a9e0d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int eos::morphablemodel::PcaModel::get_data_dimension </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the dimension of the data, i.e. the number of shape dimensions.</p>
<p>As the data is arranged in a [x y z x y z ...] fashion, dividing this by three yields the number of vertices in the model.</p>
<dl class="section return"><dt>Returns</dt><dd>The dimension of the data. </dd></dl>
</div>
</div>
<a class="anchor" id="a8315679e0893b1bcde4f9a9aa08a137d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">float eos::morphablemodel::PcaModel::get_eigenvalue </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>index</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns an eigenvalue.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>The index of the eigenvalue to return. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The eigenvalue. </dd></dl>
</div>
</div>
<a class="anchor" id="af05c96c2a5d3936503b961a9b4238495"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">cv::Mat eos::morphablemodel::PcaModel::get_mean </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the mean of the model.</p>
<dl class="section return"><dt>Returns</dt><dd>The mean of the model. </dd></dl>
</div>
</div>
<a class="anchor" id="a1820ad4e0b9719884811188f3c932592"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">cv::Vec4f eos::morphablemodel::PcaModel::get_mean_at_point </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>vertex_index</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the value of the mean at a given vertex id.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">vertex_index</td><td>A vertex id. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A homogeneous vector containing the values at the given vertex id. </dd></dl>
</div>
</div>
<a class="anchor" id="af0597eb2cf01c98e397773740f3a8258"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">cv::Mat eos::morphablemodel::PcaModel::get_normalised_pca_basis </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the PCA basis matrix, i.e. the eigenvectors. Each column of the matrix is an eigenvector. The returned basis is normalised, i.e. every eigenvector is normalised by multiplying it with the square root of its eigenvalue.</p>
<p>Returns a clone of the matrix so that the original cannot be modified. TODO: No, don't return a clone.</p>
<dl class="section return"><dt>Returns</dt><dd>Returns the normalised PCA basis matrix. </dd></dl>
</div>
</div>
<a class="anchor" id="a66e4ef89182a98845a8a6804047f2b77"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">cv::Mat eos::morphablemodel::PcaModel::get_normalised_pca_basis </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>vertex_id</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the PCA basis for a particular vertex. The returned basis is normalised, i.e. every eigenvector is normalised by multiplying it with the square root of its eigenvalue.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">vertex_id</td><td>A vertex index. Make sure it is valid. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A Mat that points to the rows in the original basis. </dd></dl>
</div>
</div>
<a class="anchor" id="a309148e123fc5fecd3cf10513f75b657"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int eos::morphablemodel::PcaModel::get_num_principal_components </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of principal components in the model.</p>
<dl class="section return"><dt>Returns</dt><dd>The number of principal components in the model. </dd></dl>
</div>
</div>
<a class="anchor" id="aab14825974f9512ba3b7b88afd2521b3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt;std::array&lt;int, 3&gt; &gt; eos::morphablemodel::PcaModel::get_triangle_list </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a list of triangles on how to assemble the vertices into a mesh.</p>
<dl class="section return"><dt>Returns</dt><dd>The list of triangles to build a mesh. </dd></dl>
</div>
</div>
<a class="anchor" id="a8d0f31b08aca934b7cf86dd92a1abbe2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">cv::Mat eos::morphablemodel::PcaModel::get_unnormalised_pca_basis </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the PCA basis matrix, i.e. the eigenvectors. Each column of the matrix is an eigenvector. The returned basis is unnormalised, i.e. not scaled by their eigenvalues.</p>
<p>Returns a clone of the matrix so that the original cannot be modified. TODO: No, don't return a clone.</p>
<dl class="section return"><dt>Returns</dt><dd>Returns the unnormalised PCA basis matrix. </dd></dl>
</div>
</div>
<a class="anchor" id="a059f3e3f68307fd97b3e4aa38e4b6d34"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">cv::Mat eos::morphablemodel::PcaModel::get_unnormalised_pca_basis </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>vertex_id</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the PCA basis for a particular vertex. The returned basis is unnormalised, i.e. not scaled by their eigenvalues.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">vertex_id</td><td>A vertex index. Make sure it is valid. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A Mat that points to the rows in the original basis. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/eos/morphablemodel/<a class="el" href="_pca_model_8hpp_source.html">PcaModel.hpp</a></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1render.html">render</a></li><li class="navelem"><a class="el" href="classeos_1_1render_1_1_texture.html">Texture</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">eos::render::Texture Member List</div> </div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="classeos_1_1render_1_1_texture.html">eos::render::Texture</a>, including all inherited members.</p>
<table class="directory">
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>heightLog</b> (defined in <a class="el" href="classeos_1_1render_1_1_texture.html">eos::render::Texture</a>)</td><td class="entry"><a class="el" href="classeos_1_1render_1_1_texture.html">eos::render::Texture</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>mipmaps</b> (defined in <a class="el" href="classeos_1_1render_1_1_texture.html">eos::render::Texture</a>)</td><td class="entry"><a class="el" href="classeos_1_1render_1_1_texture.html">eos::render::Texture</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>mipmaps_num</b> (defined in <a class="el" href="classeos_1_1render_1_1_texture.html">eos::render::Texture</a>)</td><td class="entry"><a class="el" href="classeos_1_1render_1_1_texture.html">eos::render::Texture</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>widthLog</b> (defined in <a class="el" href="classeos_1_1render_1_1_texture.html">eos::render::Texture</a>)</td><td class="entry"><a class="el" href="classeos_1_1render_1_1_texture.html">eos::render::Texture</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: eos::render::Texture 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1render.html">render</a></li><li class="navelem"><a class="el" href="classeos_1_1render_1_1_texture.html">Texture</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classeos_1_1render_1_1_texture-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">eos::render::Texture Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:af8954d614c989fbb218c64ebc95f564c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af8954d614c989fbb218c64ebc95f564c"></a>
std::vector&lt; cv::Mat &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>mipmaps</b></td></tr>
<tr class="separator:af8954d614c989fbb218c64ebc95f564c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e1910f6d0d0901eb5df8586237b13ab"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e1910f6d0d0901eb5df8586237b13ab"></a>
unsigned char&#160;</td><td class="memItemRight" valign="bottom"><b>widthLog</b></td></tr>
<tr class="separator:a7e1910f6d0d0901eb5df8586237b13ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4007a8877dce48c20bce1180c74d887"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad4007a8877dce48c20bce1180c74d887"></a>
unsigned char&#160;</td><td class="memItemRight" valign="bottom"><b>heightLog</b></td></tr>
<tr class="separator:ad4007a8877dce48c20bce1180c74d887"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a267f0430363a6d26ec581d8b1f16ef05"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a267f0430363a6d26ec581d8b1f16ef05"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>mipmaps_num</b></td></tr>
<tr class="separator:a267f0430363a6d26ec581d8b1f16ef05"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/eos/render/<a class="el" href="utils_8hpp_source.html">utils.hpp</a></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: Class Index</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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 class="current"><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<!-- 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 class="header">
<div class="headertitle">
<div class="title">Class Index</div> </div>
</div><!--header-->
<div class="contents">
<div class="qindex"><a class="qindex" href="#letter_F">F</a>&#160;|&#160;<a class="qindex" href="#letter_L">L</a>&#160;|&#160;<a class="qindex" href="#letter_M">M</a>&#160;|&#160;<a class="qindex" href="#letter_O">O</a>&#160;|&#160;<a class="qindex" href="#letter_P">P</a>&#160;|&#160;<a class="qindex" href="#letter_T">T</a></div>
<table style="margin: 10px; white-space: nowrap;" align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
<tr><td rowspan="2" valign="bottom"><a name="letter_F"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;F&#160;&#160;</div></td></tr></table>
</td><td valign="top"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html">LandmarkMapper</a> (<a class="el" href="namespaceeos_1_1core.html">eos::core</a>)&#160;&#160;&#160;</td><td valign="top"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a> (<a class="el" href="namespaceeos_1_1morphablemodel.html">eos::morphablemodel</a>)&#160;&#160;&#160;</td><td rowspan="2" valign="bottom"><a name="letter_P"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;P&#160;&#160;</div></td></tr></table>
</td><td></td></tr>
<tr><td rowspan="2" valign="bottom"><a name="letter_M"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;M&#160;&#160;</div></td></tr></table>
</td><td rowspan="2" valign="bottom"><a name="letter_O"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;O&#160;&#160;</div></td></tr></table>
</td><td></td></tr>
<tr><td valign="top"><a class="el" href="structeos_1_1fitting_1_1_frustum.html">Frustum</a> (<a class="el" href="namespaceeos_1_1fitting.html">eos::fitting</a>)&#160;&#160;&#160;</td><td valign="top"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a> (<a class="el" href="namespaceeos_1_1morphablemodel.html">eos::morphablemodel</a>)&#160;&#160;&#160;</td><td></td></tr>
<tr><td rowspan="2" valign="bottom"><a name="letter_L"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;L&#160;&#160;</div></td></tr></table>
</td><td valign="top"><a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a> (<a class="el" href="namespaceeos_1_1render.html">eos::render</a>)&#160;&#160;&#160;</td><td valign="top"><a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">OrthographicRenderingParameters</a> (<a class="el" href="namespaceeos_1_1fitting.html">eos::fitting</a>)&#160;&#160;&#160;</td><td rowspan="2" valign="bottom"><a name="letter_T"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;T&#160;&#160;</div></td></tr></table>
</td><td></td></tr>
<tr><td></td><td></td><td></td></tr>
<tr><td valign="top"><a class="el" href="structeos_1_1core_1_1_landmark.html">Landmark</a> (<a class="el" href="namespaceeos_1_1core.html">eos::core</a>)&#160;&#160;&#160;</td><td></td><td></td><td valign="top"><a class="el" href="classeos_1_1render_1_1_texture.html">Texture</a> (<a class="el" href="namespaceeos_1_1render.html">eos::render</a>)&#160;&#160;&#160;</td><td></td></tr>
<tr><td></td><td></td><td></td><td></td><td></td></tr>
</table>
<div class="qindex"><a class="qindex" href="#letter_F">F</a>&#160;|&#160;<a class="qindex" href="#letter_L">L</a>&#160;|&#160;<a class="qindex" href="#letter_M">M</a>&#160;|&#160;<a class="qindex" href="#letter_O">O</a>&#160;|&#160;<a class="qindex" href="#letter_P">P</a>&#160;|&#160;<a class="qindex" href="#letter_T">T</a></div>
</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.10
</small></address>
</body>
</html>
doc/closed.png

132 Bytes

<!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.10"/>
<title>eos: include/eos/morphablemodel/io/cvssp.hpp Source File</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_a487f496b1daaab0ce4d44d536b7440b.html">morphablemodel</a></li><li class="navelem"><a class="el" href="dir_98df3b346fc34412198a19044150842b.html">io</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">cvssp.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Eos - A 3D Morphable Model fitting library written in modern C++11/14.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * File: include/eos/morphablemodel/io/cvssp.hpp</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright 2014, 2015 Patrik Huber</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * limitations under the License.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#ifndef IO_CVSSP_HPP_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#define IO_CVSSP_HPP_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &quot;eos/morphablemodel/MorphableModel.hpp&quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &quot;opencv2/core/core.hpp&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#ifdef WIN32</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor"> #define BOOST_ALL_DYN_LINK // Link against the dynamic boost lib. Seems to be necessary because we use /MD, i.e. link to the dynamic CRT.</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor"> #define BOOST_ALL_NO_LIB // Don&#39;t use the automatic library linking by boost with VS2010 (#pragma ...). Instead, we specify everything in cmake.</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#include &quot;boost/filesystem/path.hpp&quot;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> {</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keyword">namespace </span>morphablemodel {</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="comment">// Forward declaration</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;std::vector&lt;cv::Vec2f&gt; <a class="code" href="namespaceeos_1_1morphablemodel.html#afa73fdf5b394458b7e21639ae50d074c">load_isomap</a>(boost::filesystem::path isomap_file);</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="namespaceeos_1_1morphablemodel.html#a0d607b8838d70cd8ec41cb4bfe116f58"> 63</a></span>&#160;<a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a> <a class="code" href="namespaceeos_1_1morphablemodel.html#a0d607b8838d70cd8ec41cb4bfe116f58">load_scm_model</a>(boost::filesystem::path model_filename, boost::filesystem::path isomap_file = boost::filesystem::path())</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;{</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keyword">using</span> cv::Mat;</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="keywordflow">if</span> (<span class="keyword">sizeof</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>) != 4) { <span class="comment">// note/todo: maybe use uint32 or similar instead? Yep, but still we could encounter endianness-trouble.</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; std::cout &lt;&lt; <span class="stringliteral">&quot;Warning: We&#39;re reading 4 Bytes from the file but sizeof(unsigned int) != 4. Check the code/behaviour.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; }</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keywordflow">if</span> (<span class="keyword">sizeof</span>(<span class="keywordtype">double</span>) != 8) {</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; std::cout &lt;&lt; <span class="stringliteral">&quot;Warning: We&#39;re reading 8 Bytes from the file but sizeof(double) != 8. Check the code/behaviour.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; }</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; std::ifstream modelFile(model_filename.string(), std::ios::binary);</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordflow">if</span> (!modelFile.is_open()) {</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; std::string msg(<span class="stringliteral">&quot;Unable to open model file: &quot;</span> + model_filename.string());</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; std::cout &lt;&lt; msg &lt;&lt; std::endl;</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <span class="keywordflow">throw</span> std::runtime_error(msg);</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; }</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="comment">// Reading the shape model</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="comment">// Read (reference?) num triangles and vertices</span></div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numVertices = 0;</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numTriangles = 0;</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;numVertices), 4); <span class="comment">// 1 char = 1 byte. uint32=4bytes. float64=8bytes.</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;numTriangles), 4);</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="comment">// Read triangles</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; std::vector&lt;std::array&lt;int, 3&gt;&gt; triangleList;</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; triangleList.resize(numTriangles);</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> v0, v1, v2;</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; numTriangles; ++i) {</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; v0 = v1 = v2 = 0;</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;v0), 4); <span class="comment">// would be nice to pass a &amp;vector and do it in one</span></div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;v1), 4); <span class="comment">// go, but didn&#39;t work. Maybe a cv::Mat would work?</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;v2), 4);</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; triangleList[i][0] = v0;</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; triangleList[i][1] = v1;</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; triangleList[i][2] = v2;</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; }</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="comment">// Read number of rows and columns of the shape projection matrix (pcaBasis)</span></div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numShapePcaCoeffs = 0;</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numShapeDims = 0; <span class="comment">// dimension of the shape vector (3*numVertices)</span></div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;numShapePcaCoeffs), 4);</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;numShapeDims), 4);</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <span class="keywordflow">if</span> (3 * numVertices != numShapeDims) {</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; std::cout &lt;&lt; <span class="stringliteral">&quot;Warning: Number of shape dimensions is not equal to three times the number of vertices. Something will probably go wrong during the loading.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; }</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="comment">// Read shape projection matrix</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; Mat unnormalisedPcaBasisShape(numShapeDims, numShapePcaCoeffs, CV_32FC1); <span class="comment">// m x n (rows x cols) = numShapeDims x numShapePcaCoeffs</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; std::cout &lt;&lt; <span class="stringliteral">&quot;Loading shape PCA basis matrix with &quot;</span> &lt;&lt; unnormalisedPcaBasisShape.rows &lt;&lt; <span class="stringliteral">&quot; rows and &quot;</span> &lt;&lt; unnormalisedPcaBasisShape.cols &lt;&lt; <span class="stringliteral">&quot; cols.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> col = 0; col &lt; numShapePcaCoeffs; ++col) {</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> row = 0; row &lt; numShapeDims; ++row) {</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="keywordtype">double</span> var = 0.0;</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;var), 8);</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; unnormalisedPcaBasisShape.at&lt;<span class="keywordtype">float</span>&gt;(row, col) = static_cast&lt;float&gt;(var);</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; }</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; }</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; <span class="comment">// Read mean shape vector</span></div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numMean = 0; <span class="comment">// dimension of the mean (3*numVertices)</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;numMean), 4);</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <span class="keywordflow">if</span> (numMean != numShapeDims) {</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; std::cout &lt;&lt; <span class="stringliteral">&quot;Warning: Number of shape dimensions is not equal to the number of dimensions of the mean. Something will probably go wrong during the loading.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; }</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; Mat meanShape(numMean, 1, CV_32FC1);</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> counter = 0;</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="keywordtype">double</span> vd0, vd1, vd2;</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; numMean / 3; ++i) {</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; vd0 = vd1 = vd2 = 0.0;</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;vd0), 8);</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;vd1), 8);</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;vd2), 8);</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; meanShape.at&lt;<span class="keywordtype">float</span>&gt;(counter, 0) = static_cast&lt;float&gt;(vd0);</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; ++counter;</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; meanShape.at&lt;<span class="keywordtype">float</span>&gt;(counter, 0) = static_cast&lt;float&gt;(vd1);</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; ++counter;</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; meanShape.at&lt;<span class="keywordtype">float</span>&gt;(counter, 0) = static_cast&lt;float&gt;(vd2);</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; ++counter;</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; }</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="comment">// Read shape eigenvalues</span></div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numEigenValsShape = 0;</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;numEigenValsShape), 4);</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="keywordflow">if</span> (numEigenValsShape != numShapePcaCoeffs) {</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; std::cout &lt;&lt; <span class="stringliteral">&quot;Warning: Number of coefficients in the PCA basis matrix is not equal to the number of eigenvalues. Something will probably go wrong during the loading.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; }</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; Mat eigenvaluesShape(numEigenValsShape, 1, CV_32FC1);</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; numEigenValsShape; ++i) {</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="keywordtype">double</span> var = 0.0;</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;var), 8);</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; eigenvaluesShape.at&lt;<span class="keywordtype">float</span>&gt;(i, 0) = static_cast&lt;float&gt;(var);</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; }</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="comment">// We read the unnormalised basis from the file. Now let&#39;s normalise it and store the normalised basis separately.</span></div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; Mat normalisedPcaBasisShape = <a class="code" href="namespaceeos_1_1morphablemodel.html#a73d9baeb67f25d4604fc291a23e5e2d8">normalise_pca_basis</a>(unnormalisedPcaBasisShape, eigenvaluesShape);</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a> shapeModel(meanShape, normalisedPcaBasisShape, eigenvaluesShape, triangleList);</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <span class="comment">// Reading the color model</span></div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <span class="comment">// Read number of rows and columns of projection matrix</span></div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numTexturePcaCoeffs = 0;</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numTextureDims = 0;</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;numTexturePcaCoeffs), 4);</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;numTextureDims), 4);</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; <span class="comment">// Read color projection matrix</span></div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; Mat unnormalisedPcaBasisColor(numTextureDims, numTexturePcaCoeffs, CV_32FC1);</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; std::cout &lt;&lt; <span class="stringliteral">&quot;Loading color PCA basis matrix with &quot;</span> &lt;&lt; unnormalisedPcaBasisColor.rows &lt;&lt; <span class="stringliteral">&quot; rows and &quot;</span> &lt;&lt; unnormalisedPcaBasisColor.cols &lt;&lt; <span class="stringliteral">&quot; cols.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> col = 0; col &lt; numTexturePcaCoeffs; ++col) {</div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> row = 0; row &lt; numTextureDims; ++row) {</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <span class="keywordtype">double</span> var = 0.0;</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;var), 8);</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; unnormalisedPcaBasisColor.at&lt;<span class="keywordtype">float</span>&gt;(row, col) = static_cast&lt;float&gt;(var);</div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; }</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; }</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; <span class="comment">// Read mean color vector</span></div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numMeanColor = 0; <span class="comment">// dimension of the mean (3*numVertices)</span></div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;numMeanColor), 4);</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; Mat meanColor(numMeanColor, 1, CV_32FC1);</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; counter = 0;</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; numMeanColor / 3; ++i) {</div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; vd0 = vd1 = vd2 = 0.0;</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;vd0), 8); <span class="comment">// order in hdf5: RGB. Order in OCV: BGR. But order in vertex.color: RGB</span></div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;vd1), 8);</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;vd2), 8);</div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; meanColor.at&lt;<span class="keywordtype">float</span>&gt;(counter, 0) = static_cast&lt;float&gt;(vd0);</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; ++counter;</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; meanColor.at&lt;<span class="keywordtype">float</span>&gt;(counter, 0) = static_cast&lt;float&gt;(vd1);</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; ++counter;</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; meanColor.at&lt;<span class="keywordtype">float</span>&gt;(counter, 0) = static_cast&lt;float&gt;(vd2);</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; ++counter;</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; }</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160;</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; <span class="comment">// Read color eigenvalues</span></div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numEigenValsColor = 0;</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;numEigenValsColor), 4);</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; Mat eigenvaluesColor(numEigenValsColor, 1, CV_32FC1);</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; numEigenValsColor; ++i) {</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; <span class="keywordtype">double</span> var = 0.0;</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; modelFile.read(reinterpret_cast&lt;char*&gt;(&amp;var), 8);</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; eigenvaluesColor.at&lt;<span class="keywordtype">float</span>&gt;(i, 0) = static_cast&lt;float&gt;(var);</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; }</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <span class="comment">// We read the unnormalised basis from the file. Now let&#39;s normalise it and store the normalised basis separately.</span></div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; Mat normalisedPcaBasisColor = <a class="code" href="namespaceeos_1_1morphablemodel.html#a73d9baeb67f25d4604fc291a23e5e2d8">normalise_pca_basis</a>(unnormalisedPcaBasisColor, eigenvaluesColor);</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; <a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a> colorModel(meanColor, normalisedPcaBasisColor, eigenvaluesColor, triangleList);</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160;</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; modelFile.close();</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160;</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; <span class="comment">// Load the isomap with texture coordinates if a filename has been given:</span></div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; std::vector&lt;cv::Vec2f&gt; texCoords;</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; <span class="keywordflow">if</span> (!isomap_file.empty()) {</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; texCoords = <a class="code" href="namespaceeos_1_1morphablemodel.html#afa73fdf5b394458b7e21639ae50d074c">load_isomap</a>(isomap_file);</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; <span class="keywordflow">if</span> (shapeModel.<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d">get_data_dimension</a>() / 3.0f != texCoords.size()) {</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; std::string errorMessage(<span class="stringliteral">&quot;Error, wrong number of texture coordinates. Don&#39;t have the same number of texcoords than the shape model has vertices.&quot;</span>);</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; std::cout &lt;&lt; errorMessage &lt;&lt; std::endl;</div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; <span class="keywordflow">throw</span> std::runtime_error(errorMessage);</div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; }</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; }</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160;</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a>(shapeModel, colorModel, texCoords);</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;};</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;</div>
<div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="namespaceeos_1_1morphablemodel.html#afa73fdf5b394458b7e21639ae50d074c"> 235</a></span>&#160;std::vector&lt;cv::Vec2f&gt; <a class="code" href="namespaceeos_1_1morphablemodel.html#afa73fdf5b394458b7e21639ae50d074c">load_isomap</a>(boost::filesystem::path isomapFile)</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160;{</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; <span class="keyword">using</span> std::string;</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; std::vector&lt;float&gt; xCoords, yCoords;</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; <span class="keywordtype">string</span> line;</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; std::ifstream myfile(isomapFile.string());</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; <span class="keywordflow">if</span> (!myfile.is_open()) {</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; <span class="keywordtype">string</span> logMessage(<span class="stringliteral">&quot;The isomap file could not be opened. Did you specify a correct filename? &quot;</span> + isomapFile.string());</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; <span class="keywordflow">throw</span> std::runtime_error(logMessage);</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; }</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="keywordflow">while</span> (getline(myfile, line))</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; {</div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; std::istringstream iss(line);</div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; <span class="keywordtype">string</span> x, y;</div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; iss &gt;&gt; x &gt;&gt; y;</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; xCoords.push_back(std::stof(x));</div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; yCoords.push_back(std::stof(y));</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; }</div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; myfile.close();</div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; }</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; <span class="comment">// Process the coordinates: Find the min/max and rescale to [0, 1] x [0, 1]</span></div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; <span class="keyword">auto</span> minMaxX = std::minmax_element(begin(xCoords), end(xCoords)); <span class="comment">// minMaxX is a pair, first=min, second=max</span></div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; <span class="keyword">auto</span> minMaxY = std::minmax_element(begin(yCoords), end(yCoords));</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160;</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; std::vector&lt;cv::Vec2f&gt; texCoords;</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; <span class="keywordtype">float</span> divisorX = *minMaxX.second - *minMaxX.first;</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; <span class="keywordtype">float</span> divisorY = *minMaxY.second - *minMaxY.first;</div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; xCoords.size(); ++i) {</div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; texCoords.push_back(cv::Vec2f((xCoords[i] - *minMaxX.first) / divisorX, 1.0f - (yCoords[i] - *minMaxY.first) / divisorY)); <span class="comment">// We rescale to [0, 1] and at the same time flip the y-coords (because in the isomap, the coordinates are stored upside-down).</span></div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; }</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160;</div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; <span class="keywordflow">return</span> texCoords;</div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160;};</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160;</div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; } <span class="comment">/* namespace morphablemodel */</span></div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160;} <span class="comment">/* namespace eos */</span></div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160;</div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* IO_CVSSP_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html">eos::morphablemodel::PcaModel</a></div><div class="ttdoc">This class represents a PCA-model that consists of: </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:54</div></div>
<div class="ttc" id="namespaceeos_1_1morphablemodel_html_a73d9baeb67f25d4604fc291a23e5e2d8"><div class="ttname"><a href="namespaceeos_1_1morphablemodel.html#a73d9baeb67f25d4604fc291a23e5e2d8">eos::morphablemodel::normalise_pca_basis</a></div><div class="ttdeci">cv::Mat normalise_pca_basis(cv::Mat unnormalisedBasis, cv::Mat eigenvalues)</div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:284</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_acdf68d929079eab57ab4990c468a9e0d"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d">eos::morphablemodel::PcaModel::get_data_dimension</a></div><div class="ttdeci">int get_data_dimension() const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:97</div></div>
<div class="ttc" id="namespaceeos_html"><div class="ttname"><a href="namespaceeos.html">eos</a></div><div class="ttdoc">Namespace containing all of eos&#39;s 3D model fitting functionality. </div></div>
<div class="ttc" id="namespaceeos_1_1morphablemodel_html_a0d607b8838d70cd8ec41cb4bfe116f58"><div class="ttname"><a href="namespaceeos_1_1morphablemodel.html#a0d607b8838d70cd8ec41cb4bfe116f58">eos::morphablemodel::load_scm_model</a></div><div class="ttdeci">MorphableModel load_scm_model(boost::filesystem::path model_filename, boost::filesystem::path isomap_file=boost::filesystem::path())</div><div class="ttdef"><b>Definition:</b> cvssp.hpp:63</div></div>
<div class="ttc" id="namespaceeos_1_1morphablemodel_html_afa73fdf5b394458b7e21639ae50d074c"><div class="ttname"><a href="namespaceeos_1_1morphablemodel.html#afa73fdf5b394458b7e21639ae50d074c">eos::morphablemodel::load_isomap</a></div><div class="ttdeci">std::vector&lt; cv::Vec2f &gt; load_isomap(boost::filesystem::path isomap_file)</div><div class="ttdef"><b>Definition:</b> cvssp.hpp:235</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_morphable_model_html"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a></div><div class="ttdoc">A class representing a 3D Morphable Model, consisting of a shape- and colour (albedo) PCA model...</div><div class="ttdef"><b>Definition:</b> MorphableModel.hpp:54</div></div>
</div><!-- fragment --></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: include/eos/fitting Directory 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><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>
<!-- 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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_349d8dd52ed72e674b9a830f9a7a4dcc.html">fitting</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">fitting Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:affine__camera__estimation_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>affine_camera_estimation.hpp</b> <a href="affine__camera__estimation_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:linear__shape__fitting_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>linear_shape_fitting.hpp</b> <a href="linear__shape__fitting_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:nonlinear__camera__estimation_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>nonlinear_camera_estimation.hpp</b> <a href="nonlinear__camera__estimation_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: doc Directory 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><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>
<!-- 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"><a class="el" href="dir_39d1678c1121d0e39c71c772c6b99e50.html">doc</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">doc Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:namespaces_8doxygen"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>namespaces.doxygen</b></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: include/eos/morphablemodel/io Directory 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><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>
<!-- 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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_a487f496b1daaab0ce4d44d536b7440b.html">morphablemodel</a></li><li class="navelem"><a class="el" href="dir_98df3b346fc34412198a19044150842b.html">io</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">io Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:cvssp_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>cvssp.hpp</b> <a href="cvssp_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:mat__cerealisation_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>mat_cerealisation.hpp</b> <a href="mat__cerealisation_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: include/eos/morphablemodel Directory 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><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>
<!-- 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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_a487f496b1daaab0ce4d44d536b7440b.html">morphablemodel</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">morphablemodel Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="subdirs"></a>
Directories</h2></td></tr>
<tr class="memitem:dir_98df3b346fc34412198a19044150842b"><td class="memItemLeft" align="right" valign="top">directory &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_98df3b346fc34412198a19044150842b.html">io</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:_morphable_model_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>MorphableModel.hpp</b> <a href="_morphable_model_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:_pca_model_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>PcaModel.hpp</b> <a href="_pca_model_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: include/eos/core Directory 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><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>
<!-- 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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_bfe318604057f18fe4ea65f858b9b42f.html">core</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">core Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:_landmark_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>Landmark.hpp</b> <a href="_landmark_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:_landmark_mapper_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>LandmarkMapper.hpp</b> <a href="_landmark_mapper_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: include/eos Directory 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><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>
<!-- 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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">eos Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="subdirs"></a>
Directories</h2></td></tr>
<tr class="memitem:dir_bfe318604057f18fe4ea65f858b9b42f"><td class="memItemLeft" align="right" valign="top">directory &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_bfe318604057f18fe4ea65f858b9b42f.html">core</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:dir_349d8dd52ed72e674b9a830f9a7a4dcc"><td class="memItemLeft" align="right" valign="top">directory &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_349d8dd52ed72e674b9a830f9a7a4dcc.html">fitting</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:dir_a487f496b1daaab0ce4d44d536b7440b"><td class="memItemLeft" align="right" valign="top">directory &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_a487f496b1daaab0ce4d44d536b7440b.html">morphablemodel</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:dir_fab380b22e1724065a4c65606be96940"><td class="memItemLeft" align="right" valign="top">directory &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_fab380b22e1724065a4c65606be96940.html">render</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: include Directory 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><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>
<!-- 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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">include Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="subdirs"></a>
Directories</h2></td></tr>
<tr class="memitem:dir_c7ebde285fcef06dba0b090642612638"><td class="memItemLeft" align="right" valign="top">directory &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: include/eos/render Directory 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><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>
<!-- 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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_fab380b22e1724065a4c65606be96940.html">render</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">render Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:_mesh_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>Mesh.hpp</b> <a href="_mesh_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:render_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>render.hpp</b> <a href="render_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:render__affine_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>render_affine.hpp</b> <a href="render__affine_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:texture__extraction_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>texture_extraction.hpp</b> <a href="texture__extraction_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:utils_8hpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>utils.hpp</b> <a href="utils_8hpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</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.10
</small></address>
</body>
</html>
doc/doc.png

746 Bytes

/* The standard CSS for doxygen 1.8.10 */
body, table, div, p, dl {
font: 400 14px/22px Roboto,sans-serif;
}
/* @group Heading Levels */
h1.groupheader {
font-size: 150%;
}
.title {
font: 400 14px/28px Roboto,sans-serif;
font-size: 150%;
font-weight: bold;
margin: 10px 2px;
}
h2.groupheader {
border-bottom: 1px solid #879ECB;
color: #354C7B;
font-size: 150%;
font-weight: normal;
margin-top: 1.75em;
padding-top: 8px;
padding-bottom: 4px;
width: 100%;
}
h3.groupheader {
font-size: 100%;
}
h1, h2, h3, h4, h5, h6 {
-webkit-transition: text-shadow 0.5s linear;
-moz-transition: text-shadow 0.5s linear;
-ms-transition: text-shadow 0.5s linear;
-o-transition: text-shadow 0.5s linear;
transition: text-shadow 0.5s linear;
margin-right: 15px;
}
h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {
text-shadow: 0 0 15px cyan;
}
dt {
font-weight: bold;
}
div.multicol {
-moz-column-gap: 1em;
-webkit-column-gap: 1em;
-moz-column-count: 3;
-webkit-column-count: 3;
}
p.startli, p.startdd {
margin-top: 2px;
}
p.starttd {
margin-top: 0px;
}
p.endli {
margin-bottom: 0px;
}
p.enddd {
margin-bottom: 4px;
}
p.endtd {
margin-bottom: 2px;
}
/* @end */
caption {
font-weight: bold;
}
span.legend {
font-size: 70%;
text-align: center;
}
h3.version {
font-size: 90%;
text-align: center;
}
div.qindex, div.navtab{
background-color: #EBEFF6;
border: 1px solid #A3B4D7;
text-align: center;
}
div.qindex, div.navpath {
width: 100%;
line-height: 140%;
}
div.navtab {
margin-right: 15px;
}
/* @group Link Styling */
a {
color: #3D578C;
font-weight: normal;
text-decoration: none;
}
.contents a:visited {
color: #4665A2;
}
a:hover {
text-decoration: underline;
}
a.qindex {
font-weight: bold;
}
a.qindexHL {
font-weight: bold;
background-color: #9CAFD4;
color: #ffffff;
border: 1px double #869DCA;
}
.contents a.qindexHL:visited {
color: #ffffff;
}
a.el {
font-weight: bold;
}
a.elRef {
}
a.code, a.code:visited, a.line, a.line:visited {
color: #4665A2;
}
a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {
color: #4665A2;
}
/* @end */
dl.el {
margin-left: -1cm;
}
pre.fragment {
border: 1px solid #C4CFE5;
background-color: #FBFCFD;
padding: 4px 6px;
margin: 4px 8px 4px 2px;
overflow: auto;
word-wrap: break-word;
font-size: 9pt;
line-height: 125%;
font-family: monospace, fixed;
font-size: 105%;
}
div.fragment {
padding: 4px 6px;
margin: 4px 8px 4px 2px;
background-color: #FBFCFD;
border: 1px solid #C4CFE5;
}
div.line {
font-family: monospace, fixed;
font-size: 13px;
min-height: 13px;
line-height: 1.0;
text-wrap: unrestricted;
white-space: -moz-pre-wrap; /* Moz */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* CSS3 */
word-wrap: break-word; /* IE 5.5+ */
text-indent: -53px;
padding-left: 53px;
padding-bottom: 0px;
margin: 0px;
-webkit-transition-property: background-color, box-shadow;
-webkit-transition-duration: 0.5s;
-moz-transition-property: background-color, box-shadow;
-moz-transition-duration: 0.5s;
-ms-transition-property: background-color, box-shadow;
-ms-transition-duration: 0.5s;
-o-transition-property: background-color, box-shadow;
-o-transition-duration: 0.5s;
transition-property: background-color, box-shadow;
transition-duration: 0.5s;
}
div.line.glow {
background-color: cyan;
box-shadow: 0 0 10px cyan;
}
span.lineno {
padding-right: 4px;
text-align: right;
border-right: 2px solid #0F0;
background-color: #E8E8E8;
white-space: pre;
}
span.lineno a {
background-color: #D8D8D8;
}
span.lineno a:hover {
background-color: #C8C8C8;
}
div.ah, span.ah {
background-color: black;
font-weight: bold;
color: #ffffff;
margin-bottom: 3px;
margin-top: 3px;
padding: 0.2em;
border: solid thin #333;
border-radius: 0.5em;
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
box-shadow: 2px 2px 3px #999;
-webkit-box-shadow: 2px 2px 3px #999;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
}
div.classindex ul {
list-style: none;
padding-left: 0;
}
div.classindex span.ai {
display: inline-block;
}
div.groupHeader {
margin-left: 16px;
margin-top: 12px;
font-weight: bold;
}
div.groupText {
margin-left: 16px;
font-style: italic;
}
body {
background-color: white;
color: black;
margin: 0;
}
div.contents {
margin-top: 10px;
margin-left: 12px;
margin-right: 8px;
}
td.indexkey {
background-color: #EBEFF6;
font-weight: bold;
border: 1px solid #C4CFE5;
margin: 2px 0px 2px 0;
padding: 2px 10px;
white-space: nowrap;
vertical-align: top;
}
td.indexvalue {
background-color: #EBEFF6;
border: 1px solid #C4CFE5;
padding: 2px 10px;
margin: 2px 0px;
}
tr.memlist {
background-color: #EEF1F7;
}
p.formulaDsp {
text-align: center;
}
img.formulaDsp {
}
img.formulaInl {
vertical-align: middle;
}
div.center {
text-align: center;
margin-top: 0px;
margin-bottom: 0px;
padding: 0px;
}
div.center img {
border: 0px;
}
address.footer {
text-align: right;
padding-right: 12px;
}
img.footer {
border: 0px;
vertical-align: middle;
}
/* @group Code Colorization */
span.keyword {
color: #008000
}
span.keywordtype {
color: #604020
}
span.keywordflow {
color: #e08000
}
span.comment {
color: #800000
}
span.preprocessor {
color: #806020
}
span.stringliteral {
color: #002080
}
span.charliteral {
color: #008080
}
span.vhdldigit {
color: #ff00ff
}
span.vhdlchar {
color: #000000
}
span.vhdlkeyword {
color: #700070
}
span.vhdllogic {
color: #ff0000
}
blockquote {
background-color: #F7F8FB;
border-left: 2px solid #9CAFD4;
margin: 0 24px 0 4px;
padding: 0 12px 0 16px;
}
/* @end */
/*
.search {
color: #003399;
font-weight: bold;
}
form.search {
margin-bottom: 0px;
margin-top: 0px;
}
input.search {
font-size: 75%;
color: #000080;
font-weight: normal;
background-color: #e8eef2;
}
*/
td.tiny {
font-size: 75%;
}
.dirtab {
padding: 4px;
border-collapse: collapse;
border: 1px solid #A3B4D7;
}
th.dirtab {
background: #EBEFF6;
font-weight: bold;
}
hr {
height: 0px;
border: none;
border-top: 1px solid #4A6AAA;
}
hr.footer {
height: 1px;
}
/* @group Member Descriptions */
table.memberdecls {
border-spacing: 0px;
padding: 0px;
}
.memberdecls td, .fieldtable tr {
-webkit-transition-property: background-color, box-shadow;
-webkit-transition-duration: 0.5s;
-moz-transition-property: background-color, box-shadow;
-moz-transition-duration: 0.5s;
-ms-transition-property: background-color, box-shadow;
-ms-transition-duration: 0.5s;
-o-transition-property: background-color, box-shadow;
-o-transition-duration: 0.5s;
transition-property: background-color, box-shadow;
transition-duration: 0.5s;
}
.memberdecls td.glow, .fieldtable tr.glow {
background-color: cyan;
box-shadow: 0 0 15px cyan;
}
.mdescLeft, .mdescRight,
.memItemLeft, .memItemRight,
.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
background-color: #F9FAFC;
border: none;
margin: 4px;
padding: 1px 0 0 8px;
}
.mdescLeft, .mdescRight {
padding: 0px 8px 4px 8px;
color: #555;
}
.memSeparator {
border-bottom: 1px solid #DEE4F0;
line-height: 1px;
margin: 0px;
padding: 0px;
}
.memItemLeft, .memTemplItemLeft {
white-space: nowrap;
}
.memItemRight {
width: 100%;
}
.memTemplParams {
color: #4665A2;
white-space: nowrap;
font-size: 80%;
}
/* @end */
/* @group Member Details */
/* Styles for detailed member documentation */
.memtemplate {
font-size: 80%;
color: #4665A2;
font-weight: normal;
margin-left: 9px;
}
.memnav {
background-color: #EBEFF6;
border: 1px solid #A3B4D7;
text-align: center;
margin: 2px;
margin-right: 15px;
padding: 2px;
}
.mempage {
width: 100%;
}
.memitem {
padding: 0;
margin-bottom: 10px;
margin-right: 5px;
-webkit-transition: box-shadow 0.5s linear;
-moz-transition: box-shadow 0.5s linear;
-ms-transition: box-shadow 0.5s linear;
-o-transition: box-shadow 0.5s linear;
transition: box-shadow 0.5s linear;
display: table !important;
width: 100%;
}
.memitem.glow {
box-shadow: 0 0 15px cyan;
}
.memname {
font-weight: bold;
margin-left: 6px;
}
.memname td {
vertical-align: bottom;
}
.memproto, dl.reflist dt {
border-top: 1px solid #A8B8D9;
border-left: 1px solid #A8B8D9;
border-right: 1px solid #A8B8D9;
padding: 6px 0px 6px 0px;
color: #253555;
font-weight: bold;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
background-image:url('nav_f.png');
background-repeat:repeat-x;
background-color: #E2E8F2;
/* opera specific markup */
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
border-top-right-radius: 4px;
border-top-left-radius: 4px;
/* firefox specific markup */
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
-moz-border-radius-topright: 4px;
-moz-border-radius-topleft: 4px;
/* webkit specific markup */
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-webkit-border-top-right-radius: 4px;
-webkit-border-top-left-radius: 4px;
}
.memdoc, dl.reflist dd {
border-bottom: 1px solid #A8B8D9;
border-left: 1px solid #A8B8D9;
border-right: 1px solid #A8B8D9;
padding: 6px 10px 2px 10px;
background-color: #FBFCFD;
border-top-width: 0;
background-image:url('nav_g.png');
background-repeat:repeat-x;
background-color: #FFFFFF;
/* opera specific markup */
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
/* firefox specific markup */
-moz-border-radius-bottomleft: 4px;
-moz-border-radius-bottomright: 4px;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
/* webkit specific markup */
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
}
dl.reflist dt {
padding: 5px;
}
dl.reflist dd {
margin: 0px 0px 10px 0px;
padding: 5px;
}
.paramkey {
text-align: right;
}
.paramtype {
white-space: nowrap;
}
.paramname {
color: #602020;
white-space: nowrap;
}
.paramname em {
font-style: normal;
}
.paramname code {
line-height: 14px;
}
.params, .retval, .exception, .tparams {
margin-left: 0px;
padding-left: 0px;
}
.params .paramname, .retval .paramname {
font-weight: bold;
vertical-align: top;
}
.params .paramtype {
font-style: italic;
vertical-align: top;
}
.params .paramdir {
font-family: "courier new",courier,monospace;
vertical-align: top;
}
table.mlabels {
border-spacing: 0px;
}
td.mlabels-left {
width: 100%;
padding: 0px;
}
td.mlabels-right {
vertical-align: bottom;
padding: 0px;
white-space: nowrap;
}
span.mlabels {
margin-left: 8px;
}
span.mlabel {
background-color: #728DC1;
border-top:1px solid #5373B4;
border-left:1px solid #5373B4;
border-right:1px solid #C4CFE5;
border-bottom:1px solid #C4CFE5;
text-shadow: none;
color: white;
margin-right: 4px;
padding: 2px 3px;
border-radius: 3px;
font-size: 7pt;
white-space: nowrap;
vertical-align: middle;
}
/* @end */
/* these are for tree view inside a (index) page */
div.directory {
margin: 10px 0px;
border-top: 1px solid #9CAFD4;
border-bottom: 1px solid #9CAFD4;
width: 100%;
}
.directory table {
border-collapse:collapse;
}
.directory td {
margin: 0px;
padding: 0px;
vertical-align: top;
}
.directory td.entry {
white-space: nowrap;
padding-right: 6px;
padding-top: 3px;
}
.directory td.entry a {
outline:none;
}
.directory td.entry a img {
border: none;
}
.directory td.desc {
width: 100%;
padding-left: 6px;
padding-right: 6px;
padding-top: 3px;
border-left: 1px solid rgba(0,0,0,0.05);
}
.directory tr.even {
padding-left: 6px;
background-color: #F7F8FB;
}
.directory img {
vertical-align: -30%;
}
.directory .levels {
white-space: nowrap;
width: 100%;
text-align: right;
font-size: 9pt;
}
.directory .levels span {
cursor: pointer;
padding-left: 2px;
padding-right: 2px;
color: #3D578C;
}
.arrow {
color: #9CAFD4;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: pointer;
font-size: 80%;
display: inline-block;
width: 16px;
height: 22px;
}
.icon {
font-family: Arial, Helvetica;
font-weight: bold;
font-size: 12px;
height: 14px;
width: 16px;
display: inline-block;
background-color: #728DC1;
color: white;
text-align: center;
border-radius: 4px;
margin-left: 2px;
margin-right: 2px;
}
.icona {
width: 24px;
height: 22px;
display: inline-block;
}
.iconfopen {
width: 24px;
height: 18px;
margin-bottom: 4px;
background-image:url('folderopen.png');
background-position: 0px -4px;
background-repeat: repeat-y;
vertical-align:top;
display: inline-block;
}
.iconfclosed {
width: 24px;
height: 18px;
margin-bottom: 4px;
background-image:url('folderclosed.png');
background-position: 0px -4px;
background-repeat: repeat-y;
vertical-align:top;
display: inline-block;
}
.icondoc {
width: 24px;
height: 18px;
margin-bottom: 4px;
background-image:url('doc.png');
background-position: 0px -4px;
background-repeat: repeat-y;
vertical-align:top;
display: inline-block;
}
table.directory {
font: 400 14px Roboto,sans-serif;
}
/* @end */
div.dynheader {
margin-top: 8px;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
address {
font-style: normal;
color: #2A3D61;
}
table.doxtable {
border-collapse:collapse;
margin-top: 4px;
margin-bottom: 4px;
}
table.doxtable td, table.doxtable th {
border: 1px solid #2D4068;
padding: 3px 7px 2px;
}
table.doxtable th {
background-color: #374F7F;
color: #FFFFFF;
font-size: 110%;
padding-bottom: 4px;
padding-top: 5px;
}
table.fieldtable {
/*width: 100%;*/
margin-bottom: 10px;
border: 1px solid #A8B8D9;
border-spacing: 0px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
-webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
}
.fieldtable td, .fieldtable th {
padding: 3px 7px 2px;
}
.fieldtable td.fieldtype, .fieldtable td.fieldname {
white-space: nowrap;
border-right: 1px solid #A8B8D9;
border-bottom: 1px solid #A8B8D9;
vertical-align: top;
}
.fieldtable td.fieldname {
padding-top: 3px;
}
.fieldtable td.fielddoc {
border-bottom: 1px solid #A8B8D9;
/*width: 100%;*/
}
.fieldtable td.fielddoc p:first-child {
margin-top: 0px;
}
.fieldtable td.fielddoc p:last-child {
margin-bottom: 2px;
}
.fieldtable tr:last-child td {
border-bottom: none;
}
.fieldtable th {
background-image:url('nav_f.png');
background-repeat:repeat-x;
background-color: #E2E8F2;
font-size: 90%;
color: #253555;
padding-bottom: 4px;
padding-top: 5px;
text-align:left;
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom: 1px solid #A8B8D9;
}
.tabsearch {
top: 0px;
left: 10px;
height: 36px;
background-image: url('tab_b.png');
z-index: 101;
overflow: hidden;
font-size: 13px;
}
.navpath ul
{
font-size: 11px;
background-image:url('tab_b.png');
background-repeat:repeat-x;
background-position: 0 -5px;
height:30px;
line-height:30px;
color:#8AA0CC;
border:solid 1px #C2CDE4;
overflow:hidden;
margin:0px;
padding:0px;
}
.navpath li
{
list-style-type:none;
float:left;
padding-left:10px;
padding-right:15px;
background-image:url('bc_s.png');
background-repeat:no-repeat;
background-position:right;
color:#364D7C;
}
.navpath li.navelem a
{
height:32px;
display:block;
text-decoration: none;
outline: none;
color: #283A5D;
font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
text-decoration: none;
}
.navpath li.navelem a:hover
{
color:#6884BD;
}
.navpath li.footer
{
list-style-type:none;
float:right;
padding-left:10px;
padding-right:15px;
background-image:none;
background-repeat:no-repeat;
background-position:right;
color:#364D7C;
font-size: 8pt;
}
div.summary
{
float: right;
font-size: 8pt;
padding-right: 5px;
width: 50%;
text-align: right;
}
div.summary a
{
white-space: nowrap;
}
div.ingroups
{
font-size: 8pt;
width: 50%;
text-align: left;
}
div.ingroups a
{
white-space: nowrap;
}
div.header
{
background-image:url('nav_h.png');
background-repeat:repeat-x;
background-color: #F9FAFC;
margin: 0px;
border-bottom: 1px solid #C4CFE5;
}
div.headertitle
{
padding: 5px 5px 5px 10px;
}
dl
{
padding: 0 0 0 10px;
}
/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */
dl.section
{
margin-left: 0px;
padding-left: 0px;
}
dl.note
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #D0C000;
}
dl.warning, dl.attention
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #FF0000;
}
dl.pre, dl.post, dl.invariant
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #00D000;
}
dl.deprecated
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #505050;
}
dl.todo
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #00C0E0;
}
dl.test
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #3030E0;
}
dl.bug
{
margin-left:-7px;
padding-left: 3px;
border-left:4px solid;
border-color: #C08050;
}
dl.section dd {
margin-bottom: 6px;
}
#projectlogo
{
text-align: center;
vertical-align: bottom;
border-collapse: separate;
}
#projectlogo img
{
border: 0px none;
}
#projectalign
{
vertical-align: middle;
}
#projectname
{
font: 300% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 2px 0px;
}
#projectbrief
{
font: 120% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 0px;
}
#projectnumber
{
font: 50% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 0px;
}
#titlearea
{
padding: 0px;
margin: 0px;
width: 100%;
border-bottom: 1px solid #5373B4;
}
.image
{
text-align: center;
}
.dotgraph
{
text-align: center;
}
.mscgraph
{
text-align: center;
}
.diagraph
{
text-align: center;
}
.caption
{
font-weight: bold;
}
div.zoom
{
border: 1px solid #90A5CE;
}
dl.citelist {
margin-bottom:50px;
}
dl.citelist dt {
color:#334975;
float:left;
font-weight:bold;
margin-right:10px;
padding:5px;
}
dl.citelist dd {
margin:2px 0;
padding:5px 0;
}
div.toc {
padding: 14px 25px;
background-color: #F4F6FA;
border: 1px solid #D8DFEE;
border-radius: 7px 7px 7px 7px;
float: right;
height: auto;
margin: 0 20px 10px 10px;
width: 200px;
}
div.toc li {
background: url("bdwn.png") no-repeat scroll 0 5px transparent;
font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;
margin-top: 5px;
padding-left: 10px;
padding-top: 2px;
}
div.toc h3 {
font: bold 12px/1.2 Arial,FreeSans,sans-serif;
color: #4665A2;
border-bottom: 0 none;
margin: 0;
}
div.toc ul {
list-style: none outside none;
border: medium none;
padding: 0px;
}
div.toc li.level1 {
margin-left: 0px;
}
div.toc li.level2 {
margin-left: 15px;
}
div.toc li.level3 {
margin-left: 30px;
}
div.toc li.level4 {
margin-left: 45px;
}
.inherit_header {
font-weight: bold;
color: gray;
cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.inherit_header td {
padding: 6px 0px 2px 5px;
}
.inherit {
display: none;
}
tr.heading h2 {
margin-top: 12px;
margin-bottom: 4px;
}
/* tooltip related style info */
.ttc {
position: absolute;
display: none;
}
#powerTip {
cursor: default;
white-space: nowrap;
background-color: white;
border: 1px solid gray;
border-radius: 4px 4px 4px 4px;
box-shadow: 1px 1px 7px gray;
display: none;
font-size: smaller;
max-width: 80%;
opacity: 0.9;
padding: 1ex 1em 1em;
position: absolute;
z-index: 2147483647;
}
#powerTip div.ttdoc {
color: grey;
font-style: italic;
}
#powerTip div.ttname a {
font-weight: bold;
}
#powerTip div.ttname {
font-weight: bold;
}
#powerTip div.ttdeci {
color: #006318;
}
#powerTip div {
margin: 0px;
padding: 0px;
font: 12px/16px Roboto,sans-serif;
}
#powerTip:before, #powerTip:after {
content: "";
position: absolute;
margin: 0px;
}
#powerTip.n:after, #powerTip.n:before,
#powerTip.s:after, #powerTip.s:before,
#powerTip.w:after, #powerTip.w:before,
#powerTip.e:after, #powerTip.e:before,
#powerTip.ne:after, #powerTip.ne:before,
#powerTip.se:after, #powerTip.se:before,
#powerTip.nw:after, #powerTip.nw:before,
#powerTip.sw:after, #powerTip.sw:before {
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
}
#powerTip.n:after, #powerTip.s:after,
#powerTip.w:after, #powerTip.e:after,
#powerTip.nw:after, #powerTip.ne:after,
#powerTip.sw:after, #powerTip.se:after {
border-color: rgba(255, 255, 255, 0);
}
#powerTip.n:before, #powerTip.s:before,
#powerTip.w:before, #powerTip.e:before,
#powerTip.nw:before, #powerTip.ne:before,
#powerTip.sw:before, #powerTip.se:before {
border-color: rgba(128, 128, 128, 0);
}
#powerTip.n:after, #powerTip.n:before,
#powerTip.ne:after, #powerTip.ne:before,
#powerTip.nw:after, #powerTip.nw:before {
top: 100%;
}
#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after {
border-top-color: #ffffff;
border-width: 10px;
margin: 0px -10px;
}
#powerTip.n:before {
border-top-color: #808080;
border-width: 11px;
margin: 0px -11px;
}
#powerTip.n:after, #powerTip.n:before {
left: 50%;
}
#powerTip.nw:after, #powerTip.nw:before {
right: 14px;
}
#powerTip.ne:after, #powerTip.ne:before {
left: 14px;
}
#powerTip.s:after, #powerTip.s:before,
#powerTip.se:after, #powerTip.se:before,
#powerTip.sw:after, #powerTip.sw:before {
bottom: 100%;
}
#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after {
border-bottom-color: #ffffff;
border-width: 10px;
margin: 0px -10px;
}
#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before {
border-bottom-color: #808080;
border-width: 11px;
margin: 0px -11px;
}
#powerTip.s:after, #powerTip.s:before {
left: 50%;
}
#powerTip.sw:after, #powerTip.sw:before {
right: 14px;
}
#powerTip.se:after, #powerTip.se:before {
left: 14px;
}
#powerTip.e:after, #powerTip.e:before {
left: 100%;
}
#powerTip.e:after {
border-left-color: #ffffff;
border-width: 10px;
top: 50%;
margin-top: -10px;
}
#powerTip.e:before {
border-left-color: #808080;
border-width: 11px;
top: 50%;
margin-top: -11px;
}
#powerTip.w:after, #powerTip.w:before {
right: 100%;
}
#powerTip.w:after {
border-right-color: #ffffff;
border-width: 10px;
top: 50%;
margin-top: -10px;
}
#powerTip.w:before {
border-right-color: #808080;
border-width: 11px;
top: 50%;
margin-top: -11px;
}
@media print
{
#top { display: none; }
#side-nav { display: none; }
#nav-path { display: none; }
body { overflow:visible; }
h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
.summary { display: none; }
.memitem { page-break-inside: avoid; }
#doc-content
{
margin-left:0 !important;
height:auto !important;
width:auto !important;
overflow:inherit;
display:inline;
}
}
function toggleVisibility(linkObj)
{
var base = $(linkObj).attr('id');
var summary = $('#'+base+'-summary');
var content = $('#'+base+'-content');
var trigger = $('#'+base+'-trigger');
var src=$(trigger).attr('src');
if (content.is(':visible')===true) {
content.hide();
summary.show();
$(linkObj).addClass('closed').removeClass('opened');
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
} else {
content.show();
summary.hide();
$(linkObj).removeClass('closed').addClass('opened');
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
}
return false;
}
function updateStripes()
{
$('table.directory tr').
removeClass('even').filter(':visible:even').addClass('even');
}
function toggleLevel(level)
{
$('table.directory tr').each(function() {
var l = this.id.split('_').length-1;
var i = $('#img'+this.id.substring(3));
var a = $('#arr'+this.id.substring(3));
if (l<level+1) {
i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
a.html('&#9660;');
$(this).show();
} else if (l==level+1) {
i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
a.html('&#9658;');
$(this).show();
} else {
$(this).hide();
}
});
updateStripes();
}
function toggleFolder(id)
{
// the clicked row
var currentRow = $('#row_'+id);
// all rows after the clicked row
var rows = currentRow.nextAll("tr");
var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
// only match elements AFTER this one (can't hide elements before)
var childRows = rows.filter(function() { return this.id.match(re); });
// first row is visible we are HIDING
if (childRows.filter(':first').is(':visible')===true) {
// replace down arrow by right arrow for current row
var currentRowSpans = currentRow.find("span");
currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
currentRowSpans.filter(".arrow").html('&#9658;');
rows.filter("[id^=row_"+id+"]").hide(); // hide all children
} else { // we are SHOWING
// replace right arrow by down arrow for current row
var currentRowSpans = currentRow.find("span");
currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
currentRowSpans.filter(".arrow").html('&#9660;');
// replace down arrows by right arrows for child rows
var childRowsSpans = childRows.find("span");
childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
childRowsSpans.filter(".arrow").html('&#9658;');
childRows.show(); //show all children
}
updateStripes();
}
function toggleInherit(id)
{
var rows = $('tr.inherit.'+id);
var img = $('tr.inherit_header.'+id+' img');
var src = $(img).attr('src');
if (rows.filter(':first').is(':visible')===true) {
rows.css('display','none');
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
} else {
rows.css('display','table-row'); // using show() causes jump in firefox
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
}
}
<!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.10"/>
<title>eos: File 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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 class="current"><a href="files.html"><span>File&#160;List</span></a></li>
</ul>
</div>
</div><!-- top -->
<!-- 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 class="header">
<div class="headertitle">
<div class="title">File List</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock">Here is a list of all documented files with brief descriptions:</div><div class="directory">
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span><span onclick="javascript:toggleLevel(3);">3</span><span onclick="javascript:toggleLevel(4);">4</span><span onclick="javascript:toggleLevel(5);">5</span>]</div><table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">&#9660;</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')">&#160;</span><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html" target="_self">include</a></td><td class="desc"></td></tr>
<tr id="row_0_0_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_0_" class="arrow" onclick="toggleFolder('0_0_')">&#9660;</span><span id="img_0_0_" class="iconfopen" onclick="toggleFolder('0_0_')">&#160;</span><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html" target="_self">eos</a></td><td class="desc"></td></tr>
<tr id="row_0_0_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_0_0_0_" class="arrow" onclick="toggleFolder('0_0_0_')">&#9660;</span><span id="img_0_0_0_" class="iconfopen" onclick="toggleFolder('0_0_0_')">&#160;</span><a class="el" href="dir_bfe318604057f18fe4ea65f858b9b42f.html" target="_self">core</a></td><td class="desc"></td></tr>
<tr id="row_0_0_0_0_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><a href="_landmark_8hpp_source.html"><span class="icondoc"></span></a><b>Landmark.hpp</b></td><td class="desc"></td></tr>
<tr id="row_0_0_0_1_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><a href="_landmark_mapper_8hpp_source.html"><span class="icondoc"></span></a><b>LandmarkMapper.hpp</b></td><td class="desc"></td></tr>
<tr id="row_0_0_1_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_0_0_1_" class="arrow" onclick="toggleFolder('0_0_1_')">&#9660;</span><span id="img_0_0_1_" class="iconfopen" onclick="toggleFolder('0_0_1_')">&#160;</span><a class="el" href="dir_349d8dd52ed72e674b9a830f9a7a4dcc.html" target="_self">fitting</a></td><td class="desc"></td></tr>
<tr id="row_0_0_1_0_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><a href="affine__camera__estimation_8hpp_source.html"><span class="icondoc"></span></a><b>affine_camera_estimation.hpp</b></td><td class="desc"></td></tr>
<tr id="row_0_0_1_1_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><a href="linear__shape__fitting_8hpp_source.html"><span class="icondoc"></span></a><b>linear_shape_fitting.hpp</b></td><td class="desc"></td></tr>
<tr id="row_0_0_1_2_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><a href="nonlinear__camera__estimation_8hpp_source.html"><span class="icondoc"></span></a><b>nonlinear_camera_estimation.hpp</b></td><td class="desc"></td></tr>
<tr id="row_0_0_2_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_0_0_2_" class="arrow" onclick="toggleFolder('0_0_2_')">&#9660;</span><span id="img_0_0_2_" class="iconfopen" onclick="toggleFolder('0_0_2_')">&#160;</span><a class="el" href="dir_a487f496b1daaab0ce4d44d536b7440b.html" target="_self">morphablemodel</a></td><td class="desc"></td></tr>
<tr id="row_0_0_2_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span id="arr_0_0_2_0_" class="arrow" onclick="toggleFolder('0_0_2_0_')">&#9660;</span><span id="img_0_0_2_0_" class="iconfopen" onclick="toggleFolder('0_0_2_0_')">&#160;</span><a class="el" href="dir_98df3b346fc34412198a19044150842b.html" target="_self">io</a></td><td class="desc"></td></tr>
<tr id="row_0_0_2_0_0_"><td class="entry"><span style="width:80px;display:inline-block;">&#160;</span><a href="cvssp_8hpp_source.html"><span class="icondoc"></span></a><b>cvssp.hpp</b></td><td class="desc"></td></tr>
<tr id="row_0_0_2_0_1_" class="even"><td class="entry"><span style="width:80px;display:inline-block;">&#160;</span><a href="mat__cerealisation_8hpp_source.html"><span class="icondoc"></span></a><b>mat_cerealisation.hpp</b></td><td class="desc"></td></tr>
<tr id="row_0_0_2_1_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><a href="_morphable_model_8hpp_source.html"><span class="icondoc"></span></a><b>MorphableModel.hpp</b></td><td class="desc"></td></tr>
<tr id="row_0_0_2_2_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><a href="_pca_model_8hpp_source.html"><span class="icondoc"></span></a><b>PcaModel.hpp</b></td><td class="desc"></td></tr>
<tr id="row_0_0_3_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_0_0_3_" class="arrow" onclick="toggleFolder('0_0_3_')">&#9660;</span><span id="img_0_0_3_" class="iconfopen" onclick="toggleFolder('0_0_3_')">&#160;</span><a class="el" href="dir_fab380b22e1724065a4c65606be96940.html" target="_self">render</a></td><td class="desc"></td></tr>
<tr id="row_0_0_3_0_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><a href="_mesh_8hpp_source.html"><span class="icondoc"></span></a><b>Mesh.hpp</b></td><td class="desc"></td></tr>
<tr id="row_0_0_3_1_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><a href="render_8hpp_source.html"><span class="icondoc"></span></a><b>render.hpp</b></td><td class="desc"></td></tr>
<tr id="row_0_0_3_2_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><a href="render__affine_8hpp_source.html"><span class="icondoc"></span></a><b>render_affine.hpp</b></td><td class="desc"></td></tr>
<tr id="row_0_0_3_3_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><a href="texture__extraction_8hpp_source.html"><span class="icondoc"></span></a><b>texture_extraction.hpp</b></td><td class="desc"></td></tr>
<tr id="row_0_0_3_4_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><a href="utils_8hpp_source.html"><span class="icondoc"></span></a><b>utils.hpp</b></td><td class="desc"></td></tr>
</table>
</div><!-- directory -->
</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: Class Members</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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 class="current"><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li class="current"><a href="functions.html"><span>All</span></a></li>
<li><a href="functions_func.html"><span>Functions</span></a></li>
<li><a href="functions_vars.html"><span>Variables</span></a></li>
</ul>
</div>
<div id="navrow4" class="tabs3">
<ul class="tablist">
<li><a href="#index_c"><span>c</span></a></li>
<li><a href="#index_d"><span>d</span></a></li>
<li><a href="#index_g"><span>g</span></a></li>
<li><a href="#index_h"><span>h</span></a></li>
<li><a href="#index_l"><span>l</span></a></li>
<li><a href="#index_m"><span>m</span></a></li>
<li><a href="#index_n"><span>n</span></a></li>
<li><a href="#index_p"><span>p</span></a></li>
<li><a href="#index_s"><span>s</span></a></li>
<li><a href="#index_t"><span>t</span></a></li>
<li class="current"><a href="#index_v"><span>v</span></a></li>
</ul>
</div>
</div><!-- top -->
<!-- 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 class="contents">
<div class="textblock">Here is a list of all documented class members with links to the class documentation for each member:</div>
<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
<li>colors
: <a class="el" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">eos::render::Mesh</a>
</li>
<li>convert()
: <a class="el" href="classeos_1_1core_1_1_landmark_mapper.html#aa0d5463e00e3b8f074b1f81dbd9390a7">eos::core::LandmarkMapper</a>
</li>
<li>coordinates
: <a class="el" href="structeos_1_1core_1_1_landmark.html#aa3ffa0bd40290634e485e3c5ca99229c">eos::core::Landmark&lt; LandmarkType &gt;</a>
</li>
</ul>
<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
<li>draw_sample()
: <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a5fd1b15edc89e89808339859570a4c09">eos::morphablemodel::MorphableModel</a>
, <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8dfc5fa04f9853f2e06b971b90415538">eos::morphablemodel::PcaModel</a>
</li>
</ul>
<h3><a class="anchor" id="index_g"></a>- g -</h3><ul>
<li>get_color_model()
: <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a1fff16d5d749831fa90049199101298c">eos::morphablemodel::MorphableModel</a>
</li>
<li>get_data_dimension()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d">eos::morphablemodel::PcaModel</a>
</li>
<li>get_eigenvalue()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8315679e0893b1bcde4f9a9aa08a137d">eos::morphablemodel::PcaModel</a>
</li>
<li>get_mean()
: <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a43dcaaff84e217ea9643e37705136f31">eos::morphablemodel::MorphableModel</a>
, <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#af05c96c2a5d3936503b961a9b4238495">eos::morphablemodel::PcaModel</a>
</li>
<li>get_mean_at_point()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a1820ad4e0b9719884811188f3c932592">eos::morphablemodel::PcaModel</a>
</li>
<li>get_normalised_pca_basis()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a66e4ef89182a98845a8a6804047f2b77">eos::morphablemodel::PcaModel</a>
</li>
<li>get_num_principal_components()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a309148e123fc5fecd3cf10513f75b657">eos::morphablemodel::PcaModel</a>
</li>
<li>get_shape_model()
: <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a990bf9c518307c811691facb8c1daa11">eos::morphablemodel::MorphableModel</a>
</li>
<li>get_texture_coordinates()
: <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#aeffacfcafaf7dff6e21b047a2a6d22ae">eos::morphablemodel::MorphableModel</a>
</li>
<li>get_triangle_list()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">eos::morphablemodel::PcaModel</a>
</li>
<li>get_unnormalised_pca_basis()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a059f3e3f68307fd97b3e4aa38e4b6d34">eos::morphablemodel::PcaModel</a>
</li>
</ul>
<h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
<li>has_color_model()
: <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a253ca65b7f6c6cb48d4abd7b9a7f9a83">eos::morphablemodel::MorphableModel</a>
</li>
</ul>
<h3><a class="anchor" id="index_l"></a>- l -</h3><ul>
<li>LandmarkMapper()
: <a class="el" href="classeos_1_1core_1_1_landmark_mapper.html#ab31ea1ec78c463ce54e2372fce103889">eos::core::LandmarkMapper</a>
</li>
</ul>
<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
<li>MorphableModel()
: <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a438898cd4578c1998e452de7d521f8cc">eos::morphablemodel::MorphableModel</a>
</li>
</ul>
<h3><a class="anchor" id="index_n"></a>- n -</h3><ul>
<li>name
: <a class="el" href="structeos_1_1core_1_1_landmark.html#a85c0f001e311e994314e900dcb284ad3">eos::core::Landmark&lt; LandmarkType &gt;</a>
</li>
</ul>
<h3><a class="anchor" id="index_p"></a>- p -</h3><ul>
<li>PcaModel()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#ab2e45689de5f00a6109ecf00b0625d2f">eos::morphablemodel::PcaModel</a>
</li>
</ul>
<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
<li>size()
: <a class="el" href="classeos_1_1core_1_1_landmark_mapper.html#a7e3a46e6aeb522d96066a3d73f4c92c6">eos::core::LandmarkMapper</a>
</li>
</ul>
<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
<li>tci
: <a class="el" href="structeos_1_1render_1_1_mesh.html#a81c47a35a1b0a6a6cb440cfbb67b8c28">eos::render::Mesh</a>
</li>
<li>texcoords
: <a class="el" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">eos::render::Mesh</a>
</li>
<li>tvi
: <a class="el" href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">eos::render::Mesh</a>
</li>
</ul>
<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
<li>vertices
: <a class="el" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">eos::render::Mesh</a>
</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: Class Members - Functions</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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 class="current"><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li><a href="functions.html"><span>All</span></a></li>
<li class="current"><a href="functions_func.html"><span>Functions</span></a></li>
<li><a href="functions_vars.html"><span>Variables</span></a></li>
</ul>
</div>
</div><!-- top -->
<!-- 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 class="contents">
&#160;<ul>
<li>convert()
: <a class="el" href="classeos_1_1core_1_1_landmark_mapper.html#aa0d5463e00e3b8f074b1f81dbd9390a7">eos::core::LandmarkMapper</a>
</li>
<li>draw_sample()
: <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a5fd1b15edc89e89808339859570a4c09">eos::morphablemodel::MorphableModel</a>
, <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8dfc5fa04f9853f2e06b971b90415538">eos::morphablemodel::PcaModel</a>
</li>
<li>get_color_model()
: <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a1fff16d5d749831fa90049199101298c">eos::morphablemodel::MorphableModel</a>
</li>
<li>get_data_dimension()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d">eos::morphablemodel::PcaModel</a>
</li>
<li>get_eigenvalue()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8315679e0893b1bcde4f9a9aa08a137d">eos::morphablemodel::PcaModel</a>
</li>
<li>get_mean()
: <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a43dcaaff84e217ea9643e37705136f31">eos::morphablemodel::MorphableModel</a>
, <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#af05c96c2a5d3936503b961a9b4238495">eos::morphablemodel::PcaModel</a>
</li>
<li>get_mean_at_point()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a1820ad4e0b9719884811188f3c932592">eos::morphablemodel::PcaModel</a>
</li>
<li>get_normalised_pca_basis()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#af0597eb2cf01c98e397773740f3a8258">eos::morphablemodel::PcaModel</a>
</li>
<li>get_num_principal_components()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a309148e123fc5fecd3cf10513f75b657">eos::morphablemodel::PcaModel</a>
</li>
<li>get_shape_model()
: <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a990bf9c518307c811691facb8c1daa11">eos::morphablemodel::MorphableModel</a>
</li>
<li>get_texture_coordinates()
: <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#aeffacfcafaf7dff6e21b047a2a6d22ae">eos::morphablemodel::MorphableModel</a>
</li>
<li>get_triangle_list()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3">eos::morphablemodel::PcaModel</a>
</li>
<li>get_unnormalised_pca_basis()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#a8d0f31b08aca934b7cf86dd92a1abbe2">eos::morphablemodel::PcaModel</a>
</li>
<li>has_color_model()
: <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a253ca65b7f6c6cb48d4abd7b9a7f9a83">eos::morphablemodel::MorphableModel</a>
</li>
<li>LandmarkMapper()
: <a class="el" href="classeos_1_1core_1_1_landmark_mapper.html#ab31ea1ec78c463ce54e2372fce103889">eos::core::LandmarkMapper</a>
</li>
<li>MorphableModel()
: <a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a438898cd4578c1998e452de7d521f8cc">eos::morphablemodel::MorphableModel</a>
</li>
<li>PcaModel()
: <a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html#ab2e45689de5f00a6109ecf00b0625d2f">eos::morphablemodel::PcaModel</a>
</li>
<li>size()
: <a class="el" href="classeos_1_1core_1_1_landmark_mapper.html#a7e3a46e6aeb522d96066a3d73f4c92c6">eos::core::LandmarkMapper</a>
</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: Class Members - Variables</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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 class="current"><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li><a href="functions.html"><span>All</span></a></li>
<li><a href="functions_func.html"><span>Functions</span></a></li>
<li class="current"><a href="functions_vars.html"><span>Variables</span></a></li>
</ul>
</div>
</div><!-- top -->
<!-- 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 class="contents">
&#160;<ul>
<li>colors
: <a class="el" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">eos::render::Mesh</a>
</li>
<li>coordinates
: <a class="el" href="structeos_1_1core_1_1_landmark.html#aa3ffa0bd40290634e485e3c5ca99229c">eos::core::Landmark&lt; LandmarkType &gt;</a>
</li>
<li>name
: <a class="el" href="structeos_1_1core_1_1_landmark.html#a85c0f001e311e994314e900dcb284ad3">eos::core::Landmark&lt; LandmarkType &gt;</a>
</li>
<li>tci
: <a class="el" href="structeos_1_1render_1_1_mesh.html#a81c47a35a1b0a6a6cb440cfbb67b8c28">eos::render::Mesh</a>
</li>
<li>texcoords
: <a class="el" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">eos::render::Mesh</a>
</li>
<li>tvi
: <a class="el" href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">eos::render::Mesh</a>
</li>
<li>vertices
: <a class="el" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">eos::render::Mesh</a>
</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: Main Page</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><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><!-- top -->
<!-- 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 class="header">
<div class="headertitle">
<div class="title">eos Documentation</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock">
<p>Eos is a tiny 3D Morphable Model fitting library that provides just the bare minimum to load a model and perform camera and shape fitting. It's written in modern C++11/14.</p>
<p>At the moment, it mainly provides the following functionality:</p>
<ul>
<li>MorphableModel class to represent a 3DMM (using OpenCVs <code>cv::Mat</code>)</li>
<li>Camera pose estimation, implementation of:<ul>
<li>the <em>Gold Standard Algorithm</em> for estimating an affine camera matrix, from Multiple View Geometry, Hartley &amp; Zisserman</li>
<li>a non-linear algorithm that directly estimates the pose angles and camera translation</li>
</ul>
</li>
<li>Shape fitting, implementation of the linear shape-to-landmarks fitting of O. Aldrian &amp; W. Smith, <em>Inverse Rendering of Faces with a 3D Morphable Model</em>, PAMI 2013</li>
<li>Isomap texture extraction to obtain a pose-invariant representation of the face texture.</li>
</ul>
<h2>Usage</h2>
<ul>
<li>Tested with the following compilers: &gt;=gcc-4.8.4, &gt;=clang-3.5, Visual Studio 2015</li>
<li>Needed dependencies for the library: Boost system (&gt;=1.50.0), OpenCV core (&gt;=2.4.3)</li>
</ul>
<p>To use the library in your own project, just add the following directories to your include path:</p>
<ul>
<li><code>eos/include</code></li>
<li><code>eos/3rdparty/cereal-1.1.1/include</code></li>
<li><code>eos/3rdparty/glm-0.9.7.0</code></li>
</ul>
<h3>Build the examples and tests</h3>
<ul>
<li>Needed dependencies for the example app: CMake (&gt;=2.8.10), Boost system, filesystem, program_options (&gt;=1.50.0), OpenCV core, imgproc, highgui (&gt;=2.4.3).</li>
</ul>
<p>To build:</p>
<ul>
<li>copy <code>initial_cache.cmake.template</code> to <code>initial_cache.cmake</code>, edit the necessary paths</li>
<li>create a build directory next to the <code>eos</code> folder: <code>mkdir build; cd build</code></li>
<li><code>cmake -C ../eos/initial_cache.cmake -G "\&lt;your favourite generator\&gt;" ../eos -DCMAKE_INSTALL_PREFIX=../install/</code></li>
<li>build using your favourite tools, e.g. <code>make; make install</code> or open the solution in Visual Studio.</li>
</ul>
<h2>Sample code</h2>
<p>See <a href="https://github.com/patrikhuber/eos/blob/master/examples/fit-model.cpp">examples/fit-model.cpp</a>.</p>
<p>After <code>make install</code> or running the <code>INSTALL</code> target, an example image with landmarks can be found in <code>install/bin/data/</code>. The model and the necessary landmarks mapping file are installed to <code>install/share/</code>.</p>
<p>You can run the example just by running:</p>
<p><code>fit-model</code></p>
<p>Or, by manually specifying the face model, landmark vertex mappings, an image and its 2D landmarks:</p>
<p><code>fit-model -m ../share/sfm_shape_3448.bin -p ../share/ibug2did.txt -i data/image_0010.png -l data/image_0010.pts</code></p>
<p>The output is an <code>obj</code> file with the shape and a <code>png</code> with the extracted isomap. The estimated pose angles and shape coefficients are available in the code via the API.</p>
<h2>Documentation</h2>
<p>The code is fully documented with Doxygen, and an online version of the documentation can be accessed here (todo - add link). Alternatively, an up-to-date version can be built by setting <code>-DBUILD_DOCUMENTATION=on</code> and then building the <code>doc</code> target.</p>
<h2>License &amp; contributions</h2>
<p>This code is licensed under the Apache License, Version 2.0</p>
<p>Contributions are very welcome! (best in the form of pull requests.) Please use Github issues for any bug reports, ideas, and discussions.</p>
<p>If you use this code in your own work, please cite the following paper: <em>Fitting 3D Morphable Models using Local Features</em>, P. Huber, Z. Feng, W. Christmas, J. Kittler, M. Rätsch, IEEE International Conference on Image Processing (ICIP) 2015, Québec City, Canada (<a href="http://arxiv.org/abs/1503.02330">http://arxiv.org/abs/1503.02330</a>). </p>
</div></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.10
</small></address>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
<!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.10"/>
<title>eos: include/eos/fitting/linear_shape_fitting.hpp Source File</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_349d8dd52ed72e674b9a830f9a7a4dcc.html">fitting</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">linear_shape_fitting.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Eos - A 3D Morphable Model fitting library written in modern C++11/14.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * File: include/eos/fitting/linear_shape_fitting.hpp</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright 2014, 2015 Patrik Huber</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * limitations under the License.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#ifndef LINEARSHAPEFITTING_HPP_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#define LINEARSHAPEFITTING_HPP_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &quot;eos/morphablemodel/MorphableModel.hpp&quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment">//#include &quot;Eigen/LU&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &quot;opencv2/core/core.hpp&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;boost/optional.hpp&quot;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor">#include &lt;cassert&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> {</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keyword">namespace </span>fitting {</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="namespaceeos_1_1fitting.html#ae68794185075b5b67fddae9d359cf208"> 60</a></span>&#160;<span class="keyword">inline</span> std::vector&lt;float&gt; <a class="code" href="namespaceeos_1_1fitting.html#ae68794185075b5b67fddae9d359cf208">fit_shape_to_landmarks_linear</a>(<a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html">morphablemodel::MorphableModel</a> morphable_model, cv::Mat affine_camera_matrix, std::vector&lt;cv::Vec2f&gt; landmarks, std::vector&lt;int&gt; vertex_ids, <span class="keywordtype">float</span> lambda=3.0f, boost::optional&lt;int&gt; num_coefficients_to_fit=boost::optional&lt;int&gt;(), boost::optional&lt;float&gt; detector_standard_deviation=boost::optional&lt;float&gt;(), boost::optional&lt;float&gt; model_standard_deviation=boost::optional&lt;float&gt;())</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;{</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keyword">using</span> cv::Mat;</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; assert(landmarks.size() == vertex_ids.size());</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keywordtype">int</span> num_coeffs_to_fit = num_coefficients_to_fit.get_value_or(morphable_model.<a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a990bf9c518307c811691facb8c1daa11">get_shape_model</a>().<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a309148e123fc5fecd3cf10513f75b657">get_num_principal_components</a>());</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="keywordtype">int</span> num_landmarks = <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(landmarks.size());</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <span class="comment">// $\hat{V} \in R^{3N\times m-1}$, subselect the rows of the eigenvector matrix $V$ associated with the $N$ feature points</span></div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="comment">// And we insert a row of zeros after every third row, resulting in matrix $\hat{V}_h \in R^{4N\times m-1}$:</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; Mat V_hat_h = Mat::zeros(4 * num_landmarks, num_coeffs_to_fit, CV_32FC1);</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <span class="keywordtype">int</span> row_index = 0;</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; num_landmarks; ++i) {</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; Mat basis_rows = morphable_model.<a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a990bf9c518307c811691facb8c1daa11">get_shape_model</a>().<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#af0597eb2cf01c98e397773740f3a8258">get_normalised_pca_basis</a>(vertex_ids[i]); <span class="comment">// In the paper, the not-normalised basis might be used? I&#39;m not sure, check it. It&#39;s even a mess in the paper. PH 26.5.2014: I think the normalised basis is fine/better.</span></div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="comment">//basisRows.copyTo(V_hat_h.rowRange(rowIndex, rowIndex + 3));</span></div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; basis_rows.colRange(0, num_coeffs_to_fit).copyTo(V_hat_h.rowRange(row_index, row_index + 3));</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; row_index += 4; <span class="comment">// replace 3 rows and skip the 4th one, it has all zeros</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; }</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="comment">// Form a block diagonal matrix $P \in R^{3N\times 4N}$ in which the camera matrix C (P_Affine, affineCam) is placed on the diagonal:</span></div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; Mat P = Mat::zeros(3 * num_landmarks, 4 * num_landmarks, CV_32FC1);</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; num_landmarks; ++i) {</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; Mat submatrix_to_replace = P.colRange(4 * i, (4 * i) + 4).rowRange(3 * i, (3 * i) + 3);</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; affine_camera_matrix.copyTo(submatrix_to_replace);</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; }</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <span class="comment">// The variances: Add the 2D and 3D standard deviations.</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="comment">// If the user doesn&#39;t provide them, we choose the following:</span></div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="comment">// 2D (detector) standard deviation: In pixel, we follow [1] and choose sqrt(3) as the default value.</span></div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="comment">// 3D (model) variance: 0.0f. It only makes sense to set it to something when we have a different variance for different vertices.</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="comment">// The 3D variance has to be projected to 2D (for details, see paper [1]) so the units do match up.</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keywordtype">float</span> sigma_squared_2D = std::pow(detector_standard_deviation.get_value_or(std::sqrt(3.0f)), 2) + std::pow(model_standard_deviation.get_value_or(0.0f), 2);</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; Mat Sigma = Mat::zeros(3 * num_landmarks, 3 * num_landmarks, CV_32FC1);</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 3 * num_landmarks; ++i) {</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; Sigma.at&lt;<span class="keywordtype">float</span>&gt;(i, i) = 1.0f / std::sqrt(sigma_squared_2D); <span class="comment">// the higher the sigma_squared_2D, the smaller the diagonal entries of Sigma will be</span></div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; }</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; Mat Omega = Sigma.t() * Sigma; <span class="comment">// just squares the diagonal</span></div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <span class="comment">// The landmarks in matrix notation (in homogeneous coordinates), $3N\times 1$</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; Mat y = Mat::ones(3 * num_landmarks, 1, CV_32FC1);</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; num_landmarks; ++i) {</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; y.at&lt;<span class="keywordtype">float</span>&gt;(3 * i, 0) = landmarks[i][0];</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; y.at&lt;<span class="keywordtype">float</span>&gt;((3 * i) + 1, 0) = landmarks[i][1];</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="comment">//y.at&lt;float&gt;((3 * i) + 2, 0) = 1; // already 1, stays (homogeneous coordinate)</span></div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; }</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="comment">// The mean, with an added homogeneous coordinate (x_1, y_1, z_1, 1, x_2, ...)^t</span></div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; Mat v_bar = Mat::ones(4 * num_landmarks, 1, CV_32FC1);</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; num_landmarks; ++i) {</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; cv::Vec4f model_mean = morphable_model.<a class="code" href="classeos_1_1morphablemodel_1_1_morphable_model.html#a990bf9c518307c811691facb8c1daa11">get_shape_model</a>().<a class="code" href="classeos_1_1morphablemodel_1_1_pca_model.html#a1820ad4e0b9719884811188f3c932592">get_mean_at_point</a>(vertex_ids[i]);</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; v_bar.at&lt;<span class="keywordtype">float</span>&gt;(4 * i, 0) = model_mean[0];</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; v_bar.at&lt;<span class="keywordtype">float</span>&gt;((4 * i) + 1, 0) = model_mean[1];</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; v_bar.at&lt;<span class="keywordtype">float</span>&gt;((4 * i) + 2, 0) = model_mean[2];</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="comment">//v_bar.at&lt;float&gt;((4 * i) + 3, 0) = 1; // already 1, stays (homogeneous coordinate)</span></div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="comment">// note: now that a Vec4f is returned, we could use copyTo?</span></div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; }</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="comment">// Bring into standard regularised quadratic form with diagonal distance matrix Omega</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; Mat A = P * V_hat_h; <span class="comment">// camera matrix times the basis</span></div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; Mat b = P * v_bar - y; <span class="comment">// camera matrix times the mean, minus the landmarks.</span></div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="comment">//Mat c_s; // The x, we solve for this! (the variance-normalised shape parameter vector, $c_s = [a_1/sigma_{s,1} , ..., a_m-1/sigma_{s,m-1}]^t$</span></div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="comment">//int numShapePc = morphableModel.getShapeModel().getNumberOfPrincipalComponents();</span></div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="keywordtype">int</span> num_shape_pc = num_coeffs_to_fit;</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; Mat AtOmegaA = A.t() * Omega * A;</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; Mat AtOmegaAReg = AtOmegaA + lambda * Mat::eye(num_shape_pc, num_shape_pc, CV_32FC1);</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="comment">// Invert using OpenCV:</span></div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; Mat AtOmegaARegInv = AtOmegaAReg.inv(cv::DECOMP_SVD); <span class="comment">// DECOMP_SVD calculates the pseudo-inverse if the matrix is not invertible.</span></div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="comment">// Invert (and perform some sanity checks) using Eigen:</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;<span class="comment">/* using RowMajorMatrixXf = Eigen::Matrix&lt;float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor&gt;;</span></div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;<span class="comment"> Eigen::Map&lt;RowMajorMatrixXf&gt; AtOmegaAReg_Eigen(AtOmegaAReg.ptr&lt;float&gt;(), AtOmegaAReg.rows, AtOmegaAReg.cols);</span></div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;<span class="comment"> Eigen::FullPivLU&lt;RowMajorMatrixXf&gt; luOfAtOmegaAReg(AtOmegaAReg_Eigen); // Calculate the full-pivoting LU decomposition of the regularized AtA. Note: We could also try FullPivHouseholderQR if our system is non-minimal (i.e. there are more constraints than unknowns).</span></div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="comment"> auto rankOfAtOmegaAReg = luOfAtOmegaAReg.rank();</span></div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;<span class="comment"> bool isAtOmegaARegInvertible = luOfAtOmegaAReg.isInvertible();</span></div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;<span class="comment"> float threshold = std::abs(luOfAtOmegaAReg.maxPivot()) * luOfAtOmegaAReg.threshold(); // originaly &quot;2 * ...&quot; but I commented it out</span></div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;<span class="comment"> RowMajorMatrixXf AtARegInv_EigenFullLU = luOfAtOmegaAReg.inverse(); // Note: We should use ::solve() instead</span></div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;<span class="comment"> Mat AtOmegaARegInvFullLU(AtARegInv_EigenFullLU.rows(), AtARegInv_EigenFullLU.cols(), CV_32FC1, AtARegInv_EigenFullLU.data()); // create an OpenCV Mat header for the Eigen data</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; Mat AtOmegatb = A.t() * Omega.t() * b;</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; Mat c_s = -AtOmegaARegInv * AtOmegatb; <span class="comment">// Note/Todo: We get coefficients ~ N(0, sigma) I think. They are not multiplied with the eigenvalues.</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="keywordflow">return</span> std::vector&lt;float&gt;(c_s);</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;};</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; } <span class="comment">/* namespace fitting */</span></div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;} <span class="comment">/* namespace eos */</span></div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* LINEARSHAPEFITTING_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_af0597eb2cf01c98e397773740f3a8258"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#af0597eb2cf01c98e397773740f3a8258">eos::morphablemodel::PcaModel::get_normalised_pca_basis</a></div><div class="ttdeci">cv::Mat get_normalised_pca_basis() const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:190</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_a309148e123fc5fecd3cf10513f75b657"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#a309148e123fc5fecd3cf10513f75b657">eos::morphablemodel::PcaModel::get_num_principal_components</a></div><div class="ttdeci">int get_num_principal_components() const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:83</div></div>
<div class="ttc" id="namespaceeos_html"><div class="ttname"><a href="namespaceeos.html">eos</a></div><div class="ttdoc">Namespace containing all of eos&#39;s 3D model fitting functionality. </div></div>
<div class="ttc" id="namespaceeos_1_1fitting_html_ae68794185075b5b67fddae9d359cf208"><div class="ttname"><a href="namespaceeos_1_1fitting.html#ae68794185075b5b67fddae9d359cf208">eos::fitting::fit_shape_to_landmarks_linear</a></div><div class="ttdeci">std::vector&lt; float &gt; fit_shape_to_landmarks_linear(morphablemodel::MorphableModel morphable_model, cv::Mat affine_camera_matrix, std::vector&lt; cv::Vec2f &gt; landmarks, std::vector&lt; int &gt; vertex_ids, float lambda=3.0f, boost::optional&lt; int &gt; num_coefficients_to_fit=boost::optional&lt; int &gt;(), boost::optional&lt; float &gt; detector_standard_deviation=boost::optional&lt; float &gt;(), boost::optional&lt; float &gt; model_standard_deviation=boost::optional&lt; float &gt;())</div><div class="ttdef"><b>Definition:</b> linear_shape_fitting.hpp:60</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_morphable_model_html_a990bf9c518307c811691facb8c1daa11"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_morphable_model.html#a990bf9c518307c811691facb8c1daa11">eos::morphablemodel::MorphableModel::get_shape_model</a></div><div class="ttdeci">PcaModel get_shape_model() const </div><div class="ttdef"><b>Definition:</b> MorphableModel.hpp:77</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_pca_model_html_a1820ad4e0b9719884811188f3c932592"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_pca_model.html#a1820ad4e0b9719884811188f3c932592">eos::morphablemodel::PcaModel::get_mean_at_point</a></div><div class="ttdeci">cv::Vec4f get_mean_at_point(int vertex_index) const </div><div class="ttdef"><b>Definition:</b> PcaModel.hpp:129</div></div>
<div class="ttc" id="classeos_1_1morphablemodel_1_1_morphable_model_html"><div class="ttname"><a href="classeos_1_1morphablemodel_1_1_morphable_model.html">eos::morphablemodel::MorphableModel</a></div><div class="ttdoc">A class representing a 3D Morphable Model, consisting of a shape- and colour (albedo) PCA model...</div><div class="ttdef"><b>Definition:</b> MorphableModel.hpp:54</div></div>
</div><!-- fragment --></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: include/eos/morphablemodel/io/mat_cerealisation.hpp Source File</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_a487f496b1daaab0ce4d44d536b7440b.html">morphablemodel</a></li><li class="navelem"><a class="el" href="dir_98df3b346fc34412198a19044150842b.html">io</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">mat_cerealisation.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * superviseddescent: A C++11 implementation of the supervised descent</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> * optimisation method</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * File: superviseddescent/matcerealisation.hpp</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright 2015 Patrik Huber</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * limitations under the License.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#ifndef MATCEREALISATION_HPP_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#define MATCEREALISATION_HPP_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &quot;cereal/cereal.hpp&quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &quot;opencv2/core/core.hpp&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="namespacecv.html"> 33</a></span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecv.html">cv</a> {</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">class</span> Archive&gt;</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="namespacecv.html#a62cc822cc258c9305ac746d3a832f9d4"> 44</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecv.html#a62cc822cc258c9305ac746d3a832f9d4">save</a>(Archive&amp; ar, <span class="keyword">const</span> cv::Mat&amp; mat)</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;{</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keywordtype">int</span> rows, cols, type;</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <span class="keywordtype">bool</span> continuous;</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; rows = mat.rows;</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; cols = mat.cols;</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; type = mat.type();</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; continuous = mat.isContinuous();</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; ar &amp; rows &amp; cols &amp; type &amp; continuous;</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="keywordflow">if</span> (continuous) {</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> data_size = rows * cols * <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(mat.elemSize());</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="keyword">auto</span> mat_data = cereal::binary_data(mat.ptr(), data_size);</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; ar &amp; mat_data;</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; }</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> row_size = cols * <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(mat.elemSize());</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; rows; i++) {</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keyword">auto</span> row_data = cereal::binary_data(mat.ptr(i), row_size);</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; ar &amp; row_data;</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; }</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; }</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;};</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">class</span> Archive&gt;</div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="namespacecv.html#a7172a20ab6627a1c1967d322bdfc8756"> 79</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecv.html#a7172a20ab6627a1c1967d322bdfc8756">load</a>(Archive&amp; ar, cv::Mat&amp; mat)</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;{</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keywordtype">int</span> rows, cols, type;</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keywordtype">bool</span> continuous;</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; ar &amp; rows &amp; cols &amp; type &amp; continuous;</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keywordflow">if</span> (continuous) {</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; mat.create(rows, cols, type);</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> data_size = rows * cols * <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(mat.elemSize());</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keyword">auto</span> mat_data = cereal::binary_data(mat.ptr(), data_size);</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; ar &amp; mat_data;</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; }</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; mat.create(rows, cols, type);</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> row_size = cols * <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(mat.elemSize());</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; rows; i++) {</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="keyword">auto</span> row_data = cereal::binary_data(mat.ptr(i), row_size);</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; ar &amp; row_data;</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; }</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; }</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;};</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">class</span> Archive&gt;</div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="namespacecv.html#a51eb61cb95a3e45290a030560ac7a2cd"> 109</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacecv.html#a51eb61cb95a3e45290a030560ac7a2cd">serialize</a>(Archive&amp; ar, cv::Vec2f&amp; vec)</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;{</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; ar(vec[0], vec[1]);</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;};</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;}</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* MATCEREALISATION_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="namespacecv_html"><div class="ttname"><a href="namespacecv.html">cv</a></div><div class="ttdoc">Serialisation of OpenCV cv::Mat matrices for the serialisation library cereal (http://uscilab.github.io/cereal/index.html). </div><div class="ttdef"><b>Definition:</b> mat_cerealisation.hpp:33</div></div>
<div class="ttc" id="namespacecv_html_a62cc822cc258c9305ac746d3a832f9d4"><div class="ttname"><a href="namespacecv.html#a62cc822cc258c9305ac746d3a832f9d4">cv::save</a></div><div class="ttdeci">void save(Archive &amp;ar, const cv::Mat &amp;mat)</div><div class="ttdoc">Serialise a cv::Mat using cereal. </div><div class="ttdef"><b>Definition:</b> mat_cerealisation.hpp:44</div></div>
<div class="ttc" id="namespacecv_html_a7172a20ab6627a1c1967d322bdfc8756"><div class="ttname"><a href="namespacecv.html#a7172a20ab6627a1c1967d322bdfc8756">cv::load</a></div><div class="ttdeci">void load(Archive &amp;ar, cv::Mat &amp;mat)</div><div class="ttdoc">De-serialise a cv::Mat using cereal. </div><div class="ttdef"><b>Definition:</b> mat_cerealisation.hpp:79</div></div>
<div class="ttc" id="namespacecv_html_a51eb61cb95a3e45290a030560ac7a2cd"><div class="ttname"><a href="namespacecv.html#a51eb61cb95a3e45290a030560ac7a2cd">cv::serialize</a></div><div class="ttdeci">void serialize(Archive &amp;ar, cv::Vec2f &amp;vec)</div><div class="ttdoc">Serialisation of a cv::Vec2f using cereal. </div><div class="ttdef"><b>Definition:</b> mat_cerealisation.hpp:109</div></div>
</div><!-- fragment --></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: cv Namespace 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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="namespaces.html"><span>Namespaces</span></a></li>
<li><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="namespaces.html"><span>Namespace&#160;List</span></a></li>
<li><a href="namespacemembers.html"><span>Namespace&#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><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">cv Namespace Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Serialisation of OpenCV <code>cv::Mat</code> matrices for the serialisation library cereal (<a href="http://uscilab.github.io/cereal/index.html">http://uscilab.github.io/cereal/index.html</a>).
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a62cc822cc258c9305ac746d3a832f9d4"><td class="memTemplParams" colspan="2">template&lt;class Archive &gt; </td></tr>
<tr class="memitem:a62cc822cc258c9305ac746d3a832f9d4"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacecv.html#a62cc822cc258c9305ac746d3a832f9d4">save</a> (Archive &amp;ar, const cv::Mat &amp;mat)</td></tr>
<tr class="memdesc:a62cc822cc258c9305ac746d3a832f9d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serialise a cv::Mat using cereal. <a href="#a62cc822cc258c9305ac746d3a832f9d4">More...</a><br /></td></tr>
<tr class="separator:a62cc822cc258c9305ac746d3a832f9d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7172a20ab6627a1c1967d322bdfc8756"><td class="memTemplParams" colspan="2">template&lt;class Archive &gt; </td></tr>
<tr class="memitem:a7172a20ab6627a1c1967d322bdfc8756"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacecv.html#a7172a20ab6627a1c1967d322bdfc8756">load</a> (Archive &amp;ar, cv::Mat &amp;mat)</td></tr>
<tr class="memdesc:a7172a20ab6627a1c1967d322bdfc8756"><td class="mdescLeft">&#160;</td><td class="mdescRight">De-serialise a cv::Mat using cereal. <a href="#a7172a20ab6627a1c1967d322bdfc8756">More...</a><br /></td></tr>
<tr class="separator:a7172a20ab6627a1c1967d322bdfc8756"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51eb61cb95a3e45290a030560ac7a2cd"><td class="memTemplParams" colspan="2">template&lt;class Archive &gt; </td></tr>
<tr class="memitem:a51eb61cb95a3e45290a030560ac7a2cd"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacecv.html#a51eb61cb95a3e45290a030560ac7a2cd">serialize</a> (Archive &amp;ar, cv::Vec2f &amp;vec)</td></tr>
<tr class="memdesc:a51eb61cb95a3e45290a030560ac7a2cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serialisation of a cv::Vec2f using cereal. <a href="#a51eb61cb95a3e45290a030560ac7a2cd">More...</a><br /></td></tr>
<tr class="separator:a51eb61cb95a3e45290a030560ac7a2cd"><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>Serialisation of OpenCV <code>cv::Mat</code> matrices for the serialisation library cereal (<a href="http://uscilab.github.io/cereal/index.html">http://uscilab.github.io/cereal/index.html</a>). </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a7172a20ab6627a1c1967d322bdfc8756"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Archive &gt; </div>
<table class="memname">
<tr>
<td class="memname">void cv::load </td>
<td>(</td>
<td class="paramtype">Archive &amp;&#160;</td>
<td class="paramname"><em>ar</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat &amp;&#160;</td>
<td class="paramname"><em>mat</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>De-serialise a cv::Mat using cereal. </p>
<p>Supports all types of matrices as well as non-contiguous ones.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ar</td><td>The archive to deserialise from. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">mat</td><td>The matrix to deserialise into. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a62cc822cc258c9305ac746d3a832f9d4"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Archive &gt; </div>
<table class="memname">
<tr>
<td class="memname">void cv::save </td>
<td>(</td>
<td class="paramtype">Archive &amp;&#160;</td>
<td class="paramname"><em>ar</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cv::Mat &amp;&#160;</td>
<td class="paramname"><em>mat</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Serialise a cv::Mat using cereal. </p>
<p>Supports all types of matrices as well as non-contiguous ones.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ar</td><td>The archive to serialise to. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">mat</td><td>The matrix to serialise. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a51eb61cb95a3e45290a030560ac7a2cd"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Archive &gt; </div>
<table class="memname">
<tr>
<td class="memname">void cv::serialize </td>
<td>(</td>
<td class="paramtype">Archive &amp;&#160;</td>
<td class="paramname"><em>ar</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Vec2f &amp;&#160;</td>
<td class="paramname"><em>vec</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Serialisation of a cv::Vec2f using cereal. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ar</td><td>The archive to (de)serialise. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">vec</td><td>The vector to (de)serialise. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: eos Namespace 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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="namespaces.html"><span>Namespaces</span></a></li>
<li><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="namespaces.html"><span>Namespace&#160;List</span></a></li>
<li><a href="namespacemembers.html"><span>Namespace&#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><!-- top -->
<div class="header">
<div class="summary">
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle">
<div class="title">eos Namespace Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Namespace containing all of eos's 3D model fitting functionality.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespaceeos_1_1core"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1core.html">core</a></td></tr>
<tr class="memdesc:namespaceeos_1_1core"><td class="mdescLeft">&#160;</td><td class="mdescRight">Essential functions and classes to work with 3D face models and landmarks. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:namespaceeos_1_1fitting"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1fitting.html">fitting</a></td></tr>
<tr class="memdesc:namespaceeos_1_1fitting"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pose and shape fitting of a 3D Morphable Model. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:namespaceeos_1_1morphablemodel"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1morphablemodel.html">morphablemodel</a></td></tr>
<tr class="memdesc:namespaceeos_1_1morphablemodel"><td class="mdescLeft">&#160;</td><td class="mdescRight">Functionality to represent a Morphable Model, containing it's PCA models and loading functions. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:namespaceeos_1_1render"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1render.html">render</a></td></tr>
<tr class="memdesc:namespaceeos_1_1render"><td class="mdescLeft">&#160;</td><td class="mdescRight">3D mesh and texture extraction functionality. <br /></td></tr>
<tr class="separator:"><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>Namespace containing all of eos's 3D model fitting functionality. </p>
</div></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: eos::core Namespace 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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="namespaces.html"><span>Namespaces</span></a></li>
<li><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="namespaces.html"><span>Namespace&#160;List</span></a></li>
<li><a href="namespacemembers.html"><span>Namespace&#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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1core.html">core</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">eos::core Namespace Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Essential functions and classes to work with 3D face models and landmarks.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structeos_1_1core_1_1_landmark.html">Landmark</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Representation of a landmark, consisting of a landmark name and coordinates of the given type. Usually, the type would be <code>cv::Vec2f</code>. <a href="structeos_1_1core_1_1_landmark.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1core_1_1_landmark_mapper.html">LandmarkMapper</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Represents a mapping from one kind of landmarks to a different format (e.g. model vertices). <a href="classeos_1_1core_1_1_landmark_mapper.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a6d6a8533690b5860236f55afafa14d2b"><td class="memTemplParams" colspan="2"><a class="anchor" id="a6d6a8533690b5860236f55afafa14d2b"></a>
template&lt;class LandmarkType &gt; </td></tr>
<tr class="memitem:a6d6a8533690b5860236f55afafa14d2b"><td class="memTemplItemLeft" align="right" valign="top">using&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1core.html#a6d6a8533690b5860236f55afafa14d2b">LandmarkCollection</a> = std::vector&lt; <a class="el" href="structeos_1_1core_1_1_landmark.html">Landmark</a>&lt; LandmarkType &gt;&gt;</td></tr>
<tr class="memdesc:a6d6a8533690b5860236f55afafa14d2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">A trivial collection of landmarks that belong together. <br /></td></tr>
<tr class="separator:a6d6a8533690b5860236f55afafa14d2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aacf41dc417a1dbfc929c9cc7f2c7feeb"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:aacf41dc417a1dbfc929c9cc7f2c7feeb"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="namespaceeos_1_1core.html#a6d6a8533690b5860236f55afafa14d2b">LandmarkCollection</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1core.html#aacf41dc417a1dbfc929c9cc7f2c7feeb">filter</a> (const <a class="el" href="namespaceeos_1_1core.html#a6d6a8533690b5860236f55afafa14d2b">LandmarkCollection</a>&lt; T &gt; &amp;landmarks, const std::vector&lt; std::string &gt; &amp;filter)</td></tr>
<tr class="memdesc:aacf41dc417a1dbfc929c9cc7f2c7feeb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Filters the given LandmarkCollection and returns a new LandmarkCollection containing all landmarks whose name matches the one given by <code>filter</code>. <a href="#aacf41dc417a1dbfc929c9cc7f2c7feeb">More...</a><br /></td></tr>
<tr class="separator:aacf41dc417a1dbfc929c9cc7f2c7feeb"><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>Essential functions and classes to work with 3D face models and landmarks. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="aacf41dc417a1dbfc929c9cc7f2c7feeb"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceeos_1_1core.html#a6d6a8533690b5860236f55afafa14d2b">LandmarkCollection</a>&lt;T&gt; eos::core::filter </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="namespaceeos_1_1core.html#a6d6a8533690b5860236f55afafa14d2b">LandmarkCollection</a>&lt; T &gt; &amp;&#160;</td>
<td class="paramname"><em>landmarks</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; std::string &gt; &amp;&#160;</td>
<td class="paramname"><em>filter</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Filters the given LandmarkCollection and returns a new LandmarkCollection containing all landmarks whose name matches the one given by <code>filter</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">landmarks</td><td>The input LandmarkCollection to be filtered. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">filter</td><td>A landmark name (identifier) by which the given LandmarkCollection is filtered. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new, filtered LandmarkCollection. </dd></dl>
</div>
</div>
</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: eos::fitting Namespace 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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="namespaces.html"><span>Namespaces</span></a></li>
<li><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="namespaces.html"><span>Namespace&#160;List</span></a></li>
<li><a href="namespacemembers.html"><span>Namespace&#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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1fitting.html">fitting</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">eos::fitting Namespace Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Pose and shape fitting of a 3D Morphable Model.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structeos_1_1fitting_1_1_frustum.html">Frustum</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A class representing a camera viewing frustum. At the moment used as orthographic camera only. <a href="structeos_1_1fitting_1_1_frustum.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">OrthographicRenderingParameters</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Represents a set of estimated model parameters (rotation, translation) and camera parameters (viewing frustum). <a href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:afce5f7297094056a04ad26785c94bbd8"><td class="memItemLeft" align="right" valign="top">cv::Mat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1fitting.html#afce5f7297094056a04ad26785c94bbd8">estimate_affine_camera</a> (std::vector&lt; cv::Vec2f &gt; image_points, std::vector&lt; cv::Vec4f &gt; model_points)</td></tr>
<tr class="separator:afce5f7297094056a04ad26785c94bbd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e99a34e412f0bb5b2c6568dd37ae413"><td class="memItemLeft" align="right" valign="top">cv::Vec2f&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1fitting.html#a3e99a34e412f0bb5b2c6568dd37ae413">project_affine</a> (cv::Vec4f vertex, cv::Mat affine_camera_matrix, int screen_width, int screen_height)</td></tr>
<tr class="separator:a3e99a34e412f0bb5b2c6568dd37ae413"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae68794185075b5b67fddae9d359cf208"><td class="memItemLeft" align="right" valign="top">std::vector&lt; float &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1fitting.html#ae68794185075b5b67fddae9d359cf208">fit_shape_to_landmarks_linear</a> (<a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">morphablemodel::MorphableModel</a> morphable_model, cv::Mat affine_camera_matrix, std::vector&lt; cv::Vec2f &gt; landmarks, std::vector&lt; int &gt; vertex_ids, float lambda=3.0f, boost::optional&lt; int &gt; num_coefficients_to_fit=boost::optional&lt; int &gt;(), boost::optional&lt; float &gt; detector_standard_deviation=boost::optional&lt; float &gt;(), boost::optional&lt; float &gt; model_standard_deviation=boost::optional&lt; float &gt;())</td></tr>
<tr class="separator:ae68794185075b5b67fddae9d359cf208"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93f7464a6c6dee7b3885638014ec009a"><td class="memItemLeft" align="right" valign="top">cv::Mat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1fitting.html#a93f7464a6c6dee7b3885638014ec009a">to_mat</a> (const glm::mat4x4 &amp;glm_matrix)</td></tr>
<tr class="memdesc:a93f7464a6c6dee7b3885638014ec009a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a glm::mat4x4 to a cv::Mat. <a href="#a93f7464a6c6dee7b3885638014ec009a">More...</a><br /></td></tr>
<tr class="separator:a93f7464a6c6dee7b3885638014ec009a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a503a126cfe1bbd6a7c8b7a786a8e73b8"><td class="memItemLeft" align="right" valign="top">glm::mat4x4&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1fitting.html#a503a126cfe1bbd6a7c8b7a786a8e73b8">get_4x4_modelview_matrix</a> (<a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">fitting::OrthographicRenderingParameters</a> params)</td></tr>
<tr class="memdesc:a503a126cfe1bbd6a7c8b7a786a8e73b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a 4x4 model-view matrix from given fitting parameters. <a href="#a503a126cfe1bbd6a7c8b7a786a8e73b8">More...</a><br /></td></tr>
<tr class="separator:a503a126cfe1bbd6a7c8b7a786a8e73b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af600978a071bc5dc0443cfe41ae613bf"><td class="memItemLeft" align="right" valign="top">cv::Mat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1fitting.html#af600978a071bc5dc0443cfe41ae613bf">get_3x4_affine_camera_matrix</a> (<a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">fitting::OrthographicRenderingParameters</a> params, int width, int height)</td></tr>
<tr class="memdesc:af600978a071bc5dc0443cfe41ae613bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a 3x4 affine camera matrix from given fitting parameters. The matrix transforms points directly from model-space to screen-space. <a href="#af600978a071bc5dc0443cfe41ae613bf">More...</a><br /></td></tr>
<tr class="separator:af600978a071bc5dc0443cfe41ae613bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e713b5555396806a9b26817184eacd0"><td class="memItemLeft" align="right" valign="top">glm::vec4&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1fitting.html#a4e713b5555396806a9b26817184eacd0">get_opencv_viewport</a> (int width, int height)</td></tr>
<tr class="memdesc:a4e713b5555396806a9b26817184eacd0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a glm/OpenGL compatible viewport vector that flips y and has the origin on the top-left, like in OpenCV. <a href="#a4e713b5555396806a9b26817184eacd0">More...</a><br /></td></tr>
<tr class="separator:a4e713b5555396806a9b26817184eacd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aebab65b3f9f46758b1363a347e6de852"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">OrthographicRenderingParameters</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1fitting.html#aebab65b3f9f46758b1363a347e6de852">estimate_orthographic_camera</a> (std::vector&lt; cv::Vec2f &gt; image_points, std::vector&lt; cv::Vec4f &gt; model_points, int width, int height)</td></tr>
<tr class="memdesc:aebab65b3f9f46758b1363a347e6de852"><td class="mdescLeft">&#160;</td><td class="mdescRight">This algorithm estimates the rotation angles and translation of the model, as well as the viewing frustum of the camera, given a set of corresponding 2D-3D points. <a href="#aebab65b3f9f46758b1363a347e6de852">More...</a><br /></td></tr>
<tr class="separator:aebab65b3f9f46758b1363a347e6de852"><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>Pose and shape fitting of a 3D Morphable Model. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="afce5f7297094056a04ad26785c94bbd8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cv::Mat eos::fitting::estimate_affine_camera </td>
<td>(</td>
<td class="paramtype">std::vector&lt; cv::Vec2f &gt;&#160;</td>
<td class="paramname"><em>image_points</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::vector&lt; cv::Vec4f &gt;&#160;</td>
<td class="paramname"><em>model_points</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The Gold Standard Algorithm for estimating an affine camera matrix from world to image correspondences. See Algorithm 7.2 in Multiple View Geometry, Hartley &amp; Zisserman, 2nd Edition, 2003.</p>
<p>Requires &gt;= 4 corresponding points.</p>
<p>The estimated camera matrix works together with <a class="el" href="namespaceeos_1_1render.html#a1adc532475d45d16f7b0c0eddf1bc7cb">render::render_affine(Mesh, cv::Mat, int, int, bool)</a> to for example render the model or extract texture from the image.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">image_points</td><td>A list of 2D image points. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">model_points</td><td>Corresponding points of a 3D model. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A 3x4 affine camera matrix (the third row is [0, 0, 0, 1]). </dd></dl>
</div>
</div>
<a class="anchor" id="aebab65b3f9f46758b1363a347e6de852"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">OrthographicRenderingParameters</a> eos::fitting::estimate_orthographic_camera </td>
<td>(</td>
<td class="paramtype">std::vector&lt; cv::Vec2f &gt;&#160;</td>
<td class="paramname"><em>image_points</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::vector&lt; cv::Vec4f &gt;&#160;</td>
<td class="paramname"><em>model_points</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>height</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This algorithm estimates the rotation angles and translation of the model, as well as the viewing frustum of the camera, given a set of corresponding 2D-3D points. </p>
<p>It assumes an orthographic camera and estimates 6 parameters, [r_x, r_y, r_z, t_x, t_y, frustum_scale], where the first five describe how to transform the model, and the last one describes the cameras viewing frustum (see CameraParameters). This 2D-3D correspondence problem is solved using Eigen's LevenbergMarquardt algorithm.</p>
<p>The method is slightly inspired by "Computer Vision: Models Learning and Inference", Simon J.D. Prince, 2012, but different in a lot of respects.</p>
<p>Eigen's LM implementation requires at least 6 data points, so we require &gt;= 6 corresponding points.</p>
<p>Notes/improvements: The algorithm works reliable as it is, however, it could be improved with the following:</p><ul>
<li>A better initial guess (see e.g. Prince)</li>
<li>Using the analytic derivatives instead of Eigen::NumericalDiff - they're easy to calculate.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">image_points</td><td>A list of 2D image points. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">model_points</td><td>Corresponding points of a 3D model. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Width of the image (or viewport). </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>Height of the image (or viewport). </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The estimated model and camera parameters. </dd></dl>
</div>
</div>
<a class="anchor" id="ae68794185075b5b67fddae9d359cf208"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt;float&gt; eos::fitting::fit_shape_to_landmarks_linear </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">morphablemodel::MorphableModel</a>&#160;</td>
<td class="paramname"><em>morphable_model</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>affine_camera_matrix</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::vector&lt; cv::Vec2f &gt;&#160;</td>
<td class="paramname"><em>landmarks</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::vector&lt; int &gt;&#160;</td>
<td class="paramname"><em>vertex_ids</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>lambda</em> = <code>3.0f</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">boost::optional&lt; int &gt;&#160;</td>
<td class="paramname"><em>num_coefficients_to_fit</em> = <code>boost::optional&lt;int&gt;()</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">boost::optional&lt; float &gt;&#160;</td>
<td class="paramname"><em>detector_standard_deviation</em> = <code>boost::optional&lt;float&gt;()</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">boost::optional&lt; float &gt;&#160;</td>
<td class="paramname"><em>model_standard_deviation</em> = <code>boost::optional&lt;float&gt;()</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Fits the shape of a Morphable Model to given 2D landmarks (i.e. estimates the maximum likelihood solution of the shape coefficients) as proposed in [1]. It's a linear, closed-form solution fitting of the shape, with regularisation (prior towards the mean).</p>
<p>[1] O. Aldrian &amp; W. Smith, Inverse Rendering of Faces with a 3D Morphable Model, PAMI 2013.</p>
<p>Note: Using less than the maximum number of coefficients to fit is not thoroughly tested yet and may contain an error. Note: Returns coefficients following standard normal distribution (i.e. all have similar magnitude). Why? Because we fit using the normalised basis? Note: The standard deviations given should be a vector, i.e. different for each landmark. This is not implemented yet.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">morphable_model</td><td>The Morphable Model whose shape (coefficients) are estimated. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">affine_camera_matrix</td><td>A 3x4 affine camera matrix from model to screen-space (should probably be of type CV_32FC1 as all our calculations are done with float). </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">landmarks</td><td>2D landmarks from an image, given in clip-coordinates. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">vertex_ids</td><td>The vertex ids in the model that correspond to the 2D points. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">lambda</td><td>The regularisation parameter (weight of the prior towards the mean). </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">num_coefficients_to_fit</td><td>How many shape-coefficients to fit (all others will stay 0). Not tested thoroughly. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">detector_standard_deviation</td><td>The standard deviation of the 2D landmarks given (e.g. of the detector used), in pixels. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">model_standard_deviation</td><td>The standard deviation of the 3D vertex points in the 3D model, projected to 2D (so the value is in pixels). </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The estimated shape-coefficients (alphas). </dd></dl>
</div>
</div>
<a class="anchor" id="af600978a071bc5dc0443cfe41ae613bf"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cv::Mat eos::fitting::get_3x4_affine_camera_matrix </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">fitting::OrthographicRenderingParameters</a>&#160;</td>
<td class="paramname"><em>params</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>height</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a 3x4 affine camera matrix from given fitting parameters. The matrix transforms points directly from model-space to screen-space. </p>
<p>This function is mainly used since the linear shape fitting <a class="el" href="namespaceeos_1_1fitting.html#ae68794185075b5b67fddae9d359cf208">fitting::fit_shape_to_landmarks_linear</a> expects one of these 3x4 affine camera matrices, as well as <a class="el" href="namespaceeos_1_1render.html#aafa8c960c3b6eb080da1536cc3634577">render::extract_texture</a>. </p>
</div>
</div>
<a class="anchor" id="a503a126cfe1bbd6a7c8b7a786a8e73b8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">glm::mat4x4 eos::fitting::get_4x4_modelview_matrix </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">fitting::OrthographicRenderingParameters</a>&#160;</td>
<td class="paramname"><em>params</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a 4x4 model-view matrix from given fitting parameters. </p>
<p>Together with the <a class="el" href="structeos_1_1fitting_1_1_frustum.html" title="A class representing a camera viewing frustum. At the moment used as orthographic camera only...">Frustum</a> information, this describes the full orthographic rendering parameters of the OpenGL pipeline. Example:</p>
<div class="fragment"><div class="line">fitting::OrthographicRenderingParameters rendering_params = ...;</div>
<div class="line">glm::mat4x4 view_model = <a class="code" href="namespaceeos_1_1fitting.html#a503a126cfe1bbd6a7c8b7a786a8e73b8">get_4x4_modelview_matrix</a>(rendering_params);</div>
<div class="line">glm::mat4x4 ortho_projection = glm::ortho(rendering_params.frustum.l, rendering_params.frustum.r, rendering_params.frustum.b, rendering_params.frustum.t);</div>
<div class="line">glm::vec4 viewport(0, image.rows, image.cols, -image.rows); <span class="comment">// flips y, origin top-left, like in OpenCV</span></div>
<div class="line"></div>
<div class="line"><span class="comment">// project a point from 3D to 2D:</span></div>
<div class="line">glm::vec3 point_3d = ...; <span class="comment">// from a mesh for example</span></div>
<div class="line">glm::vec3 point_2d = glm::project(point_3d, view_model, ortho_projection, viewport);</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a4e713b5555396806a9b26817184eacd0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">glm::vec4 eos::fitting::get_opencv_viewport </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>height</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a glm/OpenGL compatible viewport vector that flips y and has the origin on the top-left, like in OpenCV. </p>
<p>Note: Move to detail namespace / not used at the moment. </p>
</div>
</div>
<a class="anchor" id="a3e99a34e412f0bb5b2c6568dd37ae413"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">cv::Vec2f eos::fitting::project_affine </td>
<td>(</td>
<td class="paramtype">cv::Vec4f&#160;</td>
<td class="paramname"><em>vertex</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>affine_camera_matrix</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>screen_width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>screen_height</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Projects a point from world coordinates to screen coordinates. First, an estimated affine camera matrix is used to transform the point to clip space. Second, the point is transformed to screen coordinates using the window transform. The window transform also flips the y-axis (the image origin is top-left, while in clip space top is +1 and bottom is -1).</p>
<p>Note: Assumes the affine camera matrix only projects from world to clip space, because a subsequent window transform is applied. #Todo: This is outdated, now that we estimate the matrix from world to screen space directly.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">vertex</td><td>A vertex in 3D space. vertex[3] = 1.0f. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">affine_camera_matrix</td><td>A 3x4 affine camera matrix. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">screen_width</td><td>Width of the screen or window used for projection. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">screen_height</td><td>Height of the screen or window used for projection. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A vector with x and y coordinates transformed to screen coordinates. </dd></dl>
</div>
</div>
<a class="anchor" id="a93f7464a6c6dee7b3885638014ec009a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cv::Mat eos::fitting::to_mat </td>
<td>(</td>
<td class="paramtype">const glm::mat4x4 &amp;&#160;</td>
<td class="paramname"><em>glm_matrix</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Converts a glm::mat4x4 to a cv::Mat. </p>
<p>Note: move to render namespace </p>
</div>
</div>
</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: eos::morphablemodel Namespace 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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="namespaces.html"><span>Namespaces</span></a></li>
<li><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="namespaces.html"><span>Namespace&#160;List</span></a></li>
<li><a href="namespacemembers.html"><span>Namespace&#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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1morphablemodel.html">morphablemodel</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">eos::morphablemodel Namespace Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Functionality to represent a Morphable Model, containing it's PCA models and loading functions.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A class representing a 3D Morphable Model, consisting of a shape- and colour (albedo) PCA model. <a href="classeos_1_1morphablemodel_1_1_morphable_model.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1morphablemodel_1_1_pca_model.html">PcaModel</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">This class represents a PCA-model that consists of: <a href="classeos_1_1morphablemodel_1_1_pca_model.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:afa73fdf5b394458b7e21639ae50d074c"><td class="memItemLeft" align="right" valign="top">std::vector&lt; cv::Vec2f &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1morphablemodel.html#afa73fdf5b394458b7e21639ae50d074c">load_isomap</a> (boost::filesystem::path isomap_file)</td></tr>
<tr class="separator:afa73fdf5b394458b7e21639ae50d074c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d607b8838d70cd8ec41cb4bfe116f58"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1morphablemodel.html#a0d607b8838d70cd8ec41cb4bfe116f58">load_scm_model</a> (boost::filesystem::path model_filename, boost::filesystem::path isomap_file=boost::filesystem::path())</td></tr>
<tr class="separator:a0d607b8838d70cd8ec41cb4bfe116f58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0da6e35ec49f1ebdf55f9596540cf8f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1morphablemodel.html#a0da6e35ec49f1ebdf55f9596540cf8f8">load_model</a> (std::string filename)</td></tr>
<tr class="separator:a0da6e35ec49f1ebdf55f9596540cf8f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad09e0fd0788cb7fea41ed799c653e71"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1morphablemodel.html#aad09e0fd0788cb7fea41ed799c653e71">save_model</a> (<a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a> model, std::string filename)</td></tr>
<tr class="separator:aad09e0fd0788cb7fea41ed799c653e71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73d9baeb67f25d4604fc291a23e5e2d8"><td class="memItemLeft" align="right" valign="top">cv::Mat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1morphablemodel.html#a73d9baeb67f25d4604fc291a23e5e2d8">normalise_pca_basis</a> (cv::Mat unnormalisedBasis, cv::Mat eigenvalues)</td></tr>
<tr class="separator:a73d9baeb67f25d4604fc291a23e5e2d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d9ed5fa969cbd540ebe9587540f3607"><td class="memItemLeft" align="right" valign="top">cv::Mat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1morphablemodel.html#a3d9ed5fa969cbd540ebe9587540f3607">unnormalise_pca_basis</a> (cv::Mat normalisedBasis, cv::Mat eigenvalues)</td></tr>
<tr class="separator:a3d9ed5fa969cbd540ebe9587540f3607"><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>Functionality to represent a Morphable Model, containing it's PCA models and loading functions. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="afa73fdf5b394458b7e21639ae50d074c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; cv::Vec2f &gt; eos::morphablemodel::load_isomap </td>
<td>(</td>
<td class="paramtype">boost::filesystem::path&#160;</td>
<td class="paramname"><em>isomapFile</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load a set of 2D texture coordinates pre-generated by the isomap algorithm. After loading, we rescale the coordinates to [0, 1] x [0, 1].</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">isomapFile</td><td>Path to an isomap file containing texture coordinates. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The 2D texture coordinates for every vertex. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">...</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a0da6e35ec49f1ebdf55f9596540cf8f8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a> eos::morphablemodel::load_model </td>
<td>(</td>
<td class="paramtype">std::string&#160;</td>
<td class="paramname"><em>filename</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Helper method to load a Morphable Model from a cereal::BinaryInputArchive from the harddisk.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>Filename to a model. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The loaded Morphable Model. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">std::runtime_error</td><td>When the file given in <code>filename</code> fails to be opened (most likely because the file doesn't exist). </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a0d607b8838d70cd8ec41cb4bfe116f58"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a> eos::morphablemodel::load_scm_model </td>
<td>(</td>
<td class="paramtype">boost::filesystem::path&#160;</td>
<td class="paramname"><em>model_filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">boost::filesystem::path&#160;</td>
<td class="paramname"><em>isomap_file</em> = <code>boost::filesystem::path()</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load a shape or color model from a .scm file containing a Morphable Model in the Surrey format. CVSSP's software internally trains and stores the model in this custom binary format and this class provides means to load them.</p>
<p>Note on multi-resolution models: The landmarks to vertex-id mapping is always the same. The lowest resolution model has all the landmarks defined and for the higher resolutions, the mesh is divided from that on. Note: For new landmarks we add, this might not be the case if we add them in the highest resolution model, so take care!</p>
<ul>
<li>The pcaBasis matrix stored in the file and loaded is the orthogonal PCA basis, i.e. it is not normalised by the eigenvalues.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">model_filename</td><td>A binary .scm-file containing the model. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">isomap_file</td><td>An optional path to an isomap containing texture coordinates. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The Morphable Model loaded from the file. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">...</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a73d9baeb67f25d4604fc291a23e5e2d8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">cv::Mat eos::morphablemodel::normalise_pca_basis </td>
<td>(</td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>unnormalised_basis</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>eigenvalues</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Takes an unnormalised PCA basis matrix (a matrix consisting of the eigenvectors and normalises it, i.e. multiplies each eigenvector by the square root of its corresponding eigenvalue.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">unnormalised_basis</td><td>An unnormalised PCA basis matrix. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">eigenvalues</td><td>A row or column vector of eigenvalues. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The normalised PCA basis matrix. </dd></dl>
</div>
</div>
<a class="anchor" id="aad09e0fd0788cb7fea41ed799c653e71"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void eos::morphablemodel::save_model </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classeos_1_1morphablemodel_1_1_morphable_model.html">MorphableModel</a>&#160;</td>
<td class="paramname"><em>model</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::string&#160;</td>
<td class="paramname"><em>filename</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Helper method to save a Morphable Model to the harddrive as cereal::BinaryInputArchive.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">model</td><td>The model to be saved. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>Filename for the model. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a3d9ed5fa969cbd540ebe9587540f3607"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">cv::Mat eos::morphablemodel::unnormalise_pca_basis </td>
<td>(</td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>normalised_basis</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>eigenvalues</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Takes a normalised PCA basis matrix (a matrix consisting of the eigenvectors and denormalises it, i.e. multiplies each eigenvector by 1 over the square root of its corresponding eigenvalue.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">normalised_basis</td><td>A normalised PCA basis matrix. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">eigenvalues</td><td>A row or column vector of eigenvalues. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The unnormalised PCA basis matrix. </dd></dl>
</div>
</div>
</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: eos::render Namespace 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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="namespaces.html"><span>Namespaces</span></a></li>
<li><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="namespaces.html"><span>Namespace&#160;List</span></a></li>
<li><a href="namespacemembers.html"><span>Namespace&#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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1render.html">render</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">eos::render Namespace Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>3D mesh and texture extraction functionality.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">This class represents a 3D mesh consisting of vertices, vertex colour information and texture coordinates. <a href="structeos_1_1render_1_1_mesh.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeos_1_1render_1_1_texture.html">Texture</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a298bda0bf8e9ee6947522b96d32ab237"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237">TextureInterpolation</a> { <b>NearestNeighbour</b>,
<b>Bilinear</b>,
<b>Area</b>
}<tr class="separator:a298bda0bf8e9ee6947522b96d32ab237"><td class="memSeparator" colspan="2">&#160;</td></tr>
</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a9b4673997fae6d670d7a9cc23543e8d7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1render.html#a9b4673997fae6d670d7a9cc23543e8d7">write_obj</a> (<a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a> mesh, std::string filename)</td></tr>
<tr class="memdesc:a9b4673997fae6d670d7a9cc23543e8d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes the given <a class="el" href="structeos_1_1render_1_1_mesh.html" title="This class represents a 3D mesh consisting of vertices, vertex colour information and texture coordin...">Mesh</a> to an obj file that for example can be read by Meshlab. <a href="#a9b4673997fae6d670d7a9cc23543e8d7">More...</a><br /></td></tr>
<tr class="separator:a9b4673997fae6d670d7a9cc23543e8d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd6561b065b9c0dd6815580ab12c3204"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1render.html#afd6561b065b9c0dd6815580ab12c3204">write_textured_obj</a> (<a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a> mesh, std::string filename)</td></tr>
<tr class="memdesc:afd6561b065b9c0dd6815580ab12c3204"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes an obj file of the given <a class="el" href="structeos_1_1render_1_1_mesh.html" title="This class represents a 3D mesh consisting of vertices, vertex colour information and texture coordin...">Mesh</a>, including texture coordinates, and an mtl file containing a reference to the isomap. <a href="#afd6561b065b9c0dd6815580ab12c3204">More...</a><br /></td></tr>
<tr class="separator:afd6561b065b9c0dd6815580ab12c3204"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7628a42875570658bea6ffb4f46723e5"><td class="memItemLeft" align="right" valign="top">std::pair&lt; cv::Mat, cv::Mat &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5">render</a> (<a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a> mesh, cv::Mat model_view_matrix, cv::Mat projection_matrix, int viewport_width, int viewport_height, const <a class="el" href="classeos_1_1render_1_1_texture.html">Texture</a> &amp;texture, bool enable_backface_culling=false, bool enable_near_clipping=true, bool enable_far_clipping=true)</td></tr>
<tr class="separator:a7628a42875570658bea6ffb4f46723e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1adc532475d45d16f7b0c0eddf1bc7cb"><td class="memItemLeft" align="right" valign="top">std::pair&lt; cv::Mat, cv::Mat &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1render.html#a1adc532475d45d16f7b0c0eddf1bc7cb">render_affine</a> (<a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a> mesh, cv::Mat affine_camera_matrix, int viewport_width, int viewport_height, bool do_backface_culling=true)</td></tr>
<tr class="separator:a1adc532475d45d16f7b0c0eddf1bc7cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafa8c960c3b6eb080da1536cc3634577"><td class="memItemLeft" align="right" valign="top">cv::Mat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1render.html#aafa8c960c3b6eb080da1536cc3634577">extract_texture</a> (<a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a> mesh, cv::Mat affine_camera_matrix, cv::Mat image, cv::Mat depthbuffer, bool compute_view_angle, <a class="el" href="namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237">TextureInterpolation</a> mapping_type, int isomap_resolution)</td></tr>
<tr class="separator:aafa8c960c3b6eb080da1536cc3634577"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad663c29566fafc33606349a35d0bdbf1"><td class="memItemLeft" align="right" valign="top">cv::Mat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1render.html#ad663c29566fafc33606349a35d0bdbf1">extract_texture</a> (<a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a> mesh, cv::Mat affine_camera_matrix, cv::Mat image, bool compute_view_angle=false, <a class="el" href="namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237">TextureInterpolation</a> mapping_type=TextureInterpolation::NearestNeighbour, int isomap_resolution=512)</td></tr>
<tr class="separator:ad663c29566fafc33606349a35d0bdbf1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04bb2f816e97ecb7f33cf8a50328e0db"><td class="memItemLeft" align="right" valign="top">cv::Vec2f&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1render.html#a04bb2f816e97ecb7f33cf8a50328e0db">clip_to_screen_space</a> (const cv::Vec2f &amp;clip_coordinates, int screen_width, int screen_height)</td></tr>
<tr class="separator:a04bb2f816e97ecb7f33cf8a50328e0db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c4b923267e9b3b09c0c588bfdd4cb85"><td class="memItemLeft" align="right" valign="top">cv::Vec2f&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1render.html#a7c4b923267e9b3b09c0c588bfdd4cb85">screen_to_clip_space</a> (const cv::Vec2f &amp;screen_coordinates, int screen_width, int screen_height)</td></tr>
<tr class="separator:a7c4b923267e9b3b09c0c588bfdd4cb85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac72cdee6eed13468a424824ddd0b3074"><td class="memItemLeft" align="right" valign="top">cv::Vec3f&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1render.html#ac72cdee6eed13468a424824ddd0b3074">calculate_face_normal</a> (const cv::Vec3f &amp;v0, const cv::Vec3f &amp;v1, const cv::Vec3f &amp;v2)</td></tr>
<tr class="separator:ac72cdee6eed13468a424824ddd0b3074"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4edecd42a4a04ba6eb95089dd3ff256a"><td class="memItemLeft" align="right" valign="top">cv::Mat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceeos_1_1render.html#a4edecd42a4a04ba6eb95089dd3ff256a">draw_texcoords</a> (<a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a> mesh, cv::Mat image=cv::Mat())</td></tr>
<tr class="separator:a4edecd42a4a04ba6eb95089dd3ff256a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53bff3cd388659995ccf49920ac727f7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a53bff3cd388659995ccf49920ac727f7"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>get_max_possible_mipmaps_num</b> (unsigned int width, unsigned int height)</td></tr>
<tr class="separator:a53bff3cd388659995ccf49920ac727f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8206355ac99e122f0a612c0fffa95f5c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8206355ac99e122f0a612c0fffa95f5c"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>is_power_of_two</b> (int x)</td></tr>
<tr class="separator:a8206355ac99e122f0a612c0fffa95f5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73d461e2a61bd7ab7d90734ec779250d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a73d461e2a61bd7ab7d90734ec779250d"></a>
<a class="el" href="classeos_1_1render_1_1_texture.html">Texture</a>&#160;</td><td class="memItemRight" valign="bottom"><b>create_mipmapped_texture</b> (cv::Mat image, unsigned int mipmapsNum=0)</td></tr>
<tr class="separator:a73d461e2a61bd7ab7d90734ec779250d"><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>3D mesh and texture extraction functionality. </p>
</div><h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="a298bda0bf8e9ee6947522b96d32ab237"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237">eos::render::TextureInterpolation</a></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The interpolation types that can be used to map the texture from the original image to the isomap. </p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ac72cdee6eed13468a424824ddd0b3074"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cv::Vec3f eos::render::calculate_face_normal </td>
<td>(</td>
<td class="paramtype">const cv::Vec3f &amp;&#160;</td>
<td class="paramname"><em>v0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cv::Vec3f &amp;&#160;</td>
<td class="paramname"><em>v1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const cv::Vec3f &amp;&#160;</td>
<td class="paramname"><em>v2</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculates the normal of a face (or triangle), i.e. the per-face normal. Return normal will be normalised. Assumes the triangle is given in CCW order, i.e. vertices in counterclockwise order on the screen are front-facing.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">v0</td><td>First vertex. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">v1</td><td>Second vertex. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">v2</td><td>Third vertex. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The unit-length normal of the given triangle. </dd></dl>
</div>
</div>
<a class="anchor" id="a04bb2f816e97ecb7f33cf8a50328e0db"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">cv::Vec2f eos::render::clip_to_screen_space </td>
<td>(</td>
<td class="paramtype">const cv::Vec2f &amp;&#160;</td>
<td class="paramname"><em>clip_coordinates</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>screen_width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>screen_height</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Transforms a point from clip space ([-1, 1] x [-1, 1]) to image (screen) coordinates, i.e. the window transform. Note that the y-coordinate is flipped because the image origin is top-left while in clip space top is +1 and bottom is -1. No z-division is performed. Note: It should rather be called from NDC to screen space?</p>
<p>Exactly conforming to the OpenGL viewport transform, except that we flip y at the end. Qt: Origin top-left. OpenGL: bottom-left. OCV: top-left.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">clip_coordinates</td><td>A point in clip coordinates. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">screen_width</td><td>Width of the screen or window. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">screen_height</td><td>Height of the screen or window. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A vector with x and y coordinates transformed to screen space. </dd></dl>
</div>
</div>
<a class="anchor" id="a4edecd42a4a04ba6eb95089dd3ff256a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">cv::Mat eos::render::draw_texcoords </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a>&#160;</td>
<td class="paramname"><em>mesh</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>image</em> = <code>cv::Mat()</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Draws the texture coordinates (uv-coords) of the given mesh into an image by looping over the triangles and drawing each triangle's texcoords.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">mesh</td><td>A mesh with texture coordinates. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">image</td><td>An optional image to draw onto. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An image with the texture coordinate triangles drawn in it, 512x512 if no image is given. </dd></dl>
</div>
</div>
<a class="anchor" id="aafa8c960c3b6eb080da1536cc3634577"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">cv::Mat eos::render::extract_texture </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a>&#160;</td>
<td class="paramname"><em>mesh</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>affine_camera_matrix</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>image</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>depthbuffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>compute_view_angle</em> = <code>false</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237">TextureInterpolation</a>&#160;</td>
<td class="paramname"><em>mapping_type</em> = <code>TextureInterpolation::NearestNeighbour</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>isomap_resolution</em> = <code>512</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Extracts the texture of the face from the given image and stores it as isomap (a rectangular texture map). This function can be used if a depth buffer has already been computed. To just run the texture extraction, see the overload extract_texture(Mesh, cv::Mat, cv::Mat, TextureInterpolation, int).</p>
<p>It might be wise to remove this overload as it can get quite confusing with the zbuffer. Obviously the depthbuffer given should have been created with the same (affine or ortho) projection matrix than the texture extraction is called with.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">mesh</td><td>A mesh with texture coordinates. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">affine_camera_matrix</td><td>An estimated 3x4 affine camera matrix. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">image</td><td>The image to extract the texture from. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">depthbuffer</td><td>A pre-calculated depthbuffer image. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">compute_view_angle</td><td>A flag whether the view angle of each vertex should be computed and returned. If set to true, the angle will be encoded into the alpha channel (0 meaning occluded or facing away 90, 127 meaning facing a 45 angle and 255 meaning front-facing, and all values in between). If set to false, the alpha channel will only contain 0 for occluded vertices and 255 for visible vertices. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">mapping_type</td><td>The interpolation type to be used for the extraction. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">isomap_resolution</td><td>The resolution of the generated isomap. Defaults to 512x512. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The extracted texture as isomap (texture map). </dd></dl>
</div>
</div>
<a class="anchor" id="ad663c29566fafc33606349a35d0bdbf1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">cv::Mat eos::render::extract_texture </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a>&#160;</td>
<td class="paramname"><em>mesh</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>affine_camera_matrix</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>image</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>compute_view_angle</em> = <code>false</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237">TextureInterpolation</a>&#160;</td>
<td class="paramname"><em>mapping_type</em> = <code>TextureInterpolation::NearestNeighbour</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>isomap_resolution</em> = <code>512</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Extracts the texture of the face from the given image and stores it as isomap (a rectangular texture map).</p>
<p>Note/#Todo: Only use TextureInterpolation::NearestNeighbour for the moment, the other methods don't have correct handling of the alpha channel (and will most likely throw an exception).</p>
<p>Todo: These should be renamed to extract_texture_affine? Can we combine both cases somehow? Or an overload with RenderingParameters?</p>
<p>For TextureInterpolation::NearestNeighbour, returns a 4-channel isomap with the visibility in the 4th channel (0=invis, 255=visible).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">mesh</td><td>A mesh with texture coordinates. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">affine_camera_matrix</td><td>An estimated 3x4 affine camera matrix. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">image</td><td>The image to extract the texture from. Should be 8UC3, other types not supported yet. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">compute_view_angle</td><td>A flag whether the view angle of each vertex should be computed and returned. If set to true, the angle will be encoded into the alpha channel (0 meaning occluded or facing away 90, 127 meaning facing a 45 angle and 255 meaning front-facing, and all values in between). If set to false, the alpha channel will only contain 0 for occluded vertices and 255 for visible vertices. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">mapping_type</td><td>The interpolation type to be used for the extraction. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">isomap_resolution</td><td>The resolution of the generated isomap. Defaults to 512x512. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The extracted texture as isomap (texture map). </dd></dl>
</div>
</div>
<a class="anchor" id="a7628a42875570658bea6ffb4f46723e5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::pair&lt;cv::Mat, cv::Mat&gt; eos::render::render </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a>&#160;</td>
<td class="paramname"><em>mesh</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>model_view_matrix</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>projection_matrix</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>viewport_width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>viewport_height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classeos_1_1render_1_1_texture.html">Texture</a> &amp;&#160;</td>
<td class="paramname"><em>texture</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>enable_backface_culling</em> = <code>false</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>enable_near_clipping</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>enable_far_clipping</em> = <code>true</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This file implements a software renderer conforming to OpenGL conventions. The following are implementation notes, mostly for reference, or as a reminder of what exactly is going on. Don't try to understand them :-)</p>
<p>The renderer was initially based on code by Wojciech Sterna (<a href="http://maxest.gct-game.net/content/vainmoinen/index.html">http://maxest.gct-game.net/content/vainmoinen/index.html</a>), however, it has since then been completely rewritten. Still I'd like to thank him for making his code available and bravely answering my questions via email.</p>
<p>Coordinate systems: When specifying the vertices: +x = right, +y = up, we look into -z. So z = 0.5 is in front of 0.0. Z-Buffer:</p>
<p>Shirley: Specify n and f with negative values. which makes sense b/c the points are along the -z axis. Consequences: notably: orthogonal(2, 3): Shirley has denominator (n-f). In what space are the points in Shirley after this? OGL: We're in the orthographic viewing volume looking down -z. However, n and f are specified positive.</p>
<p>B/c the 3D points in front of the cam obviously still have negative z values, the z-value is negated. So: n = 0.1, f = 100; With the given OpenGL ortho matrix, it means a point on the near-plane which will have z = -0.1 will land up on z_clip (which equals z_ndc with ortho because w=1) = -1, and a point on the far plane z = -100 will have z_ndc = +1.</p>
<p>That's also why in the perspective case, w_clip is set to -z_eye because to project a point the formula is $x_p = (-n * x_e)/z_e$ (because our near is specified with positive values, but the near-plane is <em>really</em> at -n); but now we just move the minus-sign to the denominator, $x_p = (n * x_e)/-z_e$, so in the projection matrix we can use the (positive) n and f values and afterwards we divide by w = -z_e.</p>
<p><a href="http://www.songho.ca/opengl/gl_projectionmatrix.html">http://www.songho.ca/opengl/gl_projectionmatrix.html</a></p>
<p>Random notes: clip-space: after applying the projection matrix. ndc: after division by w NDC cube: the range of x-coordinate from [l, r] to [-1, 1], the y-coordinate from [b, t] to [-1, 1] and the z-coordinate from [n, f] to [-1, 1].</p>
<p>Note/Todo: I read that in screen space, OpenGL transform the z-values again to be between 0 and 1?</p>
<p>In contrast to OGL, this renderer doesn't have state, it's just a function that gets called with all necessary parameters. It's easiest for our purposes.</p>
<p>Here's the whole rendering pipeline: Model space -&gt; model transforms World space -&gt; camera (view/eye) transform View / eye / camera space ("truncated pyramid frustum". In case of ortho, it's already rectangular.) -&gt; perspective/ortho projection Clip coords (x_c, y_c, z_c, w_c); the z-axis is flipped now. z [z=-n, z=-f] is mapped to [-1, +1] in case of ortho, but not yet in case of persp (it's also flipped though), but the not-[-1,1]-range is fine as we test against w_c. I.e. the larger the z-value, the further back we are. Do frustum culling (clipping) here. Test the clip-coords with w_c, and discard if a tri is completely outside. Of the partially visible tris, clip them against the near-plane and construct the visible part of the triangle. We only do this for the near-plane here. Clipping to the near plane must be done here because after w-division triangles crossing it would get distorted. "Then, OpenGL will reconstruct the edges of the polygon where clipping occurs." -&gt; Then divide by the w component of the clip coordinates NDC. (now only 3D vectors: [x_ndc, y_ndc, z_ndc]). nearest points have z=-1, points on far plane have z=+1. -&gt; window transform. (also, OGL does some more to the z-buffer?) Screen / window space Directly after window-transform (still processing triangles), do backface culling with areVerticesCCWInScreenSpace() Directly afterwards we calculate the triangle's bounding box and clip x/y (screen) against 0 and the viewport width/height. Rasterising: Clipping against the far plane here by only drawing those pixels with a z-value of &lt;= 1.0f.</p>
<p>OGL: "both clipping (frustum culling) and NDC transformations are integrated into GL_PROJECTION matrix"</p>
<p>Note: In both the ortho and persp case, points at z=-n end up at -1, z=-f at +1. In case of persp proj., this happens only after the divide by w. Renders the given mesh onto a 2D image using 4x4 model-view and projection matrices. Conforms to OpenGL conventions.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">mesh</td><td>A 3D mesh. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">model_view_matrix</td><td>A 4x4 OpenGL model-view matrix. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">projection_matrix</td><td>A 4x4 orthographic or perspective OpenGL projection matrix. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">viewport_width</td><td>Screen width. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">viewport_height</td><td>Screen height. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">texture</td><td>An optional texture map (TODO: Not optional yet!). </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">enable_backface_culling</td><td>Whether the renderer should perform backface culling. If true, only draw triangles with vertices ordered CCW in screen-space. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">enable_near_clipping</td><td>Screen height. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">enable_far_clipping</td><td>Screen height. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pair with the colourbuffer as its first element and the depthbuffer as the second element. </dd></dl>
</div>
</div>
<a class="anchor" id="a1adc532475d45d16f7b0c0eddf1bc7cb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::pair&lt;cv::Mat, cv::Mat&gt; eos::render::render_affine </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a>&#160;</td>
<td class="paramname"><em>mesh</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cv::Mat&#160;</td>
<td class="paramname"><em>affine_camera_matrix</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>viewport_width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>viewport_height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>do_backface_culling</em> = <code>true</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Renders the mesh using the given affine camera matrix and returns the colour and depth buffer images. The camera matrix should be one estimated with <a class="el" href="namespaceeos_1_1fitting.html#afce5f7297094056a04ad26785c94bbd8">fitting::estimate_affine_camera</a> (Hartley &amp; Zisserman algorithm).</p>
<p>If the given mesh is a shape-only mesh without vertex-colour information, the vertices will be rendered in grey.</p>
<p>#Todo: May consider an overload where we pass in an image, use that as colourbuffer and draw over it. #Todo: Add texture rendering to this. Then, create an additional function in extract_texure that is fully optimised for only the extraction.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">mesh</td><td>A 3D mesh. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">affine_camera_matrix</td><td>3x4 affine camera matrix. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">viewport_width</td><td>Screen width. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">viewport_height</td><td>Screen height. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">do_backface_culling</td><td>Whether the renderer should perform backface culling. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pair with the colourbuffer as its first element and the depthbuffer as the second element. </dd></dl>
</div>
</div>
<a class="anchor" id="a7c4b923267e9b3b09c0c588bfdd4cb85"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">cv::Vec2f eos::render::screen_to_clip_space </td>
<td>(</td>
<td class="paramtype">const cv::Vec2f &amp;&#160;</td>
<td class="paramname"><em>screen_coordinates</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>screen_width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>screen_height</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Transforms a point from image (screen) coordinates to clip space ([-1, 1] x [-1, 1]). Note that the y-coordinate is flipped because the image origin is top-left while in clip space top is +1 and bottom is -1.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">screen_coordinates</td><td>A point in screen coordinates. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">screen_width</td><td>Width of the screen or window. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">screen_height</td><td>Height of the screen or window. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A vector with x and y coordinates transformed to clip space. </dd></dl>
</div>
</div>
<a class="anchor" id="a9b4673997fae6d670d7a9cc23543e8d7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void eos::render::write_obj </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a>&#160;</td>
<td class="paramname"><em>mesh</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::string&#160;</td>
<td class="paramname"><em>filename</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes the given <a class="el" href="structeos_1_1render_1_1_mesh.html" title="This class represents a 3D mesh consisting of vertices, vertex colour information and texture coordin...">Mesh</a> to an obj file that for example can be read by Meshlab. </p>
<p>If the mesh contains vertex colour information, it will be written to the obj as well.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">mesh</td><td>The mesh to save as obj. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>Output filename. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="afd6561b065b9c0dd6815580ab12c3204"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void eos::render::write_textured_obj </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a>&#160;</td>
<td class="paramname"><em>mesh</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::string&#160;</td>
<td class="paramname"><em>filename</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Writes an obj file of the given <a class="el" href="structeos_1_1render_1_1_mesh.html" title="This class represents a 3D mesh consisting of vertices, vertex colour information and texture coordin...">Mesh</a>, including texture coordinates, and an mtl file containing a reference to the isomap. </p>
<p>The obj will contain texture coordinates for the mesh, and the mtl file will link to a file named &lt;filename&gt;.isomap.png. Note that the texture (isomap) has to be saved separately.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">mesh</td><td>The mesh to save as obj. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>Output filename. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: Namespace Members</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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="namespaces.html"><span>Namespaces</span></a></li>
<li><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="namespaces.html"><span>Namespace&#160;List</span></a></li>
<li class="current"><a href="namespacemembers.html"><span>Namespace&#160;Members</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li class="current"><a href="namespacemembers.html"><span>All</span></a></li>
<li><a href="namespacemembers_func.html"><span>Functions</span></a></li>
<li><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
<li><a href="namespacemembers_enum.html"><span>Enumerations</span></a></li>
</ul>
</div>
</div><!-- top -->
<!-- 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 class="contents">
<div class="textblock">Here is a list of all documented namespace members with links to the namespaces they belong to:</div><ul>
<li>calculate_face_normal()
: <a class="el" href="namespaceeos_1_1render.html#ac72cdee6eed13468a424824ddd0b3074">eos::render</a>
</li>
<li>clip_to_screen_space()
: <a class="el" href="namespaceeos_1_1render.html#a04bb2f816e97ecb7f33cf8a50328e0db">eos::render</a>
</li>
<li>draw_texcoords()
: <a class="el" href="namespaceeos_1_1render.html#a4edecd42a4a04ba6eb95089dd3ff256a">eos::render</a>
</li>
<li>estimate_affine_camera()
: <a class="el" href="namespaceeos_1_1fitting.html#afce5f7297094056a04ad26785c94bbd8">eos::fitting</a>
</li>
<li>estimate_orthographic_camera()
: <a class="el" href="namespaceeos_1_1fitting.html#aebab65b3f9f46758b1363a347e6de852">eos::fitting</a>
</li>
<li>extract_texture()
: <a class="el" href="namespaceeos_1_1render.html#aafa8c960c3b6eb080da1536cc3634577">eos::render</a>
</li>
<li>filter()
: <a class="el" href="namespaceeos_1_1core.html#aacf41dc417a1dbfc929c9cc7f2c7feeb">eos::core</a>
</li>
<li>fit_shape_to_landmarks_linear()
: <a class="el" href="namespaceeos_1_1fitting.html#ae68794185075b5b67fddae9d359cf208">eos::fitting</a>
</li>
<li>get_3x4_affine_camera_matrix()
: <a class="el" href="namespaceeos_1_1fitting.html#af600978a071bc5dc0443cfe41ae613bf">eos::fitting</a>
</li>
<li>get_4x4_modelview_matrix()
: <a class="el" href="namespaceeos_1_1fitting.html#a503a126cfe1bbd6a7c8b7a786a8e73b8">eos::fitting</a>
</li>
<li>get_opencv_viewport()
: <a class="el" href="namespaceeos_1_1fitting.html#a4e713b5555396806a9b26817184eacd0">eos::fitting</a>
</li>
<li>LandmarkCollection
: <a class="el" href="namespaceeos_1_1core.html#a6d6a8533690b5860236f55afafa14d2b">eos::core</a>
</li>
<li>load()
: <a class="el" href="namespacecv.html#a7172a20ab6627a1c1967d322bdfc8756">cv</a>
</li>
<li>load_isomap()
: <a class="el" href="namespaceeos_1_1morphablemodel.html#afa73fdf5b394458b7e21639ae50d074c">eos::morphablemodel</a>
</li>
<li>load_model()
: <a class="el" href="namespaceeos_1_1morphablemodel.html#a0da6e35ec49f1ebdf55f9596540cf8f8">eos::morphablemodel</a>
</li>
<li>load_scm_model()
: <a class="el" href="namespaceeos_1_1morphablemodel.html#a0d607b8838d70cd8ec41cb4bfe116f58">eos::morphablemodel</a>
</li>
<li>normalise_pca_basis()
: <a class="el" href="namespaceeos_1_1morphablemodel.html#a73d9baeb67f25d4604fc291a23e5e2d8">eos::morphablemodel</a>
</li>
<li>project_affine()
: <a class="el" href="namespaceeos_1_1fitting.html#a3e99a34e412f0bb5b2c6568dd37ae413">eos::fitting</a>
</li>
<li>render()
: <a class="el" href="namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5">eos::render</a>
</li>
<li>render_affine()
: <a class="el" href="namespaceeos_1_1render.html#a1adc532475d45d16f7b0c0eddf1bc7cb">eos::render</a>
</li>
<li>save()
: <a class="el" href="namespacecv.html#a62cc822cc258c9305ac746d3a832f9d4">cv</a>
</li>
<li>save_model()
: <a class="el" href="namespaceeos_1_1morphablemodel.html#aad09e0fd0788cb7fea41ed799c653e71">eos::morphablemodel</a>
</li>
<li>screen_to_clip_space()
: <a class="el" href="namespaceeos_1_1render.html#a7c4b923267e9b3b09c0c588bfdd4cb85">eos::render</a>
</li>
<li>serialize()
: <a class="el" href="namespacecv.html#a51eb61cb95a3e45290a030560ac7a2cd">cv</a>
</li>
<li>TextureInterpolation
: <a class="el" href="namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237">eos::render</a>
</li>
<li>to_mat()
: <a class="el" href="namespaceeos_1_1fitting.html#a93f7464a6c6dee7b3885638014ec009a">eos::fitting</a>
</li>
<li>unnormalise_pca_basis()
: <a class="el" href="namespaceeos_1_1morphablemodel.html#a3d9ed5fa969cbd540ebe9587540f3607">eos::morphablemodel</a>
</li>
<li>write_obj()
: <a class="el" href="namespaceeos_1_1render.html#a9b4673997fae6d670d7a9cc23543e8d7">eos::render</a>
</li>
<li>write_textured_obj()
: <a class="el" href="namespaceeos_1_1render.html#afd6561b065b9c0dd6815580ab12c3204">eos::render</a>
</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: Namespace Members</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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="namespaces.html"><span>Namespaces</span></a></li>
<li><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="namespaces.html"><span>Namespace&#160;List</span></a></li>
<li class="current"><a href="namespacemembers.html"><span>Namespace&#160;Members</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li><a href="namespacemembers.html"><span>All</span></a></li>
<li><a href="namespacemembers_func.html"><span>Functions</span></a></li>
<li><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
<li class="current"><a href="namespacemembers_enum.html"><span>Enumerations</span></a></li>
</ul>
</div>
</div><!-- top -->
<!-- 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 class="contents">
&#160;<ul>
<li>TextureInterpolation
: <a class="el" href="namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237">eos::render</a>
</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: Namespace Members</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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="namespaces.html"><span>Namespaces</span></a></li>
<li><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="namespaces.html"><span>Namespace&#160;List</span></a></li>
<li class="current"><a href="namespacemembers.html"><span>Namespace&#160;Members</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li><a href="namespacemembers.html"><span>All</span></a></li>
<li class="current"><a href="namespacemembers_func.html"><span>Functions</span></a></li>
<li><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
<li><a href="namespacemembers_enum.html"><span>Enumerations</span></a></li>
</ul>
</div>
</div><!-- top -->
<!-- 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 class="contents">
&#160;<ul>
<li>calculate_face_normal()
: <a class="el" href="namespaceeos_1_1render.html#ac72cdee6eed13468a424824ddd0b3074">eos::render</a>
</li>
<li>clip_to_screen_space()
: <a class="el" href="namespaceeos_1_1render.html#a04bb2f816e97ecb7f33cf8a50328e0db">eos::render</a>
</li>
<li>draw_texcoords()
: <a class="el" href="namespaceeos_1_1render.html#a4edecd42a4a04ba6eb95089dd3ff256a">eos::render</a>
</li>
<li>estimate_affine_camera()
: <a class="el" href="namespaceeos_1_1fitting.html#afce5f7297094056a04ad26785c94bbd8">eos::fitting</a>
</li>
<li>estimate_orthographic_camera()
: <a class="el" href="namespaceeos_1_1fitting.html#aebab65b3f9f46758b1363a347e6de852">eos::fitting</a>
</li>
<li>extract_texture()
: <a class="el" href="namespaceeos_1_1render.html#aafa8c960c3b6eb080da1536cc3634577">eos::render</a>
</li>
<li>filter()
: <a class="el" href="namespaceeos_1_1core.html#aacf41dc417a1dbfc929c9cc7f2c7feeb">eos::core</a>
</li>
<li>fit_shape_to_landmarks_linear()
: <a class="el" href="namespaceeos_1_1fitting.html#ae68794185075b5b67fddae9d359cf208">eos::fitting</a>
</li>
<li>get_3x4_affine_camera_matrix()
: <a class="el" href="namespaceeos_1_1fitting.html#af600978a071bc5dc0443cfe41ae613bf">eos::fitting</a>
</li>
<li>get_4x4_modelview_matrix()
: <a class="el" href="namespaceeos_1_1fitting.html#a503a126cfe1bbd6a7c8b7a786a8e73b8">eos::fitting</a>
</li>
<li>get_opencv_viewport()
: <a class="el" href="namespaceeos_1_1fitting.html#a4e713b5555396806a9b26817184eacd0">eos::fitting</a>
</li>
<li>load()
: <a class="el" href="namespacecv.html#a7172a20ab6627a1c1967d322bdfc8756">cv</a>
</li>
<li>load_isomap()
: <a class="el" href="namespaceeos_1_1morphablemodel.html#afa73fdf5b394458b7e21639ae50d074c">eos::morphablemodel</a>
</li>
<li>load_model()
: <a class="el" href="namespaceeos_1_1morphablemodel.html#a0da6e35ec49f1ebdf55f9596540cf8f8">eos::morphablemodel</a>
</li>
<li>load_scm_model()
: <a class="el" href="namespaceeos_1_1morphablemodel.html#a0d607b8838d70cd8ec41cb4bfe116f58">eos::morphablemodel</a>
</li>
<li>normalise_pca_basis()
: <a class="el" href="namespaceeos_1_1morphablemodel.html#a73d9baeb67f25d4604fc291a23e5e2d8">eos::morphablemodel</a>
</li>
<li>project_affine()
: <a class="el" href="namespaceeos_1_1fitting.html#a3e99a34e412f0bb5b2c6568dd37ae413">eos::fitting</a>
</li>
<li>render()
: <a class="el" href="namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5">eos::render</a>
</li>
<li>render_affine()
: <a class="el" href="namespaceeos_1_1render.html#a1adc532475d45d16f7b0c0eddf1bc7cb">eos::render</a>
</li>
<li>save()
: <a class="el" href="namespacecv.html#a62cc822cc258c9305ac746d3a832f9d4">cv</a>
</li>
<li>save_model()
: <a class="el" href="namespaceeos_1_1morphablemodel.html#aad09e0fd0788cb7fea41ed799c653e71">eos::morphablemodel</a>
</li>
<li>screen_to_clip_space()
: <a class="el" href="namespaceeos_1_1render.html#a7c4b923267e9b3b09c0c588bfdd4cb85">eos::render</a>
</li>
<li>serialize()
: <a class="el" href="namespacecv.html#a51eb61cb95a3e45290a030560ac7a2cd">cv</a>
</li>
<li>to_mat()
: <a class="el" href="namespaceeos_1_1fitting.html#a93f7464a6c6dee7b3885638014ec009a">eos::fitting</a>
</li>
<li>unnormalise_pca_basis()
: <a class="el" href="namespaceeos_1_1morphablemodel.html#a3d9ed5fa969cbd540ebe9587540f3607">eos::morphablemodel</a>
</li>
<li>write_obj()
: <a class="el" href="namespaceeos_1_1render.html#a9b4673997fae6d670d7a9cc23543e8d7">eos::render</a>
</li>
<li>write_textured_obj()
: <a class="el" href="namespaceeos_1_1render.html#afd6561b065b9c0dd6815580ab12c3204">eos::render</a>
</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: Namespace Members</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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="namespaces.html"><span>Namespaces</span></a></li>
<li><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="namespaces.html"><span>Namespace&#160;List</span></a></li>
<li class="current"><a href="namespacemembers.html"><span>Namespace&#160;Members</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li><a href="namespacemembers.html"><span>All</span></a></li>
<li><a href="namespacemembers_func.html"><span>Functions</span></a></li>
<li class="current"><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
<li><a href="namespacemembers_enum.html"><span>Enumerations</span></a></li>
</ul>
</div>
</div><!-- top -->
<!-- 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 class="contents">
&#160;<ul>
<li>LandmarkCollection
: <a class="el" href="namespaceeos_1_1core.html#a6d6a8533690b5860236f55afafa14d2b">eos::core</a>
</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: Namespace 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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="namespaces.html"><span>Namespaces</span></a></li>
<li><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 class="current"><a href="namespaces.html"><span>Namespace&#160;List</span></a></li>
<li><a href="namespacemembers.html"><span>Namespace&#160;Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<!-- 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 class="header">
<div class="headertitle">
<div class="title">Namespace List</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock">Here is a list of all documented namespaces with brief descriptions:</div><div class="directory">
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacecv.html" target="_self">cv</a></td><td class="desc">Serialisation of OpenCV <code>cv::Mat</code> matrices for the serialisation library cereal (<a href="http://uscilab.github.io/cereal/index.html">http://uscilab.github.io/cereal/index.html</a>) </td></tr>
<tr id="row_1_"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_1_" class="arrow" onclick="toggleFolder('1_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespaceeos.html" target="_self">eos</a></td><td class="desc">Namespace containing all of eos's 3D model fitting functionality </td></tr>
<tr id="row_1_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespaceeos_1_1core.html" target="_self">core</a></td><td class="desc">Essential functions and classes to work with 3D face models and landmarks </td></tr>
<tr id="row_1_1_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespaceeos_1_1fitting.html" target="_self">fitting</a></td><td class="desc">Pose and shape fitting of a 3D Morphable Model </td></tr>
<tr id="row_1_2_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespaceeos_1_1morphablemodel.html" target="_self">morphablemodel</a></td><td class="desc">Functionality to represent a Morphable Model, containing it's PCA models and loading functions </td></tr>
<tr id="row_1_3_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespaceeos_1_1render.html" target="_self">render</a></td><td class="desc">3D mesh and texture extraction functionality </td></tr>
</table>
</div><!-- directory -->
</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.10
</small></address>
</body>
</html>
doc/nav_f.png

153 Bytes

<!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.10"/>
<title>eos: include/eos/fitting/nonlinear_camera_estimation.hpp Source File</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_349d8dd52ed72e674b9a830f9a7a4dcc.html">fitting</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">nonlinear_camera_estimation.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Eos - A 3D Morphable Model fitting library written in modern C++11/14.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * File: include/eos/fitting/nonlinear_camera_estimation.hpp</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright 2015 Patrik Huber</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * limitations under the License.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#ifndef NONLINEARCAMERAESTIMATION_HPP_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#define NONLINEARCAMERAESTIMATION_HPP_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &quot;eos/fitting/detail/nonlinear_camera_estimation_detail.hpp&quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &quot;glm/gtc/matrix_transform.hpp&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &quot;Eigen/Geometry&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &quot;unsupported/Eigen/NonLinearOptimization&quot;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#include &quot;opencv2/core/core.hpp&quot;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor">#include &lt;cassert&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> {</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keyword">namespace </span>fitting {</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="structeos_1_1fitting_1_1_frustum.html"> 44</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structeos_1_1fitting_1_1_frustum.html">Frustum</a></div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;{</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keywordtype">float</span> l, r, b, t;</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <span class="comment">// optional&lt;float&gt; n, f;</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;};</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;</div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html"> 67</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">OrthographicRenderingParameters</a></div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;{</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keywordtype">float</span> r_x; <span class="comment">// Pitch.</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keywordtype">float</span> r_y; <span class="comment">// Yaw. Positive means subject is looking left (we see her right cheek).</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <span class="keywordtype">float</span> r_z; <span class="comment">// Roll. Positive means the subject&#39;s right eye is further down than the other one (he tilts his head to the right).</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <span class="keywordtype">float</span> t_x;</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="keywordtype">float</span> t_y;</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <a class="code" href="structeos_1_1fitting_1_1_frustum.html">Frustum</a> frustum;</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;};</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;</div>
<div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="namespaceeos_1_1fitting.html#a93f7464a6c6dee7b3885638014ec009a"> 82</a></span>&#160;cv::Mat <a class="code" href="namespaceeos_1_1fitting.html#a93f7464a6c6dee7b3885638014ec009a">to_mat</a>(<span class="keyword">const</span> glm::mat4x4&amp; glm_matrix)</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;{</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <span class="comment">// glm stores its matrices in col-major order in memory, OpenCV in row-major order.</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="comment">// Hence we transpose the glm matrix to flip the memory layout, and then point OpenCV</span></div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="comment">// to that location.</span></div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keyword">auto</span> glm_matrix_t = glm::transpose(glm_matrix);</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; cv::Mat opencv_mat(4, 4, CV_32FC1, &amp;glm_matrix_t[0]);</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="comment">// we need to clone because the underlying data of the original goes out of scope</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <span class="keywordflow">return</span> opencv_mat.clone();</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;};</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;</div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="namespaceeos_1_1fitting.html#a503a126cfe1bbd6a7c8b7a786a8e73b8"> 111</a></span>&#160;glm::mat4x4 <a class="code" href="namespaceeos_1_1fitting.html#a503a126cfe1bbd6a7c8b7a786a8e73b8">get_4x4_modelview_matrix</a>(<a class="code" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">fitting::OrthographicRenderingParameters</a> params)</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;{</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="comment">// rotation order: RPY * P</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keyword">auto</span> rot_mtx_x = glm::rotate(glm::mat4(1.0f), params.r_x, glm::vec3{ 1.0f, 0.0f, 0.0f });</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="keyword">auto</span> rot_mtx_y = glm::rotate(glm::mat4(1.0f), params.r_y, glm::vec3{ 0.0f, 1.0f, 0.0f });</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="keyword">auto</span> rot_mtx_z = glm::rotate(glm::mat4(1.0f), params.r_z, glm::vec3{ 0.0f, 0.0f, 1.0f });</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="keyword">auto</span> t_mtx = glm::translate(glm::mat4(1.0f), glm::vec3{ params.t_x, params.t_y, 0.0f });</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="keyword">auto</span> modelview = t_mtx * rot_mtx_z * rot_mtx_x * rot_mtx_y;</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keywordflow">return</span> modelview;</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;};</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;</div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="namespaceeos_1_1fitting.html#af600978a071bc5dc0443cfe41ae613bf"> 129</a></span>&#160;cv::Mat <a class="code" href="namespaceeos_1_1fitting.html#af600978a071bc5dc0443cfe41ae613bf">get_3x4_affine_camera_matrix</a>(<a class="code" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">fitting::OrthographicRenderingParameters</a> params, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height)</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;{</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="keyword">auto</span> view_model = <a class="code" href="namespaceeos_1_1fitting.html#a93f7464a6c6dee7b3885638014ec009a">to_mat</a>(<a class="code" href="namespaceeos_1_1fitting.html#a503a126cfe1bbd6a7c8b7a786a8e73b8">get_4x4_modelview_matrix</a>(params));</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keyword">auto</span> ortho_projection = <a class="code" href="namespaceeos_1_1fitting.html#a93f7464a6c6dee7b3885638014ec009a">to_mat</a>(glm::ortho(params.frustum.l, params.frustum.r, params.frustum.b, params.frustum.t));</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; cv::Mat mvp = ortho_projection * view_model;</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; glm::vec4 viewport(0, height, width, -height); <span class="comment">// flips y, origin top-left, like in OpenCV</span></div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="comment">// equivalent to what glm::project&#39;s viewport does, but we don&#39;t change z and w:</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; cv::Mat viewport_mat = (cv::Mat_&lt;float&gt;(4, 4) &lt;&lt; viewport[2] / 2.0f, 0.0f, 0.0f, viewport[2] / 2.0f + viewport[0],</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; 0.0f, viewport[3] / 2.0f, 0.0f, viewport[3] / 2.0f + viewport[1],</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; 0.0f, 0.0f, 1.0f, 0.0f,</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; 0.0f, 0.0f, 0.0f, 1.0f);</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; cv::Mat full_projection_4x4 = viewport_mat * mvp;</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; cv::Mat full_projection_3x4 = full_projection_4x4.rowRange(0, 3); <span class="comment">// we take the first 3 rows, but then set the last one to [0 0 0 1]</span></div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; full_projection_3x4.at&lt;<span class="keywordtype">float</span>&gt;(2, 0) = 0.0f;</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; full_projection_3x4.at&lt;<span class="keywordtype">float</span>&gt;(2, 1) = 0.0f;</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; full_projection_3x4.at&lt;<span class="keywordtype">float</span>&gt;(2, 2) = 0.0f;</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; full_projection_3x4.at&lt;<span class="keywordtype">float</span>&gt;(2, 3) = 1.0f;</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="keywordflow">return</span> full_projection_3x4;</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;};</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;</div>
<div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="namespaceeos_1_1fitting.html#a4e713b5555396806a9b26817184eacd0"> 158</a></span>&#160;glm::vec4 <a class="code" href="namespaceeos_1_1fitting.html#a4e713b5555396806a9b26817184eacd0">get_opencv_viewport</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height)</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160;{</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="keywordflow">return</span> glm::vec4(0, height, width, -height);</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;};</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;</div>
<div class="line"><a name="l00188"></a><span class="lineno"><a class="line" href="namespaceeos_1_1fitting.html#aebab65b3f9f46758b1363a347e6de852"> 188</a></span>&#160;<a class="code" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">OrthographicRenderingParameters</a> <a class="code" href="namespaceeos_1_1fitting.html#aebab65b3f9f46758b1363a347e6de852">estimate_orthographic_camera</a>(std::vector&lt;cv::Vec2f&gt; image_points, std::vector&lt;cv::Vec4f&gt; model_points, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height)</div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160;{</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; <span class="keyword">using</span> cv::Mat;</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; assert(image_points.size() == model_points.size());</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; assert(image_points.size() &gt;= 6); <span class="comment">// Number of correspondence points given needs to be equal to or larger than 6</span></div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160;</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> aspect = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(width) / height;</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160;</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <span class="comment">// Set up the initial parameter vector and the cost function:</span></div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; <span class="keywordtype">int</span> num_params = 6;</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; Eigen::VectorXd parameters; <span class="comment">// [rot_x_pitch, rot_y_yaw, rot_z_roll, t_x, t_y, frustum_scale]</span></div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; parameters.setConstant(num_params, 0.0); <span class="comment">// Set all 6 values to zero (except frustum_scale, see next line)</span></div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; parameters[5] = 110.0; <span class="comment">// This is just a rough hand-chosen scaling estimate - we could do a lot better. But it works.</span></div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; detail::OrthographicParameterProjection cost_function(image_points, model_points, width, height);</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; <span class="comment">// Note: we have analytical derivatives, so we should use them!</span></div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; Eigen::NumericalDiff&lt;detail::OrthographicParameterProjection&gt; cost_function_with_derivative(cost_function, 0.0001);</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="comment">// I had to change the default value of epsfcn, it works well around 0.0001. It couldn&#39;t produce the derivative with the default, I guess the changes in the gradient were too small.</span></div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; Eigen::LevenbergMarquardt&lt;Eigen::NumericalDiff&lt;detail::OrthographicParameterProjection&gt;&gt; lm(cost_function_with_derivative);</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; <span class="keyword">auto</span> info = lm.minimize(parameters); <span class="comment">// we could or should use the return value</span></div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; <span class="comment">// &#39;parameters&#39; contains the solution now.</span></div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160;</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; <a class="code" href="structeos_1_1fitting_1_1_frustum.html">Frustum</a> camera_frustum{ -1.0f * aspect * <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(parameters[5]), 1.0f * aspect * static_cast&lt;float&gt;(parameters[5]), -1.0f * <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(parameters[5]), 1.0f * static_cast&lt;float&gt;(parameters[5]) };</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; <span class="keywordflow">return</span> <a class="code" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">OrthographicRenderingParameters</a>{ <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(parameters[0]), static_cast&lt;float&gt;(parameters[1]), <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(parameters[2]), static_cast&lt;float&gt;(parameters[3]), <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(parameters[4]), camera_frustum };</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160;};</div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160;</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; } <span class="comment">/* namespace fitting */</span></div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160;} <span class="comment">/* namespace eos */</span></div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160;</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* NONLINEARCAMERAESTIMATION_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="namespaceeos_1_1fitting_html_a93f7464a6c6dee7b3885638014ec009a"><div class="ttname"><a href="namespaceeos_1_1fitting.html#a93f7464a6c6dee7b3885638014ec009a">eos::fitting::to_mat</a></div><div class="ttdeci">cv::Mat to_mat(const glm::mat4x4 &amp;glm_matrix)</div><div class="ttdoc">Converts a glm::mat4x4 to a cv::Mat. </div><div class="ttdef"><b>Definition:</b> nonlinear_camera_estimation.hpp:82</div></div>
<div class="ttc" id="namespaceeos_1_1fitting_html_a4e713b5555396806a9b26817184eacd0"><div class="ttname"><a href="namespaceeos_1_1fitting.html#a4e713b5555396806a9b26817184eacd0">eos::fitting::get_opencv_viewport</a></div><div class="ttdeci">glm::vec4 get_opencv_viewport(int width, int height)</div><div class="ttdoc">Returns a glm/OpenGL compatible viewport vector that flips y and has the origin on the top-left...</div><div class="ttdef"><b>Definition:</b> nonlinear_camera_estimation.hpp:158</div></div>
<div class="ttc" id="namespaceeos_1_1fitting_html_aebab65b3f9f46758b1363a347e6de852"><div class="ttname"><a href="namespaceeos_1_1fitting.html#aebab65b3f9f46758b1363a347e6de852">eos::fitting::estimate_orthographic_camera</a></div><div class="ttdeci">OrthographicRenderingParameters estimate_orthographic_camera(std::vector&lt; cv::Vec2f &gt; image_points, std::vector&lt; cv::Vec4f &gt; model_points, int width, int height)</div><div class="ttdoc">This algorithm estimates the rotation angles and translation of the model, as well as the viewing fru...</div><div class="ttdef"><b>Definition:</b> nonlinear_camera_estimation.hpp:188</div></div>
<div class="ttc" id="namespaceeos_1_1fitting_html_a503a126cfe1bbd6a7c8b7a786a8e73b8"><div class="ttname"><a href="namespaceeos_1_1fitting.html#a503a126cfe1bbd6a7c8b7a786a8e73b8">eos::fitting::get_4x4_modelview_matrix</a></div><div class="ttdeci">glm::mat4x4 get_4x4_modelview_matrix(fitting::OrthographicRenderingParameters params)</div><div class="ttdoc">Creates a 4x4 model-view matrix from given fitting parameters. </div><div class="ttdef"><b>Definition:</b> nonlinear_camera_estimation.hpp:111</div></div>
<div class="ttc" id="namespaceeos_1_1fitting_html_af600978a071bc5dc0443cfe41ae613bf"><div class="ttname"><a href="namespaceeos_1_1fitting.html#af600978a071bc5dc0443cfe41ae613bf">eos::fitting::get_3x4_affine_camera_matrix</a></div><div class="ttdeci">cv::Mat get_3x4_affine_camera_matrix(fitting::OrthographicRenderingParameters params, int width, int height)</div><div class="ttdoc">Creates a 3x4 affine camera matrix from given fitting parameters. The matrix transforms points direct...</div><div class="ttdef"><b>Definition:</b> nonlinear_camera_estimation.hpp:129</div></div>
<div class="ttc" id="namespaceeos_html"><div class="ttname"><a href="namespaceeos.html">eos</a></div><div class="ttdoc">Namespace containing all of eos&#39;s 3D model fitting functionality. </div></div>
<div class="ttc" id="structeos_1_1fitting_1_1_orthographic_rendering_parameters_html"><div class="ttname"><a href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">eos::fitting::OrthographicRenderingParameters</a></div><div class="ttdoc">Represents a set of estimated model parameters (rotation, translation) and camera parameters (viewing...</div><div class="ttdef"><b>Definition:</b> nonlinear_camera_estimation.hpp:67</div></div>
<div class="ttc" id="structeos_1_1fitting_1_1_frustum_html"><div class="ttname"><a href="structeos_1_1fitting_1_1_frustum.html">eos::fitting::Frustum</a></div><div class="ttdoc">A class representing a camera viewing frustum. At the moment used as orthographic camera only...</div><div class="ttdef"><b>Definition:</b> nonlinear_camera_estimation.hpp:44</div></div>
</div><!-- fragment --></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.10
</small></address>
</body>
</html>
doc/open.png

123 Bytes

<!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.10"/>
<title>eos: include/eos/render/render.hpp Source File</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_fab380b22e1724065a4c65606be96940.html">render</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">render.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Eos - A 3D Morphable Model fitting library written in modern C++11/14.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * File: include/eos/render/render.hpp</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright 2014, 2015 Patrik Huber</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * limitations under the License.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#ifndef RENDER_HPP_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#define RENDER_HPP_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &quot;eos/render/detail/render_detail.hpp&quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &quot;eos/render/utils.hpp&quot;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &quot;opencv2/core/core.hpp&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#ifdef WIN32</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor"> #define BOOST_ALL_DYN_LINK // Link against the dynamic boost lib. Seems to be necessary because we use /MD, i.e. link to the dynamic CRT.</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor"> #define BOOST_ALL_NO_LIB // Don&#39;t use the automatic library linking by boost with VS2010 (#pragma ...). Instead, we specify everything in cmake.</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#include &quot;boost/optional.hpp&quot;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="preprocessor">#include &lt;array&gt;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> {</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="keyword">namespace </span><a class="code" href="namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5">render</a> {</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;</div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5"> 129</a></span>&#160;std::pair&lt;cv::Mat, cv::Mat&gt; <a class="code" href="namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5">render</a>(<a class="code" href="structeos_1_1render_1_1_mesh.html">Mesh</a> mesh, cv::Mat model_view_matrix, cv::Mat projection_matrix, <span class="keywordtype">int</span> viewport_width, <span class="keywordtype">int</span> viewport_height, <span class="keyword">const</span> <a class="code" href="classeos_1_1render_1_1_texture.html">Texture</a>&amp; texture, <span class="keywordtype">bool</span> enable_backface_culling = <span class="keyword">false</span>, <span class="keywordtype">bool</span> enable_near_clipping = <span class="keyword">true</span>, <span class="keywordtype">bool</span> enable_far_clipping = <span class="keyword">true</span>)</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;{</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="comment">// Some internal documentation / old todos or notes:</span></div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="comment">// maybe change and pass depthBuffer as an optional arg (&amp;?), because usually we never need it outside the renderer. Or maybe even a getDepthBuffer().</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="comment">// modelViewMatrix goes to eye-space (camera space), projection does ortho or perspective proj.</span></div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="comment">// bool enable_texturing = false; Maybe re-add later, not sure</span></div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="comment">// take a cv::Mat texture instead and convert to Texture internally? no, we don&#39;t want to recreate mipmap levels on each render() call.</span></div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; assert(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>.size() == mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>.size() || mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>.empty()); <span class="comment">// The number of vertices has to be equal for both shape and colour, or, alternatively, it has to be a shape-only model.</span></div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; assert(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>.size() == mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>.size() || mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>.empty()); <span class="comment">// same for the texcoords</span></div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="comment">// another assert: If cv::Mat texture != empty, then we need texcoords?</span></div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="keyword">using</span> cv::Mat;</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keyword">using</span> std::vector;</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; Mat colourbuffer = Mat::zeros(viewport_height, viewport_width, CV_8UC4); <span class="comment">// make sure it&#39;s CV_8UC4?</span></div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; Mat depthbuffer = std::numeric_limits&lt;float&gt;::max() * Mat::ones(viewport_height, viewport_width, CV_64FC1);</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="comment">// Vertex shader:</span></div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="comment">//processedVertex = shade(Vertex); // processedVertex : pos, col, tex, texweight</span></div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="comment">// Assemble the vertices, project to clip space, and store as detail::Vertex (the internal representation):</span></div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; vector&lt;detail::Vertex&gt; clipspace_vertices;</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; clipspace_vertices.reserve(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>.size());</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>.size(); ++i) { <span class="comment">// &quot;previously&quot;: mesh.vertex</span></div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; Mat clipspace_coords = projection_matrix * model_view_matrix * Mat(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[i]);</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; cv::Vec3f vertex_colour;</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keywordflow">if</span> (mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>.empty()) {</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; vertex_colour = cv::Vec3f(0.5f, 0.5f, 0.5f);</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; }</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; vertex_colour = mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>[i];</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; }</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; clipspace_vertices.push_back(detail::Vertex(clipspace_coords, vertex_colour, mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[i]));</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; }</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="comment">// All vertices are in clip-space now.</span></div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <span class="comment">// Prepare the rasterisation stage.</span></div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <span class="comment">// For every vertex/tri:</span></div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; vector&lt;detail::TriangleToRasterize&gt; triangles_to_raster;</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; tri_indices : mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">tvi</a>) {</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <span class="comment">// Todo: Split this whole stuff up. Make a &quot;clip&quot; function, ... rename &quot;processProspective..&quot;.. what is &quot;process&quot;... get rid of &quot;continue;&quot;-stuff by moving stuff inside process...</span></div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="comment">// classify vertices visibility with respect to the planes of the view frustum</span></div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="comment">// we&#39;re in clip-coords (NDC), so just check if outside [-1, 1] x ...</span></div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <span class="comment">// Actually we&#39;re in clip-coords and it&#39;s not the same as NDC. We&#39;re only in NDC after the division by w.</span></div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <span class="comment">// We should do the clipping in clip-coords though. See http://www.songho.ca/opengl/gl_projectionmatrix.html for more details.</span></div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <span class="comment">// However, when comparing against w_c below, we might run into the trouble of the sign again in the affine case.</span></div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <span class="comment">// &#39;w&#39; is always positive, as it is -z_camspace, and all z_camspace are negative.</span></div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> visibility_bits[3];</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> k = 0; k &lt; 3; k++)</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; {</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; visibility_bits[k] = 0;</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <span class="keywordtype">float</span> x_cc = clipspace_vertices[tri_indices[k]].position[0];</div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <span class="keywordtype">float</span> y_cc = clipspace_vertices[tri_indices[k]].position[1];</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <span class="keywordtype">float</span> z_cc = clipspace_vertices[tri_indices[k]].position[2];</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="keywordtype">float</span> w_cc = clipspace_vertices[tri_indices[k]].position[3];</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <span class="keywordflow">if</span> (x_cc &lt; -w_cc) <span class="comment">// true if outside of view frustum. False if on or inside the plane.</span></div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; visibility_bits[k] |= 1; <span class="comment">// set bit if outside of frustum</span></div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <span class="keywordflow">if</span> (x_cc &gt; w_cc)</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; visibility_bits[k] |= 2;</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="keywordflow">if</span> (y_cc &lt; -w_cc)</div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; visibility_bits[k] |= 4;</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; <span class="keywordflow">if</span> (y_cc &gt; w_cc)</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; visibility_bits[k] |= 8;</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <span class="keywordflow">if</span> (enable_near_clipping &amp;&amp; z_cc &lt; -w_cc) <span class="comment">// near plane frustum clipping</span></div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; visibility_bits[k] |= 16;</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="keywordflow">if</span> (enable_far_clipping &amp;&amp; z_cc &gt; w_cc) <span class="comment">// far plane frustum clipping</span></div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; visibility_bits[k] |= 32;</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; } <span class="comment">// if all bits are 0, then it&#39;s inside the frustum</span></div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; <span class="comment">// all vertices are not visible - reject the triangle.</span></div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; <span class="keywordflow">if</span> ((visibility_bits[0] &amp; visibility_bits[1] &amp; visibility_bits[2]) &gt; 0)</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; {</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; }</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; <span class="comment">// all vertices are visible - pass the whole triangle to the rasterizer. = All bits of all 3 triangles are 0.</span></div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; <span class="keywordflow">if</span> ((visibility_bits[0] | visibility_bits[1] | visibility_bits[2]) == 0)</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; {</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; boost::optional&lt;detail::TriangleToRasterize&gt; t = detail::process_prospective_tri(clipspace_vertices[tri_indices[0]], clipspace_vertices[tri_indices[1]], clipspace_vertices[tri_indices[2]], viewport_width, viewport_height, enable_backface_culling);</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; <span class="keywordflow">if</span> (t) {</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; triangles_to_raster.push_back(*t);</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; }</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; }</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; <span class="comment">// at this moment the triangle is known to be intersecting one of the view frustum&#39;s planes</span></div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; std::vector&lt;detail::Vertex&gt; vertices;</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; vertices.push_back(clipspace_vertices[tri_indices[0]]);</div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; vertices.push_back(clipspace_vertices[tri_indices[1]]);</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; vertices.push_back(clipspace_vertices[tri_indices[2]]);</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; <span class="comment">// split the triangle if it intersects the near plane:</span></div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; <span class="keywordflow">if</span> (enable_near_clipping)</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; {</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; vertices = detail::clip_polygon_to_plane_in_4d(vertices, cv::Vec4f(0.0f, 0.0f, -1.0f, -1.0f)); <span class="comment">// &quot;Normal&quot; (or &quot;4D hyperplane&quot;) of the near-plane. I tested it and it works like this but I&#39;m a little bit unsure because Songho says the normal of the near-plane is (0,0,-1,1) (maybe I have to switch around the &lt; 0 checks in the function?)</span></div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; }</div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160;</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; <span class="comment">// triangulation of the polygon formed of vertices array</span></div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; <span class="keywordflow">if</span> (vertices.size() &gt;= 3)</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; {</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> k = 0; k &lt; vertices.size() - 2; k++)</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; {</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; boost::optional&lt;detail::TriangleToRasterize&gt; t = detail::process_prospective_tri(vertices[0], vertices[1 + k], vertices[2 + k], viewport_width, viewport_height, enable_backface_culling);</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; <span class="keywordflow">if</span> (t) {</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; triangles_to_raster.push_back(*t);</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; }</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; }</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; }</div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; }</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160;</div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; <span class="comment">// Fragment/pixel shader: Colour the pixel values</span></div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; <span class="comment">// for every tri:</span></div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; tri : triangles_to_raster) {</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; detail::raster_triangle(tri, colourbuffer, depthbuffer, texture, enable_far_clipping);</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; }</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; <span class="keywordflow">return</span> std::make_pair(colourbuffer, depthbuffer);</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160;};</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160;</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; } <span class="comment">/* namespace render */</span></div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160;} <span class="comment">/* namespace eos */</span></div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160;</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* RENDER_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="classeos_1_1render_1_1_texture_html"><div class="ttname"><a href="classeos_1_1render_1_1_texture.html">eos::render::Texture</a></div><div class="ttdef"><b>Definition:</b> utils.hpp:150</div></div>
<div class="ttc" id="namespaceeos_html"><div class="ttname"><a href="namespaceeos.html">eos</a></div><div class="ttdoc">Namespace containing all of eos&#39;s 3D model fitting functionality. </div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_a305d17e6453f6be320331e00e8c8816e"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">eos::render::Mesh::vertices</a></div><div class="ttdeci">std::vector&lt; cv::Vec4f &gt; vertices</div><div class="ttdoc">3D vertex positions. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:51</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_ae3b0e946a77b4f434b382b315ea7c24b"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">eos::render::Mesh::colors</a></div><div class="ttdeci">std::vector&lt; cv::Vec3f &gt; colors</div><div class="ttdoc">Colour information for each vertex. Expected to be in RGB order. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:52</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html">eos::render::Mesh</a></div><div class="ttdoc">This class represents a 3D mesh consisting of vertices, vertex colour information and texture coordin...</div><div class="ttdef"><b>Definition:</b> Mesh.hpp:49</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_ab6fb80c460656bf7830a526f0692681b"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">eos::render::Mesh::tvi</a></div><div class="ttdeci">std::vector&lt; std::array&lt; int, 3 &gt; &gt; tvi</div><div class="ttdoc">Triangle vertex indices. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:55</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_a64fddf0a7200e7f66b0426773542eea4"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">eos::render::Mesh::texcoords</a></div><div class="ttdeci">std::vector&lt; cv::Vec2f &gt; texcoords</div><div class="ttdoc">Texture coordinates for each vertex. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:53</div></div>
<div class="ttc" id="namespaceeos_1_1render_html_a7628a42875570658bea6ffb4f46723e5"><div class="ttname"><a href="namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5">eos::render::render</a></div><div class="ttdeci">std::pair&lt; cv::Mat, cv::Mat &gt; render(Mesh mesh, cv::Mat model_view_matrix, cv::Mat projection_matrix, int viewport_width, int viewport_height, const Texture &amp;texture, bool enable_backface_culling=false, bool enable_near_clipping=true, bool enable_far_clipping=true)</div><div class="ttdef"><b>Definition:</b> render.hpp:129</div></div>
</div><!-- fragment --></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: include/eos/render/render_affine.hpp Source File</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_fab380b22e1724065a4c65606be96940.html">render</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">render_affine.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Eos - A 3D Morphable Model fitting library written in modern C++11/14.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * File: include/eos/render/render_affine.hpp</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright 2014, 2015 Patrik Huber</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * limitations under the License.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#ifndef RENDER_AFFINE_HPP_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#define RENDER_AFFINE_HPP_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &quot;eos/render/detail/render_detail.hpp&quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &quot;eos/render/detail/render_affine_detail.hpp&quot;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &quot;eos/render/Mesh.hpp&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &quot;opencv2/core/core.hpp&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> {</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="keyword">namespace </span><a class="code" href="namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5">render</a> {</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="namespaceeos_1_1render.html#a1adc532475d45d16f7b0c0eddf1bc7cb"> 52</a></span>&#160;std::pair&lt;cv::Mat, cv::Mat&gt; <a class="code" href="namespaceeos_1_1render.html#a1adc532475d45d16f7b0c0eddf1bc7cb">render_affine</a>(<a class="code" href="structeos_1_1render_1_1_mesh.html">Mesh</a> mesh, cv::Mat affine_camera_matrix, <span class="keywordtype">int</span> viewport_width, <span class="keywordtype">int</span> viewport_height, <span class="keywordtype">bool</span> do_backface_culling = <span class="keyword">true</span>)</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;{</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; assert(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>.size() == mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>.size() || mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>.empty()); <span class="comment">// The number of vertices has to be equal for both shape and colour, or, alternatively, it has to be a shape-only model.</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="comment">//assert(mesh.vertices.size() == mesh.texcoords.size() || mesh.texcoords.empty()); // same for the texcoords</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="keyword">using</span> cv::Mat;</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="keyword">using</span> std::vector;</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; Mat colourbuffer = Mat::zeros(viewport_height, viewport_width, CV_8UC4);</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; Mat depthbuffer = std::numeric_limits&lt;float&gt;::max() * Mat::ones(viewport_height, viewport_width, CV_64FC1);</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; Mat affine_with_z = detail::calculate_affine_z_direction(affine_camera_matrix);</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; vector&lt;detail::Vertex&gt; projected_vertices;</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; projected_vertices.reserve(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>.size());</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>.size(); ++i) {</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; Mat vertex_screen_coords = affine_with_z * Mat(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[i]);</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; cv::Vec3f vertex_colour;</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keywordflow">if</span> (mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>.empty()) {</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; vertex_colour = cv::Vec3f(0.5f, 0.5f, 0.5f);</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; }</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; vertex_colour = mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a>[i];</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; }</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; projected_vertices.push_back(detail::Vertex(vertex_screen_coords, vertex_colour, mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[i]));</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; }</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="comment">// All vertices are screen-coordinates now</span></div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; vector&lt;detail::TriangleToRasterize&gt; triangles_to_raster;</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; tri_indices : mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">tvi</a>) {</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keywordflow">if</span> (do_backface_culling) {</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="keywordflow">if</span> (!detail::are_vertices_ccw_in_screen_space(projected_vertices[tri_indices[0]].position, projected_vertices[tri_indices[1]].position, projected_vertices[tri_indices[2]].position))</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <span class="keywordflow">continue</span>; <span class="comment">// don&#39;t render this triangle</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; }</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="comment">// Get the bounding box of the triangle:</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="comment">// take care: What do we do if all 3 vertices are not visible. Seems to work on a test case.</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; cv::Rect bounding_box = detail::calculate_clipped_bounding_box(projected_vertices[tri_indices[0]].position, projected_vertices[tri_indices[1]].position, projected_vertices[tri_indices[2]].position, viewport_width, viewport_height);</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <span class="keyword">auto</span> min_x = bounding_box.x;</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keyword">auto</span> max_x = bounding_box.x + bounding_box.width;</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keyword">auto</span> min_y = bounding_box.y;</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keyword">auto</span> max_y = bounding_box.y + bounding_box.height;</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <span class="keywordflow">if</span> (max_x &lt;= min_x || max_y &lt;= min_y) <span class="comment">// Note: Can the width/height of the bbox be negative? Maybe we only need to check for equality here?</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; detail::TriangleToRasterize t;</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; t.min_x = min_x;</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; t.max_x = max_x;</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; t.min_y = min_y;</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; t.max_y = max_y;</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; t.v0 = projected_vertices[tri_indices[0]];</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; t.v1 = projected_vertices[tri_indices[1]];</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; t.v2 = projected_vertices[tri_indices[2]];</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; triangles_to_raster.push_back(t);</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; }</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="comment">// Raster all triangles, i.e. colour the pixel values and write the z-buffer</span></div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp;&amp; triangle : triangles_to_raster) {</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; detail::raster_triangle_affine(triangle, colourbuffer, depthbuffer);</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; }</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keywordflow">return</span> std::make_pair(colourbuffer, depthbuffer);</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;};</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; } <span class="comment">/* namespace render */</span></div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;} <span class="comment">/* namespace eos */</span></div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* RENDER_AFFINE_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="namespaceeos_1_1render_html_a1adc532475d45d16f7b0c0eddf1bc7cb"><div class="ttname"><a href="namespaceeos_1_1render.html#a1adc532475d45d16f7b0c0eddf1bc7cb">eos::render::render_affine</a></div><div class="ttdeci">std::pair&lt; cv::Mat, cv::Mat &gt; render_affine(Mesh mesh, cv::Mat affine_camera_matrix, int viewport_width, int viewport_height, bool do_backface_culling=true)</div><div class="ttdef"><b>Definition:</b> render_affine.hpp:52</div></div>
<div class="ttc" id="namespaceeos_html"><div class="ttname"><a href="namespaceeos.html">eos</a></div><div class="ttdoc">Namespace containing all of eos&#39;s 3D model fitting functionality. </div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_a305d17e6453f6be320331e00e8c8816e"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">eos::render::Mesh::vertices</a></div><div class="ttdeci">std::vector&lt; cv::Vec4f &gt; vertices</div><div class="ttdoc">3D vertex positions. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:51</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_ae3b0e946a77b4f434b382b315ea7c24b"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">eos::render::Mesh::colors</a></div><div class="ttdeci">std::vector&lt; cv::Vec3f &gt; colors</div><div class="ttdoc">Colour information for each vertex. Expected to be in RGB order. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:52</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html">eos::render::Mesh</a></div><div class="ttdoc">This class represents a 3D mesh consisting of vertices, vertex colour information and texture coordin...</div><div class="ttdef"><b>Definition:</b> Mesh.hpp:49</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_ab6fb80c460656bf7830a526f0692681b"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">eos::render::Mesh::tvi</a></div><div class="ttdeci">std::vector&lt; std::array&lt; int, 3 &gt; &gt; tvi</div><div class="ttdoc">Triangle vertex indices. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:55</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_a64fddf0a7200e7f66b0426773542eea4"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">eos::render::Mesh::texcoords</a></div><div class="ttdeci">std::vector&lt; cv::Vec2f &gt; texcoords</div><div class="ttdoc">Texture coordinates for each vertex. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:53</div></div>
<div class="ttc" id="namespaceeos_1_1render_html_a7628a42875570658bea6ffb4f46723e5"><div class="ttname"><a href="namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5">eos::render::render</a></div><div class="ttdeci">std::pair&lt; cv::Mat, cv::Mat &gt; render(Mesh mesh, cv::Mat model_view_matrix, cv::Mat projection_matrix, int viewport_width, int viewport_height, const Texture &amp;texture, bool enable_backface_culling=false, bool enable_near_clipping=true, bool enable_far_clipping=true)</div><div class="ttdef"><b>Definition:</b> render.hpp:129</div></div>
</div><!-- fragment --></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.10
</small></address>
</body>
</html>
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_0.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>
var searchData=
[
['calculate_5fface_5fnormal',['calculate_face_normal',['../namespaceeos_1_1render.html#ac72cdee6eed13468a424824ddd0b3074',1,'eos::render']]],
['clip_5fto_5fscreen_5fspace',['clip_to_screen_space',['../namespaceeos_1_1render.html#a04bb2f816e97ecb7f33cf8a50328e0db',1,'eos::render']]],
['colors',['colors',['../structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b',1,'eos::render::Mesh']]],
['convert',['convert',['../classeos_1_1core_1_1_landmark_mapper.html#aa0d5463e00e3b8f074b1f81dbd9390a7',1,'eos::core::LandmarkMapper']]],
['coordinates',['coordinates',['../structeos_1_1core_1_1_landmark.html#aa3ffa0bd40290634e485e3c5ca99229c',1,'eos::core::Landmark']]],
['cv',['cv',['../namespacecv.html',1,'']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_1.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>
var searchData=
[
['draw_5fsample',['draw_sample',['../classeos_1_1morphablemodel_1_1_morphable_model.html#a5fd1b15edc89e89808339859570a4c09',1,'eos::morphablemodel::MorphableModel::draw_sample(float shape_sigma=1.0f, float color_sigma=1.0f)'],['../classeos_1_1morphablemodel_1_1_morphable_model.html#a14787e8e29f390277b10f2d0e19aa587',1,'eos::morphablemodel::MorphableModel::draw_sample(std::vector&lt; float &gt; shape_coefficients, std::vector&lt; float &gt; color_coefficients)'],['../classeos_1_1morphablemodel_1_1_pca_model.html#a8dfc5fa04f9853f2e06b971b90415538',1,'eos::morphablemodel::PcaModel::draw_sample(float sigma=1.0f)'],['../classeos_1_1morphablemodel_1_1_pca_model.html#abb5f0c6f86ab0cf9b35016441d877745',1,'eos::morphablemodel::PcaModel::draw_sample(std::vector&lt; float &gt; coefficients)']]],
['draw_5ftexcoords',['draw_texcoords',['../namespaceeos_1_1render.html#a4edecd42a4a04ba6eb95089dd3ff256a',1,'eos::render']]]
];
<!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.10"/>
<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>
var searchData=
[
['write_5fobj',['write_obj',['../namespaceeos_1_1render.html#a9b4673997fae6d670d7a9cc23543e8d7',1,'eos::render']]],
['write_5ftextured_5fobj',['write_textured_obj',['../namespaceeos_1_1render.html#afd6561b065b9c0dd6815580ab12c3204',1,'eos::render']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_2.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>
var searchData=
[
['core',['core',['../namespaceeos_1_1core.html',1,'eos']]],
['eos',['eos',['../namespaceeos.html',1,'']]],
['estimate_5faffine_5fcamera',['estimate_affine_camera',['../namespaceeos_1_1fitting.html#afce5f7297094056a04ad26785c94bbd8',1,'eos::fitting']]],
['estimate_5forthographic_5fcamera',['estimate_orthographic_camera',['../namespaceeos_1_1fitting.html#aebab65b3f9f46758b1363a347e6de852',1,'eos::fitting']]],
['extract_5ftexture',['extract_texture',['../namespaceeos_1_1render.html#aafa8c960c3b6eb080da1536cc3634577',1,'eos::render::extract_texture(Mesh mesh, cv::Mat affine_camera_matrix, cv::Mat image, cv::Mat depthbuffer, bool compute_view_angle, TextureInterpolation mapping_type, int isomap_resolution)'],['../namespaceeos_1_1render.html#ad663c29566fafc33606349a35d0bdbf1',1,'eos::render::extract_texture(Mesh mesh, cv::Mat affine_camera_matrix, cv::Mat image, bool compute_view_angle=false, TextureInterpolation mapping_type=TextureInterpolation::NearestNeighbour, int isomap_resolution=512)']]],
['fitting',['fitting',['../namespaceeos_1_1fitting.html',1,'eos']]],
['morphablemodel',['morphablemodel',['../namespaceeos_1_1morphablemodel.html',1,'eos']]],
['render',['render',['../namespaceeos_1_1render.html',1,'eos']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_3.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>
var searchData=
[
['filter',['filter',['../namespaceeos_1_1core.html#aacf41dc417a1dbfc929c9cc7f2c7feeb',1,'eos::core']]],
['fit_5fshape_5fto_5flandmarks_5flinear',['fit_shape_to_landmarks_linear',['../namespaceeos_1_1fitting.html#ae68794185075b5b67fddae9d359cf208',1,'eos::fitting']]],
['frustum',['Frustum',['../structeos_1_1fitting_1_1_frustum.html',1,'eos::fitting']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_4.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>
var searchData=
[
['get_5f3x4_5faffine_5fcamera_5fmatrix',['get_3x4_affine_camera_matrix',['../namespaceeos_1_1fitting.html#af600978a071bc5dc0443cfe41ae613bf',1,'eos::fitting']]],
['get_5f4x4_5fmodelview_5fmatrix',['get_4x4_modelview_matrix',['../namespaceeos_1_1fitting.html#a503a126cfe1bbd6a7c8b7a786a8e73b8',1,'eos::fitting']]],
['get_5fcolor_5fmodel',['get_color_model',['../classeos_1_1morphablemodel_1_1_morphable_model.html#a1fff16d5d749831fa90049199101298c',1,'eos::morphablemodel::MorphableModel']]],
['get_5fdata_5fdimension',['get_data_dimension',['../classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d',1,'eos::morphablemodel::PcaModel']]],
['get_5feigenvalue',['get_eigenvalue',['../classeos_1_1morphablemodel_1_1_pca_model.html#a8315679e0893b1bcde4f9a9aa08a137d',1,'eos::morphablemodel::PcaModel']]],
['get_5fmean',['get_mean',['../classeos_1_1morphablemodel_1_1_morphable_model.html#a43dcaaff84e217ea9643e37705136f31',1,'eos::morphablemodel::MorphableModel::get_mean()'],['../classeos_1_1morphablemodel_1_1_pca_model.html#af05c96c2a5d3936503b961a9b4238495',1,'eos::morphablemodel::PcaModel::get_mean()']]],
['get_5fmean_5fat_5fpoint',['get_mean_at_point',['../classeos_1_1morphablemodel_1_1_pca_model.html#a1820ad4e0b9719884811188f3c932592',1,'eos::morphablemodel::PcaModel']]],
['get_5fnormalised_5fpca_5fbasis',['get_normalised_pca_basis',['../classeos_1_1morphablemodel_1_1_pca_model.html#af0597eb2cf01c98e397773740f3a8258',1,'eos::morphablemodel::PcaModel::get_normalised_pca_basis() const '],['../classeos_1_1morphablemodel_1_1_pca_model.html#a66e4ef89182a98845a8a6804047f2b77',1,'eos::morphablemodel::PcaModel::get_normalised_pca_basis(int vertex_id) const ']]],
['get_5fnum_5fprincipal_5fcomponents',['get_num_principal_components',['../classeos_1_1morphablemodel_1_1_pca_model.html#a309148e123fc5fecd3cf10513f75b657',1,'eos::morphablemodel::PcaModel']]],
['get_5fopencv_5fviewport',['get_opencv_viewport',['../namespaceeos_1_1fitting.html#a4e713b5555396806a9b26817184eacd0',1,'eos::fitting']]],
['get_5fshape_5fmodel',['get_shape_model',['../classeos_1_1morphablemodel_1_1_morphable_model.html#a990bf9c518307c811691facb8c1daa11',1,'eos::morphablemodel::MorphableModel']]],
['get_5ftexture_5fcoordinates',['get_texture_coordinates',['../classeos_1_1morphablemodel_1_1_morphable_model.html#aeffacfcafaf7dff6e21b047a2a6d22ae',1,'eos::morphablemodel::MorphableModel']]],
['get_5ftriangle_5flist',['get_triangle_list',['../classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3',1,'eos::morphablemodel::PcaModel']]],
['get_5funnormalised_5fpca_5fbasis',['get_unnormalised_pca_basis',['../classeos_1_1morphablemodel_1_1_pca_model.html#a8d0f31b08aca934b7cf86dd92a1abbe2',1,'eos::morphablemodel::PcaModel::get_unnormalised_pca_basis() const '],['../classeos_1_1morphablemodel_1_1_pca_model.html#a059f3e3f68307fd97b3e4aa38e4b6d34',1,'eos::morphablemodel::PcaModel::get_unnormalised_pca_basis(int vertex_id) const ']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_5.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>
var searchData=
[
['has_5fcolor_5fmodel',['has_color_model',['../classeos_1_1morphablemodel_1_1_morphable_model.html#a253ca65b7f6c6cb48d4abd7b9a7f9a83',1,'eos::morphablemodel::MorphableModel']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_6.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>
var searchData=
[
['landmark',['Landmark',['../structeos_1_1core_1_1_landmark.html',1,'eos::core']]],
['landmarkcollection',['LandmarkCollection',['../namespaceeos_1_1core.html#a6d6a8533690b5860236f55afafa14d2b',1,'eos::core']]],
['landmarkmapper',['LandmarkMapper',['../classeos_1_1core_1_1_landmark_mapper.html',1,'eos::core']]],
['landmarkmapper',['LandmarkMapper',['../classeos_1_1core_1_1_landmark_mapper.html#ab31ea1ec78c463ce54e2372fce103889',1,'eos::core::LandmarkMapper::LandmarkMapper()=default'],['../classeos_1_1core_1_1_landmark_mapper.html#a7da2756a772bd7dd7708bf20fcc95fc4',1,'eos::core::LandmarkMapper::LandmarkMapper(boost::filesystem::path filename)']]],
['load',['load',['../namespacecv.html#a7172a20ab6627a1c1967d322bdfc8756',1,'cv']]],
['load_5fisomap',['load_isomap',['../namespaceeos_1_1morphablemodel.html#afa73fdf5b394458b7e21639ae50d074c',1,'eos::morphablemodel']]],
['load_5fmodel',['load_model',['../namespaceeos_1_1morphablemodel.html#a0da6e35ec49f1ebdf55f9596540cf8f8',1,'eos::morphablemodel']]],
['load_5fscm_5fmodel',['load_scm_model',['../namespaceeos_1_1morphablemodel.html#a0d607b8838d70cd8ec41cb4bfe116f58',1,'eos::morphablemodel']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_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>
var searchData=
[
['mesh',['Mesh',['../structeos_1_1render_1_1_mesh.html',1,'eos::render']]],
['morphablemodel',['MorphableModel',['../classeos_1_1morphablemodel_1_1_morphable_model.html#a438898cd4578c1998e452de7d521f8cc',1,'eos::morphablemodel::MorphableModel']]],
['morphablemodel',['MorphableModel',['../classeos_1_1morphablemodel_1_1_morphable_model.html',1,'eos::morphablemodel']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_8.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>
var searchData=
[
['name',['name',['../structeos_1_1core_1_1_landmark.html#a85c0f001e311e994314e900dcb284ad3',1,'eos::core::Landmark']]],
['normalise_5fpca_5fbasis',['normalise_pca_basis',['../namespaceeos_1_1morphablemodel.html#a73d9baeb67f25d4604fc291a23e5e2d8',1,'eos::morphablemodel']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_9.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>
var searchData=
[
['orthographicrenderingparameters',['OrthographicRenderingParameters',['../structeos_1_1fitting_1_1_orthographic_rendering_parameters.html',1,'eos::fitting']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_a.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>
var searchData=
[
['pcamodel',['PcaModel',['../classeos_1_1morphablemodel_1_1_pca_model.html',1,'eos::morphablemodel']]],
['pcamodel',['PcaModel',['../classeos_1_1morphablemodel_1_1_pca_model.html#ab2e45689de5f00a6109ecf00b0625d2f',1,'eos::morphablemodel::PcaModel']]],
['project_5faffine',['project_affine',['../namespaceeos_1_1fitting.html#a3e99a34e412f0bb5b2c6568dd37ae413',1,'eos::fitting']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_b.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>
var searchData=
[
['render',['render',['../namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5',1,'eos::render']]],
['render_5faffine',['render_affine',['../namespaceeos_1_1render.html#a1adc532475d45d16f7b0c0eddf1bc7cb',1,'eos::render']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_c.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>
var searchData=
[
['save',['save',['../namespacecv.html#a62cc822cc258c9305ac746d3a832f9d4',1,'cv']]],
['save_5fmodel',['save_model',['../namespaceeos_1_1morphablemodel.html#aad09e0fd0788cb7fea41ed799c653e71',1,'eos::morphablemodel']]],
['screen_5fto_5fclip_5fspace',['screen_to_clip_space',['../namespaceeos_1_1render.html#a7c4b923267e9b3b09c0c588bfdd4cb85',1,'eos::render']]],
['serialize',['serialize',['../namespacecv.html#a51eb61cb95a3e45290a030560ac7a2cd',1,'cv']]],
['size',['size',['../classeos_1_1core_1_1_landmark_mapper.html#a7e3a46e6aeb522d96066a3d73f4c92c6',1,'eos::core::LandmarkMapper']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_d.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>
var searchData=
[
['tci',['tci',['../structeos_1_1render_1_1_mesh.html#a81c47a35a1b0a6a6cb440cfbb67b8c28',1,'eos::render::Mesh']]],
['texcoords',['texcoords',['../structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4',1,'eos::render::Mesh']]],
['texture',['Texture',['../classeos_1_1render_1_1_texture.html',1,'eos::render']]],
['textureinterpolation',['TextureInterpolation',['../namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237',1,'eos::render']]],
['to_5fmat',['to_mat',['../namespaceeos_1_1fitting.html#a93f7464a6c6dee7b3885638014ec009a',1,'eos::fitting']]],
['tvi',['tvi',['../structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b',1,'eos::render::Mesh']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_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>
var searchData=
[
['unnormalise_5fpca_5fbasis',['unnormalise_pca_basis',['../namespaceeos_1_1morphablemodel.html#a3d9ed5fa969cbd540ebe9587540f3607',1,'eos::morphablemodel']]]
];
<!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.10"/>
<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>
var searchData=
[
['vertices',['vertices',['../structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e',1,'eos::render::Mesh']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="classes_0.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>
var searchData=
[
['frustum',['Frustum',['../structeos_1_1fitting_1_1_frustum.html',1,'eos::fitting']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="classes_1.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>
var searchData=
[
['landmark',['Landmark',['../structeos_1_1core_1_1_landmark.html',1,'eos::core']]],
['landmarkmapper',['LandmarkMapper',['../classeos_1_1core_1_1_landmark_mapper.html',1,'eos::core']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="classes_2.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>
var searchData=
[
['mesh',['Mesh',['../structeos_1_1render_1_1_mesh.html',1,'eos::render']]],
['morphablemodel',['MorphableModel',['../classeos_1_1morphablemodel_1_1_morphable_model.html',1,'eos::morphablemodel']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="classes_3.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>
var searchData=
[
['orthographicrenderingparameters',['OrthographicRenderingParameters',['../structeos_1_1fitting_1_1_orthographic_rendering_parameters.html',1,'eos::fitting']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="classes_4.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>
var searchData=
[
['pcamodel',['PcaModel',['../classeos_1_1morphablemodel_1_1_pca_model.html',1,'eos::morphablemodel']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="classes_5.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>
var searchData=
[
['texture',['Texture',['../classeos_1_1render_1_1_texture.html',1,'eos::render']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="enums_0.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>
var searchData=
[
['textureinterpolation',['TextureInterpolation',['../namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237',1,'eos::render']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_0.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>
var searchData=
[
['calculate_5fface_5fnormal',['calculate_face_normal',['../namespaceeos_1_1render.html#ac72cdee6eed13468a424824ddd0b3074',1,'eos::render']]],
['clip_5fto_5fscreen_5fspace',['clip_to_screen_space',['../namespaceeos_1_1render.html#a04bb2f816e97ecb7f33cf8a50328e0db',1,'eos::render']]],
['convert',['convert',['../classeos_1_1core_1_1_landmark_mapper.html#aa0d5463e00e3b8f074b1f81dbd9390a7',1,'eos::core::LandmarkMapper']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_1.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>
var searchData=
[
['draw_5fsample',['draw_sample',['../classeos_1_1morphablemodel_1_1_morphable_model.html#a5fd1b15edc89e89808339859570a4c09',1,'eos::morphablemodel::MorphableModel::draw_sample(float shape_sigma=1.0f, float color_sigma=1.0f)'],['../classeos_1_1morphablemodel_1_1_morphable_model.html#a14787e8e29f390277b10f2d0e19aa587',1,'eos::morphablemodel::MorphableModel::draw_sample(std::vector&lt; float &gt; shape_coefficients, std::vector&lt; float &gt; color_coefficients)'],['../classeos_1_1morphablemodel_1_1_pca_model.html#a8dfc5fa04f9853f2e06b971b90415538',1,'eos::morphablemodel::PcaModel::draw_sample(float sigma=1.0f)'],['../classeos_1_1morphablemodel_1_1_pca_model.html#abb5f0c6f86ab0cf9b35016441d877745',1,'eos::morphablemodel::PcaModel::draw_sample(std::vector&lt; float &gt; coefficients)']]],
['draw_5ftexcoords',['draw_texcoords',['../namespaceeos_1_1render.html#a4edecd42a4a04ba6eb95089dd3ff256a',1,'eos::render']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_2.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>
var searchData=
[
['estimate_5faffine_5fcamera',['estimate_affine_camera',['../namespaceeos_1_1fitting.html#afce5f7297094056a04ad26785c94bbd8',1,'eos::fitting']]],
['estimate_5forthographic_5fcamera',['estimate_orthographic_camera',['../namespaceeos_1_1fitting.html#aebab65b3f9f46758b1363a347e6de852',1,'eos::fitting']]],
['extract_5ftexture',['extract_texture',['../namespaceeos_1_1render.html#aafa8c960c3b6eb080da1536cc3634577',1,'eos::render::extract_texture(Mesh mesh, cv::Mat affine_camera_matrix, cv::Mat image, cv::Mat depthbuffer, bool compute_view_angle, TextureInterpolation mapping_type, int isomap_resolution)'],['../namespaceeos_1_1render.html#ad663c29566fafc33606349a35d0bdbf1',1,'eos::render::extract_texture(Mesh mesh, cv::Mat affine_camera_matrix, cv::Mat image, bool compute_view_angle=false, TextureInterpolation mapping_type=TextureInterpolation::NearestNeighbour, int isomap_resolution=512)']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_3.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>
var searchData=
[
['filter',['filter',['../namespaceeos_1_1core.html#aacf41dc417a1dbfc929c9cc7f2c7feeb',1,'eos::core']]],
['fit_5fshape_5fto_5flandmarks_5flinear',['fit_shape_to_landmarks_linear',['../namespaceeos_1_1fitting.html#ae68794185075b5b67fddae9d359cf208',1,'eos::fitting']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_4.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>
var searchData=
[
['get_5f3x4_5faffine_5fcamera_5fmatrix',['get_3x4_affine_camera_matrix',['../namespaceeos_1_1fitting.html#af600978a071bc5dc0443cfe41ae613bf',1,'eos::fitting']]],
['get_5f4x4_5fmodelview_5fmatrix',['get_4x4_modelview_matrix',['../namespaceeos_1_1fitting.html#a503a126cfe1bbd6a7c8b7a786a8e73b8',1,'eos::fitting']]],
['get_5fcolor_5fmodel',['get_color_model',['../classeos_1_1morphablemodel_1_1_morphable_model.html#a1fff16d5d749831fa90049199101298c',1,'eos::morphablemodel::MorphableModel']]],
['get_5fdata_5fdimension',['get_data_dimension',['../classeos_1_1morphablemodel_1_1_pca_model.html#acdf68d929079eab57ab4990c468a9e0d',1,'eos::morphablemodel::PcaModel']]],
['get_5feigenvalue',['get_eigenvalue',['../classeos_1_1morphablemodel_1_1_pca_model.html#a8315679e0893b1bcde4f9a9aa08a137d',1,'eos::morphablemodel::PcaModel']]],
['get_5fmean',['get_mean',['../classeos_1_1morphablemodel_1_1_morphable_model.html#a43dcaaff84e217ea9643e37705136f31',1,'eos::morphablemodel::MorphableModel::get_mean()'],['../classeos_1_1morphablemodel_1_1_pca_model.html#af05c96c2a5d3936503b961a9b4238495',1,'eos::morphablemodel::PcaModel::get_mean()']]],
['get_5fmean_5fat_5fpoint',['get_mean_at_point',['../classeos_1_1morphablemodel_1_1_pca_model.html#a1820ad4e0b9719884811188f3c932592',1,'eos::morphablemodel::PcaModel']]],
['get_5fnormalised_5fpca_5fbasis',['get_normalised_pca_basis',['../classeos_1_1morphablemodel_1_1_pca_model.html#af0597eb2cf01c98e397773740f3a8258',1,'eos::morphablemodel::PcaModel::get_normalised_pca_basis() const '],['../classeos_1_1morphablemodel_1_1_pca_model.html#a66e4ef89182a98845a8a6804047f2b77',1,'eos::morphablemodel::PcaModel::get_normalised_pca_basis(int vertex_id) const ']]],
['get_5fnum_5fprincipal_5fcomponents',['get_num_principal_components',['../classeos_1_1morphablemodel_1_1_pca_model.html#a309148e123fc5fecd3cf10513f75b657',1,'eos::morphablemodel::PcaModel']]],
['get_5fopencv_5fviewport',['get_opencv_viewport',['../namespaceeos_1_1fitting.html#a4e713b5555396806a9b26817184eacd0',1,'eos::fitting']]],
['get_5fshape_5fmodel',['get_shape_model',['../classeos_1_1morphablemodel_1_1_morphable_model.html#a990bf9c518307c811691facb8c1daa11',1,'eos::morphablemodel::MorphableModel']]],
['get_5ftexture_5fcoordinates',['get_texture_coordinates',['../classeos_1_1morphablemodel_1_1_morphable_model.html#aeffacfcafaf7dff6e21b047a2a6d22ae',1,'eos::morphablemodel::MorphableModel']]],
['get_5ftriangle_5flist',['get_triangle_list',['../classeos_1_1morphablemodel_1_1_pca_model.html#aab14825974f9512ba3b7b88afd2521b3',1,'eos::morphablemodel::PcaModel']]],
['get_5funnormalised_5fpca_5fbasis',['get_unnormalised_pca_basis',['../classeos_1_1morphablemodel_1_1_pca_model.html#a8d0f31b08aca934b7cf86dd92a1abbe2',1,'eos::morphablemodel::PcaModel::get_unnormalised_pca_basis() const '],['../classeos_1_1morphablemodel_1_1_pca_model.html#a059f3e3f68307fd97b3e4aa38e4b6d34',1,'eos::morphablemodel::PcaModel::get_unnormalised_pca_basis(int vertex_id) const ']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_5.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>
var searchData=
[
['has_5fcolor_5fmodel',['has_color_model',['../classeos_1_1morphablemodel_1_1_morphable_model.html#a253ca65b7f6c6cb48d4abd7b9a7f9a83',1,'eos::morphablemodel::MorphableModel']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_6.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>
var searchData=
[
['landmarkmapper',['LandmarkMapper',['../classeos_1_1core_1_1_landmark_mapper.html#ab31ea1ec78c463ce54e2372fce103889',1,'eos::core::LandmarkMapper::LandmarkMapper()=default'],['../classeos_1_1core_1_1_landmark_mapper.html#a7da2756a772bd7dd7708bf20fcc95fc4',1,'eos::core::LandmarkMapper::LandmarkMapper(boost::filesystem::path filename)']]],
['load',['load',['../namespacecv.html#a7172a20ab6627a1c1967d322bdfc8756',1,'cv']]],
['load_5fisomap',['load_isomap',['../namespaceeos_1_1morphablemodel.html#afa73fdf5b394458b7e21639ae50d074c',1,'eos::morphablemodel']]],
['load_5fmodel',['load_model',['../namespaceeos_1_1morphablemodel.html#a0da6e35ec49f1ebdf55f9596540cf8f8',1,'eos::morphablemodel']]],
['load_5fscm_5fmodel',['load_scm_model',['../namespaceeos_1_1morphablemodel.html#a0d607b8838d70cd8ec41cb4bfe116f58',1,'eos::morphablemodel']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_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>
var searchData=
[
['morphablemodel',['MorphableModel',['../classeos_1_1morphablemodel_1_1_morphable_model.html#a438898cd4578c1998e452de7d521f8cc',1,'eos::morphablemodel::MorphableModel']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_8.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>
var searchData=
[
['normalise_5fpca_5fbasis',['normalise_pca_basis',['../namespaceeos_1_1morphablemodel.html#a73d9baeb67f25d4604fc291a23e5e2d8',1,'eos::morphablemodel']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_9.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>
var searchData=
[
['pcamodel',['PcaModel',['../classeos_1_1morphablemodel_1_1_pca_model.html#ab2e45689de5f00a6109ecf00b0625d2f',1,'eos::morphablemodel::PcaModel']]],
['project_5faffine',['project_affine',['../namespaceeos_1_1fitting.html#a3e99a34e412f0bb5b2c6568dd37ae413',1,'eos::fitting']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_a.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>
var searchData=
[
['render',['render',['../namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5',1,'eos::render']]],
['render_5faffine',['render_affine',['../namespaceeos_1_1render.html#a1adc532475d45d16f7b0c0eddf1bc7cb',1,'eos::render']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_b.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>
var searchData=
[
['save',['save',['../namespacecv.html#a62cc822cc258c9305ac746d3a832f9d4',1,'cv']]],
['save_5fmodel',['save_model',['../namespaceeos_1_1morphablemodel.html#aad09e0fd0788cb7fea41ed799c653e71',1,'eos::morphablemodel']]],
['screen_5fto_5fclip_5fspace',['screen_to_clip_space',['../namespaceeos_1_1render.html#a7c4b923267e9b3b09c0c588bfdd4cb85',1,'eos::render']]],
['serialize',['serialize',['../namespacecv.html#a51eb61cb95a3e45290a030560ac7a2cd',1,'cv']]],
['size',['size',['../classeos_1_1core_1_1_landmark_mapper.html#a7e3a46e6aeb522d96066a3d73f4c92c6',1,'eos::core::LandmarkMapper']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_c.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>
var searchData=
[
['to_5fmat',['to_mat',['../namespaceeos_1_1fitting.html#a93f7464a6c6dee7b3885638014ec009a',1,'eos::fitting']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_d.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>
var searchData=
[
['unnormalise_5fpca_5fbasis',['unnormalise_pca_basis',['../namespaceeos_1_1morphablemodel.html#a3d9ed5fa969cbd540ebe9587540f3607',1,'eos::morphablemodel']]]
];
<!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.10"/>
<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>
var searchData=
[
['write_5fobj',['write_obj',['../namespaceeos_1_1render.html#a9b4673997fae6d670d7a9cc23543e8d7',1,'eos::render']]],
['write_5ftextured_5fobj',['write_textured_obj',['../namespaceeos_1_1render.html#afd6561b065b9c0dd6815580ab12c3204',1,'eos::render']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="namespaces_0.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>
var searchData=
[
['cv',['cv',['../namespacecv.html',1,'']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="namespaces_1.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>
var searchData=
[
['core',['core',['../namespaceeos_1_1core.html',1,'eos']]],
['eos',['eos',['../namespaceeos.html',1,'']]],
['fitting',['fitting',['../namespaceeos_1_1fitting.html',1,'eos']]],
['morphablemodel',['morphablemodel',['../namespaceeos_1_1morphablemodel.html',1,'eos']]],
['render',['render',['../namespaceeos_1_1render.html',1,'eos']]]
];
<!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"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</body>
</html>
/*---------------- Search Box */
#FSearchBox {
float: left;
}
#MSearchBox {
white-space : nowrap;
position: absolute;
float: none;
display: inline;
margin-top: 8px;
right: 0px;
width: 170px;
z-index: 102;
background-color: white;
}
#MSearchBox .left
{
display:block;
position:absolute;
left:10px;
width:20px;
height:19px;
background:url('search_l.png') no-repeat;
background-position:right;
}
#MSearchSelect {
display:block;
position:absolute;
width:20px;
height:19px;
}
.left #MSearchSelect {
left:4px;
}
.right #MSearchSelect {
right:5px;
}
#MSearchField {
display:block;
position:absolute;
height:19px;
background:url('search_m.png') repeat-x;
border:none;
width:111px;
margin-left:20px;
padding-left:4px;
color: #909090;
outline: none;
font: 9pt Arial, Verdana, sans-serif;
}
#FSearchBox #MSearchField {
margin-left:15px;
}
#MSearchBox .right {
display:block;
position:absolute;
right:10px;
top:0px;
width:20px;
height:19px;
background:url('search_r.png') no-repeat;
background-position:left;
}
#MSearchClose {
display: none;
position: absolute;
top: 4px;
background : none;
border: none;
margin: 0px 4px 0px 0px;
padding: 0px 0px;
outline: none;
}
.left #MSearchClose {
left: 6px;
}
.right #MSearchClose {
right: 2px;
}
.MSearchBoxActive #MSearchField {
color: #000000;
}
/*---------------- Search filter selection */
#MSearchSelectWindow {
display: none;
position: absolute;
left: 0; top: 0;
border: 1px solid #90A5CE;
background-color: #F9FAFC;
z-index: 1;
padding-top: 4px;
padding-bottom: 4px;
-moz-border-radius: 4px;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
}
.SelectItem {
font: 8pt Arial, Verdana, sans-serif;
padding-left: 2px;
padding-right: 12px;
border: 0px;
}
span.SelectionMark {
margin-right: 4px;
font-family: monospace;
outline-style: none;
text-decoration: none;
}
a.SelectItem {
display: block;
outline-style: none;
color: #000000;
text-decoration: none;
padding-left: 6px;
padding-right: 12px;
}
a.SelectItem:focus,
a.SelectItem:active {
color: #000000;
outline-style: none;
text-decoration: none;
}
a.SelectItem:hover {
color: #FFFFFF;
background-color: #3D578C;
outline-style: none;
text-decoration: none;
cursor: pointer;
display: block;
}
/*---------------- Search results window */
iframe#MSearchResults {
width: 60ex;
height: 15em;
}
#MSearchResultsWindow {
display: none;
position: absolute;
left: 0; top: 0;
border: 1px solid #000;
background-color: #EEF1F7;
}
/* ----------------------------------- */
#SRIndex {
clear:both;
padding-bottom: 15px;
}
.SREntry {
font-size: 10pt;
padding-left: 1ex;
}
.SRPage .SREntry {
font-size: 8pt;
padding: 1px 5px;
}
body.SRPage {
margin: 5px 2px;
}
.SRChildren {
padding-left: 3ex; padding-bottom: .5em
}
.SRPage .SRChildren {
display: none;
}
.SRSymbol {
font-weight: bold;
color: #425E97;
font-family: Arial, Verdana, sans-serif;
text-decoration: none;
outline: none;
}
a.SRScope {
display: block;
color: #425E97;
font-family: Arial, Verdana, sans-serif;
text-decoration: none;
outline: none;
}
a.SRSymbol:focus, a.SRSymbol:active,
a.SRScope:focus, a.SRScope:active {
text-decoration: underline;
}
span.SRScope {
padding-left: 4px;
}
.SRPage .SRStatus {
padding: 2px 5px;
font-size: 8pt;
font-style: italic;
}
.SRResult {
display: none;
}
DIV.searchresults {
margin-left: 10px;
margin-right: 10px;
}
/*---------------- External search page results */
.searchresult {
background-color: #F0F3F8;
}
.pages b {
color: white;
padding: 5px 5px 3px 5px;
background-image: url("../tab_a.png");
background-repeat: repeat-x;
text-shadow: 0 1px 1px #000000;
}
.pages {
line-height: 17px;
margin-left: 4px;
text-decoration: none;
}
.hl {
font-weight: bold;
}
#searchresults {
margin-bottom: 20px;
}
.searchpages {
margin-top: 10px;
}
function convertToId(search)
{
var result = '';
for (i=0;i<search.length;i++)
{
var c = search.charAt(i);
var cn = c.charCodeAt(0);
if (c.match(/[a-z0-9\u0080-\uFFFF]/))
{
result+=c;
}
else if (cn<16)
{
result+="_0"+cn.toString(16);
}
else
{
result+="_"+cn.toString(16);
}
}
return result;
}
function getXPos(item)
{
var x = 0;
if (item.offsetWidth)
{
while (item && item!=document.body)
{
x += item.offsetLeft;
item = item.offsetParent;
}
}
return x;
}
function getYPos(item)
{
var y = 0;
if (item.offsetWidth)
{
while (item && item!=document.body)
{
y += item.offsetTop;
item = item.offsetParent;
}
}
return y;
}
/* A class handling everything associated with the search panel.
Parameters:
name - The name of the global variable that will be
storing this instance. Is needed to be able to set timeouts.
resultPath - path to use for external files
*/
function SearchBox(name, resultsPath, inFrame, label)
{
if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); }
// ---------- Instance variables
this.name = name;
this.resultsPath = resultsPath;
this.keyTimeout = 0;
this.keyTimeoutLength = 500;
this.closeSelectionTimeout = 300;
this.lastSearchValue = "";
this.lastResultsPage = "";
this.hideTimeout = 0;
this.searchIndex = 0;
this.searchActive = false;
this.insideFrame = inFrame;
this.searchLabel = label;
// ----------- DOM Elements
this.DOMSearchField = function()
{ return document.getElementById("MSearchField"); }
this.DOMSearchSelect = function()
{ return document.getElementById("MSearchSelect"); }
this.DOMSearchSelectWindow = function()
{ return document.getElementById("MSearchSelectWindow"); }
this.DOMPopupSearchResults = function()
{ return document.getElementById("MSearchResults"); }
this.DOMPopupSearchResultsWindow = function()
{ return document.getElementById("MSearchResultsWindow"); }
this.DOMSearchClose = function()
{ return document.getElementById("MSearchClose"); }
this.DOMSearchBox = function()
{ return document.getElementById("MSearchBox"); }
// ------------ Event Handlers
// Called when focus is added or removed from the search field.
this.OnSearchFieldFocus = function(isActive)
{
this.Activate(isActive);
}
this.OnSearchSelectShow = function()
{
var searchSelectWindow = this.DOMSearchSelectWindow();
var searchField = this.DOMSearchSelect();
if (this.insideFrame)
{
var left = getXPos(searchField);
var top = getYPos(searchField);
left += searchField.offsetWidth + 6;
top += searchField.offsetHeight;
// show search selection popup
searchSelectWindow.style.display='block';
left -= searchSelectWindow.offsetWidth;
searchSelectWindow.style.left = left + 'px';
searchSelectWindow.style.top = top + 'px';
}
else
{
var left = getXPos(searchField);
var top = getYPos(searchField);
top += searchField.offsetHeight;
// show search selection popup
searchSelectWindow.style.display='block';
searchSelectWindow.style.left = left + 'px';
searchSelectWindow.style.top = top + 'px';
}
// stop selection hide timer
if (this.hideTimeout)
{
clearTimeout(this.hideTimeout);
this.hideTimeout=0;
}
return false; // to avoid "image drag" default event
}
this.OnSearchSelectHide = function()
{
this.hideTimeout = setTimeout(this.name +".CloseSelectionWindow()",
this.closeSelectionTimeout);
}
// Called when the content of the search field is changed.
this.OnSearchFieldChange = function(evt)
{
if (this.keyTimeout) // kill running timer
{
clearTimeout(this.keyTimeout);
this.keyTimeout = 0;
}
var e = (evt) ? evt : window.event; // for IE
if (e.keyCode==40 || e.keyCode==13)
{
if (e.shiftKey==1)
{
this.OnSearchSelectShow();
var win=this.DOMSearchSelectWindow();
for (i=0;i<win.childNodes.length;i++)
{
var child = win.childNodes[i]; // get span within a
if (child.className=='SelectItem')
{
child.focus();
return;
}
}
return;
}
else if (window.frames.MSearchResults.searchResults)
{
var elem = window.frames.MSearchResults.searchResults.NavNext(0);
if (elem) elem.focus();
}
}
else if (e.keyCode==27) // Escape out of the search field
{
this.DOMSearchField().blur();
this.DOMPopupSearchResultsWindow().style.display = 'none';
this.DOMSearchClose().style.display = 'none';
this.lastSearchValue = '';
this.Activate(false);
return;
}
// strip whitespaces
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
if (searchValue != this.lastSearchValue) // search value has changed
{
if (searchValue != "") // non-empty search
{
// set timer for search update
this.keyTimeout = setTimeout(this.name + '.Search()',
this.keyTimeoutLength);
}
else // empty search field
{
this.DOMPopupSearchResultsWindow().style.display = 'none';
this.DOMSearchClose().style.display = 'none';
this.lastSearchValue = '';
}
}
}
this.SelectItemCount = function(id)
{
var count=0;
var win=this.DOMSearchSelectWindow();
for (i=0;i<win.childNodes.length;i++)
{
var child = win.childNodes[i]; // get span within a
if (child.className=='SelectItem')
{
count++;
}
}
return count;
}
this.SelectItemSet = function(id)
{
var i,j=0;
var win=this.DOMSearchSelectWindow();
for (i=0;i<win.childNodes.length;i++)
{
var child = win.childNodes[i]; // get span within a
if (child.className=='SelectItem')
{
var node = child.firstChild;
if (j==id)
{
node.innerHTML='&#8226;';
}
else
{
node.innerHTML='&#160;';
}
j++;
}
}
}
// Called when an search filter selection is made.
// set item with index id as the active item
this.OnSelectItem = function(id)
{
this.searchIndex = id;
this.SelectItemSet(id);
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
if (searchValue!="" && this.searchActive) // something was found -> do a search
{
this.Search();
}
}
this.OnSearchSelectKey = function(evt)
{
var e = (evt) ? evt : window.event; // for IE
if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down
{
this.searchIndex++;
this.OnSelectItem(this.searchIndex);
}
else if (e.keyCode==38 && this.searchIndex>0) // Up
{
this.searchIndex--;
this.OnSelectItem(this.searchIndex);
}
else if (e.keyCode==13 || e.keyCode==27)
{
this.OnSelectItem(this.searchIndex);
this.CloseSelectionWindow();
this.DOMSearchField().focus();
}
return false;
}
// --------- Actions
// Closes the results window.
this.CloseResultsWindow = function()
{
this.DOMPopupSearchResultsWindow().style.display = 'none';
this.DOMSearchClose().style.display = 'none';
this.Activate(false);
}
this.CloseSelectionWindow = function()
{
this.DOMSearchSelectWindow().style.display = 'none';
}
// Performs a search.
this.Search = function()
{
this.keyTimeout = 0;
// strip leading whitespace
var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
var code = searchValue.toLowerCase().charCodeAt(0);
var idxChar = searchValue.substr(0, 1).toLowerCase();
if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair
{
idxChar = searchValue.substr(0, 2);
}
var resultsPage;
var resultsPageWithSearch;
var hasResultsPage;
var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar);
if (idx!=-1)
{
var hexCode=idx.toString(16);
resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html';
resultsPageWithSearch = resultsPage+'?'+escape(searchValue);
hasResultsPage = true;
}
else // nothing available for this search term
{
resultsPage = this.resultsPath + '/nomatches.html';
resultsPageWithSearch = resultsPage;
hasResultsPage = false;
}
window.frames.MSearchResults.location = resultsPageWithSearch;
var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
if (domPopupSearchResultsWindow.style.display!='block')
{
var domSearchBox = this.DOMSearchBox();
this.DOMSearchClose().style.display = 'inline';
if (this.insideFrame)
{
var domPopupSearchResults = this.DOMPopupSearchResults();
domPopupSearchResultsWindow.style.position = 'relative';
domPopupSearchResultsWindow.style.display = 'block';
var width = document.body.clientWidth - 8; // the -8 is for IE :-(
domPopupSearchResultsWindow.style.width = width + 'px';
domPopupSearchResults.style.width = width + 'px';
}
else
{
var domPopupSearchResults = this.DOMPopupSearchResults();
var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth;
var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1;
domPopupSearchResultsWindow.style.display = 'block';
left -= domPopupSearchResults.offsetWidth;
domPopupSearchResultsWindow.style.top = top + 'px';
domPopupSearchResultsWindow.style.left = left + 'px';
}
}
this.lastSearchValue = searchValue;
this.lastResultsPage = resultsPage;
}
// -------- Activation Functions
// Activates or deactivates the search panel, resetting things to
// their default values if necessary.
this.Activate = function(isActive)
{
if (isActive || // open it
this.DOMPopupSearchResultsWindow().style.display == 'block'
)
{
this.DOMSearchBox().className = 'MSearchBoxActive';
var searchField = this.DOMSearchField();
if (searchField.value == this.searchLabel) // clear "Search" term upon entry
{
searchField.value = '';
this.searchActive = true;
}
}
else if (!isActive) // directly remove the panel
{
this.DOMSearchBox().className = 'MSearchBoxInactive';
this.DOMSearchField().value = this.searchLabel;
this.searchActive = false;
this.lastSearchValue = ''
this.lastResultsPage = '';
}
}
}
// -----------------------------------------------------------------------
// The class that handles everything on the search results page.
function SearchResults(name)
{
// The number of matches from the last run of <Search()>.
this.lastMatchCount = 0;
this.lastKey = 0;
this.repeatOn = false;
// Toggles the visibility of the passed element ID.
this.FindChildElement = function(id)
{
var parentElement = document.getElementById(id);
var element = parentElement.firstChild;
while (element && element!=parentElement)
{
if (element.nodeName == 'DIV' && element.className == 'SRChildren')
{
return element;
}
if (element.nodeName == 'DIV' && element.hasChildNodes())
{
element = element.firstChild;
}
else if (element.nextSibling)
{
element = element.nextSibling;
}
else
{
do
{
element = element.parentNode;
}
while (element && element!=parentElement && !element.nextSibling);
if (element && element!=parentElement)
{
element = element.nextSibling;
}
}
}
}
this.Toggle = function(id)
{
var element = this.FindChildElement(id);
if (element)
{
if (element.style.display == 'block')
{
element.style.display = 'none';
}
else
{
element.style.display = 'block';
}
}
}
// Searches for the passed string. If there is no parameter,
// it takes it from the URL query.
//
// Always returns true, since other documents may try to call it
// and that may or may not be possible.
this.Search = function(search)
{
if (!search) // get search word from URL
{
search = window.location.search;
search = search.substring(1); // Remove the leading '?'
search = unescape(search);
}
search = search.replace(/^ +/, ""); // strip leading spaces
search = search.replace(/ +$/, ""); // strip trailing spaces
search = search.toLowerCase();
search = convertToId(search);
var resultRows = document.getElementsByTagName("div");
var matches = 0;
var i = 0;
while (i < resultRows.length)
{
var row = resultRows.item(i);
if (row.className == "SRResult")
{
var rowMatchName = row.id.toLowerCase();
rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_'
if (search.length<=rowMatchName.length &&
rowMatchName.substr(0, search.length)==search)
{
row.style.display = 'block';
matches++;
}
else
{
row.style.display = 'none';
}
}
i++;
}
document.getElementById("Searching").style.display='none';
if (matches == 0) // no results
{
document.getElementById("NoMatches").style.display='block';
}
else // at least one result
{
document.getElementById("NoMatches").style.display='none';
}
this.lastMatchCount = matches;
return true;
}
// return the first item with index index or higher that is visible
this.NavNext = function(index)
{
var focusItem;
while (1)
{
var focusName = 'Item'+index;
focusItem = document.getElementById(focusName);
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
{
break;
}
else if (!focusItem) // last element
{
break;
}
focusItem=null;
index++;
}
return focusItem;
}
this.NavPrev = function(index)
{
var focusItem;
while (1)
{
var focusName = 'Item'+index;
focusItem = document.getElementById(focusName);
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
{
break;
}
else if (!focusItem) // last element
{
break;
}
focusItem=null;
index--;
}
return focusItem;
}
this.ProcessKeys = function(e)
{
if (e.type == "keydown")
{
this.repeatOn = false;
this.lastKey = e.keyCode;
}
else if (e.type == "keypress")
{
if (!this.repeatOn)
{
if (this.lastKey) this.repeatOn = true;
return false; // ignore first keypress after keydown
}
}
else if (e.type == "keyup")
{
this.lastKey = 0;
this.repeatOn = false;
}
return this.lastKey!=0;
}
this.Nav = function(evt,itemIndex)
{
var e = (evt) ? evt : window.event; // for IE
if (e.keyCode==13) return true;
if (!this.ProcessKeys(e)) return false;
if (this.lastKey==38) // Up
{
var newIndex = itemIndex-1;
var focusItem = this.NavPrev(newIndex);
if (focusItem)
{
var child = this.FindChildElement(focusItem.parentNode.parentNode.id);
if (child && child.style.display == 'block') // children visible
{
var n=0;
var tmpElem;
while (1) // search for last child
{
tmpElem = document.getElementById('Item'+newIndex+'_c'+n);
if (tmpElem)
{
focusItem = tmpElem;
}
else // found it!
{
break;
}
n++;
}
}
}
if (focusItem)
{
focusItem.focus();
}
else // return focus to search field
{
parent.document.getElementById("MSearchField").focus();
}
}
else if (this.lastKey==40) // Down
{
var newIndex = itemIndex+1;
var focusItem;
var item = document.getElementById('Item'+itemIndex);
var elem = this.FindChildElement(item.parentNode.parentNode.id);
if (elem && elem.style.display == 'block') // children visible
{
focusItem = document.getElementById('Item'+itemIndex+'_c0');
}
if (!focusItem) focusItem = this.NavNext(newIndex);
if (focusItem) focusItem.focus();
}
else if (this.lastKey==39) // Right
{
var item = document.getElementById('Item'+itemIndex);
var elem = this.FindChildElement(item.parentNode.parentNode.id);
if (elem) elem.style.display = 'block';
}
else if (this.lastKey==37) // Left
{
var item = document.getElementById('Item'+itemIndex);
var elem = this.FindChildElement(item.parentNode.parentNode.id);
if (elem) elem.style.display = 'none';
}
else if (this.lastKey==27) // Escape
{
parent.searchBox.CloseResultsWindow();
parent.document.getElementById("MSearchField").focus();
}
else if (this.lastKey==13) // Enter
{
return true;
}
return false;
}
this.NavChild = function(evt,itemIndex,childIndex)
{
var e = (evt) ? evt : window.event; // for IE
if (e.keyCode==13) return true;
if (!this.ProcessKeys(e)) return false;
if (this.lastKey==38) // Up
{
if (childIndex>0)
{
var newIndex = childIndex-1;
document.getElementById('Item'+itemIndex+'_c'+newIndex).focus();
}
else // already at first child, jump to parent
{
document.getElementById('Item'+itemIndex).focus();
}
}
else if (this.lastKey==40) // Down
{
var newIndex = childIndex+1;
var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex);
if (!elem) // last child, jump to parent next parent
{
elem = this.NavNext(itemIndex+1);
}
if (elem)
{
elem.focus();
}
}
else if (this.lastKey==27) // Escape
{
parent.searchBox.CloseResultsWindow();
parent.document.getElementById("MSearchField").focus();
}
else if (this.lastKey==13) // Enter
{
return true;
}
return false;
}
}
function setKeyActions(elem,action)
{
elem.setAttribute('onkeydown',action);
elem.setAttribute('onkeypress',action);
elem.setAttribute('onkeyup',action);
}
function setClassAttr(elem,attr)
{
elem.setAttribute('class',attr);
elem.setAttribute('className',attr);
}
function createResults()
{
var results = document.getElementById("SRResults");
for (var e=0; e<searchData.length; e++)
{
var id = searchData[e][0];
var srResult = document.createElement('div');
srResult.setAttribute('id','SR_'+id);
setClassAttr(srResult,'SRResult');
var srEntry = document.createElement('div');
setClassAttr(srEntry,'SREntry');
var srLink = document.createElement('a');
srLink.setAttribute('id','Item'+e);
setKeyActions(srLink,'return searchResults.Nav(event,'+e+')');
setClassAttr(srLink,'SRSymbol');
srLink.innerHTML = searchData[e][1][0];
srEntry.appendChild(srLink);
if (searchData[e][1].length==2) // single result
{
srLink.setAttribute('href',searchData[e][1][1][0]);
if (searchData[e][1][1][1])
{
srLink.setAttribute('target','_parent');
}
var srScope = document.createElement('span');
setClassAttr(srScope,'SRScope');
srScope.innerHTML = searchData[e][1][1][2];
srEntry.appendChild(srScope);
}
else // multiple results
{
srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")');
var srChildren = document.createElement('div');
setClassAttr(srChildren,'SRChildren');
for (var c=0; c<searchData[e][1].length-1; c++)
{
var srChild = document.createElement('a');
srChild.setAttribute('id','Item'+e+'_c'+c);
setKeyActions(srChild,'return searchResults.NavChild(event,'+e+','+c+')');
setClassAttr(srChild,'SRScope');
srChild.setAttribute('href',searchData[e][1][c+1][0]);
if (searchData[e][1][c+1][1])
{
srChild.setAttribute('target','_parent');
}
srChild.innerHTML = searchData[e][1][c+1][2];
srChildren.appendChild(srChild);
}
srEntry.appendChild(srChildren);
}
srResult.appendChild(srEntry);
results.appendChild(srResult);
}
}
function init_search()
{
var results = document.getElementById("MSearchSelectWindow");
for (var key in indexSectionLabels)
{
var link = document.createElement('a');
link.setAttribute('class','SelectItem');
link.setAttribute('onclick','searchBox.OnSelectItem('+key+')');
link.href='javascript:void(0)';
link.innerHTML='<span class="SelectionMark">&#160;</span>'+indexSectionLabels[key];
results.appendChild(link);
}
searchBox.OnSelectItem(0);
}
var indexSectionsWithContent =
{
0: "cdefghlmnoprstuvw",
1: "flmopt",
2: "ce",
3: "cdefghlmnprstuw",
4: "cntv",
5: "l",
6: "t"
};
var indexSectionNames =
{
0: "all",
1: "classes",
2: "namespaces",
3: "functions",
4: "variables",
5: "typedefs",
6: "enums"
};
var indexSectionLabels =
{
0: "All",
1: "Classes",
2: "Namespaces",
3: "Functions",
4: "Variables",
5: "Typedefs",
6: "Enumerations"
};
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="typedefs_0.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>
var searchData=
[
['landmarkcollection',['LandmarkCollection',['../namespaceeos_1_1core.html#a6d6a8533690b5860236f55afafa14d2b',1,'eos::core']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="variables_0.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>
var searchData=
[
['colors',['colors',['../structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b',1,'eos::render::Mesh']]],
['coordinates',['coordinates',['../structeos_1_1core_1_1_landmark.html#aa3ffa0bd40290634e485e3c5ca99229c',1,'eos::core::Landmark']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="variables_1.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>
var searchData=
[
['name',['name',['../structeos_1_1core_1_1_landmark.html#a85c0f001e311e994314e900dcb284ad3',1,'eos::core::Landmark']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="variables_2.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>
var searchData=
[
['tci',['tci',['../structeos_1_1render_1_1_mesh.html#a81c47a35a1b0a6a6cb440cfbb67b8c28',1,'eos::render::Mesh']]],
['texcoords',['texcoords',['../structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4',1,'eos::render::Mesh']]],
['tvi',['tvi',['../structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b',1,'eos::render::Mesh']]]
];
<!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.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="variables_3.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>
var searchData=
[
['vertices',['vertices',['../structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e',1,'eos::render::Mesh']]]
];
<!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.10"/>
<title>eos: 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1core.html">core</a></li><li class="navelem"><a class="el" href="structeos_1_1core_1_1_landmark.html">Landmark</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">eos::core::Landmark&lt; LandmarkType &gt; Member List</div> </div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="structeos_1_1core_1_1_landmark.html">eos::core::Landmark&lt; LandmarkType &gt;</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="structeos_1_1core_1_1_landmark.html#aa3ffa0bd40290634e485e3c5ca99229c">coordinates</a></td><td class="entry"><a class="el" href="structeos_1_1core_1_1_landmark.html">eos::core::Landmark&lt; LandmarkType &gt;</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="structeos_1_1core_1_1_landmark.html#a85c0f001e311e994314e900dcb284ad3">name</a></td><td class="entry"><a class="el" href="structeos_1_1core_1_1_landmark.html">eos::core::Landmark&lt; LandmarkType &gt;</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: eos::core::Landmark&lt; LandmarkType &gt; Struct Template 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1core.html">core</a></li><li class="navelem"><a class="el" href="structeos_1_1core_1_1_landmark.html">Landmark</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structeos_1_1core_1_1_landmark-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">eos::core::Landmark&lt; LandmarkType &gt; Struct Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Representation of a landmark, consisting of a landmark name and coordinates of the given type. Usually, the type would be <code>cv::Vec2f</code>.
<a href="structeos_1_1core_1_1_landmark.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_landmark_8hpp_source.html">Landmark.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a85c0f001e311e994314e900dcb284ad3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a85c0f001e311e994314e900dcb284ad3"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structeos_1_1core_1_1_landmark.html#a85c0f001e311e994314e900dcb284ad3">name</a></td></tr>
<tr class="memdesc:a85c0f001e311e994314e900dcb284ad3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Name of the landmark, often used as identifier. <br /></td></tr>
<tr class="separator:a85c0f001e311e994314e900dcb284ad3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3ffa0bd40290634e485e3c5ca99229c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa3ffa0bd40290634e485e3c5ca99229c"></a>
LandmarkType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structeos_1_1core_1_1_landmark.html#aa3ffa0bd40290634e485e3c5ca99229c">coordinates</a></td></tr>
<tr class="memdesc:aa3ffa0bd40290634e485e3c5ca99229c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The position or coordinates of the landmark. <br /></td></tr>
<tr class="separator:aa3ffa0bd40290634e485e3c5ca99229c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;class LandmarkType&gt;<br />
struct eos::core::Landmark&lt; LandmarkType &gt;</h3>
<p>Representation of a landmark, consisting of a landmark name and coordinates of the given type. Usually, the type would be <code>cv::Vec2f</code>. </p>
</div><hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/eos/core/<a class="el" href="_landmark_8hpp_source.html">Landmark.hpp</a></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1fitting.html">fitting</a></li><li class="navelem"><a class="el" href="structeos_1_1fitting_1_1_frustum.html">Frustum</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">eos::fitting::Frustum Member List</div> </div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="structeos_1_1fitting_1_1_frustum.html">eos::fitting::Frustum</a>, including all inherited members.</p>
<table class="directory">
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>b</b> (defined in <a class="el" href="structeos_1_1fitting_1_1_frustum.html">eos::fitting::Frustum</a>)</td><td class="entry"><a class="el" href="structeos_1_1fitting_1_1_frustum.html">eos::fitting::Frustum</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>l</b> (defined in <a class="el" href="structeos_1_1fitting_1_1_frustum.html">eos::fitting::Frustum</a>)</td><td class="entry"><a class="el" href="structeos_1_1fitting_1_1_frustum.html">eos::fitting::Frustum</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>r</b> (defined in <a class="el" href="structeos_1_1fitting_1_1_frustum.html">eos::fitting::Frustum</a>)</td><td class="entry"><a class="el" href="structeos_1_1fitting_1_1_frustum.html">eos::fitting::Frustum</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>t</b> (defined in <a class="el" href="structeos_1_1fitting_1_1_frustum.html">eos::fitting::Frustum</a>)</td><td class="entry"><a class="el" href="structeos_1_1fitting_1_1_frustum.html">eos::fitting::Frustum</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: eos::fitting::Frustum Struct 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1fitting.html">fitting</a></li><li class="navelem"><a class="el" href="structeos_1_1fitting_1_1_frustum.html">Frustum</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structeos_1_1fitting_1_1_frustum-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">eos::fitting::Frustum Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A class representing a camera viewing frustum. At the moment used as orthographic camera only.
<a href="structeos_1_1fitting_1_1_frustum.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="nonlinear__camera__estimation_8hpp_source.html">nonlinear_camera_estimation.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a91187e9a49672711d7f23bd4f4a8c738"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a91187e9a49672711d7f23bd4f4a8c738"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>l</b></td></tr>
<tr class="separator:a91187e9a49672711d7f23bd4f4a8c738"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4119574b26a62235b9b89365f505ee01"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4119574b26a62235b9b89365f505ee01"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>r</b></td></tr>
<tr class="separator:a4119574b26a62235b9b89365f505ee01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad69aaca8f408ad68c13a1b31c694ed26"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad69aaca8f408ad68c13a1b31c694ed26"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>b</b></td></tr>
<tr class="separator:ad69aaca8f408ad68c13a1b31c694ed26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6af2a4dd568ec950ce05129071a92e28"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6af2a4dd568ec950ce05129071a92e28"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>t</b></td></tr>
<tr class="separator:a6af2a4dd568ec950ce05129071a92e28"><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>A class representing a camera viewing frustum. At the moment used as orthographic camera only. </p>
</div><hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/eos/fitting/<a class="el" href="nonlinear__camera__estimation_8hpp_source.html">nonlinear_camera_estimation.hpp</a></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1fitting.html">fitting</a></li><li class="navelem"><a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">OrthographicRenderingParameters</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">eos::fitting::OrthographicRenderingParameters Member List</div> </div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">eos::fitting::OrthographicRenderingParameters</a>, including all inherited members.</p>
<table class="directory">
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>frustum</b> (defined in <a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">eos::fitting::OrthographicRenderingParameters</a>)</td><td class="entry"><a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">eos::fitting::OrthographicRenderingParameters</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>r_x</b> (defined in <a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">eos::fitting::OrthographicRenderingParameters</a>)</td><td class="entry"><a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">eos::fitting::OrthographicRenderingParameters</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>r_y</b> (defined in <a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">eos::fitting::OrthographicRenderingParameters</a>)</td><td class="entry"><a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">eos::fitting::OrthographicRenderingParameters</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>r_z</b> (defined in <a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">eos::fitting::OrthographicRenderingParameters</a>)</td><td class="entry"><a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">eos::fitting::OrthographicRenderingParameters</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>t_x</b> (defined in <a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">eos::fitting::OrthographicRenderingParameters</a>)</td><td class="entry"><a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">eos::fitting::OrthographicRenderingParameters</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>t_y</b> (defined in <a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">eos::fitting::OrthographicRenderingParameters</a>)</td><td class="entry"><a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">eos::fitting::OrthographicRenderingParameters</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: eos::fitting::OrthographicRenderingParameters Struct 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1fitting.html">fitting</a></li><li class="navelem"><a class="el" href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html">OrthographicRenderingParameters</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structeos_1_1fitting_1_1_orthographic_rendering_parameters-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">eos::fitting::OrthographicRenderingParameters Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Represents a set of estimated model parameters (rotation, translation) and camera parameters (viewing frustum).
<a href="structeos_1_1fitting_1_1_orthographic_rendering_parameters.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="nonlinear__camera__estimation_8hpp_source.html">nonlinear_camera_estimation.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:afffe9dd0da1723c91f7d977f92280300"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afffe9dd0da1723c91f7d977f92280300"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>r_x</b></td></tr>
<tr class="separator:afffe9dd0da1723c91f7d977f92280300"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56c72b4cae779e20fdf5767bca14f549"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a56c72b4cae779e20fdf5767bca14f549"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>r_y</b></td></tr>
<tr class="separator:a56c72b4cae779e20fdf5767bca14f549"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2b93d0df572cdb24864e77242deff84"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae2b93d0df572cdb24864e77242deff84"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>r_z</b></td></tr>
<tr class="separator:ae2b93d0df572cdb24864e77242deff84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd2fd09cecf0b601c779c031dccd263c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acd2fd09cecf0b601c779c031dccd263c"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>t_x</b></td></tr>
<tr class="separator:acd2fd09cecf0b601c779c031dccd263c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa13470874f9c1246c1e14f788da6c228"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa13470874f9c1246c1e14f788da6c228"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>t_y</b></td></tr>
<tr class="separator:aa13470874f9c1246c1e14f788da6c228"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9196501da2716cbcf9e2cfcf04f1eae1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9196501da2716cbcf9e2cfcf04f1eae1"></a>
<a class="el" href="structeos_1_1fitting_1_1_frustum.html">Frustum</a>&#160;</td><td class="memItemRight" valign="bottom"><b>frustum</b></td></tr>
<tr class="separator:a9196501da2716cbcf9e2cfcf04f1eae1"><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>Represents a set of estimated model parameters (rotation, translation) and camera parameters (viewing frustum). </p>
<p>The estimated rotation and translation transform the model from model-space to camera-space, and, if one wishes to use OpenGL, can be used to build the model-view matrix. The parameters are the inverse of the camera position in 3D space.</p>
<p>The camera frustum describes the size of the viewing plane of the camera, and can be used to build an OpenGL-conformant orthographic projection matrix.</p>
<p>Together, these parameters fully describe the imaging process of a given model instance (under an orthographic projection).</p>
<p>The rotation values are given in radians and estimated using the RPY convention. Yaw is applied first to the model, then pitch, then roll (R * P * Y * vertex). </p>
</div><hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/eos/fitting/<a class="el" href="nonlinear__camera__estimation_8hpp_source.html">nonlinear_camera_estimation.hpp</a></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1render.html">render</a></li><li class="navelem"><a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">eos::render::Mesh Member List</div> </div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="structeos_1_1render_1_1_mesh.html">eos::render::Mesh</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a></td><td class="entry"><a class="el" href="structeos_1_1render_1_1_mesh.html">eos::render::Mesh</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="structeos_1_1render_1_1_mesh.html#a81c47a35a1b0a6a6cb440cfbb67b8c28">tci</a></td><td class="entry"><a class="el" href="structeos_1_1render_1_1_mesh.html">eos::render::Mesh</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a></td><td class="entry"><a class="el" href="structeos_1_1render_1_1_mesh.html">eos::render::Mesh</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">tvi</a></td><td class="entry"><a class="el" href="structeos_1_1render_1_1_mesh.html">eos::render::Mesh</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a></td><td class="entry"><a class="el" href="structeos_1_1render_1_1_mesh.html">eos::render::Mesh</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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: eos::render::Mesh Struct 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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</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="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"><a class="el" href="namespaceeos.html">eos</a></li><li class="navelem"><a class="el" href="namespaceeos_1_1render.html">render</a></li><li class="navelem"><a class="el" href="structeos_1_1render_1_1_mesh.html">Mesh</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structeos_1_1render_1_1_mesh-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">eos::render::Mesh Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>This class represents a 3D mesh consisting of vertices, vertex colour information and texture coordinates.
<a href="structeos_1_1render_1_1_mesh.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_mesh_8hpp_source.html">Mesh.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a305d17e6453f6be320331e00e8c8816e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a305d17e6453f6be320331e00e8c8816e"></a>
std::vector&lt; cv::Vec4f &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a></td></tr>
<tr class="memdesc:a305d17e6453f6be320331e00e8c8816e"><td class="mdescLeft">&#160;</td><td class="mdescRight">3D vertex positions. <br /></td></tr>
<tr class="separator:a305d17e6453f6be320331e00e8c8816e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3b0e946a77b4f434b382b315ea7c24b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae3b0e946a77b4f434b382b315ea7c24b"></a>
std::vector&lt; cv::Vec3f &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structeos_1_1render_1_1_mesh.html#ae3b0e946a77b4f434b382b315ea7c24b">colors</a></td></tr>
<tr class="memdesc:ae3b0e946a77b4f434b382b315ea7c24b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Colour information for each vertex. Expected to be in RGB order. <br /></td></tr>
<tr class="separator:ae3b0e946a77b4f434b382b315ea7c24b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64fddf0a7200e7f66b0426773542eea4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a64fddf0a7200e7f66b0426773542eea4"></a>
std::vector&lt; cv::Vec2f &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a></td></tr>
<tr class="memdesc:a64fddf0a7200e7f66b0426773542eea4"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classeos_1_1render_1_1_texture.html">Texture</a> coordinates for each vertex. <br /></td></tr>
<tr class="separator:a64fddf0a7200e7f66b0426773542eea4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6fb80c460656bf7830a526f0692681b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab6fb80c460656bf7830a526f0692681b"></a>
std::vector&lt; std::array&lt; int, 3 &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">tvi</a></td></tr>
<tr class="memdesc:ab6fb80c460656bf7830a526f0692681b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Triangle vertex indices. <br /></td></tr>
<tr class="separator:ab6fb80c460656bf7830a526f0692681b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81c47a35a1b0a6a6cb440cfbb67b8c28"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a81c47a35a1b0a6a6cb440cfbb67b8c28"></a>
std::vector&lt; std::array&lt; int, 3 &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structeos_1_1render_1_1_mesh.html#a81c47a35a1b0a6a6cb440cfbb67b8c28">tci</a></td></tr>
<tr class="memdesc:a81c47a35a1b0a6a6cb440cfbb67b8c28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Triangle color indices. <br /></td></tr>
<tr class="separator:a81c47a35a1b0a6a6cb440cfbb67b8c28"><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>This class represents a 3D mesh consisting of vertices, vertex colour information and texture coordinates. </p>
<p>Additionally it stores the indices that specify which vertices to use to generate the triangle mesh out of the vertices. </p>
</div><hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/eos/render/<a class="el" href="_mesh_8hpp_source.html">Mesh.hpp</a></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.10
</small></address>
</body>
</html>
doc/tab_a.png

142 Bytes

doc/tab_b.png

169 Bytes

doc/tab_h.png

177 Bytes

doc/tab_s.png

184 Bytes

.tabs, .tabs2, .tabs3 {
background-image: url('tab_b.png');
width: 100%;
z-index: 101;
font-size: 13px;
font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
}
.tabs2 {
font-size: 10px;
}
.tabs3 {
font-size: 9px;
}
.tablist {
margin: 0;
padding: 0;
display: table;
}
.tablist li {
float: left;
display: table-cell;
background-image: url('tab_b.png');
line-height: 36px;
list-style: none;
}
.tablist a {
display: block;
padding: 0 20px;
font-weight: bold;
background-image:url('tab_s.png');
background-repeat:no-repeat;
background-position:right;
color: #283A5D;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
text-decoration: none;
outline: none;
}
.tabs3 .tablist a {
padding: 0 10px;
}
.tablist a:hover {
background-image: url('tab_h.png');
background-repeat:repeat-x;
color: #fff;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
text-decoration: none;
}
.tablist li.current a {
background-image: url('tab_a.png');
background-repeat:repeat-x;
color: #fff;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
}
<!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.10"/>
<title>eos: include/eos/render/texture_extraction.hpp Source File</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_fab380b22e1724065a4c65606be96940.html">render</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">texture_extraction.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Eos - A 3D Morphable Model fitting library written in modern C++11/14.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * File: include/eos/render/texture_extraction.hpp</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright 2014, 2015 Patrik Huber</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * limitations under the License.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#ifndef TEXTURE_EXTRACTION_HPP_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#define TEXTURE_EXTRACTION_HPP_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &quot;eos/render/detail/texture_extraction_detail.hpp&quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &quot;eos/render/Mesh.hpp&quot;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &quot;eos/render/render_affine.hpp&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &quot;eos/render/detail/render_detail.hpp&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &quot;opencv2/core/core.hpp&quot;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;opencv2/imgproc/imgproc.hpp&quot;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#include &lt;tuple&gt;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#include &lt;cassert&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor">#include &lt;future&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> {</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keyword">namespace </span><a class="code" href="namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5">render</a> {</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237"> 44</a></span>&#160;<span class="keyword">enum class</span> <a class="code" href="namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237">TextureInterpolation</a> {</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; NearestNeighbour,</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; Bilinear,</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; Area</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;};</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="comment">// Just a forward declaration</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="keyword">inline</span> cv::Mat <a class="code" href="namespaceeos_1_1render.html#aafa8c960c3b6eb080da1536cc3634577">extract_texture</a>(Mesh mesh, cv::Mat affine_camera_matrix, cv::Mat image, cv::Mat depthbuffer, <span class="keywordtype">bool</span> compute_view_angle, <a class="code" href="namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237">TextureInterpolation</a> mapping_type, <span class="keywordtype">int</span> isomap_resolution);</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;</div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="namespaceeos_1_1render.html#ad663c29566fafc33606349a35d0bdbf1"> 75</a></span>&#160;<span class="keyword">inline</span> cv::Mat <a class="code" href="namespaceeos_1_1render.html#aafa8c960c3b6eb080da1536cc3634577">extract_texture</a>(<a class="code" href="structeos_1_1render_1_1_mesh.html">Mesh</a> mesh, cv::Mat affine_camera_matrix, cv::Mat image, <span class="keywordtype">bool</span> compute_view_angle = <span class="keyword">false</span>, <a class="code" href="namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237">TextureInterpolation</a> mapping_type = TextureInterpolation::NearestNeighbour, <span class="keywordtype">int</span> isomap_resolution = 512)</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;{</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <span class="comment">// Render the model to get a depth buffer:</span></div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; cv::Mat depthbuffer;</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; std::tie(std::ignore, depthbuffer) = <a class="code" href="namespaceeos_1_1render.html#a1adc532475d45d16f7b0c0eddf1bc7cb">render::render_affine</a>(mesh, affine_camera_matrix, image.cols, image.rows);</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="comment">// Note: There&#39;s potential for optimisation here - we don&#39;t need to do everything that is done in render_affine to just get the depthbuffer.</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="comment">// Now forward the call to the actual texture extraction function:</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespaceeos_1_1render.html#aafa8c960c3b6eb080da1536cc3634577">extract_texture</a>(mesh, affine_camera_matrix, image, depthbuffer, compute_view_angle, mapping_type, isomap_resolution);</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;};</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;</div>
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="namespaceeos_1_1render.html#aafa8c960c3b6eb080da1536cc3634577"> 106</a></span>&#160;<span class="keyword">inline</span> cv::Mat <a class="code" href="namespaceeos_1_1render.html#aafa8c960c3b6eb080da1536cc3634577">extract_texture</a>(<a class="code" href="structeos_1_1render_1_1_mesh.html">Mesh</a> mesh, cv::Mat affine_camera_matrix, cv::Mat image, cv::Mat depthbuffer, <span class="keywordtype">bool</span> compute_view_angle = <span class="keyword">false</span>, <a class="code" href="namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237">TextureInterpolation</a> mapping_type = TextureInterpolation::NearestNeighbour, <span class="keywordtype">int</span> isomap_resolution = 512)</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;{</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; assert(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>.size() == mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>.size());</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; assert(image.type() == CV_8UC3); <span class="comment">// the other cases are not yet supported</span></div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keyword">using</span> cv::Mat;</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="keyword">using</span> cv::Vec2f;</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="keyword">using</span> cv::Vec3f;</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keyword">using</span> cv::Vec4f;</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="keyword">using</span> cv::Vec3b;</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="keyword">using</span> std::min;</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="keyword">using</span> std::max;</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="keyword">using</span> std::floor;</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keyword">using</span> std::ceil;</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; affine_camera_matrix = detail::calculate_affine_z_direction(affine_camera_matrix);</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; Mat isomap = Mat::zeros(isomap_resolution, isomap_resolution, CV_8UC4);</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="comment">// #Todo: We should handle gray images, but output a 4-channel isomap nevertheless I think.</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; std::vector&lt;std::future&lt;void&gt;&gt; results;</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; triangle_indices : mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">tvi</a>) {</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <span class="comment">// Note: If there&#39;s a performance problem, there&#39;s no need to capture the whole mesh - we could capture only the three required vertices with their texcoords.</span></div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <span class="keyword">auto</span> extract_triangle = [&amp;mesh, &amp;affine_camera_matrix, &amp;triangle_indices, &amp;depthbuffer, &amp;isomap, &amp;mapping_type, &amp;image, &amp;compute_view_angle]() {</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="comment">// Find out if the current triangle is visible:</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="comment">// We do a second rendering-pass here. We use the depth-buffer of the final image, and then, here,</span></div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="comment">// check if each pixel in a triangle is visible. If the whole triangle is visible, we use it to extract</span></div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="comment">// the texture.</span></div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="comment">// Possible improvement: - If only part of the triangle is visible, split it</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="comment">// This could be optimized in 2 ways though:</span></div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="comment">// - Use render(), or as in render(...), transfer the vertices once, not in a loop over all triangles (vertices are getting transformed multiple times)</span></div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="comment">// - We transform them later (below) a second time. Only do it once.</span></div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="comment">// Project the triangle vertices to screen coordinates, and use the depthbuffer to check whether the triangle is visible:</span></div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <span class="keyword">const</span> Vec4f v0 = Mat(affine_camera_matrix * Mat(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[triangle_indices[0]]));</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="keyword">const</span> Vec4f v1 = Mat(affine_camera_matrix * Mat(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[triangle_indices[1]]));</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="keyword">const</span> Vec4f v2 = Mat(affine_camera_matrix * Mat(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[triangle_indices[2]]));</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keywordflow">if</span> (!detail::is_triangle_visible(v0, v1, v2, depthbuffer))</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; {</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="comment">//continue;</span></div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; }</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="keywordtype">float</span> alpha_value;</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <span class="keywordflow">if</span> (compute_view_angle)</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; {</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <span class="comment">// Calculate how well visible the current triangle is:</span></div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; <span class="comment">// (in essence, the dot product of the viewing direction (0, 0, 1) and the face normal)</span></div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="keyword">const</span> Vec3f face_normal = <a class="code" href="namespaceeos_1_1render.html#ac72cdee6eed13468a424824ddd0b3074">calculate_face_normal</a>(Vec3f(Mat(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[triangle_indices[0]]).rowRange(0, 3)), Vec3f(Mat(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[triangle_indices[1]]).rowRange(0, 3)), Vec3f(Mat(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[triangle_indices[2]]).rowRange(0, 3)));</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="comment">// Transform the normal to &quot;screen&quot; (kind of &quot;eye&quot;) space using the upper 3x3 part of the affine camera matrix (=the translation can be ignored):</span></div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; Vec3f face_normal_transformed = Mat(affine_camera_matrix.rowRange(0, 3).colRange(0, 3) * Mat(face_normal));</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; face_normal_transformed /= cv::norm(face_normal_transformed, cv::NORM_L2); <span class="comment">// normalise to unit length</span></div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <span class="comment">// Implementation notes regarding the affine camera matrix and the sign:</span></div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <span class="comment">// If the matrix given were the model_view matrix, the sign would be correct.</span></div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="comment">// However, affine_camera_matrix includes glm::ortho, which includes a z-flip.</span></div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <span class="comment">// So we need to flip one of the two signs.</span></div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <span class="comment">// * viewing_direction(0.0f, 0.0f, 1.0f) is correct if affine_camera_matrix were only a model_view matrix</span></div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="comment">// * affine_camera_matrix includes glm::ortho, which flips z, so we flip the sign of viewing_direction.</span></div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; <span class="comment">// We don&#39;t need the dot product since viewing_direction.xy are 0 and .z is 1:</span></div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> angle = -face_normal_transformed[2]; <span class="comment">// flip sign, see above</span></div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; assert(angle &gt;= -1.f &amp;&amp; angle &lt;= 1.f);</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="comment">// angle is [-1, 1].</span></div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <span class="comment">// * +1 means 0 (same direction)</span></div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <span class="comment">// * 0 means 90</span></div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <span class="comment">// * -1 means 180 (facing opposite directions)</span></div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <span class="comment">// It&#39;s a linear relation, so +0.5 is 45 etc.</span></div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="comment">// An angle larger than 90 means the vertex won&#39;t be rendered anyway (because it&#39;s back-facing) so we encode 0 to 90.</span></div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="keywordflow">if</span> (angle &lt; 0.0f) {</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; alpha_value = 0.0f;</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; alpha_value = angle * 255.0f;</div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; }</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; }</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <span class="comment">// no visibility angle computation - if the triangle/pixel is visible, set the alpha chan to 255 (fully visible pixel).</span></div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; alpha_value = 255.0f;</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; }</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160;</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="comment">// Todo: Documentation</span></div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; cv::Point2f src_tri[3];</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; cv::Point2f dst_tri[3];</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160;</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; Vec4f vec(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[triangle_indices[0]][0], mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[triangle_indices[0]][1], mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[triangle_indices[0]][2], 1.0f);</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; Vec4f res = Mat(affine_camera_matrix * Mat(vec));</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; src_tri[0] = Vec2f(res[0], res[1]);</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160;</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; vec = Vec4f(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[triangle_indices[1]][0], mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[triangle_indices[1]][1], mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[triangle_indices[1]][2], 1.0f);</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; res = Mat(affine_camera_matrix * Mat(vec));</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; src_tri[1] = Vec2f(res[0], res[1]);</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; vec = Vec4f(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[triangle_indices[2]][0], mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[triangle_indices[2]][1], mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">vertices</a>[triangle_indices[2]][2], 1.0f);</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; res = Mat(affine_camera_matrix * Mat(vec));</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; src_tri[2] = Vec2f(res[0], res[1]);</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; dst_tri[0] = cv::Point2f(isomap.cols*mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triangle_indices[0]][0], isomap.rows*mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triangle_indices[0]][1] - 1.0f);</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; dst_tri[1] = cv::Point2f(isomap.cols*mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triangle_indices[1]][0], isomap.rows*mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triangle_indices[1]][1] - 1.0f);</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; dst_tri[2] = cv::Point2f(isomap.cols*mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triangle_indices[2]][0], isomap.rows*mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triangle_indices[2]][1] - 1.0f);</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160;</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; <span class="comment">// We now have the source triangles in the image and the source triangle in the isomap</span></div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; <span class="comment">// We use the inverse/ backward mapping approach, so we want to find the corresponding texel (texture-pixel) for each pixel in the isomap</span></div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160;</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; <span class="comment">// Get the inverse Affine Transform from original image: from dst (pixel in isomap) to src (in image)</span></div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; Mat warp_mat_org_inv = cv::getAffineTransform(dst_tri, src_tri);</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; warp_mat_org_inv.convertTo(warp_mat_org_inv, CV_32FC1);</div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160;</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; <span class="comment">// We now loop over all pixels in the triangle and select, depending on the mapping type, the corresponding texel(s) in the source image</span></div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = min(dst_tri[0].x, min(dst_tri[1].x, dst_tri[2].x)); x &lt; max(dst_tri[0].x, max(dst_tri[1].x, dst_tri[2].x)); ++x) {</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> y = min(dst_tri[0].y, min(dst_tri[1].y, dst_tri[2].y)); y &lt; max(dst_tri[0].y, max(dst_tri[1].y, dst_tri[2].y)); ++y) {</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; <span class="keywordflow">if</span> (detail::is_point_in_triangle(cv::Point2f(x, y), dst_tri[0], dst_tri[1], dst_tri[2])) {</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160;</div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; <span class="comment">// As the coordinates of the transformed pixel in the image will most likely not lie on a texel, we have to choose how to </span></div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <span class="comment">// calculate the pixel colors depending on the next texels</span></div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; <span class="comment">// there are three different texture interpolation methods: area, bilinear and nearest neighbour</span></div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160;</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; <span class="comment">// Area mapping: calculate mean color of texels in transformed pixel area</span></div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; <span class="keywordflow">if</span> (mapping_type == TextureInterpolation::Area) {</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; <span class="comment">// calculate positions of 4 corners of pixel in image (src)</span></div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; Vec3f homogenous_dst_upper_left(x - 0.5f, y - 0.5f, 1.0f);</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; Vec3f homogenous_dst_upper_right(x + 0.5f, y - 0.5f, 1.0f);</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; Vec3f homogenous_dst_lower_left(x - 0.5f, y + 0.5f, 1.0f);</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; Vec3f homogenous_dst_lower_right(x + 0.5f, y + 0.5f, 1.0f);</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160;</div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; Vec2f src_texel_upper_left = Mat(warp_mat_org_inv * Mat(homogenous_dst_upper_left));</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; Vec2f src_texel_upper_right = Mat(warp_mat_org_inv * Mat(homogenous_dst_upper_right));</div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; Vec2f src_texel_lower_left = Mat(warp_mat_org_inv * Mat(homogenous_dst_lower_left));</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; Vec2f src_texel_lower_right = Mat(warp_mat_org_inv * Mat(homogenous_dst_lower_right));</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160;</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; <span class="keywordtype">float</span> min_a = min(min(src_texel_upper_left[0], src_texel_upper_right[0]), min(src_texel_lower_left[0], src_texel_lower_right[0]));</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; <span class="keywordtype">float</span> max_a = max(max(src_texel_upper_left[0], src_texel_upper_right[0]), max(src_texel_lower_left[0], src_texel_lower_right[0]));</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; <span class="keywordtype">float</span> min_b = min(min(src_texel_upper_left[1], src_texel_upper_right[1]), min(src_texel_lower_left[1], src_texel_lower_right[1]));</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; <span class="keywordtype">float</span> max_b = max(max(src_texel_upper_left[1], src_texel_upper_right[1]), max(src_texel_lower_left[1], src_texel_lower_right[1]));</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160;</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; cv::Vec3i color;</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; <span class="keywordtype">int</span> num_texels = 0;</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160;</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="comment">// loop over square in which quadrangle out of the four corners of pixel is</span></div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> a = ceil(min_a); a &lt;= floor(max_a); ++a)</div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; {</div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> b = ceil(min_b); b &lt;= floor(max_b); ++b)</div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; {</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; <span class="comment">// check if texel is in quadrangle</span></div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <span class="keywordflow">if</span> (detail::is_point_in_triangle(cv::Point2f(a, b), src_texel_upper_left, src_texel_lower_left, src_texel_upper_right) || detail::is_point_in_triangle(cv::Point2f(a, b), src_texel_lower_left, src_texel_upper_right, src_texel_lower_right)) {</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; <span class="keywordflow">if</span> (a &lt; image.cols &amp;&amp; b &lt; image.rows) { <span class="comment">// check if texel is in image</span></div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; num_texels++;</div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; color += image.at&lt;Vec3b&gt;(b, a);</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; }</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; }</div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; }</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; }</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; <span class="keywordflow">if</span> (num_texels &gt; 0)</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; color = color / num_texels;</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; <span class="keywordflow">else</span> { <span class="comment">// if no corresponding texel found, nearest neighbour interpolation</span></div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; <span class="comment">// calculate corresponding position of dst_coord pixel center in image (src)</span></div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; Vec3f homogenous_dst_coord = Vec3f(x, y, 1.0f);</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; Vec2f src_texel = Mat(warp_mat_org_inv * Mat(homogenous_dst_coord));</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160;</div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; <span class="keywordflow">if</span> ((cvRound(src_texel[1]) &lt; image.rows) &amp;&amp; cvRound(src_texel[0]) &lt; image.cols) {</div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; color = image.at&lt;Vec3b&gt;(cvRound(src_texel[1]), cvRound(src_texel[0]));</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; }</div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; }</div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; isomap.at&lt;Vec3b&gt;(y, x) = color;</div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; }</div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; <span class="comment">// Bilinear mapping: calculate pixel color depending on the four neighbouring texels</span></div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; <span class="keywordflow">else</span> <span class="keywordflow">if</span> (mapping_type == TextureInterpolation::Bilinear) {</div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160;</div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; <span class="comment">// calculate corresponding position of dst_coord pixel center in image (src)</span></div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; Vec3f homogenous_dst_coord(x, y, 1.0f);</div>
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; Vec2f src_texel = Mat(warp_mat_org_inv * Mat(homogenous_dst_coord));</div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160;</div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; <span class="comment">// calculate euclidean distances to next 4 texels</span></div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; <span class="keyword">using</span> std::sqrt;</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; <span class="keyword">using</span> std::pow;</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; <span class="keywordtype">float</span> distance_upper_left = sqrt(pow(src_texel[0] - floor(src_texel[0]), 2) + pow(src_texel[1] - floor(src_texel[1]), 2));</div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; <span class="keywordtype">float</span> distance_upper_right = sqrt(pow(src_texel[0] - floor(src_texel[0]), 2) + pow(src_texel[1] - ceil(src_texel[1]), 2));</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; <span class="keywordtype">float</span> distance_lower_left = sqrt(pow(src_texel[0] - ceil(src_texel[0]), 2) + pow(src_texel[1] - floor(src_texel[1]), 2));</div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; <span class="keywordtype">float</span> distance_lower_right = sqrt(pow(src_texel[0] - ceil(src_texel[0]), 2) + pow(src_texel[1] - ceil(src_texel[1]), 2));</div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160;</div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; <span class="comment">// normalise distances that the sum of all distances is 1</span></div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; <span class="keywordtype">float</span> sum_distances = distance_lower_left + distance_lower_right + distance_upper_left + distance_upper_right;</div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; distance_lower_left /= sum_distances;</div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; distance_lower_right /= sum_distances;</div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; distance_upper_left /= sum_distances;</div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; distance_upper_right /= sum_distances;</div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;</div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <span class="comment">// set color depending on distance from next 4 texels</span></div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> color = 0; color &lt; 3; ++color) {</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; <span class="keywordtype">float</span> color_upper_left = image.at&lt;Vec3b&gt;(floor(src_texel[1]), floor(src_texel[0]))[color] * distance_upper_left;</div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; <span class="keywordtype">float</span> color_upper_right = image.at&lt;Vec3b&gt;(floor(src_texel[1]), ceil(src_texel[0]))[color] * distance_upper_right;</div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; <span class="keywordtype">float</span> color_lower_left = image.at&lt;Vec3b&gt;(ceil(src_texel[1]), floor(src_texel[0]))[color] * distance_lower_left;</div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; <span class="keywordtype">float</span> color_lower_right = image.at&lt;Vec3b&gt;(ceil(src_texel[1]), ceil(src_texel[0]))[color] * distance_lower_right;</div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160;</div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; isomap.at&lt;Vec3b&gt;(y, x)[color] = color_upper_left + color_upper_right + color_lower_left + color_lower_right;</div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; }</div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; }</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; <span class="comment">// NearestNeighbour mapping: set color of pixel to color of nearest texel</span></div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; <span class="keywordflow">else</span> <span class="keywordflow">if</span> (mapping_type == TextureInterpolation::NearestNeighbour) {</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160;</div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; <span class="comment">// calculate corresponding position of dst_coord pixel center in image (src)</span></div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; <span class="keyword">const</span> Mat homogenous_dst_coord(Vec3f(x, y, 1.0f));</div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; <span class="keyword">const</span> Vec2f src_texel = Mat(warp_mat_org_inv * homogenous_dst_coord);</div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160;</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; <span class="keywordflow">if</span> ((cvRound(src_texel[1]) &lt; image.rows) &amp;&amp; (cvRound(src_texel[0]) &lt; image.cols) &amp;&amp; cvRound(src_texel[0]) &gt; 0 &amp;&amp; cvRound(src_texel[1]) &gt; 0)</div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; {</div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; cv::Vec4b isomap_pixel;</div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; isomap.at&lt;cv::Vec4b&gt;(y, x)[0] = image.at&lt;Vec3b&gt;(cvRound(src_texel[1]), cvRound(src_texel[0]))[0];</div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160; isomap.at&lt;cv::Vec4b&gt;(y, x)[1] = image.at&lt;Vec3b&gt;(cvRound(src_texel[1]), cvRound(src_texel[0]))[1];</div>
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160; isomap.at&lt;cv::Vec4b&gt;(y, x)[2] = image.at&lt;Vec3b&gt;(cvRound(src_texel[1]), cvRound(src_texel[0]))[2];</div>
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; isomap.at&lt;cv::Vec4b&gt;(y, x)[3] = static_cast&lt;uchar&gt;(alpha_value); <span class="comment">// pixel is visible</span></div>
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160; }</div>
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; }</div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160; }</div>
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; }</div>
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; }</div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; }; <span class="comment">// end lambda auto extract_triangle();</span></div>
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160; results.emplace_back(std::async(extract_triangle));</div>
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160; } <span class="comment">// end for all mesh.tvi</span></div>
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160; <span class="comment">// Collect all the launched tasks:</span></div>
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp;&amp; r : results) {</div>
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160; r.get();</div>
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; }</div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160; <span class="keywordflow">return</span> isomap;</div>
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160;};</div>
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160;</div>
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160; } <span class="comment">/* namespace render */</span></div>
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160;} <span class="comment">/* namespace eos */</span></div>
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160;</div>
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* TEXTURE_EXTRACTION_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="namespaceeos_1_1render_html_ac72cdee6eed13468a424824ddd0b3074"><div class="ttname"><a href="namespaceeos_1_1render.html#ac72cdee6eed13468a424824ddd0b3074">eos::render::calculate_face_normal</a></div><div class="ttdeci">cv::Vec3f calculate_face_normal(const cv::Vec3f &amp;v0, const cv::Vec3f &amp;v1, const cv::Vec3f &amp;v2)</div><div class="ttdef"><b>Definition:</b> utils.hpp:95</div></div>
<div class="ttc" id="namespaceeos_1_1render_html_a298bda0bf8e9ee6947522b96d32ab237"><div class="ttname"><a href="namespaceeos_1_1render.html#a298bda0bf8e9ee6947522b96d32ab237">eos::render::TextureInterpolation</a></div><div class="ttdeci">TextureInterpolation</div><div class="ttdef"><b>Definition:</b> texture_extraction.hpp:44</div></div>
<div class="ttc" id="namespaceeos_1_1render_html_aafa8c960c3b6eb080da1536cc3634577"><div class="ttname"><a href="namespaceeos_1_1render.html#aafa8c960c3b6eb080da1536cc3634577">eos::render::extract_texture</a></div><div class="ttdeci">cv::Mat extract_texture(Mesh mesh, cv::Mat affine_camera_matrix, cv::Mat image, cv::Mat depthbuffer, bool compute_view_angle, TextureInterpolation mapping_type, int isomap_resolution)</div><div class="ttdef"><b>Definition:</b> texture_extraction.hpp:106</div></div>
<div class="ttc" id="namespaceeos_1_1render_html_a1adc532475d45d16f7b0c0eddf1bc7cb"><div class="ttname"><a href="namespaceeos_1_1render.html#a1adc532475d45d16f7b0c0eddf1bc7cb">eos::render::render_affine</a></div><div class="ttdeci">std::pair&lt; cv::Mat, cv::Mat &gt; render_affine(Mesh mesh, cv::Mat affine_camera_matrix, int viewport_width, int viewport_height, bool do_backface_culling=true)</div><div class="ttdef"><b>Definition:</b> render_affine.hpp:52</div></div>
<div class="ttc" id="namespaceeos_html"><div class="ttname"><a href="namespaceeos.html">eos</a></div><div class="ttdoc">Namespace containing all of eos&#39;s 3D model fitting functionality. </div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_a305d17e6453f6be320331e00e8c8816e"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#a305d17e6453f6be320331e00e8c8816e">eos::render::Mesh::vertices</a></div><div class="ttdeci">std::vector&lt; cv::Vec4f &gt; vertices</div><div class="ttdoc">3D vertex positions. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:51</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html">eos::render::Mesh</a></div><div class="ttdoc">This class represents a 3D mesh consisting of vertices, vertex colour information and texture coordin...</div><div class="ttdef"><b>Definition:</b> Mesh.hpp:49</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_ab6fb80c460656bf7830a526f0692681b"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">eos::render::Mesh::tvi</a></div><div class="ttdeci">std::vector&lt; std::array&lt; int, 3 &gt; &gt; tvi</div><div class="ttdoc">Triangle vertex indices. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:55</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_a64fddf0a7200e7f66b0426773542eea4"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">eos::render::Mesh::texcoords</a></div><div class="ttdeci">std::vector&lt; cv::Vec2f &gt; texcoords</div><div class="ttdoc">Texture coordinates for each vertex. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:53</div></div>
<div class="ttc" id="namespaceeos_1_1render_html_a7628a42875570658bea6ffb4f46723e5"><div class="ttname"><a href="namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5">eos::render::render</a></div><div class="ttdeci">std::pair&lt; cv::Mat, cv::Mat &gt; render(Mesh mesh, cv::Mat model_view_matrix, cv::Mat projection_matrix, int viewport_width, int viewport_height, const Texture &amp;texture, bool enable_backface_culling=false, bool enable_near_clipping=true, bool enable_far_clipping=true)</div><div class="ttdef"><b>Definition:</b> render.hpp:129</div></div>
</div><!-- fragment --></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.10
</small></address>
</body>
</html>
<!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.10"/>
<title>eos: include/eos/render/utils.hpp Source File</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML/MathJax.js"></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">eos
&#160;<span id="projectnumber">0.6.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</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"><a class="el" href="dir_ce53d3124a8ddb93985ce6ec479297f4.html">include</a></li><li class="navelem"><a class="el" href="dir_c7ebde285fcef06dba0b090642612638.html">eos</a></li><li class="navelem"><a class="el" href="dir_fab380b22e1724065a4c65606be96940.html">render</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">utils.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Eos - A 3D Morphable Model fitting library written in modern C++11/14.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * File: include/eos/render/utils.hpp</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright 2014, 2015 Patrik Huber</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * limitations under the License.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#ifndef RENDER_UTILS_HPP_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#define RENDER_UTILS_HPP_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &quot;eos/render/Mesh.hpp&quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &quot;opencv2/core/core.hpp&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &quot;opencv2/imgproc/imgproc.hpp&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> {</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; <span class="keyword">namespace </span><a class="code" href="namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5">render</a> {</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="namespaceeos_1_1render.html#a04bb2f816e97ecb7f33cf8a50328e0db"> 50</a></span>&#160;<span class="keyword">inline</span> cv::Vec2f <a class="code" href="namespaceeos_1_1render.html#a04bb2f816e97ecb7f33cf8a50328e0db">clip_to_screen_space</a>(<span class="keyword">const</span> cv::Vec2f&amp; clip_coordinates, <span class="keywordtype">int</span> screen_width, <span class="keywordtype">int</span> screen_height)</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;{</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <span class="comment">// Window transform:</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> x_ss = (clip_coordinates[0] + 1.0f) * (screen_width / 2.0f);</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> y_ss = screen_height - (clip_coordinates[1] + 1.0f) * (screen_height / 2.0f); <span class="comment">// also flip y; Qt: Origin top-left. OpenGL: bottom-left.</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="keywordflow">return</span> cv::Vec2f(x_ss, y_ss);</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="comment">/* Note: What we do here is equivalent to</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;<span class="comment"> x_w = (x * vW/2) + vW/2;</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;<span class="comment"> However, Shirley says we should do:</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="comment"> x_w = (x * vW/2) + (vW-1)/2;</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;<span class="comment"> (analogous for y)</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;<span class="comment"> Todo: Check the consequences.</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;};</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;</div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="namespaceeos_1_1render.html#a7c4b923267e9b3b09c0c588bfdd4cb85"> 76</a></span>&#160;<span class="keyword">inline</span> cv::Vec2f <a class="code" href="namespaceeos_1_1render.html#a7c4b923267e9b3b09c0c588bfdd4cb85">screen_to_clip_space</a>(<span class="keyword">const</span> cv::Vec2f&amp; screen_coordinates, <span class="keywordtype">int</span> screen_width, <span class="keywordtype">int</span> screen_height)</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;{</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> x_cs = screen_coordinates[0] / (screen_width / 2.0f) - 1.0f;</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keywordtype">float</span> y_cs = screen_coordinates[1] / (screen_height / 2.0f) - 1.0f;</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; y_cs *= -1.0f;</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keywordflow">return</span> cv::Vec2f(x_cs, y_cs);</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;};</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;</div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="namespaceeos_1_1render.html#ac72cdee6eed13468a424824ddd0b3074"> 95</a></span>&#160;cv::Vec3f <a class="code" href="namespaceeos_1_1render.html#ac72cdee6eed13468a424824ddd0b3074">calculate_face_normal</a>(<span class="keyword">const</span> cv::Vec3f&amp; v0, <span class="keyword">const</span> cv::Vec3f&amp; v1, <span class="keyword">const</span> cv::Vec3f&amp; v2)</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;{</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; cv::Vec3f n = (v1 - v0).cross(v2 - v0); <span class="comment">// v0-to-v1 x v0-to-v2</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; n /= cv::norm(n);</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keywordflow">return</span> n;</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;};</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="namespaceeos_1_1render.html#a4edecd42a4a04ba6eb95089dd3ff256a"> 111</a></span>&#160;cv::Mat <a class="code" href="namespaceeos_1_1render.html#a4edecd42a4a04ba6eb95089dd3ff256a">draw_texcoords</a>(<a class="code" href="structeos_1_1render_1_1_mesh.html">Mesh</a> mesh, cv::Mat image = cv::Mat())</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;{</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="keyword">using</span> cv::Point2f;</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keyword">using</span> cv::Scalar;</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="keywordflow">if</span> (image.empty())</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; {</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; image = cv::Mat(512, 512, CV_8UC4, Scalar(0.0f, 0.0f, 0.0f, 255.0f));</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; }</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; triIdx : mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">tvi</a>) {</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; cv::line(image, Point2f(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triIdx[0]][0] * image.cols, mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triIdx[0]][1] * image.rows), Point2f(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triIdx[1]][0] * image.cols, mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triIdx[1]][1] * image.rows), Scalar(255.0f, 0.0f, 0.0f));</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; cv::line(image, Point2f(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triIdx[1]][0] * image.cols, mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triIdx[1]][1] * image.rows), Point2f(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triIdx[2]][0] * image.cols, mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triIdx[2]][1] * image.rows), Scalar(255.0f, 0.0f, 0.0f));</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; cv::line(image, Point2f(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triIdx[2]][0] * image.cols, mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triIdx[2]][1] * image.rows), Point2f(mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triIdx[0]][0] * image.cols, mesh.<a class="code" href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">texcoords</a>[triIdx[0]][1] * image.rows), Scalar(255.0f, 0.0f, 0.0f));</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; }</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <span class="keywordflow">return</span> image;</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;};</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="comment">// TODO: Should go to detail:: namespace, or texturing/utils or whatever.</span></div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> get_max_possible_mipmaps_num(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> width, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> height)</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;{</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mipmapsNum = 1;</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size = std::max(width, height);</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keywordflow">if</span> (size == 1)</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keywordflow">do</span> {</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; size &gt;&gt;= 1;</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; mipmapsNum++;</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; } <span class="keywordflow">while</span> (size != 1);</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keywordflow">return</span> mipmapsNum;</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;};</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> is_power_of_two(<span class="keywordtype">int</span> x)</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;{</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keywordflow">return</span> !(x &amp; (x - 1));</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;};</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160;</div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="classeos_1_1render_1_1_texture.html"> 150</a></span>&#160;<span class="keyword">class </span><a class="code" href="classeos_1_1render_1_1_texture.html">Texture</a></div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;{</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="comment">// Todo: This whole class needs a major overhaul and documentation.</span></div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; std::vector&lt;cv::Mat&gt; mipmaps; <span class="comment">// make Texture a friend class of renderer, then move this to private?</span></div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> widthLog, heightLog; <span class="comment">// log2 of width and height of the base mip-level</span></div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;<span class="comment">//private:</span></div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="comment">//std::string filename;</span></div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mipmaps_num;</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;};</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;<span class="comment">// throws: ocv exc, runtime_ex</span></div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160;<a class="code" href="classeos_1_1render_1_1_texture.html">Texture</a> create_mipmapped_texture(cv::Mat image, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mipmapsNum = 0) {</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; assert(image.type() == CV_8UC3 || image.type() == CV_8UC4);</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <a class="code" href="classeos_1_1render_1_1_texture.html">Texture</a> texture;</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160;</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; texture.mipmaps_num = (mipmapsNum == 0 ? get_max_possible_mipmaps_num(image.cols, image.rows) : mipmapsNum);</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="comment">/*if (mipmapsNum == 0)</span></div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160;<span class="comment"> {</span></div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160;<span class="comment"> uchar mmn = render::utils::MatrixUtils::getMaxPossibleMipmapsNum(image.cols, image.rows);</span></div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;<span class="comment"> this-&gt;mipmapsNum = mmn;</span></div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;<span class="comment"> } else</span></div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160;<span class="comment"> {</span></div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;<span class="comment"> this-&gt;mipmapsNum = mipmapsNum;</span></div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160;<span class="comment"> }*/</span></div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; <span class="keywordflow">if</span> (texture.mipmaps_num &gt; 1)</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; {</div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <span class="keywordflow">if</span> (!is_power_of_two(image.cols) || !is_power_of_two(image.rows))</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; {</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;Error: Couldn&#39;t generate mipmaps, width or height not power of two.&quot;</span>);</div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; }</div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; }</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <span class="keywordflow">if</span> (image.type() == CV_8UC3)</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; {</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; image.convertTo(image, CV_8UC4); <span class="comment">// Most often, the input img is CV_8UC3. Img is BGR. Add an alpha channel</span></div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; cv::cvtColor(image, image, CV_BGR2BGRA);</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; }</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160;</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <span class="keywordtype">int</span> currWidth = image.cols;</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; <span class="keywordtype">int</span> currHeight = image.rows;</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; std::vector&lt;cv::Mat&gt; mipmaps;</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; texture.mipmaps_num; i++)</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; {</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; <span class="keywordflow">if</span> (i == 0) {</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; mipmaps.push_back(image);</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; }</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; cv::Mat currMipMap(currHeight, currWidth, CV_8UC4);</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; cv::resize(mipmaps[i - 1], currMipMap, currMipMap.size());</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; mipmaps.push_back(currMipMap);</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; }</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; <span class="keywordflow">if</span> (currWidth &gt; 1)</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; currWidth &gt;&gt;= 1;</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; <span class="keywordflow">if</span> (currHeight &gt; 1)</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; currHeight &gt;&gt;= 1;</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; }</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; texture.mipmaps = mipmaps;</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; texture.widthLog = (uchar)(std::log(mipmaps[0].cols) / CV_LOG2 + 0.0001f); <span class="comment">// std::epsilon or something? or why 0.0001f here?</span></div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; texture.heightLog = (uchar)(std::log(mipmaps[0].rows) / CV_LOG2 + 0.0001f); <span class="comment">// Changed std::logf to std::log because it doesnt compile in linux (gcc 4.8). CHECK THAT</span></div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; <span class="keywordflow">return</span> texture;</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160;};</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160;</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; } <span class="comment">/* namespace render */</span></div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;} <span class="comment">/* namespace eos */</span></div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160;</div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* RENDER_UTILS_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="namespaceeos_1_1render_html_ac72cdee6eed13468a424824ddd0b3074"><div class="ttname"><a href="namespaceeos_1_1render.html#ac72cdee6eed13468a424824ddd0b3074">eos::render::calculate_face_normal</a></div><div class="ttdeci">cv::Vec3f calculate_face_normal(const cv::Vec3f &amp;v0, const cv::Vec3f &amp;v1, const cv::Vec3f &amp;v2)</div><div class="ttdef"><b>Definition:</b> utils.hpp:95</div></div>
<div class="ttc" id="classeos_1_1render_1_1_texture_html"><div class="ttname"><a href="classeos_1_1render_1_1_texture.html">eos::render::Texture</a></div><div class="ttdef"><b>Definition:</b> utils.hpp:150</div></div>
<div class="ttc" id="namespaceeos_1_1render_html_a4edecd42a4a04ba6eb95089dd3ff256a"><div class="ttname"><a href="namespaceeos_1_1render.html#a4edecd42a4a04ba6eb95089dd3ff256a">eos::render::draw_texcoords</a></div><div class="ttdeci">cv::Mat draw_texcoords(Mesh mesh, cv::Mat image=cv::Mat())</div><div class="ttdef"><b>Definition:</b> utils.hpp:111</div></div>
<div class="ttc" id="namespaceeos_1_1render_html_a7c4b923267e9b3b09c0c588bfdd4cb85"><div class="ttname"><a href="namespaceeos_1_1render.html#a7c4b923267e9b3b09c0c588bfdd4cb85">eos::render::screen_to_clip_space</a></div><div class="ttdeci">cv::Vec2f screen_to_clip_space(const cv::Vec2f &amp;screen_coordinates, int screen_width, int screen_height)</div><div class="ttdef"><b>Definition:</b> utils.hpp:76</div></div>
<div class="ttc" id="namespaceeos_html"><div class="ttname"><a href="namespaceeos.html">eos</a></div><div class="ttdoc">Namespace containing all of eos&#39;s 3D model fitting functionality. </div></div>
<div class="ttc" id="namespaceeos_1_1render_html_a04bb2f816e97ecb7f33cf8a50328e0db"><div class="ttname"><a href="namespaceeos_1_1render.html#a04bb2f816e97ecb7f33cf8a50328e0db">eos::render::clip_to_screen_space</a></div><div class="ttdeci">cv::Vec2f clip_to_screen_space(const cv::Vec2f &amp;clip_coordinates, int screen_width, int screen_height)</div><div class="ttdef"><b>Definition:</b> utils.hpp:50</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html">eos::render::Mesh</a></div><div class="ttdoc">This class represents a 3D mesh consisting of vertices, vertex colour information and texture coordin...</div><div class="ttdef"><b>Definition:</b> Mesh.hpp:49</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_ab6fb80c460656bf7830a526f0692681b"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#ab6fb80c460656bf7830a526f0692681b">eos::render::Mesh::tvi</a></div><div class="ttdeci">std::vector&lt; std::array&lt; int, 3 &gt; &gt; tvi</div><div class="ttdoc">Triangle vertex indices. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:55</div></div>
<div class="ttc" id="structeos_1_1render_1_1_mesh_html_a64fddf0a7200e7f66b0426773542eea4"><div class="ttname"><a href="structeos_1_1render_1_1_mesh.html#a64fddf0a7200e7f66b0426773542eea4">eos::render::Mesh::texcoords</a></div><div class="ttdeci">std::vector&lt; cv::Vec2f &gt; texcoords</div><div class="ttdoc">Texture coordinates for each vertex. </div><div class="ttdef"><b>Definition:</b> Mesh.hpp:53</div></div>
<div class="ttc" id="namespaceeos_1_1render_html_a7628a42875570658bea6ffb4f46723e5"><div class="ttname"><a href="namespaceeos_1_1render.html#a7628a42875570658bea6ffb4f46723e5">eos::render::render</a></div><div class="ttdeci">std::pair&lt; cv::Mat, cv::Mat &gt; render(Mesh mesh, cv::Mat model_view_matrix, cv::Mat projection_matrix, int viewport_width, int viewport_height, const Texture &amp;texture, bool enable_backface_culling=false, bool enable_near_clipping=true, bool enable_far_clipping=true)</div><div class="ttdef"><b>Definition:</b> render.hpp:129</div></div>
</div><!-- fragment --></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.10
</small></address>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment