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