Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 1 | <!-- 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: tests/InferenceTestImage.hpp File 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 |  <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"> |
| 56 | var 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('_inference_test_image_8hpp.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="#nested-classes">Classes</a> | |
| 99 | <a href="#enum-members">Enumerations</a> | |
| 100 | <a href="#func-members">Functions</a> </div> |
| 101 | <div class="headertitle"> |
| 102 | <div class="title">InferenceTestImage.hpp File Reference</div> </div> |
| 103 | </div><!--header--> |
| 104 | <div class="contents"> |
| 105 | <div class="textblock"><code>#include <<a class="el" href="_exceptions_8hpp_source.xhtml">armnn/Exceptions.hpp</a>></code><br /> |
| 106 | <code>#include <<a class="el" href="_verification_helpers_8hpp_source.xhtml">VerificationHelpers.hpp</a>></code><br /> |
| 107 | <code>#include <array></code><br /> |
| 108 | <code>#include <cstdint></code><br /> |
| 109 | <code>#include <vector></code><br /> |
| 110 | <code>#include <utility></code><br /> |
| 111 | </div> |
| 112 | <p><a href="_inference_test_image_8hpp_source.xhtml">Go to the source code of this file.</a></p> |
| 113 | <table class="memberdecls"> |
| 114 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> |
| 115 | Classes</h2></td></tr> |
| 116 | <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image_exception.xhtml">InferenceTestImageException</a></td></tr> |
| 117 | <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| 118 | <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image_load_failed.xhtml">InferenceTestImageLoadFailed</a></td></tr> |
| 119 | <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| 120 | <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image_out_of_bounds_access.xhtml">InferenceTestImageOutOfBoundsAccess</a></td></tr> |
| 121 | <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| 122 | <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image_resize_failed.xhtml">InferenceTestImageResizeFailed</a></td></tr> |
| 123 | <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| 124 | <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image_write_failed.xhtml">InferenceTestImageWriteFailed</a></td></tr> |
| 125 | <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| 126 | <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_unknown_image_channel_layout.xhtml">UnknownImageChannelLayout</a></td></tr> |
| 127 | <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| 128 | <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.xhtml">InferenceTestImage</a></td></tr> |
| 129 | <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| 130 | </table><table class="memberdecls"> |
| 131 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a> |
| 132 | Enumerations</h2></td></tr> |
| 133 | <tr class="memitem:a65983f8cb907d873f2328bb8307c296a"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296a">ImageChannel</a> { <a class="el" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6">R</a>, |
| 134 | <a class="el" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf">G</a>, |
| 135 | <a class="el" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571">B</a> |
| 136 | }</td></tr> |
| 137 | <tr class="separator:a65983f8cb907d873f2328bb8307c296a"><td class="memSeparator" colspan="2"> </td></tr> |
| 138 | <tr class="memitem:a5f7592b0a8fa09208cd32721cf207110"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="_inference_test_image_8hpp.xhtml#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a> { <a class="el" href="_inference_test_image_8hpp.xhtml#a5f7592b0a8fa09208cd32721cf207110aabe0e112dd5f40f1de00eccbf99798a3">Rgb</a>, |
| 139 | <a class="el" href="_inference_test_image_8hpp.xhtml#a5f7592b0a8fa09208cd32721cf207110a103b58155b4c5cc09249629e7ccd5dc2">Bgr</a> |
| 140 | }</td></tr> |
| 141 | <tr class="separator:a5f7592b0a8fa09208cd32721cf207110"><td class="memSeparator" colspan="2"> </td></tr> |
| 142 | </table><table class="memberdecls"> |
| 143 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 144 | Functions</h2></td></tr> |
| 145 | <tr class="memitem:a3f8ac82c346c723f775a383d22239182"><td class="memItemLeft" align="right" valign="top">std::vector< float > </td><td class="memItemRight" valign="bottom"><a class="el" href="_inference_test_image_8hpp.xhtml#a3f8ac82c346c723f775a383d22239182">GetImageDataInArmNnLayoutAsNormalizedFloats</a> (<a class="el" href="_inference_test_image_8hpp.xhtml#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a> layout, const <a class="el" href="class_inference_test_image.xhtml">InferenceTestImage</a> &image)</td></tr> |
| 146 | <tr class="separator:a3f8ac82c346c723f775a383d22239182"><td class="memSeparator" colspan="2"> </td></tr> |
| 147 | <tr class="memitem:a16f15d88afcc9c6bba231cc72bdd8cbf"><td class="memItemLeft" align="right" valign="top">std::vector< float > </td><td class="memItemRight" valign="bottom"><a class="el" href="_inference_test_image_8hpp.xhtml#a16f15d88afcc9c6bba231cc72bdd8cbf">GetImageDataInArmNnLayoutAsFloatsSubtractingMean</a> (<a class="el" href="_inference_test_image_8hpp.xhtml#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a> layout, const <a class="el" href="class_inference_test_image.xhtml">InferenceTestImage</a> &image, const std::array< float, 3 > &mean)</td></tr> |
| 148 | <tr class="separator:a16f15d88afcc9c6bba231cc72bdd8cbf"><td class="memSeparator" colspan="2"> </td></tr> |
| 149 | <tr class="memitem:a0b39a9dcbed4124b88b7b58f5d77096f"><td class="memItemLeft" align="right" valign="top">std::vector< float > </td><td class="memItemRight" valign="bottom"><a class="el" href="_inference_test_image_8hpp.xhtml#a0b39a9dcbed4124b88b7b58f5d77096f">GetImageDataAsNormalizedFloats</a> (<a class="el" href="_inference_test_image_8hpp.xhtml#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a> layout, const <a class="el" href="class_inference_test_image.xhtml">InferenceTestImage</a> &image)</td></tr> |
| 150 | <tr class="separator:a0b39a9dcbed4124b88b7b58f5d77096f"><td class="memSeparator" colspan="2"> </td></tr> |
| 151 | </table> |
| 152 | <h2 class="groupheader">Enumeration Type Documentation</h2> |
| 153 | <a id="a65983f8cb907d873f2328bb8307c296a"></a> |
| 154 | <h2 class="memtitle"><span class="permalink"><a href="#a65983f8cb907d873f2328bb8307c296a">◆ </a></span>ImageChannel</h2> |
| 155 | |
| 156 | <div class="memitem"> |
| 157 | <div class="memproto"> |
| 158 | <table class="mlabels"> |
| 159 | <tr> |
| 160 | <td class="mlabels-left"> |
| 161 | <table class="memname"> |
| 162 | <tr> |
| 163 | <td class="memname">enum <a class="el" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296a">ImageChannel</a></td> |
| 164 | </tr> |
| 165 | </table> |
| 166 | </td> |
| 167 | <td class="mlabels-right"> |
| 168 | <span class="mlabels"><span class="mlabel">strong</span></span> </td> |
| 169 | </tr> |
| 170 | </table> |
| 171 | </div><div class="memdoc"> |
| 172 | <table class="fieldtable"> |
| 173 | <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6"></a>R </td><td class="fielddoc"></td></tr> |
| 174 | <tr><td class="fieldname"><a id="a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf"></a>G </td><td class="fielddoc"></td></tr> |
| 175 | <tr><td class="fieldname"><a id="a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571"></a>B </td><td class="fielddoc"></td></tr> |
| 176 | </table> |
| 177 | |
| 178 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8hpp_source.xhtml#l00113">113</a> of file <a class="el" href="_inference_test_image_8hpp_source.xhtml">InferenceTestImage.hpp</a>.</p> |
| 179 | <div class="fragment"><div class="line"><a name="l00114"></a><span class="lineno"> 114</span> {</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <a class="code" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6">R</a>,</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <a class="code" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf">G</a>,</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <a class="code" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571">B</a></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> };</div><div class="ttc" id="_inference_test_image_8hpp_xhtml_a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf"><div class="ttname"><a href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf">ImageChannel::G</a></div></div> |
| 180 | <div class="ttc" id="_inference_test_image_8hpp_xhtml_a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571"><div class="ttname"><a href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571">ImageChannel::B</a></div></div> |
| 181 | <div class="ttc" id="_inference_test_image_8hpp_xhtml_a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6"><div class="ttname"><a href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6">ImageChannel::R</a></div></div> |
| 182 | </div><!-- fragment --> |
| 183 | </div> |
| 184 | </div> |
| 185 | <a id="a5f7592b0a8fa09208cd32721cf207110"></a> |
| 186 | <h2 class="memtitle"><span class="permalink"><a href="#a5f7592b0a8fa09208cd32721cf207110">◆ </a></span>ImageChannelLayout</h2> |
| 187 | |
| 188 | <div class="memitem"> |
| 189 | <div class="memproto"> |
| 190 | <table class="mlabels"> |
| 191 | <tr> |
| 192 | <td class="mlabels-left"> |
| 193 | <table class="memname"> |
| 194 | <tr> |
| 195 | <td class="memname">enum <a class="el" href="_inference_test_image_8hpp.xhtml#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a></td> |
| 196 | </tr> |
| 197 | </table> |
| 198 | </td> |
| 199 | <td class="mlabels-right"> |
| 200 | <span class="mlabels"><span class="mlabel">strong</span></span> </td> |
| 201 | </tr> |
| 202 | </table> |
| 203 | </div><div class="memdoc"> |
| 204 | <table class="fieldtable"> |
| 205 | <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a5f7592b0a8fa09208cd32721cf207110aabe0e112dd5f40f1de00eccbf99798a3"></a>Rgb </td><td class="fielddoc"></td></tr> |
| 206 | <tr><td class="fieldname"><a id="a5f7592b0a8fa09208cd32721cf207110a103b58155b4c5cc09249629e7ccd5dc2"></a>Bgr </td><td class="fielddoc"></td></tr> |
| 207 | </table> |
| 208 | |
| 209 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8hpp_source.xhtml#l00121">121</a> of file <a class="el" href="_inference_test_image_8hpp_source.xhtml">InferenceTestImage.hpp</a>.</p> |
| 210 | <div class="fragment"><div class="line"><a name="l00122"></a><span class="lineno"> 122</span> {</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <a class="code" href="_inference_test_image_8hpp.xhtml#a5f7592b0a8fa09208cd32721cf207110aabe0e112dd5f40f1de00eccbf99798a3">Rgb</a>,</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <a class="code" href="_inference_test_image_8hpp.xhtml#a5f7592b0a8fa09208cd32721cf207110a103b58155b4c5cc09249629e7ccd5dc2">Bgr</a></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span> };</div><div class="ttc" id="_inference_test_image_8hpp_xhtml_a5f7592b0a8fa09208cd32721cf207110aabe0e112dd5f40f1de00eccbf99798a3"><div class="ttname"><a href="_inference_test_image_8hpp.xhtml#a5f7592b0a8fa09208cd32721cf207110aabe0e112dd5f40f1de00eccbf99798a3">ImageChannelLayout::Rgb</a></div></div> |
| 211 | <div class="ttc" id="_inference_test_image_8hpp_xhtml_a5f7592b0a8fa09208cd32721cf207110a103b58155b4c5cc09249629e7ccd5dc2"><div class="ttname"><a href="_inference_test_image_8hpp.xhtml#a5f7592b0a8fa09208cd32721cf207110a103b58155b4c5cc09249629e7ccd5dc2">ImageChannelLayout::Bgr</a></div></div> |
| 212 | </div><!-- fragment --> |
| 213 | </div> |
| 214 | </div> |
| 215 | <h2 class="groupheader">Function Documentation</h2> |
| 216 | <a id="a0b39a9dcbed4124b88b7b58f5d77096f"></a> |
| 217 | <h2 class="memtitle"><span class="permalink"><a href="#a0b39a9dcbed4124b88b7b58f5d77096f">◆ </a></span>GetImageDataAsNormalizedFloats()</h2> |
| 218 | |
| 219 | <div class="memitem"> |
| 220 | <div class="memproto"> |
| 221 | <table class="memname"> |
| 222 | <tr> |
| 223 | <td class="memname">std::vector<float> GetImageDataAsNormalizedFloats </td> |
| 224 | <td>(</td> |
| 225 | <td class="paramtype"><a class="el" href="_inference_test_image_8hpp.xhtml#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a> </td> |
| 226 | <td class="paramname"><em>layout</em>, </td> |
| 227 | </tr> |
| 228 | <tr> |
| 229 | <td class="paramkey"></td> |
| 230 | <td></td> |
| 231 | <td class="paramtype">const <a class="el" href="class_inference_test_image.xhtml">InferenceTestImage</a> & </td> |
| 232 | <td class="paramname"><em>image</em> </td> |
| 233 | </tr> |
| 234 | <tr> |
| 235 | <td></td> |
| 236 | <td>)</td> |
| 237 | <td></td><td></td> |
| 238 | </tr> |
| 239 | </table> |
| 240 | </div><div class="memdoc"> |
| 241 | |
| 242 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8cpp_source.xhtml#l00334">334</a> of file <a class="el" href="_inference_test_image_8cpp_source.xhtml">InferenceTestImage.cpp</a>.</p> |
| 243 | |
| 244 | <p class="reference">References <a class="el" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571">B</a>, <a class="el" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf">G</a>, <a class="el" href="_inference_test_image_8hpp_source.xhtml#l00076">InferenceTestImage::GetHeight()</a>, <a class="el" href="_inference_test_image_8cpp_source.xhtml#l00158">InferenceTestImage::GetPixelAs3Channels()</a>, <a class="el" href="_inference_test_image_8hpp_source.xhtml#l00075">InferenceTestImage::GetWidth()</a>, and <a class="el" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6">R</a>.</p> |
| 245 | <div class="fragment"><div class="line"><a name="l00336"></a><span class="lineno"> 336</span> {</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  std::vector<float> imageData;</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> h = image.<a class="code" href="class_inference_test_image.xhtml#a0983225e32025d901ce6547170892f56">GetHeight</a>();</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> w = image.<a class="code" href="class_inference_test_image.xhtml#a4ec823e49ce46950b3d4cee1efff050b">GetWidth</a>();</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span> </div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> rDstIndex = GetImageChannelIndex(layout, <a class="code" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6">ImageChannel::R</a>);</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> gDstIndex = GetImageChannelIndex(layout, <a class="code" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf">ImageChannel::G</a>);</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bDstIndex = GetImageChannelIndex(layout, <a class="code" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571">ImageChannel::B</a>);</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span> </div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  imageData.resize(h * w * 3);</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> offset = 0;</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span> </div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j = 0; j < h; ++j)</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  {</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < w; ++i)</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  {</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  uint8_t r, g, b;</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  std::tie(r, g, b) = image.<a class="code" href="class_inference_test_image.xhtml#a97a4644e316893df9dd2ab73cdd08d33">GetPixelAs3Channels</a>(i, j);</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span> </div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  imageData[offset+rDstIndex] = float(r) / 255.0f;</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  imageData[offset+gDstIndex] = float(g) / 255.0f;</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  imageData[offset+bDstIndex] = float(b) / 255.0f;</div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  offset += 3;</div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  }</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  }</div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span> </div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  <span class="keywordflow">return</span> imageData;</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span> }</div><div class="ttc" id="_inference_test_image_8hpp_xhtml_a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf"><div class="ttname"><a href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf">ImageChannel::G</a></div></div> |
| 246 | <div class="ttc" id="_inference_test_image_8hpp_xhtml_a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571"><div class="ttname"><a href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571">ImageChannel::B</a></div></div> |
| 247 | <div class="ttc" id="_inference_test_image_8hpp_xhtml_a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6"><div class="ttname"><a href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6">ImageChannel::R</a></div></div> |
| 248 | <div class="ttc" id="class_inference_test_image_xhtml_a4ec823e49ce46950b3d4cee1efff050b"><div class="ttname"><a href="class_inference_test_image.xhtml#a4ec823e49ce46950b3d4cee1efff050b">InferenceTestImage::GetWidth</a></div><div class="ttdeci">unsigned int GetWidth() const</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.xhtml#l00075">InferenceTestImage.hpp:75</a></div></div> |
| 249 | <div class="ttc" id="class_inference_test_image_xhtml_a97a4644e316893df9dd2ab73cdd08d33"><div class="ttname"><a href="class_inference_test_image.xhtml#a97a4644e316893df9dd2ab73cdd08d33">InferenceTestImage::GetPixelAs3Channels</a></div><div class="ttdeci">std::tuple< uint8_t, uint8_t, uint8_t > GetPixelAs3Channels(unsigned int x, unsigned int y) const</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8cpp_source.xhtml#l00158">InferenceTestImage.cpp:158</a></div></div> |
| 250 | <div class="ttc" id="class_inference_test_image_xhtml_a0983225e32025d901ce6547170892f56"><div class="ttname"><a href="class_inference_test_image.xhtml#a0983225e32025d901ce6547170892f56">InferenceTestImage::GetHeight</a></div><div class="ttdeci">unsigned int GetHeight() const</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.xhtml#l00076">InferenceTestImage.hpp:76</a></div></div> |
| 251 | </div><!-- fragment --> |
| 252 | </div> |
| 253 | </div> |
| 254 | <a id="a16f15d88afcc9c6bba231cc72bdd8cbf"></a> |
| 255 | <h2 class="memtitle"><span class="permalink"><a href="#a16f15d88afcc9c6bba231cc72bdd8cbf">◆ </a></span>GetImageDataInArmNnLayoutAsFloatsSubtractingMean()</h2> |
| 256 | |
| 257 | <div class="memitem"> |
| 258 | <div class="memproto"> |
| 259 | <table class="memname"> |
| 260 | <tr> |
| 261 | <td class="memname">std::vector<float> GetImageDataInArmNnLayoutAsFloatsSubtractingMean </td> |
| 262 | <td>(</td> |
| 263 | <td class="paramtype"><a class="el" href="_inference_test_image_8hpp.xhtml#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a> </td> |
| 264 | <td class="paramname"><em>layout</em>, </td> |
| 265 | </tr> |
| 266 | <tr> |
| 267 | <td class="paramkey"></td> |
| 268 | <td></td> |
| 269 | <td class="paramtype">const <a class="el" href="class_inference_test_image.xhtml">InferenceTestImage</a> & </td> |
| 270 | <td class="paramname"><em>image</em>, </td> |
| 271 | </tr> |
| 272 | <tr> |
| 273 | <td class="paramkey"></td> |
| 274 | <td></td> |
| 275 | <td class="paramtype">const std::array< float, 3 > & </td> |
| 276 | <td class="paramname"><em>mean</em> </td> |
| 277 | </tr> |
| 278 | <tr> |
| 279 | <td></td> |
| 280 | <td>)</td> |
| 281 | <td></td><td></td> |
| 282 | </tr> |
| 283 | </table> |
| 284 | </div><div class="memdoc"> |
| 285 | |
| 286 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8cpp_source.xhtml#l00322">322</a> of file <a class="el" href="_inference_test_image_8cpp_source.xhtml">InferenceTestImage.cpp</a>.</p> |
| 287 | |
| 288 | <p class="reference">References <a class="el" href="_inference_test_image_8cpp_source.xhtml#l00280">GetImageDataInArmNnLayoutAsFloats()</a>.</p> |
| 289 | |
| 290 | <p class="reference">Referenced by <a class="el" href="_caffe_preprocessor_8cpp_source.xhtml#l00030">CaffePreprocessor::GetTestCaseData()</a>.</p> |
| 291 | <div class="fragment"><div class="line"><a name="l00325"></a><span class="lineno"> 325</span> {</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  <span class="keywordflow">return</span> <a class="code" href="_inference_test_image_8cpp.xhtml#ada9c94c9ae0a7082f648f75f50d57be1">GetImageDataInArmNnLayoutAsFloats</a>(layout, image,</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  [layout, &mean](<a class="code" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296a">ImageChannel</a> channel, <span class="keywordtype">float</span> value)</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  {</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channelIndex = GetImageChannelIndex(layout, channel);</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  <span class="keywordflow">return</span> value - mean[channelIndex];</div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  });</div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span> }</div><div class="ttc" id="_inference_test_image_8hpp_xhtml_a65983f8cb907d873f2328bb8307c296a"><div class="ttname"><a href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296a">ImageChannel</a></div><div class="ttdeci">ImageChannel</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.xhtml#l00113">InferenceTestImage.hpp:113</a></div></div> |
| 292 | <div class="ttc" id="_inference_test_image_8cpp_xhtml_ada9c94c9ae0a7082f648f75f50d57be1"><div class="ttname"><a href="_inference_test_image_8cpp.xhtml#ada9c94c9ae0a7082f648f75f50d57be1">GetImageDataInArmNnLayoutAsFloats</a></div><div class="ttdeci">std::vector< float > GetImageDataInArmNnLayoutAsFloats(ImageChannelLayout channelLayout, const InferenceTestImage &image, TProcessValueCallable processValue)</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8cpp_source.xhtml#l00280">InferenceTestImage.cpp:280</a></div></div> |
| 293 | </div><!-- fragment --> |
| 294 | </div> |
| 295 | </div> |
| 296 | <a id="a3f8ac82c346c723f775a383d22239182"></a> |
| 297 | <h2 class="memtitle"><span class="permalink"><a href="#a3f8ac82c346c723f775a383d22239182">◆ </a></span>GetImageDataInArmNnLayoutAsNormalizedFloats()</h2> |
| 298 | |
| 299 | <div class="memitem"> |
| 300 | <div class="memproto"> |
| 301 | <table class="memname"> |
| 302 | <tr> |
| 303 | <td class="memname">std::vector<float> GetImageDataInArmNnLayoutAsNormalizedFloats </td> |
| 304 | <td>(</td> |
| 305 | <td class="paramtype"><a class="el" href="_inference_test_image_8hpp.xhtml#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a> </td> |
| 306 | <td class="paramname"><em>layout</em>, </td> |
| 307 | </tr> |
| 308 | <tr> |
| 309 | <td class="paramkey"></td> |
| 310 | <td></td> |
| 311 | <td class="paramtype">const <a class="el" href="class_inference_test_image.xhtml">InferenceTestImage</a> & </td> |
| 312 | <td class="paramname"><em>image</em> </td> |
| 313 | </tr> |
| 314 | <tr> |
| 315 | <td></td> |
| 316 | <td>)</td> |
| 317 | <td></td><td></td> |
| 318 | </tr> |
| 319 | </table> |
| 320 | </div><div class="memdoc"> |
| 321 | |
| 322 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8cpp_source.xhtml#l00311">311</a> of file <a class="el" href="_inference_test_image_8cpp_source.xhtml">InferenceTestImage.cpp</a>.</p> |
| 323 | |
| 324 | <p class="reference">References <a class="el" href="_inference_test_image_8cpp_source.xhtml#l00280">GetImageDataInArmNnLayoutAsFloats()</a>, and <a class="el" href="_ignore_unused_8hpp_source.xhtml#l00014">armnn::IgnoreUnused()</a>.</p> |
| 325 | |
| 326 | <p class="reference">Referenced by <a class="el" href="_yolo_database_8cpp_source.xhtml#l00075">YoloDatabase::GetTestCaseData()</a>.</p> |
| 327 | <div class="fragment"><div class="line"><a name="l00313"></a><span class="lineno"> 313</span> {</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <span class="keywordflow">return</span> <a class="code" href="_inference_test_image_8cpp.xhtml#ada9c94c9ae0a7082f648f75f50d57be1">GetImageDataInArmNnLayoutAsFloats</a>(layout, image,</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  [](<a class="code" href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296a">ImageChannel</a> channel, <span class="keywordtype">float</span> value)</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  {</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <a class="code" href="namespacearmnn.xhtml#a44affeeb090c3c6a3062830562672e84">armnn::IgnoreUnused</a>(channel);</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  <span class="keywordflow">return</span> value / 255.f;</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  });</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span> }</div><div class="ttc" id="namespacearmnn_xhtml_a44affeeb090c3c6a3062830562672e84"><div class="ttname"><a href="namespacearmnn.xhtml#a44affeeb090c3c6a3062830562672e84">armnn::IgnoreUnused</a></div><div class="ttdeci">void IgnoreUnused(Ts &&...)</div><div class="ttdef"><b>Definition:</b> <a href="_ignore_unused_8hpp_source.xhtml#l00014">IgnoreUnused.hpp:14</a></div></div> |
| 328 | <div class="ttc" id="_inference_test_image_8hpp_xhtml_a65983f8cb907d873f2328bb8307c296a"><div class="ttname"><a href="_inference_test_image_8hpp.xhtml#a65983f8cb907d873f2328bb8307c296a">ImageChannel</a></div><div class="ttdeci">ImageChannel</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.xhtml#l00113">InferenceTestImage.hpp:113</a></div></div> |
| 329 | <div class="ttc" id="_inference_test_image_8cpp_xhtml_ada9c94c9ae0a7082f648f75f50d57be1"><div class="ttname"><a href="_inference_test_image_8cpp.xhtml#ada9c94c9ae0a7082f648f75f50d57be1">GetImageDataInArmNnLayoutAsFloats</a></div><div class="ttdeci">std::vector< float > GetImageDataInArmNnLayoutAsFloats(ImageChannelLayout channelLayout, const InferenceTestImage &image, TProcessValueCallable processValue)</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8cpp_source.xhtml#l00280">InferenceTestImage.cpp:280</a></div></div> |
| 330 | </div><!-- fragment --> |
| 331 | </div> |
| 332 | </div> |
| 333 | </div><!-- contents --> |
| 334 | </div><!-- doc-content --> |
| 335 | <!-- start footer part --> |
| 336 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 337 | <ul> |
| 338 | <li class="navelem"><a class="el" href="dir_59425e443f801f1f2fd8bbe4959a3ccf.xhtml">tests</a></li><li class="navelem"><a class="el" href="_inference_test_image_8hpp.xhtml">InferenceTestImage.hpp</a></li> |
| 339 | <li class="footer">Generated on Fri Mar 13 2020 16:09:16 for ArmNN by |
| 340 | <a href="http://www.doxygen.org/index.html"> |
| 341 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 342 | </ul> |
| 343 | </div> |
| 344 | </body> |
| 345 | </html> |