blob: c62bbf894e0fead3e75b8e10b068e6d4eba4d3b2 [file] [log] [blame]
Ryan OSheade36e4a2020-03-13 16:26:19 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6<meta name="generator" content="Doxygen 1.8.13"/>
7<meta name="viewport" content="width=device-width, initial-scale=1"/>
8<title>ArmNN: ImagePreprocessor&lt; TDataType &gt; Class Template Reference</title>
9<link href="tabs.css" rel="stylesheet" type="text/css"/>
10<script type="text/javascript" src="jquery.js"></script>
11<script type="text/javascript" src="dynsections.js"></script>
12<link href="navtree.css" rel="stylesheet" type="text/css"/>
13<script type="text/javascript" src="resize.js"></script>
14<script type="text/javascript" src="navtreedata.js"></script>
15<script type="text/javascript" src="navtree.js"></script>
16<script type="text/javascript">
17 $(document).ready(initResizable);
18</script>
19<link href="search/search.css" rel="stylesheet" type="text/css"/>
20<script type="text/javascript" src="search/searchdata.js"></script>
21<script type="text/javascript" src="search/search.js"></script>
22<link href="doxygen.css" rel="stylesheet" type="text/css" />
23</head>
24<body>
25<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
26<div id="titlearea">
27<table cellspacing="0" cellpadding="0">
28 <tbody>
29 <tr style="height: 56px;">
30 <td id="projectalign" style="padding-left: 0.5em;">
31 <div id="projectname">ArmNN
32 &#160;<span id="projectnumber">NotReleased</span>
33 </div>
34 </td>
35 </tr>
36 </tbody>
37</table>
38</div>
39<!-- end header part -->
40<!-- Generated by Doxygen 1.8.13 -->
41<script type="text/javascript">
42var searchBox = new SearchBox("searchBox", "search",false,'Search');
43</script>
44<script type="text/javascript" src="menudata.js"></script>
45<script type="text/javascript" src="menu.js"></script>
46<script type="text/javascript">
47$(function() {
48 initMenu('',true,false,'search.php','Search');
49 $(document).ready(function() { init_search(); });
50});
51</script>
52<div id="main-nav"></div>
53</div><!-- top -->
54<div id="side-nav" class="ui-resizable side-nav-resizable">
55 <div id="nav-tree">
56 <div id="nav-tree-contents">
57 <div id="nav-sync" class="sync"></div>
58 </div>
59 </div>
60 <div id="splitbar" style="-moz-user-select:none;"
61 class="ui-resizable-handle">
62 </div>
63</div>
64<script type="text/javascript">
65$(document).ready(function(){initNavTree('class_image_preprocessor.html','');});
66</script>
67<div id="doc-content">
68<!-- window showing the filter options -->
69<div id="MSearchSelectWindow"
70 onmouseover="return searchBox.OnSearchSelectShow()"
71 onmouseout="return searchBox.OnSearchSelectHide()"
72 onkeydown="return searchBox.OnSearchSelectKey(event)">
73</div>
74
75<!-- iframe showing the search results (closed by default) -->
76<div id="MSearchResultsWindow">
77<iframe src="javascript:void(0)" frameborder="0"
78 name="MSearchResults" id="MSearchResults">
79</iframe>
80</div>
81
82<div class="header">
83 <div class="summary">
84<a href="#pub-types">Public Types</a> &#124;
85<a href="#pub-methods">Public Member Functions</a> &#124;
86<a href="class_image_preprocessor-members.html">List of all members</a> </div>
87 <div class="headertitle">
88<div class="title">ImagePreprocessor&lt; TDataType &gt; Class Template Reference</div> </div>
89</div><!--header-->
90<div class="contents">
91
92<p><code>#include &lt;<a class="el" href="_image_preprocessor_8hpp_source.html">ImagePreprocessor.hpp</a>&gt;</code></p>
93<table class="memberdecls">
94<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
95Public Types</h2></td></tr>
96<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>,
97<a class="el" href="class_image_preprocessor.html#a8b182988d497b07d1e06a1707b67897fa54d2c44e9fb4c89a3abd5088e04fdc48">NCHW</a>
98 }</td></tr>
99<tr class="separator:a8b182988d497b07d1e06a1707b67897f"><td class="memSeparator" colspan="2">&#160;</td></tr>
100<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>
101<tr class="separator:af6964b8f91085191c5228d1a67db4523"><td class="memSeparator" colspan="2">&#160;</td></tr>
102<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>
103<tr class="separator:a0b6d5426d97a60215cdcd609dee35cc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
104</table><table class="memberdecls">
105<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
106Public Member Functions</h2></td></tr>
107<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>
108<tr class="separator:a3d7f9eb381f95c181466db2172dfd775"><td class="memSeparator" colspan="2">&#160;</td></tr>
109<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>
110<tr class="separator:ac2bd5628ca0535f9e8af78e65685d62f"><td class="memSeparator" colspan="2">&#160;</td></tr>
111<tr class="memitem:afc05b2b7e914f9737812e66f5583b04c"><td class="memTemplParams" colspan="2">template&lt;&gt; </td></tr>
112<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>
113<tr class="separator:afc05b2b7e914f9737812e66f5583b04c"><td class="memSeparator" colspan="2">&#160;</td></tr>
114<tr class="memitem:a0859c20682ecfa660d0da13de7998029"><td class="memTemplParams" colspan="2">template&lt;&gt; </td></tr>
115<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>
116<tr class="separator:a0859c20682ecfa660d0da13de7998029"><td class="memSeparator" colspan="2">&#160;</td></tr>
117</table>
118<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
119<div class="textblock"><h3>template&lt;typename TDataType&gt;<br />
120class ImagePreprocessor&lt; TDataType &gt;</h3>
121
122
123<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>
124</div><h2 class="groupheader">Member Typedef Documentation</h2>
125<a id="af6964b8f91085191c5228d1a67db4523"></a>
126<h2 class="memtitle"><span class="permalink"><a href="#af6964b8f91085191c5228d1a67db4523">&#9670;&nbsp;</a></span>DataType</h2>
127
128<div class="memitem">
129<div class="memproto">
130 <table class="memname">
131 <tr>
132 <td class="memname">using <a class="el" href="class_image_preprocessor.html#af6964b8f91085191c5228d1a67db4523">DataType</a> = TDataType</td>
133 </tr>
134 </table>
135</div><div class="memdoc">
136
137<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>
138
139</div>
140</div>
141<a id="a0b6d5426d97a60215cdcd609dee35cc9"></a>
142<h2 class="memtitle"><span class="permalink"><a href="#a0b6d5426d97a60215cdcd609dee35cc9">&#9670;&nbsp;</a></span>TTestCaseData</h2>
143
144<div class="memitem">
145<div class="memproto">
146 <table class="memname">
147 <tr>
148 <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>
149 </tr>
150 </table>
151</div><div class="memdoc">
152
153<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>
154
155</div>
156</div>
157<h2 class="groupheader">Member Enumeration Documentation</h2>
158<a id="a8b182988d497b07d1e06a1707b67897f"></a>
159<h2 class="memtitle"><span class="permalink"><a href="#a8b182988d497b07d1e06a1707b67897f">&#9670;&nbsp;</a></span>DataFormat</h2>
160
161<div class="memitem">
162<div class="memproto">
163 <table class="memname">
164 <tr>
165 <td class="memname">enum <a class="el" href="class_image_preprocessor.html#a8b182988d497b07d1e06a1707b67897f">DataFormat</a></td>
166 </tr>
167 </table>
168</div><div class="memdoc">
169<table class="fieldtable">
170<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a8b182988d497b07d1e06a1707b67897fa7442702e1d93df81504eb5e5d536c2fc"></a>NHWC&#160;</td><td class="fielddoc"></td></tr>
171<tr><td class="fieldname"><a id="a8b182988d497b07d1e06a1707b67897fa54d2c44e9fb4c89a3abd5088e04fdc48"></a>NCHW&#160;</td><td class="fielddoc"></td></tr>
172</table>
173
174<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>
175<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>
176<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>
177</div><!-- fragment -->
178</div>
179</div>
180<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
181<a id="a3d7f9eb381f95c181466db2172dfd775"></a>
182<h2 class="memtitle"><span class="permalink"><a href="#a3d7f9eb381f95c181466db2172dfd775">&#9670;&nbsp;</a></span>ImagePreprocessor()</h2>
183
184<div class="memitem">
185<div class="memproto">
186<table class="mlabels">
187 <tr>
188 <td class="mlabels-left">
189 <table class="memname">
190 <tr>
191 <td class="memname"><a class="el" href="class_image_preprocessor.html">ImagePreprocessor</a> </td>
192 <td>(</td>
193 <td class="paramtype">const std::string &amp;&#160;</td>
194 <td class="paramname"><em>binaryFileDirectory</em>, </td>
195 </tr>
196 <tr>
197 <td class="paramkey"></td>
198 <td></td>
199 <td class="paramtype">unsigned int&#160;</td>
200 <td class="paramname"><em>width</em>, </td>
201 </tr>
202 <tr>
203 <td class="paramkey"></td>
204 <td></td>
205 <td class="paramtype">unsigned int&#160;</td>
206 <td class="paramname"><em>height</em>, </td>
207 </tr>
208 <tr>
209 <td class="paramkey"></td>
210 <td></td>
211 <td class="paramtype">const std::vector&lt; <a class="el" href="_caffe_preprocessor_8hpp.html#aaf2811634c15da39d0966a444b780a55">ImageSet</a> &gt; &amp;&#160;</td>
212 <td class="paramname"><em>imageSet</em>, </td>
213 </tr>
214 <tr>
215 <td class="paramkey"></td>
216 <td></td>
217 <td class="paramtype">float&#160;</td>
218 <td class="paramname"><em>scale</em> = <code>255.0f</code>, </td>
219 </tr>
220 <tr>
221 <td class="paramkey"></td>
222 <td></td>
223 <td class="paramtype">const std::array&lt; float, 3 &gt;&#160;</td>
224 <td class="paramname"><em>mean</em> = <code>{{0,&#160;0,&#160;0}}</code>, </td>
225 </tr>
226 <tr>
227 <td class="paramkey"></td>
228 <td></td>
229 <td class="paramtype">const std::array&lt; float, 3 &gt;&#160;</td>
230 <td class="paramname"><em>stddev</em> = <code>{{1,&#160;1,&#160;1}}</code>, </td>
231 </tr>
232 <tr>
233 <td class="paramkey"></td>
234 <td></td>
235 <td class="paramtype"><a class="el" href="class_image_preprocessor.html#a8b182988d497b07d1e06a1707b67897f">DataFormat</a>&#160;</td>
236 <td class="paramname"><em>dataFormat</em> = <code>DataFormat::NHWC</code>, </td>
237 </tr>
238 <tr>
239 <td class="paramkey"></td>
240 <td></td>
241 <td class="paramtype">unsigned int&#160;</td>
242 <td class="paramname"><em>batchSize</em> = <code>1</code>&#160;</td>
243 </tr>
244 <tr>
245 <td></td>
246 <td>)</td>
247 <td></td><td></td>
248 </tr>
249 </table>
250 </td>
251 <td class="mlabels-right">
252<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
253 </tr>
254</table>
255</div><div class="memdoc">
256
257<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>
258
259<p class="reference">References <a class="el" href="class_image_preprocessor.html#ac2bd5628ca0535f9e8af78e65685d62f">ImagePreprocessor&lt; TDataType &gt;::GetTestCaseData()</a>.</p>
260<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>
261</div><!-- fragment -->
262</div>
263</div>
264<h2 class="groupheader">Member Function Documentation</h2>
265<a id="ac2bd5628ca0535f9e8af78e65685d62f"></a>
266<h2 class="memtitle"><span class="permalink"><a href="#ac2bd5628ca0535f9e8af78e65685d62f">&#9670;&nbsp;</a></span>GetTestCaseData() <span class="overload">[1/3]</span></h2>
267
268<div class="memitem">
269<div class="memproto">
270 <table class="memname">
271 <tr>
272 <td class="memname">std::unique_ptr&lt;<a class="el" href="class_image_preprocessor.html#a0b6d5426d97a60215cdcd609dee35cc9">TTestCaseData</a>&gt; GetTestCaseData </td>
273 <td>(</td>
274 <td class="paramtype">unsigned int&#160;</td>
275 <td class="paramname"><em>testCaseId</em></td><td>)</td>
276 <td></td>
277 </tr>
278 </table>
279</div><div class="memdoc">
280
281<p class="reference">Referenced by <a class="el" href="_image_preprocessor_8hpp_source.html#l00032">ImagePreprocessor&lt; TDataType &gt;::ImagePreprocessor()</a>.</p>
282
283</div>
284</div>
285<a id="afc05b2b7e914f9737812e66f5583b04c"></a>
286<h2 class="memtitle"><span class="permalink"><a href="#afc05b2b7e914f9737812e66f5583b04c">&#9670;&nbsp;</a></span>GetTestCaseData() <span class="overload">[2/3]</span></h2>
287
288<div class="memitem">
289<div class="memproto">
290 <table class="memname">
291 <tr>
292 <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>
293 <td>(</td>
294 <td class="paramtype">unsigned int&#160;</td>
295 <td class="paramname"><em>testCaseId</em></td><td>)</td>
296 <td></td>
297 </tr>
298 </table>
299</div><div class="memdoc">
300
301<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>
302<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 -->
303</div>
304</div>
305<a id="a0859c20682ecfa660d0da13de7998029"></a>
306<h2 class="memtitle"><span class="permalink"><a href="#a0859c20682ecfa660d0da13de7998029">&#9670;&nbsp;</a></span>GetTestCaseData() <span class="overload">[3/3]</span></h2>
307
308<div class="memitem">
309<div class="memproto">
310 <table class="memname">
311 <tr>
312 <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>
313 <td>(</td>
314 <td class="paramtype">unsigned int&#160;</td>
315 <td class="paramname"><em>testCaseId</em></td><td>)</td>
316 <td></td>
317 </tr>
318 </table>
319</div><div class="memdoc">
320
321<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>
322<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 -->
323</div>
324</div>
325<hr/>The documentation for this class was generated from the following files:<ul>
326<li>tests/<a class="el" href="_image_preprocessor_8hpp_source.html">ImagePreprocessor.hpp</a></li>
327<li>tests/<a class="el" href="_image_preprocessor_8cpp_source.html">ImagePreprocessor.cpp</a></li>
328</ul>
329</div><!-- contents -->
330</div><!-- doc-content -->
331<!-- start footer part -->
332<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
333 <ul>
334 <li class="navelem"><a class="el" href="class_image_preprocessor.html">ImagePreprocessor</a></li>
335 <li class="footer">Generated on Fri Mar 13 2020 16:07:01 for ArmNN by
336 <a href="http://www.doxygen.org/index.html">
337 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
338 </ul>
339</div>
340</body>
341</html>