Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 1 | <!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: InferenceTestImage Class 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 |  <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"> |
| 42 | var 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_inference_test_image.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> | |
| 85 | <a href="#pub-methods">Public Member Functions</a> | |
| 86 | <a href="class_inference_test_image-members.html">List of all members</a> </div> |
| 87 | <div class="headertitle"> |
| 88 | <div class="title">InferenceTestImage Class Reference</div> </div> |
| 89 | </div><!--header--> |
| 90 | <div class="contents"> |
| 91 | |
| 92 | <p><code>#include <<a class="el" href="_inference_test_image_8hpp_source.html">InferenceTestImage.hpp</a>></code></p> |
| 93 | <table class="memberdecls"> |
| 94 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a> |
| 95 | Public Types</h2></td></tr> |
| 96 | <tr class="memitem:afe2346f1f07296902bc8d84beb69b45d"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45d">WriteFormat</a> { <a class="el" href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45daf8fd4f1b5b05c6b1cc6a661141fd4f54">Png</a>, |
| 97 | <a class="el" href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45da021d8346462df53d4272607b0f41a8d8">Bmp</a>, |
| 98 | <a class="el" href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45da38f4e5f66749f755f54ef67faa2058dc">Tga</a> |
| 99 | }</td></tr> |
| 100 | <tr class="separator:afe2346f1f07296902bc8d84beb69b45d"><td class="memSeparator" colspan="2"> </td></tr> |
| 101 | <tr class="memitem:ae7a403f69a7717c1eaae1d74b7bb7bce"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#ae7a403f69a7717c1eaae1d74b7bb7bce">ResizingMethods</a> { <a class="el" href="class_inference_test_image.html#ae7a403f69a7717c1eaae1d74b7bb7bceaecd472e37d2e3d8542fd5e9ff63e3450">STB</a>, |
| 102 | <a class="el" href="class_inference_test_image.html#ae7a403f69a7717c1eaae1d74b7bb7bcea773b27aa8d21604182ba90d029ad2e13">BilinearAndNormalized</a> |
| 103 | }</td></tr> |
| 104 | <tr class="separator:ae7a403f69a7717c1eaae1d74b7bb7bce"><td class="memSeparator" colspan="2"> </td></tr> |
| 105 | </table><table class="memberdecls"> |
| 106 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| 107 | Public Member Functions</h2></td></tr> |
| 108 | <tr class="memitem:a9583c8d35e13002b79d9e65434e0b685"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#a9583c8d35e13002b79d9e65434e0b685">InferenceTestImage</a> (const char *filePath)</td></tr> |
| 109 | <tr class="separator:a9583c8d35e13002b79d9e65434e0b685"><td class="memSeparator" colspan="2"> </td></tr> |
| 110 | <tr class="memitem:a1221f9d864aed14208371c83b47f2686"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#a1221f9d864aed14208371c83b47f2686">InferenceTestImage</a> (<a class="el" href="class_inference_test_image.html">InferenceTestImage</a> &&)=delete</td></tr> |
| 111 | <tr class="separator:a1221f9d864aed14208371c83b47f2686"><td class="memSeparator" colspan="2"> </td></tr> |
| 112 | <tr class="memitem:a51b6530e9551346a609770853dedf7b0"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#a51b6530e9551346a609770853dedf7b0">InferenceTestImage</a> (const <a class="el" href="class_inference_test_image.html">InferenceTestImage</a> &)=delete</td></tr> |
| 113 | <tr class="separator:a51b6530e9551346a609770853dedf7b0"><td class="memSeparator" colspan="2"> </td></tr> |
| 114 | <tr class="memitem:a2ec879fd8f3865e9937bb875eaf5c092"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_inference_test_image.html">InferenceTestImage</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#a2ec879fd8f3865e9937bb875eaf5c092">operator=</a> (const <a class="el" href="class_inference_test_image.html">InferenceTestImage</a> &)=delete</td></tr> |
| 115 | <tr class="separator:a2ec879fd8f3865e9937bb875eaf5c092"><td class="memSeparator" colspan="2"> </td></tr> |
| 116 | <tr class="memitem:a85fe58abcde5d3abd1e3fb8b5282ea7b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_inference_test_image.html">InferenceTestImage</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#a85fe58abcde5d3abd1e3fb8b5282ea7b">operator=</a> (<a class="el" href="class_inference_test_image.html">InferenceTestImage</a> &&)=delete</td></tr> |
| 117 | <tr class="separator:a85fe58abcde5d3abd1e3fb8b5282ea7b"><td class="memSeparator" colspan="2"> </td></tr> |
| 118 | <tr class="memitem:a4ec823e49ce46950b3d4cee1efff050b"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#a4ec823e49ce46950b3d4cee1efff050b">GetWidth</a> () const</td></tr> |
| 119 | <tr class="separator:a4ec823e49ce46950b3d4cee1efff050b"><td class="memSeparator" colspan="2"> </td></tr> |
| 120 | <tr class="memitem:a0983225e32025d901ce6547170892f56"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#a0983225e32025d901ce6547170892f56">GetHeight</a> () const</td></tr> |
| 121 | <tr class="separator:a0983225e32025d901ce6547170892f56"><td class="memSeparator" colspan="2"> </td></tr> |
| 122 | <tr class="memitem:a5a1e22b2882917bcd82a14328ff2c5d6"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#a5a1e22b2882917bcd82a14328ff2c5d6">GetNumChannels</a> () const</td></tr> |
| 123 | <tr class="separator:a5a1e22b2882917bcd82a14328ff2c5d6"><td class="memSeparator" colspan="2"> </td></tr> |
| 124 | <tr class="memitem:a8846406ac37fbd2204f0be16ee05d5b7"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#a8846406ac37fbd2204f0be16ee05d5b7">GetNumElements</a> () const</td></tr> |
| 125 | <tr class="separator:a8846406ac37fbd2204f0be16ee05d5b7"><td class="memSeparator" colspan="2"> </td></tr> |
| 126 | <tr class="memitem:acd495024dcb50f4081d5c05a1e66d210"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#acd495024dcb50f4081d5c05a1e66d210">GetSizeInBytes</a> () const</td></tr> |
| 127 | <tr class="separator:acd495024dcb50f4081d5c05a1e66d210"><td class="memSeparator" colspan="2"> </td></tr> |
| 128 | <tr class="memitem:a97a4644e316893df9dd2ab73cdd08d33"><td class="memItemLeft" align="right" valign="top">std::tuple< uint8_t, uint8_t, uint8_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#a97a4644e316893df9dd2ab73cdd08d33">GetPixelAs3Channels</a> (unsigned int x, unsigned int y) const</td></tr> |
| 129 | <tr class="separator:a97a4644e316893df9dd2ab73cdd08d33"><td class="memSeparator" colspan="2"> </td></tr> |
| 130 | <tr class="memitem:a746dbda8e529cdc8450f81fabb604250"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#a746dbda8e529cdc8450f81fabb604250">StbResize</a> (<a class="el" href="class_inference_test_image.html">InferenceTestImage</a> &im, const unsigned int newWidth, const unsigned int newHeight)</td></tr> |
| 131 | <tr class="separator:a746dbda8e529cdc8450f81fabb604250"><td class="memSeparator" colspan="2"> </td></tr> |
| 132 | <tr class="memitem:a4a6637c2a2952a14cb3a426133b67a73"><td class="memItemLeft" align="right" valign="top">std::vector< float > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#a4a6637c2a2952a14cb3a426133b67a73">Resize</a> (unsigned int newWidth, unsigned int newHeight, const <a class="el" href="structarmnn_1_1_check_location.html">armnn::CheckLocation</a> &location, const <a class="el" href="class_inference_test_image.html#ae7a403f69a7717c1eaae1d74b7bb7bce">ResizingMethods</a> meth=<a class="el" href="class_inference_test_image.html#ae7a403f69a7717c1eaae1d74b7bb7bceaecd472e37d2e3d8542fd5e9ff63e3450">ResizingMethods::STB</a>, const std::array< float, 3 > &mean={{0.0, 0.0, 0.0}}, const std::array< float, 3 > &stddev={{1.0, 1.0, 1.0}}, const float scale=255.0f)</td></tr> |
| 133 | <tr class="separator:a4a6637c2a2952a14cb3a426133b67a73"><td class="memSeparator" colspan="2"> </td></tr> |
| 134 | <tr class="memitem:a98be3e32f21051eca5de5728c9cd43bc"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_inference_test_image.html#a98be3e32f21051eca5de5728c9cd43bc">Write</a> (<a class="el" href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45d">WriteFormat</a> format, const char *filePath) const</td></tr> |
| 135 | <tr class="separator:a98be3e32f21051eca5de5728c9cd43bc"><td class="memSeparator" colspan="2"> </td></tr> |
| 136 | </table> |
| 137 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 138 | <div class="textblock"> |
| 139 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8hpp_source.html#l00051">51</a> of file <a class="el" href="_inference_test_image_8hpp_source.html">InferenceTestImage.hpp</a>.</p> |
| 140 | </div><h2 class="groupheader">Member Enumeration Documentation</h2> |
| 141 | <a id="ae7a403f69a7717c1eaae1d74b7bb7bce"></a> |
| 142 | <h2 class="memtitle"><span class="permalink"><a href="#ae7a403f69a7717c1eaae1d74b7bb7bce">◆ </a></span>ResizingMethods</h2> |
| 143 | |
| 144 | <div class="memitem"> |
| 145 | <div class="memproto"> |
| 146 | <table class="mlabels"> |
| 147 | <tr> |
| 148 | <td class="mlabels-left"> |
| 149 | <table class="memname"> |
| 150 | <tr> |
| 151 | <td class="memname">enum <a class="el" href="class_inference_test_image.html#ae7a403f69a7717c1eaae1d74b7bb7bce">ResizingMethods</a></td> |
| 152 | </tr> |
| 153 | </table> |
| 154 | </td> |
| 155 | <td class="mlabels-right"> |
| 156 | <span class="mlabels"><span class="mlabel">strong</span></span> </td> |
| 157 | </tr> |
| 158 | </table> |
| 159 | </div><div class="memdoc"> |
| 160 | <table class="fieldtable"> |
| 161 | <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ae7a403f69a7717c1eaae1d74b7bb7bceaecd472e37d2e3d8542fd5e9ff63e3450"></a>STB </td><td class="fielddoc"></td></tr> |
| 162 | <tr><td class="fieldname"><a id="ae7a403f69a7717c1eaae1d74b7bb7bcea773b27aa8d21604182ba90d029ad2e13"></a>BilinearAndNormalized </td><td class="fielddoc"></td></tr> |
| 163 | </table> |
| 164 | |
| 165 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8hpp_source.html#l00062">62</a> of file <a class="el" href="_inference_test_image_8hpp_source.html">InferenceTestImage.hpp</a>.</p> |
| 166 | <div class="fragment"><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  {</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  STB,</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  BilinearAndNormalized,</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  };</div></div><!-- fragment --> |
| 167 | </div> |
| 168 | </div> |
| 169 | <a id="afe2346f1f07296902bc8d84beb69b45d"></a> |
| 170 | <h2 class="memtitle"><span class="permalink"><a href="#afe2346f1f07296902bc8d84beb69b45d">◆ </a></span>WriteFormat</h2> |
| 171 | |
| 172 | <div class="memitem"> |
| 173 | <div class="memproto"> |
| 174 | <table class="mlabels"> |
| 175 | <tr> |
| 176 | <td class="mlabels-left"> |
| 177 | <table class="memname"> |
| 178 | <tr> |
| 179 | <td class="memname">enum <a class="el" href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45d">WriteFormat</a></td> |
| 180 | </tr> |
| 181 | </table> |
| 182 | </td> |
| 183 | <td class="mlabels-right"> |
| 184 | <span class="mlabels"><span class="mlabel">strong</span></span> </td> |
| 185 | </tr> |
| 186 | </table> |
| 187 | </div><div class="memdoc"> |
| 188 | <table class="fieldtable"> |
| 189 | <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="afe2346f1f07296902bc8d84beb69b45daf8fd4f1b5b05c6b1cc6a661141fd4f54"></a>Png </td><td class="fielddoc"></td></tr> |
| 190 | <tr><td class="fieldname"><a id="afe2346f1f07296902bc8d84beb69b45da021d8346462df53d4272607b0f41a8d8"></a>Bmp </td><td class="fielddoc"></td></tr> |
| 191 | <tr><td class="fieldname"><a id="afe2346f1f07296902bc8d84beb69b45da38f4e5f66749f755f54ef67faa2058dc"></a>Tga </td><td class="fielddoc"></td></tr> |
| 192 | </table> |
| 193 | |
| 194 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8hpp_source.html#l00054">54</a> of file <a class="el" href="_inference_test_image_8hpp_source.html">InferenceTestImage.hpp</a>.</p> |
| 195 | <div class="fragment"><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  {</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  Png,</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  Bmp,</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  Tga</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  };</div></div><!-- fragment --> |
| 196 | </div> |
| 197 | </div> |
| 198 | <h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| 199 | <a id="a9583c8d35e13002b79d9e65434e0b685"></a> |
| 200 | <h2 class="memtitle"><span class="permalink"><a href="#a9583c8d35e13002b79d9e65434e0b685">◆ </a></span>InferenceTestImage() <span class="overload">[1/3]</span></h2> |
| 201 | |
| 202 | <div class="memitem"> |
| 203 | <div class="memproto"> |
| 204 | <table class="mlabels"> |
| 205 | <tr> |
| 206 | <td class="mlabels-left"> |
| 207 | <table class="memname"> |
| 208 | <tr> |
| 209 | <td class="memname"><a class="el" href="class_inference_test_image.html">InferenceTestImage</a> </td> |
| 210 | <td>(</td> |
| 211 | <td class="paramtype">const char * </td> |
| 212 | <td class="paramname"><em>filePath</em></td><td>)</td> |
| 213 | <td></td> |
| 214 | </tr> |
| 215 | </table> |
| 216 | </td> |
| 217 | <td class="mlabels-right"> |
| 218 | <span class="mlabels"><span class="mlabel">explicit</span></span> </td> |
| 219 | </tr> |
| 220 | </table> |
| 221 | </div><div class="memdoc"> |
| 222 | |
| 223 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8cpp_source.html#l00127">127</a> of file <a class="el" href="_inference_test_image_8cpp_source.html">InferenceTestImage.cpp</a>.</p> |
| 224 | |
| 225 | <p class="reference">References <a class="el" href="_inference_test_image_8hpp_source.html#l00079">GetSizeInBytes()</a>.</p> |
| 226 | <div class="fragment"><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  : m_Width(0u)</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  , m_Height(0u)</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  , m_NumChannels(0u)</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span> {</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordtype">int</span> width;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keywordtype">int</span> height;</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keywordtype">int</span> channels;</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span> </div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keyword">using</span> StbImageDataPtr = std::unique_ptr<unsigned char, decltype(&stbi_image_free)>;</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  StbImageDataPtr stbData(stbi_load(filePath, &width, &height, &channels, 0), &stbi_image_free);</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span> </div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <span class="keywordflow">if</span> (stbData == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  {</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keywordflow">throw</span> <a class="code" href="class_inference_test_image_load_failed.html">InferenceTestImageLoadFailed</a>(boost::str(boost::format(<span class="stringliteral">"Could not load the image at %1%"</span>) % filePath));</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  }</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span> </div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordflow">if</span> (width == 0 || height == 0)</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  {</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keywordflow">throw</span> <a class="code" href="class_inference_test_image_load_failed.html">InferenceTestImageLoadFailed</a>(boost::str(boost::format(<span class="stringliteral">"Could not load empty image at %1%"</span>) % filePath));</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  }</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span> </div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  m_Width = boost::numeric_cast<<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>>(width);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  m_Height = boost::numeric_cast<<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>>(height);</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  m_NumChannels = boost::numeric_cast<<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>>(channels);</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span> </div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sizeInBytes = <a class="code" href="class_inference_test_image.html#acd495024dcb50f4081d5c05a1e66d210">GetSizeInBytes</a>();</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  m_Data.resize(sizeInBytes);</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  memcpy(m_Data.data(), stbData.get(), sizeInBytes);</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span> }</div><div class="ttc" id="class_inference_test_image_load_failed_html"><div class="ttname"><a href="class_inference_test_image_load_failed.html">InferenceTestImageLoadFailed</a></div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.html#l00021">InferenceTestImage.hpp:21</a></div></div> |
| 227 | <div class="ttc" id="class_inference_test_image_html_acd495024dcb50f4081d5c05a1e66d210"><div class="ttname"><a href="class_inference_test_image.html#acd495024dcb50f4081d5c05a1e66d210">InferenceTestImage::GetSizeInBytes</a></div><div class="ttdeci">unsigned int GetSizeInBytes() const</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.html#l00079">InferenceTestImage.hpp:79</a></div></div> |
| 228 | </div><!-- fragment --> |
| 229 | </div> |
| 230 | </div> |
| 231 | <a id="a1221f9d864aed14208371c83b47f2686"></a> |
| 232 | <h2 class="memtitle"><span class="permalink"><a href="#a1221f9d864aed14208371c83b47f2686">◆ </a></span>InferenceTestImage() <span class="overload">[2/3]</span></h2> |
| 233 | |
| 234 | <div class="memitem"> |
| 235 | <div class="memproto"> |
| 236 | <table class="mlabels"> |
| 237 | <tr> |
| 238 | <td class="mlabels-left"> |
| 239 | <table class="memname"> |
| 240 | <tr> |
| 241 | <td class="memname"><a class="el" href="class_inference_test_image.html">InferenceTestImage</a> </td> |
| 242 | <td>(</td> |
| 243 | <td class="paramtype"><a class="el" href="class_inference_test_image.html">InferenceTestImage</a> && </td> |
| 244 | <td class="paramname"></td><td>)</td> |
| 245 | <td></td> |
| 246 | </tr> |
| 247 | </table> |
| 248 | </td> |
| 249 | <td class="mlabels-right"> |
| 250 | <span class="mlabels"><span class="mlabel">delete</span></span> </td> |
| 251 | </tr> |
| 252 | </table> |
| 253 | </div><div class="memdoc"> |
| 254 | |
| 255 | </div> |
| 256 | </div> |
| 257 | <a id="a51b6530e9551346a609770853dedf7b0"></a> |
| 258 | <h2 class="memtitle"><span class="permalink"><a href="#a51b6530e9551346a609770853dedf7b0">◆ </a></span>InferenceTestImage() <span class="overload">[3/3]</span></h2> |
| 259 | |
| 260 | <div class="memitem"> |
| 261 | <div class="memproto"> |
| 262 | <table class="mlabels"> |
| 263 | <tr> |
| 264 | <td class="mlabels-left"> |
| 265 | <table class="memname"> |
| 266 | <tr> |
| 267 | <td class="memname"><a class="el" href="class_inference_test_image.html">InferenceTestImage</a> </td> |
| 268 | <td>(</td> |
| 269 | <td class="paramtype">const <a class="el" href="class_inference_test_image.html">InferenceTestImage</a> & </td> |
| 270 | <td class="paramname"></td><td>)</td> |
| 271 | <td></td> |
| 272 | </tr> |
| 273 | </table> |
| 274 | </td> |
| 275 | <td class="mlabels-right"> |
| 276 | <span class="mlabels"><span class="mlabel">delete</span></span> </td> |
| 277 | </tr> |
| 278 | </table> |
| 279 | </div><div class="memdoc"> |
| 280 | |
| 281 | </div> |
| 282 | </div> |
| 283 | <h2 class="groupheader">Member Function Documentation</h2> |
| 284 | <a id="a0983225e32025d901ce6547170892f56"></a> |
| 285 | <h2 class="memtitle"><span class="permalink"><a href="#a0983225e32025d901ce6547170892f56">◆ </a></span>GetHeight()</h2> |
| 286 | |
| 287 | <div class="memitem"> |
| 288 | <div class="memproto"> |
| 289 | <table class="mlabels"> |
| 290 | <tr> |
| 291 | <td class="mlabels-left"> |
| 292 | <table class="memname"> |
| 293 | <tr> |
| 294 | <td class="memname">unsigned int GetHeight </td> |
| 295 | <td>(</td> |
| 296 | <td class="paramname"></td><td>)</td> |
| 297 | <td> const</td> |
| 298 | </tr> |
| 299 | </table> |
| 300 | </td> |
| 301 | <td class="mlabels-right"> |
| 302 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 303 | </tr> |
| 304 | </table> |
| 305 | </div><div class="memdoc"> |
| 306 | |
| 307 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8hpp_source.html#l00076">76</a> of file <a class="el" href="_inference_test_image_8hpp_source.html">InferenceTestImage.hpp</a>.</p> |
| 308 | |
| 309 | <p class="reference">Referenced by <a class="el" href="_inference_test_image_8cpp_source.html#l00334">GetImageDataAsNormalizedFloats()</a>, <a class="el" href="_inference_test_image_8cpp_source.html#l00280">GetImageDataInArmNnLayoutAsFloats()</a>, <a class="el" href="_inference_test_image_8cpp_source.html#l00183">StbResize()</a>, and <a class="el" href="_inference_test_image_8cpp_source.html#l00243">Write()</a>.</p> |
| 310 | <div class="fragment"><div class="line"><a name="l00076"></a><span class="lineno"> 76</span> { <span class="keywordflow">return</span> m_Height; }</div></div><!-- fragment --> |
| 311 | </div> |
| 312 | </div> |
| 313 | <a id="a5a1e22b2882917bcd82a14328ff2c5d6"></a> |
| 314 | <h2 class="memtitle"><span class="permalink"><a href="#a5a1e22b2882917bcd82a14328ff2c5d6">◆ </a></span>GetNumChannels()</h2> |
| 315 | |
| 316 | <div class="memitem"> |
| 317 | <div class="memproto"> |
| 318 | <table class="mlabels"> |
| 319 | <tr> |
| 320 | <td class="mlabels-left"> |
| 321 | <table class="memname"> |
| 322 | <tr> |
| 323 | <td class="memname">unsigned int GetNumChannels </td> |
| 324 | <td>(</td> |
| 325 | <td class="paramname"></td><td>)</td> |
| 326 | <td> const</td> |
| 327 | </tr> |
| 328 | </table> |
| 329 | </td> |
| 330 | <td class="mlabels-right"> |
| 331 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 332 | </tr> |
| 333 | </table> |
| 334 | </div><div class="memdoc"> |
| 335 | |
| 336 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8hpp_source.html#l00077">77</a> of file <a class="el" href="_inference_test_image_8hpp_source.html">InferenceTestImage.hpp</a>.</p> |
| 337 | |
| 338 | <p class="reference">Referenced by <a class="el" href="_inference_test_image_8cpp_source.html#l00158">GetPixelAs3Channels()</a>, <a class="el" href="_inference_test_image_8cpp_source.html#l00183">StbResize()</a>, and <a class="el" href="_inference_test_image_8cpp_source.html#l00243">Write()</a>.</p> |
| 339 | <div class="fragment"><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> { <span class="keywordflow">return</span> m_NumChannels; }</div></div><!-- fragment --> |
| 340 | </div> |
| 341 | </div> |
| 342 | <a id="a8846406ac37fbd2204f0be16ee05d5b7"></a> |
| 343 | <h2 class="memtitle"><span class="permalink"><a href="#a8846406ac37fbd2204f0be16ee05d5b7">◆ </a></span>GetNumElements()</h2> |
| 344 | |
| 345 | <div class="memitem"> |
| 346 | <div class="memproto"> |
| 347 | <table class="mlabels"> |
| 348 | <tr> |
| 349 | <td class="mlabels-left"> |
| 350 | <table class="memname"> |
| 351 | <tr> |
| 352 | <td class="memname">unsigned int GetNumElements </td> |
| 353 | <td>(</td> |
| 354 | <td class="paramname"></td><td>)</td> |
| 355 | <td> const</td> |
| 356 | </tr> |
| 357 | </table> |
| 358 | </td> |
| 359 | <td class="mlabels-right"> |
| 360 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 361 | </tr> |
| 362 | </table> |
| 363 | </div><div class="memdoc"> |
| 364 | |
| 365 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8hpp_source.html#l00078">78</a> of file <a class="el" href="_inference_test_image_8hpp_source.html">InferenceTestImage.hpp</a>.</p> |
| 366 | <div class="fragment"><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> { <span class="keywordflow">return</span> <a class="code" href="class_inference_test_image.html#a4ec823e49ce46950b3d4cee1efff050b">GetWidth</a>() * <a class="code" href="class_inference_test_image.html#a0983225e32025d901ce6547170892f56">GetHeight</a>() * <a class="code" href="class_inference_test_image.html#a5a1e22b2882917bcd82a14328ff2c5d6">GetNumChannels</a>(); }</div><div class="ttc" id="class_inference_test_image_html_a4ec823e49ce46950b3d4cee1efff050b"><div class="ttname"><a href="class_inference_test_image.html#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.html#l00075">InferenceTestImage.hpp:75</a></div></div> |
| 367 | <div class="ttc" id="class_inference_test_image_html_a5a1e22b2882917bcd82a14328ff2c5d6"><div class="ttname"><a href="class_inference_test_image.html#a5a1e22b2882917bcd82a14328ff2c5d6">InferenceTestImage::GetNumChannels</a></div><div class="ttdeci">unsigned int GetNumChannels() const</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.html#l00077">InferenceTestImage.hpp:77</a></div></div> |
| 368 | <div class="ttc" id="class_inference_test_image_html_a0983225e32025d901ce6547170892f56"><div class="ttname"><a href="class_inference_test_image.html#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.html#l00076">InferenceTestImage.hpp:76</a></div></div> |
| 369 | </div><!-- fragment --> |
| 370 | </div> |
| 371 | </div> |
| 372 | <a id="a97a4644e316893df9dd2ab73cdd08d33"></a> |
| 373 | <h2 class="memtitle"><span class="permalink"><a href="#a97a4644e316893df9dd2ab73cdd08d33">◆ </a></span>GetPixelAs3Channels()</h2> |
| 374 | |
| 375 | <div class="memitem"> |
| 376 | <div class="memproto"> |
| 377 | <table class="memname"> |
| 378 | <tr> |
| 379 | <td class="memname">std::tuple< uint8_t, uint8_t, uint8_t > GetPixelAs3Channels </td> |
| 380 | <td>(</td> |
| 381 | <td class="paramtype">unsigned int </td> |
| 382 | <td class="paramname"><em>x</em>, </td> |
| 383 | </tr> |
| 384 | <tr> |
| 385 | <td class="paramkey"></td> |
| 386 | <td></td> |
| 387 | <td class="paramtype">unsigned int </td> |
| 388 | <td class="paramname"><em>y</em> </td> |
| 389 | </tr> |
| 390 | <tr> |
| 391 | <td></td> |
| 392 | <td>)</td> |
| 393 | <td></td><td> const</td> |
| 394 | </tr> |
| 395 | </table> |
| 396 | </div><div class="memdoc"> |
| 397 | |
| 398 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8cpp_source.html#l00158">158</a> of file <a class="el" href="_inference_test_image_8cpp_source.html">InferenceTestImage.cpp</a>.</p> |
| 399 | |
| 400 | <p class="reference">References <a class="el" href="_inference_test_image_8hpp_source.html#l00077">GetNumChannels()</a>, <a class="el" href="_inference_test_image_8hpp_source.html#l00079">GetSizeInBytes()</a>, and <a class="el" href="_inference_test_image_8hpp_source.html#l00075">GetWidth()</a>.</p> |
| 401 | |
| 402 | <p class="reference">Referenced by <a class="el" href="_inference_test_image_8cpp_source.html#l00334">GetImageDataAsNormalizedFloats()</a>, and <a class="el" href="_inference_test_image_8cpp_source.html#l00280">GetImageDataInArmNnLayoutAsFloats()</a>.</p> |
| 403 | <div class="fragment"><div class="line"><a name="l00159"></a><span class="lineno"> 159</span> {</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordflow">if</span> (x >= m_Width || y >= m_Height)</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  {</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="keywordflow">throw</span> <a class="code" href="class_inference_test_image_out_of_bounds_access.html">InferenceTestImageOutOfBoundsAccess</a>(boost::str(boost::format(<span class="stringliteral">"Attempted out of bounds image access. "</span></div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="stringliteral">"Requested (%1%, %2%). Maximum valid coordinates (%3%, %4%)."</span>) % x % y % (m_Width - 1) % (m_Height - 1)));</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  }</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span> </div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pixelOffset = x * <a class="code" href="class_inference_test_image.html#a5a1e22b2882917bcd82a14328ff2c5d6">GetNumChannels</a>() + y * <a class="code" href="class_inference_test_image.html#a4ec823e49ce46950b3d4cee1efff050b">GetWidth</a>() * <a class="code" href="class_inference_test_image.html#a5a1e22b2882917bcd82a14328ff2c5d6">GetNumChannels</a>();</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <span class="keyword">const</span> uint8_t* <span class="keyword">const</span> pixelData = m_Data.data() + pixelOffset;</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  BOOST_ASSERT(pixelData <= (m_Data.data() + <a class="code" href="class_inference_test_image.html#acd495024dcb50f4081d5c05a1e66d210">GetSizeInBytes</a>()));</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span> </div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  std::array<uint8_t, 3> outPixelData;</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  outPixelData.fill(0);</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span> </div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> maxChannelsInPixel = std::min(<a class="code" href="class_inference_test_image.html#a5a1e22b2882917bcd82a14328ff2c5d6">GetNumChannels</a>(), static_cast<unsigned int>(outPixelData.size()));</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> c = 0; c < maxChannelsInPixel; ++c)</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  {</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  outPixelData[c] = pixelData[c];</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  }</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span> </div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keywordflow">return</span> std::make_tuple(outPixelData[0], outPixelData[1], outPixelData[2]);</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span> }</div><div class="ttc" id="class_inference_test_image_out_of_bounds_access_html"><div class="ttname"><a href="class_inference_test_image_out_of_bounds_access.html">InferenceTestImageOutOfBoundsAccess</a></div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.html#l00027">InferenceTestImage.hpp:27</a></div></div> |
| 404 | <div class="ttc" id="class_inference_test_image_html_a4ec823e49ce46950b3d4cee1efff050b"><div class="ttname"><a href="class_inference_test_image.html#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.html#l00075">InferenceTestImage.hpp:75</a></div></div> |
| 405 | <div class="ttc" id="class_inference_test_image_html_a5a1e22b2882917bcd82a14328ff2c5d6"><div class="ttname"><a href="class_inference_test_image.html#a5a1e22b2882917bcd82a14328ff2c5d6">InferenceTestImage::GetNumChannels</a></div><div class="ttdeci">unsigned int GetNumChannels() const</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.html#l00077">InferenceTestImage.hpp:77</a></div></div> |
| 406 | <div class="ttc" id="class_inference_test_image_html_acd495024dcb50f4081d5c05a1e66d210"><div class="ttname"><a href="class_inference_test_image.html#acd495024dcb50f4081d5c05a1e66d210">InferenceTestImage::GetSizeInBytes</a></div><div class="ttdeci">unsigned int GetSizeInBytes() const</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.html#l00079">InferenceTestImage.hpp:79</a></div></div> |
| 407 | </div><!-- fragment --> |
| 408 | </div> |
| 409 | </div> |
| 410 | <a id="acd495024dcb50f4081d5c05a1e66d210"></a> |
| 411 | <h2 class="memtitle"><span class="permalink"><a href="#acd495024dcb50f4081d5c05a1e66d210">◆ </a></span>GetSizeInBytes()</h2> |
| 412 | |
| 413 | <div class="memitem"> |
| 414 | <div class="memproto"> |
| 415 | <table class="mlabels"> |
| 416 | <tr> |
| 417 | <td class="mlabels-left"> |
| 418 | <table class="memname"> |
| 419 | <tr> |
| 420 | <td class="memname">unsigned int GetSizeInBytes </td> |
| 421 | <td>(</td> |
| 422 | <td class="paramname"></td><td>)</td> |
| 423 | <td> const</td> |
| 424 | </tr> |
| 425 | </table> |
| 426 | </td> |
| 427 | <td class="mlabels-right"> |
| 428 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 429 | </tr> |
| 430 | </table> |
| 431 | </div><div class="memdoc"> |
| 432 | |
| 433 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8hpp_source.html#l00079">79</a> of file <a class="el" href="_inference_test_image_8hpp_source.html">InferenceTestImage.hpp</a>.</p> |
| 434 | |
| 435 | <p class="reference">References <a class="el" href="_resize_8cpp_source.html#l00035">armnn::Resize()</a>, and <a class="el" href="_network_sockets_8cpp_source.html#l00050">armnnUtils::Sockets::Write()</a>.</p> |
| 436 | |
| 437 | <p class="reference">Referenced by <a class="el" href="_inference_test_image_8cpp_source.html#l00158">GetPixelAs3Channels()</a>, and <a class="el" href="_inference_test_image_8cpp_source.html#l00127">InferenceTestImage()</a>.</p> |
| 438 | <div class="fragment"><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> { <span class="keywordflow">return</span> <a class="code" href="class_inference_test_image.html#a8846406ac37fbd2204f0be16ee05d5b7">GetNumElements</a>() * GetSingleElementSizeInBytes(); }</div><div class="ttc" id="class_inference_test_image_html_a8846406ac37fbd2204f0be16ee05d5b7"><div class="ttname"><a href="class_inference_test_image.html#a8846406ac37fbd2204f0be16ee05d5b7">InferenceTestImage::GetNumElements</a></div><div class="ttdeci">unsigned int GetNumElements() const</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.html#l00078">InferenceTestImage.hpp:78</a></div></div> |
| 439 | </div><!-- fragment --> |
| 440 | </div> |
| 441 | </div> |
| 442 | <a id="a4ec823e49ce46950b3d4cee1efff050b"></a> |
| 443 | <h2 class="memtitle"><span class="permalink"><a href="#a4ec823e49ce46950b3d4cee1efff050b">◆ </a></span>GetWidth()</h2> |
| 444 | |
| 445 | <div class="memitem"> |
| 446 | <div class="memproto"> |
| 447 | <table class="mlabels"> |
| 448 | <tr> |
| 449 | <td class="mlabels-left"> |
| 450 | <table class="memname"> |
| 451 | <tr> |
| 452 | <td class="memname">unsigned int GetWidth </td> |
| 453 | <td>(</td> |
| 454 | <td class="paramname"></td><td>)</td> |
| 455 | <td> const</td> |
| 456 | </tr> |
| 457 | </table> |
| 458 | </td> |
| 459 | <td class="mlabels-right"> |
| 460 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 461 | </tr> |
| 462 | </table> |
| 463 | </div><div class="memdoc"> |
| 464 | |
| 465 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8hpp_source.html#l00075">75</a> of file <a class="el" href="_inference_test_image_8hpp_source.html">InferenceTestImage.hpp</a>.</p> |
| 466 | |
| 467 | <p class="reference">Referenced by <a class="el" href="_inference_test_image_8cpp_source.html#l00334">GetImageDataAsNormalizedFloats()</a>, <a class="el" href="_inference_test_image_8cpp_source.html#l00280">GetImageDataInArmNnLayoutAsFloats()</a>, <a class="el" href="_inference_test_image_8cpp_source.html#l00158">GetPixelAs3Channels()</a>, <a class="el" href="_image_tensor_generator_8hpp_source.html#l00091">PrepareImageTensor< float >()</a>, <a class="el" href="_inference_test_image_8cpp_source.html#l00183">StbResize()</a>, and <a class="el" href="_inference_test_image_8cpp_source.html#l00243">Write()</a>.</p> |
| 468 | <div class="fragment"><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> { <span class="keywordflow">return</span> m_Width; }</div></div><!-- fragment --> |
| 469 | </div> |
| 470 | </div> |
| 471 | <a id="a2ec879fd8f3865e9937bb875eaf5c092"></a> |
| 472 | <h2 class="memtitle"><span class="permalink"><a href="#a2ec879fd8f3865e9937bb875eaf5c092">◆ </a></span>operator=() <span class="overload">[1/2]</span></h2> |
| 473 | |
| 474 | <div class="memitem"> |
| 475 | <div class="memproto"> |
| 476 | <table class="mlabels"> |
| 477 | <tr> |
| 478 | <td class="mlabels-left"> |
| 479 | <table class="memname"> |
| 480 | <tr> |
| 481 | <td class="memname"><a class="el" href="class_inference_test_image.html">InferenceTestImage</a>& operator= </td> |
| 482 | <td>(</td> |
| 483 | <td class="paramtype">const <a class="el" href="class_inference_test_image.html">InferenceTestImage</a> & </td> |
| 484 | <td class="paramname"></td><td>)</td> |
| 485 | <td></td> |
| 486 | </tr> |
| 487 | </table> |
| 488 | </td> |
| 489 | <td class="mlabels-right"> |
| 490 | <span class="mlabels"><span class="mlabel">delete</span></span> </td> |
| 491 | </tr> |
| 492 | </table> |
| 493 | </div><div class="memdoc"> |
| 494 | |
| 495 | </div> |
| 496 | </div> |
| 497 | <a id="a85fe58abcde5d3abd1e3fb8b5282ea7b"></a> |
| 498 | <h2 class="memtitle"><span class="permalink"><a href="#a85fe58abcde5d3abd1e3fb8b5282ea7b">◆ </a></span>operator=() <span class="overload">[2/2]</span></h2> |
| 499 | |
| 500 | <div class="memitem"> |
| 501 | <div class="memproto"> |
| 502 | <table class="mlabels"> |
| 503 | <tr> |
| 504 | <td class="mlabels-left"> |
| 505 | <table class="memname"> |
| 506 | <tr> |
| 507 | <td class="memname"><a class="el" href="class_inference_test_image.html">InferenceTestImage</a>& operator= </td> |
| 508 | <td>(</td> |
| 509 | <td class="paramtype"><a class="el" href="class_inference_test_image.html">InferenceTestImage</a> && </td> |
| 510 | <td class="paramname"></td><td>)</td> |
| 511 | <td></td> |
| 512 | </tr> |
| 513 | </table> |
| 514 | </td> |
| 515 | <td class="mlabels-right"> |
| 516 | <span class="mlabels"><span class="mlabel">delete</span></span> </td> |
| 517 | </tr> |
| 518 | </table> |
| 519 | </div><div class="memdoc"> |
| 520 | |
| 521 | </div> |
| 522 | </div> |
| 523 | <a id="a4a6637c2a2952a14cb3a426133b67a73"></a> |
| 524 | <h2 class="memtitle"><span class="permalink"><a href="#a4a6637c2a2952a14cb3a426133b67a73">◆ </a></span>Resize()</h2> |
| 525 | |
| 526 | <div class="memitem"> |
| 527 | <div class="memproto"> |
| 528 | <table class="memname"> |
| 529 | <tr> |
| 530 | <td class="memname">std::vector< float > Resize </td> |
| 531 | <td>(</td> |
| 532 | <td class="paramtype">unsigned int </td> |
| 533 | <td class="paramname"><em>newWidth</em>, </td> |
| 534 | </tr> |
| 535 | <tr> |
| 536 | <td class="paramkey"></td> |
| 537 | <td></td> |
| 538 | <td class="paramtype">unsigned int </td> |
| 539 | <td class="paramname"><em>newHeight</em>, </td> |
| 540 | </tr> |
| 541 | <tr> |
| 542 | <td class="paramkey"></td> |
| 543 | <td></td> |
| 544 | <td class="paramtype">const <a class="el" href="structarmnn_1_1_check_location.html">armnn::CheckLocation</a> & </td> |
| 545 | <td class="paramname"><em>location</em>, </td> |
| 546 | </tr> |
| 547 | <tr> |
| 548 | <td class="paramkey"></td> |
| 549 | <td></td> |
| 550 | <td class="paramtype">const <a class="el" href="class_inference_test_image.html#ae7a403f69a7717c1eaae1d74b7bb7bce">ResizingMethods</a> </td> |
| 551 | <td class="paramname"><em>meth</em> = <code><a class="el" href="class_inference_test_image.html#ae7a403f69a7717c1eaae1d74b7bb7bceaecd472e37d2e3d8542fd5e9ff63e3450">ResizingMethods::STB</a></code>, </td> |
| 552 | </tr> |
| 553 | <tr> |
| 554 | <td class="paramkey"></td> |
| 555 | <td></td> |
| 556 | <td class="paramtype">const std::array< float, 3 > & </td> |
| 557 | <td class="paramname"><em>mean</em> = <code>{{0.0, 0.0, 0.0}}</code>, </td> |
| 558 | </tr> |
| 559 | <tr> |
| 560 | <td class="paramkey"></td> |
| 561 | <td></td> |
| 562 | <td class="paramtype">const std::array< float, 3 > & </td> |
| 563 | <td class="paramname"><em>stddev</em> = <code>{{1.0, 1.0, 1.0}}</code>, </td> |
| 564 | </tr> |
| 565 | <tr> |
| 566 | <td class="paramkey"></td> |
| 567 | <td></td> |
| 568 | <td class="paramtype">const float </td> |
| 569 | <td class="paramname"><em>scale</em> = <code>255.0f</code> </td> |
| 570 | </tr> |
| 571 | <tr> |
| 572 | <td></td> |
| 573 | <td>)</td> |
| 574 | <td></td><td></td> |
| 575 | </tr> |
| 576 | </table> |
| 577 | </div><div class="memdoc"> |
| 578 | |
| 579 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8cpp_source.html#l00209">209</a> of file <a class="el" href="_inference_test_image_8cpp_source.html">InferenceTestImage.cpp</a>.</p> |
| 580 | |
| 581 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.html#l00029">CheckLocation::AsString()</a>, <a class="el" href="class_inference_test_image.html#ae7a403f69a7717c1eaae1d74b7bb7bcea773b27aa8d21604182ba90d029ad2e13">BilinearAndNormalized</a>, <a class="el" href="class_inference_test_image.html#ae7a403f69a7717c1eaae1d74b7bb7bceaecd472e37d2e3d8542fd5e9ff63e3450">STB</a>, and <a class="el" href="_inference_test_image_8cpp_source.html#l00183">StbResize()</a>.</p> |
| 582 | |
| 583 | <p class="reference">Referenced by <a class="el" href="_caffe_preprocessor_8cpp_source.html#l00030">CaffePreprocessor::GetTestCaseData()</a>, and <a class="el" href="_yolo_database_8cpp_source.html#l00075">YoloDatabase::GetTestCaseData()</a>.</p> |
| 584 | <div class="fragment"><div class="line"><a name="l00216"></a><span class="lineno"> 216</span> {</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  std::vector<float> out;</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <span class="keywordflow">if</span> (newWidth == 0 || newHeight == 0)</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  {</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="keywordflow">throw</span> <a class="code" href="class_inference_test_image_resize_failed.html">InferenceTestImageResizeFailed</a>(boost::str(boost::format(<span class="stringliteral">"None of the dimensions passed to a resize "</span></div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="stringliteral">"operation can be zero. Requested width: %1%. Requested height: %2%."</span>) % newWidth % newHeight));</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  }</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span> </div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="keywordflow">switch</span> (meth) {</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <span class="keywordflow">case</span> <a class="code" href="class_inference_test_image.html#ae7a403f69a7717c1eaae1d74b7bb7bceaecd472e37d2e3d8542fd5e9ff63e3450">ResizingMethods::STB</a>:</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  {</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <a class="code" href="class_inference_test_image.html#a746dbda8e529cdc8450f81fabb604250">StbResize</a>(*<span class="keyword">this</span>, newWidth, newHeight);</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  }</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="keywordflow">case</span> <a class="code" href="class_inference_test_image.html#ae7a403f69a7717c1eaae1d74b7bb7bcea773b27aa8d21604182ba90d029ad2e13">ResizingMethods::BilinearAndNormalized</a>:</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  {</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  out = ResizeBilinearAndNormalize(*<span class="keyword">this</span>, newWidth, newHeight, scale, mean, stddev);</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  }</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <span class="keywordflow">throw</span> <a class="code" href="class_inference_test_image_resize_failed.html">InferenceTestImageResizeFailed</a>(boost::str(</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  boost::format(<span class="stringliteral">"Unknown resizing method asked ArmNN only supports {STB, BilinearAndNormalized} %1%"</span>)</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  % location.<a class="code" href="structarmnn_1_1_check_location.html#a5e3562cda960da001597e7dd5679b140">AsString</a>()));</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  }</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  <span class="keywordflow">return</span> out;</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span> }</div><div class="ttc" id="class_inference_test_image_html_ae7a403f69a7717c1eaae1d74b7bb7bceaecd472e37d2e3d8542fd5e9ff63e3450"><div class="ttname"><a href="class_inference_test_image.html#ae7a403f69a7717c1eaae1d74b7bb7bceaecd472e37d2e3d8542fd5e9ff63e3450">InferenceTestImage::ResizingMethods::STB</a></div></div> |
| 585 | <div class="ttc" id="class_inference_test_image_html_ae7a403f69a7717c1eaae1d74b7bb7bcea773b27aa8d21604182ba90d029ad2e13"><div class="ttname"><a href="class_inference_test_image.html#ae7a403f69a7717c1eaae1d74b7bb7bcea773b27aa8d21604182ba90d029ad2e13">InferenceTestImage::ResizingMethods::BilinearAndNormalized</a></div></div> |
| 586 | <div class="ttc" id="class_inference_test_image_resize_failed_html"><div class="ttname"><a href="class_inference_test_image_resize_failed.html">InferenceTestImageResizeFailed</a></div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.html#l00033">InferenceTestImage.hpp:33</a></div></div> |
| 587 | <div class="ttc" id="class_inference_test_image_html_a746dbda8e529cdc8450f81fabb604250"><div class="ttname"><a href="class_inference_test_image.html#a746dbda8e529cdc8450f81fabb604250">InferenceTestImage::StbResize</a></div><div class="ttdeci">void StbResize(InferenceTestImage &im, const unsigned int newWidth, const unsigned int newHeight)</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8cpp_source.html#l00183">InferenceTestImage.cpp:183</a></div></div> |
| 588 | <div class="ttc" id="structarmnn_1_1_check_location_html_a5e3562cda960da001597e7dd5679b140"><div class="ttname"><a href="structarmnn_1_1_check_location.html#a5e3562cda960da001597e7dd5679b140">armnn::CheckLocation::AsString</a></div><div class="ttdeci">std::string AsString() const</div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.html#l00029">Exceptions.hpp:29</a></div></div> |
| 589 | </div><!-- fragment --> |
| 590 | </div> |
| 591 | </div> |
| 592 | <a id="a746dbda8e529cdc8450f81fabb604250"></a> |
| 593 | <h2 class="memtitle"><span class="permalink"><a href="#a746dbda8e529cdc8450f81fabb604250">◆ </a></span>StbResize()</h2> |
| 594 | |
| 595 | <div class="memitem"> |
| 596 | <div class="memproto"> |
| 597 | <table class="memname"> |
| 598 | <tr> |
| 599 | <td class="memname">void StbResize </td> |
| 600 | <td>(</td> |
| 601 | <td class="paramtype"><a class="el" href="class_inference_test_image.html">InferenceTestImage</a> & </td> |
| 602 | <td class="paramname"><em>im</em>, </td> |
| 603 | </tr> |
| 604 | <tr> |
| 605 | <td class="paramkey"></td> |
| 606 | <td></td> |
| 607 | <td class="paramtype">const unsigned int </td> |
| 608 | <td class="paramname"><em>newWidth</em>, </td> |
| 609 | </tr> |
| 610 | <tr> |
| 611 | <td class="paramkey"></td> |
| 612 | <td></td> |
| 613 | <td class="paramtype">const unsigned int </td> |
| 614 | <td class="paramname"><em>newHeight</em> </td> |
| 615 | </tr> |
| 616 | <tr> |
| 617 | <td></td> |
| 618 | <td>)</td> |
| 619 | <td></td><td></td> |
| 620 | </tr> |
| 621 | </table> |
| 622 | </div><div class="memdoc"> |
| 623 | |
| 624 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8cpp_source.html#l00183">183</a> of file <a class="el" href="_inference_test_image_8cpp_source.html">InferenceTestImage.cpp</a>.</p> |
| 625 | |
| 626 | <p class="reference">References <a class="el" href="_inference_test_image_8hpp_source.html#l00076">GetHeight()</a>, <a class="el" href="_inference_test_image_8hpp_source.html#l00077">GetNumChannels()</a>, and <a class="el" href="_inference_test_image_8hpp_source.html#l00075">GetWidth()</a>.</p> |
| 627 | |
| 628 | <p class="reference">Referenced by <a class="el" href="_inference_test_image_8cpp_source.html#l00209">Resize()</a>.</p> |
| 629 | <div class="fragment"><div class="line"><a name="l00184"></a><span class="lineno"> 184</span> {</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  std::vector<uint8_t> newData;</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  newData.resize(newWidth * newHeight * im.<a class="code" href="class_inference_test_image.html#a5a1e22b2882917bcd82a14328ff2c5d6">GetNumChannels</a>() * im.GetSingleElementSizeInBytes());</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span> </div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <span class="comment">// boost::numeric_cast<>() is used for user-provided data (protecting about overflows).</span></div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="comment">// static_cast<> is ok for internal data (assumes that, when internal data was originally provided by a user,</span></div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="comment">// a boost::numeric_cast<>() handled the conversion).</span></div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> nW = boost::numeric_cast<<span class="keywordtype">int</span>>(newWidth);</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> nH = boost::numeric_cast<<span class="keywordtype">int</span>>(newHeight);</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span> </div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> w = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(im.<a class="code" href="class_inference_test_image.html#a4ec823e49ce46950b3d4cee1efff050b">GetWidth</a>());</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> h = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(im.<a class="code" href="class_inference_test_image.html#a0983225e32025d901ce6547170892f56">GetHeight</a>());</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> numChannels = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(im.<a class="code" href="class_inference_test_image.html#a5a1e22b2882917bcd82a14328ff2c5d6">GetNumChannels</a>());</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span> </div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> res = stbir_resize_uint8(im.m_Data.data(), w, h, 0, newData.data(), nW, nH, 0, numChannels);</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="keywordflow">if</span> (res == 0)</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  {</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <span class="keywordflow">throw</span> <a class="code" href="class_inference_test_image_resize_failed.html">InferenceTestImageResizeFailed</a>(<span class="stringliteral">"The resizing operation failed"</span>);</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  }</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span> </div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  im.m_Data.swap(newData);</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  im.m_Width = newWidth;</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  im.m_Height = newHeight;</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span> }</div><div class="ttc" id="class_inference_test_image_resize_failed_html"><div class="ttname"><a href="class_inference_test_image_resize_failed.html">InferenceTestImageResizeFailed</a></div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.html#l00033">InferenceTestImage.hpp:33</a></div></div> |
| 630 | <div class="ttc" id="class_inference_test_image_html_a4ec823e49ce46950b3d4cee1efff050b"><div class="ttname"><a href="class_inference_test_image.html#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.html#l00075">InferenceTestImage.hpp:75</a></div></div> |
| 631 | <div class="ttc" id="class_inference_test_image_html_a5a1e22b2882917bcd82a14328ff2c5d6"><div class="ttname"><a href="class_inference_test_image.html#a5a1e22b2882917bcd82a14328ff2c5d6">InferenceTestImage::GetNumChannels</a></div><div class="ttdeci">unsigned int GetNumChannels() const</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.html#l00077">InferenceTestImage.hpp:77</a></div></div> |
| 632 | <div class="ttc" id="class_inference_test_image_html_a0983225e32025d901ce6547170892f56"><div class="ttname"><a href="class_inference_test_image.html#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.html#l00076">InferenceTestImage.hpp:76</a></div></div> |
| 633 | </div><!-- fragment --> |
| 634 | </div> |
| 635 | </div> |
| 636 | <a id="a98be3e32f21051eca5de5728c9cd43bc"></a> |
| 637 | <h2 class="memtitle"><span class="permalink"><a href="#a98be3e32f21051eca5de5728c9cd43bc">◆ </a></span>Write()</h2> |
| 638 | |
| 639 | <div class="memitem"> |
| 640 | <div class="memproto"> |
| 641 | <table class="memname"> |
| 642 | <tr> |
| 643 | <td class="memname">void Write </td> |
| 644 | <td>(</td> |
| 645 | <td class="paramtype"><a class="el" href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45d">WriteFormat</a> </td> |
| 646 | <td class="paramname"><em>format</em>, </td> |
| 647 | </tr> |
| 648 | <tr> |
| 649 | <td class="paramkey"></td> |
| 650 | <td></td> |
| 651 | <td class="paramtype">const char * </td> |
| 652 | <td class="paramname"><em>filePath</em> </td> |
| 653 | </tr> |
| 654 | <tr> |
| 655 | <td></td> |
| 656 | <td>)</td> |
| 657 | <td></td><td> const</td> |
| 658 | </tr> |
| 659 | </table> |
| 660 | </div><div class="memdoc"> |
| 661 | |
| 662 | <p class="definition">Definition at line <a class="el" href="_inference_test_image_8cpp_source.html#l00243">243</a> of file <a class="el" href="_inference_test_image_8cpp_source.html">InferenceTestImage.cpp</a>.</p> |
| 663 | |
| 664 | <p class="reference">References <a class="el" href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45da021d8346462df53d4272607b0f41a8d8">Bmp</a>, <a class="el" href="_inference_test_image_8hpp_source.html#l00076">GetHeight()</a>, <a class="el" href="_inference_test_image_8hpp_source.html#l00077">GetNumChannels()</a>, <a class="el" href="_inference_test_image_8hpp_source.html#l00075">GetWidth()</a>, <a class="el" href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45daf8fd4f1b5b05c6b1cc6a661141fd4f54">Png</a>, and <a class="el" href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45da38f4e5f66749f755f54ef67faa2058dc">Tga</a>.</p> |
| 665 | <div class="fragment"><div class="line"><a name="l00244"></a><span class="lineno"> 244</span> {</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> w = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(<a class="code" href="class_inference_test_image.html#a4ec823e49ce46950b3d4cee1efff050b">GetWidth</a>());</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> h = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(<a class="code" href="class_inference_test_image.html#a0983225e32025d901ce6547170892f56">GetHeight</a>());</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> numChannels = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(<a class="code" href="class_inference_test_image.html#a5a1e22b2882917bcd82a14328ff2c5d6">GetNumChannels</a>());</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <span class="keywordtype">int</span> res = 0;</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span> </div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  <span class="keywordflow">switch</span> (format)</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  {</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <span class="keywordflow">case</span> <a class="code" href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45daf8fd4f1b5b05c6b1cc6a661141fd4f54">WriteFormat::Png</a>:</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  {</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  res = stbi_write_png(filePath, w, h, numChannels, m_Data.data(), 0);</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  }</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <span class="keywordflow">case</span> <a class="code" href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45da021d8346462df53d4272607b0f41a8d8">WriteFormat::Bmp</a>:</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  {</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  res = stbi_write_bmp(filePath, w, h, numChannels, m_Data.data());</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  }</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  <span class="keywordflow">case</span> <a class="code" href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45da38f4e5f66749f755f54ef67faa2058dc">WriteFormat::Tga</a>:</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  {</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  res = stbi_write_tga(filePath, w, h, numChannels, m_Data.data());</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  }</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="keywordflow">throw</span> <a class="code" href="class_inference_test_image_write_failed.html">InferenceTestImageWriteFailed</a>(boost::str(boost::format(<span class="stringliteral">"Unknown format %1%"</span>)</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  % static_cast<int>(format)));</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  }</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span> </div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <span class="keywordflow">if</span> (res == 0)</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  {</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <span class="keywordflow">throw</span> <a class="code" href="class_inference_test_image_write_failed.html">InferenceTestImageWriteFailed</a>(boost::str(boost::format(<span class="stringliteral">"An error occurred when writing to file %1%"</span>)</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  % filePath));</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  }</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span> }</div><div class="ttc" id="class_inference_test_image_html_afe2346f1f07296902bc8d84beb69b45da021d8346462df53d4272607b0f41a8d8"><div class="ttname"><a href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45da021d8346462df53d4272607b0f41a8d8">InferenceTestImage::WriteFormat::Bmp</a></div></div> |
| 666 | <div class="ttc" id="class_inference_test_image_html_a4ec823e49ce46950b3d4cee1efff050b"><div class="ttname"><a href="class_inference_test_image.html#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.html#l00075">InferenceTestImage.hpp:75</a></div></div> |
| 667 | <div class="ttc" id="class_inference_test_image_html_afe2346f1f07296902bc8d84beb69b45da38f4e5f66749f755f54ef67faa2058dc"><div class="ttname"><a href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45da38f4e5f66749f755f54ef67faa2058dc">InferenceTestImage::WriteFormat::Tga</a></div></div> |
| 668 | <div class="ttc" id="class_inference_test_image_html_a5a1e22b2882917bcd82a14328ff2c5d6"><div class="ttname"><a href="class_inference_test_image.html#a5a1e22b2882917bcd82a14328ff2c5d6">InferenceTestImage::GetNumChannels</a></div><div class="ttdeci">unsigned int GetNumChannels() const</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.html#l00077">InferenceTestImage.hpp:77</a></div></div> |
| 669 | <div class="ttc" id="class_inference_test_image_html_a0983225e32025d901ce6547170892f56"><div class="ttname"><a href="class_inference_test_image.html#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.html#l00076">InferenceTestImage.hpp:76</a></div></div> |
| 670 | <div class="ttc" id="class_inference_test_image_write_failed_html"><div class="ttname"><a href="class_inference_test_image_write_failed.html">InferenceTestImageWriteFailed</a></div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.html#l00039">InferenceTestImage.hpp:39</a></div></div> |
| 671 | <div class="ttc" id="class_inference_test_image_html_afe2346f1f07296902bc8d84beb69b45daf8fd4f1b5b05c6b1cc6a661141fd4f54"><div class="ttname"><a href="class_inference_test_image.html#afe2346f1f07296902bc8d84beb69b45daf8fd4f1b5b05c6b1cc6a661141fd4f54">InferenceTestImage::WriteFormat::Png</a></div></div> |
| 672 | </div><!-- fragment --> |
| 673 | </div> |
| 674 | </div> |
| 675 | <hr/>The documentation for this class was generated from the following files:<ul> |
| 676 | <li>tests/<a class="el" href="_inference_test_image_8hpp_source.html">InferenceTestImage.hpp</a></li> |
| 677 | <li>tests/<a class="el" href="_inference_test_image_8cpp_source.html">InferenceTestImage.cpp</a></li> |
| 678 | </ul> |
| 679 | </div><!-- contents --> |
| 680 | </div><!-- doc-content --> |
| 681 | <!-- start footer part --> |
| 682 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 683 | <ul> |
| 684 | <li class="navelem"><a class="el" href="class_inference_test_image.html">InferenceTestImage</a></li> |
| 685 | <li class="footer">Generated on Fri Mar 13 2020 16:07:01 for ArmNN by |
| 686 | <a href="http://www.doxygen.org/index.html"> |
| 687 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 688 | </ul> |
| 689 | </div> |
| 690 | </body> |
| 691 | </html> |