diff options
author | Ryan OShea <Ryan.OShea2@arm.com> | 2020-03-13 16:26:19 +0000 |
---|---|---|
committer | Ryan OShea <Ryan.OShea2@arm.com> | 2020-03-13 16:26:19 +0000 |
commit | de36e4a9c299028e792c3a5bd99ad0816d806077 (patch) | |
tree | 6c71d89db68da1033bb422253cee2970580ed692 /Documentation/_inference_test_image_8cpp.html | |
parent | 78b26f024641e763c7252198339c83bad8c0982f (diff) | |
download | armnn-de36e4a9c299028e792c3a5bd99ad0816d806077.tar.gz |
IVGCVSW-3726 Upload ArmNN Doxygen files
* Upload current ArmNN Doxygen files
Signed-off-by: Ryan OShea <Ryan.OShea2@arm.com>
Change-Id: I8989ed16ee40a99a4495b100bd009cf3e24a7285
Diffstat (limited to 'Documentation/_inference_test_image_8cpp.html')
-rw-r--r-- | Documentation/_inference_test_image_8cpp.html | 346 |
1 files changed, 346 insertions, 0 deletions
diff --git a/Documentation/_inference_test_image_8cpp.html b/Documentation/_inference_test_image_8cpp.html new file mode 100644 index 0000000000..29c592c650 --- /dev/null +++ b/Documentation/_inference_test_image_8cpp.html @@ -0,0 +1,346 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>ArmNN: tests/InferenceTestImage.cpp File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="navtree.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="resize.js"></script> +<script type="text/javascript" src="navtreedata.js"></script> +<script type="text/javascript" src="navtree.js"></script> +<script type="text/javascript"> + $(document).ready(initResizable); +</script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">ArmNN +  <span id="projectnumber">NotReleased</span> + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> +<script type="text/javascript" src="menudata.js"></script> +<script type="text/javascript" src="menu.js"></script> +<script type="text/javascript"> +$(function() { + initMenu('',true,false,'search.php','Search'); + $(document).ready(function() { init_search(); }); +}); +</script> +<div id="main-nav"></div> +</div><!-- top --> +<div id="side-nav" class="ui-resizable side-nav-resizable"> + <div id="nav-tree"> + <div id="nav-tree-contents"> + <div id="nav-sync" class="sync"></div> + </div> + </div> + <div id="splitbar" style="-moz-user-select:none;" + class="ui-resizable-handle"> + </div> +</div> +<script type="text/javascript"> +$(document).ready(function(){initNavTree('_inference_test_image_8cpp.html','');}); +</script> +<div id="doc-content"> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="header"> + <div class="summary"> +<a href="#define-members">Macros</a> | +<a href="#func-members">Functions</a> </div> + <div class="headertitle"> +<div class="title">InferenceTestImage.cpp File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include "<a class="el" href="_inference_test_image_8hpp_source.html">InferenceTestImage.hpp</a>"</code><br /> +<code>#include <boost/core/ignore_unused.hpp></code><br /> +<code>#include <boost/format.hpp></code><br /> +<code>#include <boost/numeric/conversion/cast.hpp></code><br /> +<code>#include <array></code><br /> +<code>#include <stb/stb_image.h></code><br /> +<code>#include <stb/stb_image_resize.h></code><br /> +<code>#include <stb/stb_image_write.h></code><br /> +</div> +<p><a href="_inference_test_image_8cpp_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> +Macros</h2></td></tr> +<tr class="memitem:a18372412ad2fc3ce1e3240b3cf0efe78"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_inference_test_image_8cpp.html#a18372412ad2fc3ce1e3240b3cf0efe78">STB_IMAGE_IMPLEMENTATION</a></td></tr> +<tr class="separator:a18372412ad2fc3ce1e3240b3cf0efe78"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aa6a7b41350a14f718b619164bc2b8fdf"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_inference_test_image_8cpp.html#aa6a7b41350a14f718b619164bc2b8fdf">STB_IMAGE_RESIZE_IMPLEMENTATION</a></td></tr> +<tr class="separator:aa6a7b41350a14f718b619164bc2b8fdf"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aefe397a94e8feddc652f92ef40ce9597"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_inference_test_image_8cpp.html#aefe397a94e8feddc652f92ef40ce9597">STB_IMAGE_WRITE_IMPLEMENTATION</a></td></tr> +<tr class="separator:aefe397a94e8feddc652f92ef40ce9597"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:ada9c94c9ae0a7082f648f75f50d57be1"><td class="memTemplParams" colspan="2">template<typename TProcessValueCallable > </td></tr> +<tr class="memitem:ada9c94c9ae0a7082f648f75f50d57be1"><td class="memTemplItemLeft" align="right" valign="top">std::vector< float > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_inference_test_image_8cpp.html#ada9c94c9ae0a7082f648f75f50d57be1">GetImageDataInArmNnLayoutAsFloats</a> (<a class="el" href="_inference_test_image_8hpp.html#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a> channelLayout, const <a class="el" href="class_inference_test_image.html">InferenceTestImage</a> &image, TProcessValueCallable processValue)</td></tr> +<tr class="separator:ada9c94c9ae0a7082f648f75f50d57be1"><td class="memSeparator" colspan="2"> </td></tr> +<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_8cpp.html#a3f8ac82c346c723f775a383d22239182">GetImageDataInArmNnLayoutAsNormalizedFloats</a> (<a class="el" href="_inference_test_image_8hpp.html#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a> layout, const <a class="el" href="class_inference_test_image.html">InferenceTestImage</a> &image)</td></tr> +<tr class="separator:a3f8ac82c346c723f775a383d22239182"><td class="memSeparator" colspan="2"> </td></tr> +<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_8cpp.html#a16f15d88afcc9c6bba231cc72bdd8cbf">GetImageDataInArmNnLayoutAsFloatsSubtractingMean</a> (<a class="el" href="_inference_test_image_8hpp.html#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a> layout, const <a class="el" href="class_inference_test_image.html">InferenceTestImage</a> &image, const std::array< float, 3 > &mean)</td></tr> +<tr class="separator:a16f15d88afcc9c6bba231cc72bdd8cbf"><td class="memSeparator" colspan="2"> </td></tr> +<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_8cpp.html#a0b39a9dcbed4124b88b7b58f5d77096f">GetImageDataAsNormalizedFloats</a> (<a class="el" href="_inference_test_image_8hpp.html#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a> layout, const <a class="el" href="class_inference_test_image.html">InferenceTestImage</a> &image)</td></tr> +<tr class="separator:a0b39a9dcbed4124b88b7b58f5d77096f"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Macro Definition Documentation</h2> +<a id="a18372412ad2fc3ce1e3240b3cf0efe78"></a> +<h2 class="memtitle"><span class="permalink"><a href="#a18372412ad2fc3ce1e3240b3cf0efe78">◆ </a></span>STB_IMAGE_IMPLEMENTATION</h2> + +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define STB_IMAGE_IMPLEMENTATION</td> + </tr> + </table> +</div><div class="memdoc"> + +<p class="definition">Definition at line <a class="el" href="_inference_test_image_8cpp_source.html#l00014">14</a> of file <a class="el" href="_inference_test_image_8cpp_source.html">InferenceTestImage.cpp</a>.</p> + +</div> +</div> +<a id="aa6a7b41350a14f718b619164bc2b8fdf"></a> +<h2 class="memtitle"><span class="permalink"><a href="#aa6a7b41350a14f718b619164bc2b8fdf">◆ </a></span>STB_IMAGE_RESIZE_IMPLEMENTATION</h2> + +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define STB_IMAGE_RESIZE_IMPLEMENTATION</td> + </tr> + </table> +</div><div class="memdoc"> + +<p class="definition">Definition at line <a class="el" href="_inference_test_image_8cpp_source.html#l00017">17</a> of file <a class="el" href="_inference_test_image_8cpp_source.html">InferenceTestImage.cpp</a>.</p> + +</div> +</div> +<a id="aefe397a94e8feddc652f92ef40ce9597"></a> +<h2 class="memtitle"><span class="permalink"><a href="#aefe397a94e8feddc652f92ef40ce9597">◆ </a></span>STB_IMAGE_WRITE_IMPLEMENTATION</h2> + +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define STB_IMAGE_WRITE_IMPLEMENTATION</td> + </tr> + </table> +</div><div class="memdoc"> + +<p class="definition">Definition at line <a class="el" href="_inference_test_image_8cpp_source.html#l00020">20</a> of file <a class="el" href="_inference_test_image_8cpp_source.html">InferenceTestImage.cpp</a>.</p> + +</div> +</div> +<h2 class="groupheader">Function Documentation</h2> +<a id="a0b39a9dcbed4124b88b7b58f5d77096f"></a> +<h2 class="memtitle"><span class="permalink"><a href="#a0b39a9dcbed4124b88b7b58f5d77096f">◆ </a></span>GetImageDataAsNormalizedFloats()</h2> + +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">std::vector<float> GetImageDataAsNormalizedFloats </td> + <td>(</td> + <td class="paramtype"><a class="el" href="_inference_test_image_8hpp.html#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a> </td> + <td class="paramname"><em>layout</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const <a class="el" href="class_inference_test_image.html">InferenceTestImage</a> & </td> + <td class="paramname"><em>image</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p class="definition">Definition at line <a class="el" href="_inference_test_image_8cpp_source.html#l00334">334</a> of file <a class="el" href="_inference_test_image_8cpp_source.html">InferenceTestImage.cpp</a>.</p> + +<p class="reference">References <a class="el" href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571">B</a>, <a class="el" href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf">G</a>, <a class="el" href="_inference_test_image_8hpp_source.html#l00076">InferenceTestImage::GetHeight()</a>, <a class="el" href="_inference_test_image_8cpp_source.html#l00158">InferenceTestImage::GetPixelAs3Channels()</a>, <a class="el" href="_inference_test_image_8hpp_source.html#l00075">InferenceTestImage::GetWidth()</a>, and <a class="el" href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6">R</a>.</p> +<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.html#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.html#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.html#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.html#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.html#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.html#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_html_a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf"><div class="ttname"><a href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf">ImageChannel::G</a></div></div> +<div class="ttc" id="_inference_test_image_8hpp_html_a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6"><div class="ttname"><a href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6">ImageChannel::R</a></div></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> +<div class="ttc" id="_inference_test_image_8hpp_html_a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571"><div class="ttname"><a href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571">ImageChannel::B</a></div></div> +<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> +<div class="ttc" id="class_inference_test_image_html_a97a4644e316893df9dd2ab73cdd08d33"><div class="ttname"><a href="class_inference_test_image.html#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.html#l00158">InferenceTestImage.cpp:158</a></div></div> +</div><!-- fragment --> +</div> +</div> +<a id="ada9c94c9ae0a7082f648f75f50d57be1"></a> +<h2 class="memtitle"><span class="permalink"><a href="#ada9c94c9ae0a7082f648f75f50d57be1">◆ </a></span>GetImageDataInArmNnLayoutAsFloats()</h2> + +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">std::vector<float> GetImageDataInArmNnLayoutAsFloats </td> + <td>(</td> + <td class="paramtype"><a class="el" href="_inference_test_image_8hpp.html#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a> </td> + <td class="paramname"><em>channelLayout</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const <a class="el" href="class_inference_test_image.html">InferenceTestImage</a> & </td> + <td class="paramname"><em>image</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">TProcessValueCallable </td> + <td class="paramname"><em>processValue</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p class="definition">Definition at line <a class="el" href="_inference_test_image_8cpp_source.html#l00280">280</a> of file <a class="el" href="_inference_test_image_8cpp_source.html">InferenceTestImage.cpp</a>.</p> + +<p class="reference">References <a class="el" href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571">B</a>, <a class="el" href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf">G</a>, <a class="el" href="_inference_test_image_8hpp_source.html#l00076">InferenceTestImage::GetHeight()</a>, <a class="el" href="_inference_test_image_8cpp_source.html#l00158">InferenceTestImage::GetPixelAs3Channels()</a>, <a class="el" href="_inference_test_image_8hpp_source.html#l00075">InferenceTestImage::GetWidth()</a>, and <a class="el" href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6">R</a>.</p> + +<p class="reference">Referenced by <a class="el" href="_inference_test_image_8cpp_source.html#l00322">GetImageDataInArmNnLayoutAsFloatsSubtractingMean()</a>, and <a class="el" href="_inference_test_image_8cpp_source.html#l00311">GetImageDataInArmNnLayoutAsNormalizedFloats()</a>.</p> +<div class="fragment"><div class="line"><a name="l00283"></a><span class="lineno"> 283</span> {</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</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.html#a0983225e32025d901ce6547170892f56">GetHeight</a>();</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</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.html#a4ec823e49ce46950b3d4cee1efff050b">GetWidth</a>();</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span> </div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  std::vector<float> imageData;</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  imageData.resize(h * w * 3);</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span> </div><div class="line"><a name="l00290"></a><span class="lineno"> 290</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="l00291"></a><span class="lineno"> 291</span>  {</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</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="l00293"></a><span class="lineno"> 293</span>  {</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  uint8_t r, g, b;</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  std::tie(r, g, b) = image.<a class="code" href="class_inference_test_image.html#a97a4644e316893df9dd2ab73cdd08d33">GetPixelAs3Channels</a>(i, j);</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span> </div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  <span class="comment">// ArmNN order: C, H, W</span></div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> rDstIndex = GetImageChannelIndex(channelLayout, <a class="code" href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6">ImageChannel::R</a>) * h * w + j * w + i;</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> gDstIndex = GetImageChannelIndex(channelLayout, <a class="code" href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf">ImageChannel::G</a>) * h * w + j * w + i;</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bDstIndex = GetImageChannelIndex(channelLayout, <a class="code" href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571">ImageChannel::B</a>) * h * w + j * w + i;</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span> </div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  imageData[rDstIndex] = processValue(<a class="code" href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6">ImageChannel::R</a>, <span class="keywordtype">float</span>(r));</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  imageData[gDstIndex] = processValue(<a class="code" href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf">ImageChannel::G</a>, <span class="keywordtype">float</span>(g));</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  imageData[bDstIndex] = processValue(<a class="code" href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571">ImageChannel::B</a>, <span class="keywordtype">float</span>(b));</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  }</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  }</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span> </div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  <span class="keywordflow">return</span> imageData;</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span> }</div><div class="ttc" id="_inference_test_image_8hpp_html_a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf"><div class="ttname"><a href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aadfcf28d0734569a6a693bc8194de62bf">ImageChannel::G</a></div></div> +<div class="ttc" id="_inference_test_image_8hpp_html_a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6"><div class="ttname"><a href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aae1e1d3d40573127e9ee0480caf1283d6">ImageChannel::R</a></div></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> +<div class="ttc" id="_inference_test_image_8hpp_html_a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571"><div class="ttname"><a href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296aa9d5ed678fe57bcca610140957afab571">ImageChannel::B</a></div></div> +<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> +<div class="ttc" id="class_inference_test_image_html_a97a4644e316893df9dd2ab73cdd08d33"><div class="ttname"><a href="class_inference_test_image.html#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.html#l00158">InferenceTestImage.cpp:158</a></div></div> +</div><!-- fragment --> +</div> +</div> +<a id="a16f15d88afcc9c6bba231cc72bdd8cbf"></a> +<h2 class="memtitle"><span class="permalink"><a href="#a16f15d88afcc9c6bba231cc72bdd8cbf">◆ </a></span>GetImageDataInArmNnLayoutAsFloatsSubtractingMean()</h2> + +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">std::vector<float> GetImageDataInArmNnLayoutAsFloatsSubtractingMean </td> + <td>(</td> + <td class="paramtype"><a class="el" href="_inference_test_image_8hpp.html#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a> </td> + <td class="paramname"><em>layout</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const <a class="el" href="class_inference_test_image.html">InferenceTestImage</a> & </td> + <td class="paramname"><em>image</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const std::array< float, 3 > & </td> + <td class="paramname"><em>mean</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p class="definition">Definition at line <a class="el" href="_inference_test_image_8cpp_source.html#l00322">322</a> of file <a class="el" href="_inference_test_image_8cpp_source.html">InferenceTestImage.cpp</a>.</p> + +<p class="reference">References <a class="el" href="_inference_test_image_8cpp_source.html#l00280">GetImageDataInArmNnLayoutAsFloats()</a>.</p> + +<p class="reference">Referenced by <a class="el" href="_caffe_preprocessor_8cpp_source.html#l00030">CaffePreprocessor::GetTestCaseData()</a>.</p> +<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.html#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.html#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_8cpp_html_ada9c94c9ae0a7082f648f75f50d57be1"><div class="ttname"><a href="_inference_test_image_8cpp.html#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.html#l00280">InferenceTestImage.cpp:280</a></div></div> +<div class="ttc" id="_inference_test_image_8hpp_html_a65983f8cb907d873f2328bb8307c296a"><div class="ttname"><a href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296a">ImageChannel</a></div><div class="ttdeci">ImageChannel</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.html#l00113">InferenceTestImage.hpp:113</a></div></div> +</div><!-- fragment --> +</div> +</div> +<a id="a3f8ac82c346c723f775a383d22239182"></a> +<h2 class="memtitle"><span class="permalink"><a href="#a3f8ac82c346c723f775a383d22239182">◆ </a></span>GetImageDataInArmNnLayoutAsNormalizedFloats()</h2> + +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">std::vector<float> GetImageDataInArmNnLayoutAsNormalizedFloats </td> + <td>(</td> + <td class="paramtype"><a class="el" href="_inference_test_image_8hpp.html#a5f7592b0a8fa09208cd32721cf207110">ImageChannelLayout</a> </td> + <td class="paramname"><em>layout</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const <a class="el" href="class_inference_test_image.html">InferenceTestImage</a> & </td> + <td class="paramname"><em>image</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p class="definition">Definition at line <a class="el" href="_inference_test_image_8cpp_source.html#l00311">311</a> of file <a class="el" href="_inference_test_image_8cpp_source.html">InferenceTestImage.cpp</a>.</p> + +<p class="reference">References <a class="el" href="_inference_test_image_8cpp_source.html#l00280">GetImageDataInArmNnLayoutAsFloats()</a>.</p> + +<p class="reference">Referenced by <a class="el" href="_yolo_database_8cpp_source.html#l00075">YoloDatabase::GetTestCaseData()</a>.</p> +<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.html#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.html#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>  boost::ignore_unused(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="_inference_test_image_8cpp_html_ada9c94c9ae0a7082f648f75f50d57be1"><div class="ttname"><a href="_inference_test_image_8cpp.html#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.html#l00280">InferenceTestImage.cpp:280</a></div></div> +<div class="ttc" id="_inference_test_image_8hpp_html_a65983f8cb907d873f2328bb8307c296a"><div class="ttname"><a href="_inference_test_image_8hpp.html#a65983f8cb907d873f2328bb8307c296a">ImageChannel</a></div><div class="ttdeci">ImageChannel</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_image_8hpp_source.html#l00113">InferenceTestImage.hpp:113</a></div></div> +</div><!-- fragment --> +</div> +</div> +</div><!-- contents --> +</div><!-- doc-content --> +<!-- start footer part --> +<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> + <ul> + <li class="navelem"><a class="el" href="dir_59425e443f801f1f2fd8bbe4959a3ccf.html">tests</a></li><li class="navelem"><a class="el" href="_inference_test_image_8cpp.html">InferenceTestImage.cpp</a></li> + <li class="footer">Generated on Fri Mar 13 2020 16:07:01 for ArmNN by + <a href="http://www.doxygen.org/index.html"> + <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> + </ul> +</div> +</body> +</html> |