blob: c62bbf894e0fead3e75b8e10b068e6d4eba4d3b2 [file] [log] [blame]
<!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.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ArmNN: ImagePreprocessor&lt; TDataType &gt; Class 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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</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>
<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">ArmNN
&#160;<span id="projectnumber">NotReleased</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_image_preprocessor.html','');});
</script>
<div id="doc-content">
<!-- 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="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_image_preprocessor-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">ImagePreprocessor&lt; TDataType &gt; Class Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="_image_preprocessor_8hpp_source.html">ImagePreprocessor.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a8b182988d497b07d1e06a1707b67897f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_image_preprocessor.html#a8b182988d497b07d1e06a1707b67897f">DataFormat</a> { <a class="el" href="class_image_preprocessor.html#a8b182988d497b07d1e06a1707b67897fa7442702e1d93df81504eb5e5d536c2fc">NHWC</a>,
<a class="el" href="class_image_preprocessor.html#a8b182988d497b07d1e06a1707b67897fa54d2c44e9fb4c89a3abd5088e04fdc48">NCHW</a>
}</td></tr>
<tr class="separator:a8b182988d497b07d1e06a1707b67897f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6964b8f91085191c5228d1a67db4523"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_image_preprocessor.html#af6964b8f91085191c5228d1a67db4523">DataType</a> = TDataType</td></tr>
<tr class="separator:af6964b8f91085191c5228d1a67db4523"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b6d5426d97a60215cdcd609dee35cc9"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_image_preprocessor.html#a0b6d5426d97a60215cdcd609dee35cc9">TTestCaseData</a> = <a class="el" href="class_classifier_test_case_data.html">ClassifierTestCaseData</a>&lt; <a class="el" href="class_image_preprocessor.html#af6964b8f91085191c5228d1a67db4523">DataType</a> &gt;</td></tr>
<tr class="separator:a0b6d5426d97a60215cdcd609dee35cc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><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:a3d7f9eb381f95c181466db2172dfd775"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_image_preprocessor.html#a3d7f9eb381f95c181466db2172dfd775">ImagePreprocessor</a> (const std::string &amp;binaryFileDirectory, unsigned int width, unsigned int height, const std::vector&lt; <a class="el" href="_caffe_preprocessor_8hpp.html#aaf2811634c15da39d0966a444b780a55">ImageSet</a> &gt; &amp;imageSet, float scale=255.0f, const std::array&lt; float, 3 &gt; mean={{0, 0, 0}}, const std::array&lt; float, 3 &gt; stddev={{1, 1, 1}}, DataFormat dataFormat=DataFormat::NHWC, unsigned int batchSize=1)</td></tr>
<tr class="separator:a3d7f9eb381f95c181466db2172dfd775"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2bd5628ca0535f9e8af78e65685d62f"><td class="memItemLeft" align="right" valign="top">std::unique_ptr&lt; <a class="el" href="class_image_preprocessor.html#a0b6d5426d97a60215cdcd609dee35cc9">TTestCaseData</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_image_preprocessor.html#ac2bd5628ca0535f9e8af78e65685d62f">GetTestCaseData</a> (unsigned int testCaseId)</td></tr>
<tr class="separator:ac2bd5628ca0535f9e8af78e65685d62f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc05b2b7e914f9737812e66f5583b04c"><td class="memTemplParams" colspan="2">template&lt;&gt; </td></tr>
<tr class="memitem:afc05b2b7e914f9737812e66f5583b04c"><td class="memTemplItemLeft" align="right" valign="top">std::unique_ptr&lt; <a class="el" href="class_image_preprocessor.html">ImagePreprocessor</a>&lt; float &gt;::<a class="el" href="class_image_preprocessor.html#a0b6d5426d97a60215cdcd609dee35cc9">TTestCaseData</a> &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_image_preprocessor.html#afc05b2b7e914f9737812e66f5583b04c">GetTestCaseData</a> (unsigned int testCaseId)</td></tr>
<tr class="separator:afc05b2b7e914f9737812e66f5583b04c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0859c20682ecfa660d0da13de7998029"><td class="memTemplParams" colspan="2">template&lt;&gt; </td></tr>
<tr class="memitem:a0859c20682ecfa660d0da13de7998029"><td class="memTemplItemLeft" align="right" valign="top">std::unique_ptr&lt; <a class="el" href="class_image_preprocessor.html">ImagePreprocessor</a>&lt; uint8_t &gt;::<a class="el" href="class_image_preprocessor.html#a0b6d5426d97a60215cdcd609dee35cc9">TTestCaseData</a> &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_image_preprocessor.html#a0859c20682ecfa660d0da13de7998029">GetTestCaseData</a> (unsigned int testCaseId)</td></tr>
<tr class="separator:a0859c20682ecfa660d0da13de7998029"><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;typename TDataType&gt;<br />
class ImagePreprocessor&lt; TDataType &gt;</h3>
<p class="definition">Definition at line <a class="el" href="_image_preprocessor_8hpp_source.html#l00020">20</a> of file <a class="el" href="_image_preprocessor_8hpp_source.html">ImagePreprocessor.hpp</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="af6964b8f91085191c5228d1a67db4523"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af6964b8f91085191c5228d1a67db4523">&#9670;&nbsp;</a></span>DataType</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="class_image_preprocessor.html#af6964b8f91085191c5228d1a67db4523">DataType</a> = TDataType</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_image_preprocessor_8hpp_source.html#l00023">23</a> of file <a class="el" href="_image_preprocessor_8hpp_source.html">ImagePreprocessor.hpp</a>.</p>
</div>
</div>
<a id="a0b6d5426d97a60215cdcd609dee35cc9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b6d5426d97a60215cdcd609dee35cc9">&#9670;&nbsp;</a></span>TTestCaseData</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="class_image_preprocessor.html#a0b6d5426d97a60215cdcd609dee35cc9">TTestCaseData</a> = <a class="el" href="class_classifier_test_case_data.html">ClassifierTestCaseData</a>&lt;<a class="el" href="class_image_preprocessor.html#af6964b8f91085191c5228d1a67db4523">DataType</a>&gt;</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_image_preprocessor_8hpp_source.html#l00024">24</a> of file <a class="el" href="_image_preprocessor_8hpp_source.html">ImagePreprocessor.hpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="a8b182988d497b07d1e06a1707b67897f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b182988d497b07d1e06a1707b67897f">&#9670;&nbsp;</a></span>DataFormat</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="class_image_preprocessor.html#a8b182988d497b07d1e06a1707b67897f">DataFormat</a></td>
</tr>
</table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a8b182988d497b07d1e06a1707b67897fa7442702e1d93df81504eb5e5d536c2fc"></a>NHWC&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a8b182988d497b07d1e06a1707b67897fa54d2c44e9fb4c89a3abd5088e04fdc48"></a>NCHW&#160;</td><td class="fielddoc"></td></tr>
</table>
<p class="definition">Definition at line <a class="el" href="_image_preprocessor_8hpp_source.html#l00026">26</a> of file <a class="el" href="_image_preprocessor_8hpp_source.html">ImagePreprocessor.hpp</a>.</p>
<div class="fragment"><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; <a class="code" href="class_image_preprocessor.html#a8b182988d497b07d1e06a1707b67897fa7442702e1d93df81504eb5e5d536c2fc">NHWC</a>,</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; <a class="code" href="class_image_preprocessor.html#a8b182988d497b07d1e06a1707b67897fa54d2c44e9fb4c89a3abd5088e04fdc48">NCHW</a></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; };</div><div class="ttc" id="class_image_preprocessor_html_a8b182988d497b07d1e06a1707b67897fa54d2c44e9fb4c89a3abd5088e04fdc48"><div class="ttname"><a href="class_image_preprocessor.html#a8b182988d497b07d1e06a1707b67897fa54d2c44e9fb4c89a3abd5088e04fdc48">ImagePreprocessor::NCHW</a></div><div class="ttdef"><b>Definition:</b> <a href="_image_preprocessor_8hpp_source.html#l00029">ImagePreprocessor.hpp:29</a></div></div>
<div class="ttc" id="class_image_preprocessor_html_a8b182988d497b07d1e06a1707b67897fa7442702e1d93df81504eb5e5d536c2fc"><div class="ttname"><a href="class_image_preprocessor.html#a8b182988d497b07d1e06a1707b67897fa7442702e1d93df81504eb5e5d536c2fc">ImagePreprocessor::NHWC</a></div><div class="ttdef"><b>Definition:</b> <a href="_image_preprocessor_8hpp_source.html#l00028">ImagePreprocessor.hpp:28</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a3d7f9eb381f95c181466db2172dfd775"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d7f9eb381f95c181466db2172dfd775">&#9670;&nbsp;</a></span>ImagePreprocessor()</h2>
<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="class_image_preprocessor.html">ImagePreprocessor</a> </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>binaryFileDirectory</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; <a class="el" href="_caffe_preprocessor_8hpp.html#aaf2811634c15da39d0966a444b780a55">ImageSet</a> &gt; &amp;&#160;</td>
<td class="paramname"><em>imageSet</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>scale</em> = <code>255.0f</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::array&lt; float, 3 &gt;&#160;</td>
<td class="paramname"><em>mean</em> = <code>{{0,&#160;0,&#160;0}}</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::array&lt; float, 3 &gt;&#160;</td>
<td class="paramname"><em>stddev</em> = <code>{{1,&#160;1,&#160;1}}</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_image_preprocessor.html#a8b182988d497b07d1e06a1707b67897f">DataFormat</a>&#160;</td>
<td class="paramname"><em>dataFormat</em> = <code>DataFormat::NHWC</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>batchSize</em> = <code>1</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 class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_image_preprocessor_8hpp_source.html#l00032">32</a> of file <a class="el" href="_image_preprocessor_8hpp_source.html">ImagePreprocessor.hpp</a>.</p>
<p class="reference">References <a class="el" href="class_image_preprocessor.html#ac2bd5628ca0535f9e8af78e65685d62f">ImagePreprocessor&lt; TDataType &gt;::GetTestCaseData()</a>.</p>
<div class="fragment"><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; {{0, 0, 0}},</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keyword">const</span> std::array&lt;float, 3&gt; stddev={{1, 1, 1}},</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <a class="code" href="class_image_preprocessor.html#a8b182988d497b07d1e06a1707b67897f">DataFormat</a> dataFormat=DataFormat::NHWC,</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> batchSize=1)</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; : m_BinaryDirectory(binaryFileDirectory)</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; , m_Height(height)</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; , m_Width(width)</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; , m_BatchSize(batchSize)</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; , m_Scale(scale)</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; , m_ImageSet(imageSet)</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; , m_Mean(mean)</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; , m_Stddev(stddev)</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; , m_DataFormat(dataFormat)</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"> 51</span>&#160; }</div><div class="ttc" id="class_image_preprocessor_html_a8b182988d497b07d1e06a1707b67897f"><div class="ttname"><a href="class_image_preprocessor.html#a8b182988d497b07d1e06a1707b67897f">ImagePreprocessor::DataFormat</a></div><div class="ttdeci">DataFormat</div><div class="ttdef"><b>Definition:</b> <a href="_image_preprocessor_8hpp_source.html#l00026">ImagePreprocessor.hpp:26</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ac2bd5628ca0535f9e8af78e65685d62f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2bd5628ca0535f9e8af78e65685d62f">&#9670;&nbsp;</a></span>GetTestCaseData() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::unique_ptr&lt;<a class="el" href="class_image_preprocessor.html#a0b6d5426d97a60215cdcd609dee35cc9">TTestCaseData</a>&gt; GetTestCaseData </td>
<td>(</td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>testCaseId</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="reference">Referenced by <a class="el" href="_image_preprocessor_8hpp_source.html#l00032">ImagePreprocessor&lt; TDataType &gt;::ImagePreprocessor()</a>.</p>
</div>
</div>
<a id="afc05b2b7e914f9737812e66f5583b04c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc05b2b7e914f9737812e66f5583b04c">&#9670;&nbsp;</a></span>GetTestCaseData() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::unique_ptr&lt; <a class="el" href="class_image_preprocessor.html">ImagePreprocessor</a>&lt; float &gt;::<a class="el" href="class_image_preprocessor.html#a0b6d5426d97a60215cdcd609dee35cc9">TTestCaseData</a> &gt; GetTestCaseData </td>
<td>(</td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>testCaseId</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_image_preprocessor_8cpp_source.html#l00059">59</a> of file <a class="el" href="_image_preprocessor_8cpp_source.html">ImagePreprocessor.cpp</a>.</p>
<div class="fragment"><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; std::vector&lt;float&gt; resized;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keyword">auto</span> label = GetLabelAndResizedImageAsFloat(testCaseId, resized);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="keywordflow">return</span> std::make_unique&lt;TTestCaseData&gt;(label, std::move(resized));</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a id="a0859c20682ecfa660d0da13de7998029"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0859c20682ecfa660d0da13de7998029">&#9670;&nbsp;</a></span>GetTestCaseData() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::unique_ptr&lt; <a class="el" href="class_image_preprocessor.html">ImagePreprocessor</a>&lt; uint8_t &gt;::<a class="el" href="class_image_preprocessor.html#a0b6d5426d97a60215cdcd609dee35cc9">TTestCaseData</a> &gt; GetTestCaseData </td>
<td>(</td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>testCaseId</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_image_preprocessor_8cpp_source.html#l00068">68</a> of file <a class="el" href="_image_preprocessor_8cpp_source.html">ImagePreprocessor.cpp</a>.</p>
<div class="fragment"><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; std::vector&lt;float&gt; resized;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <span class="keyword">auto</span> label = GetLabelAndResizedImageAsFloat(testCaseId, resized);</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="keywordtype">size_t</span> resizedSize = resized.size();</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; std::vector&lt;uint8_t&gt; quantized(resized.size());</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; <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;resizedSize; ++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; quantized[i] = <span class="keyword">static_cast&lt;</span>uint8_t<span class="keyword">&gt;</span>(resized[i]);</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;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keywordflow">return</span> std::make_unique&lt;TTestCaseData&gt;(label, std::move(quantized));</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>tests/<a class="el" href="_image_preprocessor_8hpp_source.html">ImagePreprocessor.hpp</a></li>
<li>tests/<a class="el" href="_image_preprocessor_8cpp_source.html">ImagePreprocessor.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="class_image_preprocessor.html">ImagePreprocessor</a></li>
<li class="footer">Generated on Fri Mar 13 2020 16:07:01 for ArmNN by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
</ul>
</div>
</body>
</html>