Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 1 | <!-- HTML header for doxygen 1.8.9.1--> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 6 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 7 | <meta name="generator" content="Doxygen 1.8.13"/> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 8 | <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines --> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 9 | <title>Compute Library: src/core/CL/cl_kernels/warp_perspective.cl File Reference</title> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 10 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 11 | <script type="text/javascript" src="jquery.js"></script> |
| 12 | <script type="text/javascript" src="dynsections.js"></script> |
| 13 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 14 | <script type="text/javascript" src="resize.js"></script> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 15 | <script type="text/javascript" src="navtreedata.js"></script> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 16 | <script type="text/javascript" src="navtree.js"></script> |
| 17 | <script type="text/javascript"> |
| 18 | $(document).ready(initResizable); |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 19 | </script> |
| 20 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 21 | <script type="text/javascript" src="search/searchdata.js"></script> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 22 | <script type="text/javascript" src="search/search.js"></script> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 23 | <script type="text/x-mathjax-config"> |
| 24 | MathJax.Hub.Config({ |
| 25 | extensions: ["tex2jax.js"], |
| 26 | jax: ["input/TeX","output/HTML-CSS"], |
| 27 | }); |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 28 | </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 29 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 30 | </head> |
| 31 | <body> |
| 32 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 33 | <div id="titlearea"> |
| 34 | <table cellspacing="0" cellpadding="0"> |
| 35 | <tbody> |
| 36 | <tr style="height: 56px;"> |
| 37 | <td style="padding-left: 0.5em;"> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 38 | <div id="projectname">Compute Library |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 39 |  <span id="projectnumber">18.11</span> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 40 | </div> |
| 41 | </td> |
| 42 | </tr> |
| 43 | </tbody> |
| 44 | </table> |
| 45 | </div> |
| 46 | <!-- end header part --> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 47 | <!-- Generated by Doxygen 1.8.13 --> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 48 | <script type="text/javascript"> |
| 49 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 50 | </script> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 51 | <script type="text/javascript" src="menudata.js"></script> |
| 52 | <script type="text/javascript" src="menu.js"></script> |
| 53 | <script type="text/javascript"> |
| 54 | $(function() { |
| 55 | initMenu('',true,false,'search.php','Search'); |
| 56 | $(document).ready(function() { init_search(); }); |
| 57 | }); |
| 58 | </script> |
| 59 | <div id="main-nav"></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 60 | </div><!-- top --> |
| 61 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 62 | <div id="nav-tree"> |
| 63 | <div id="nav-tree-contents"> |
| 64 | <div id="nav-sync" class="sync"></div> |
| 65 | </div> |
| 66 | </div> |
| 67 | <div id="splitbar" style="-moz-user-select:none;" |
| 68 | class="ui-resizable-handle"> |
| 69 | </div> |
| 70 | </div> |
| 71 | <script type="text/javascript"> |
| 72 | $(document).ready(function(){initNavTree('warp__perspective_8cl.xhtml','');}); |
| 73 | </script> |
| 74 | <div id="doc-content"> |
| 75 | <!-- window showing the filter options --> |
| 76 | <div id="MSearchSelectWindow" |
| 77 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 78 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 79 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 80 | </div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 81 | |
| 82 | <!-- iframe showing the search results (closed by default) --> |
| 83 | <div id="MSearchResultsWindow"> |
| 84 | <iframe src="javascript:void(0)" frameborder="0" |
| 85 | name="MSearchResults" id="MSearchResults"> |
| 86 | </iframe> |
| 87 | </div> |
| 88 | |
| 89 | <div class="header"> |
| 90 | <div class="summary"> |
| 91 | <a href="#func-members">Functions</a> </div> |
| 92 | <div class="headertitle"> |
| 93 | <div class="title">warp_perspective.cl File Reference</div> </div> |
| 94 | </div><!--header--> |
| 95 | <div class="contents"> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 96 | <div class="textblock"><code>#include "<a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml">helpers.h</a>"</code><br /> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 97 | <code>#include "<a class="el" href="warp__helpers_8h_source.xhtml">warp_helpers.h</a>"</code><br /> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 98 | </div> |
| 99 | <p><a href="warp__perspective_8cl_source.xhtml">Go to the source code of this file.</a></p> |
| 100 | <table class="memberdecls"> |
| 101 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 102 | Functions</h2></td></tr> |
| 103 | <tr class="memitem:aa02a47b9dfa96a2705d5c77044a40048"><td class="memItemLeft" align="right" valign="top">const float16 </td><td class="memItemRight" valign="bottom"><a class="el" href="warp__perspective_8cl.xhtml#aa02a47b9dfa96a2705d5c77044a40048">build_perspective_mtx</a> ()</td></tr> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 104 | <tr class="memdesc:aa02a47b9dfa96a2705d5c77044a40048"><td class="mdescLeft"> </td><td class="mdescRight">Returns the perspective matrix. <a href="#aa02a47b9dfa96a2705d5c77044a40048">More...</a><br /></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 105 | <tr class="separator:aa02a47b9dfa96a2705d5c77044a40048"><td class="memSeparator" colspan="2"> </td></tr> |
| 106 | <tr class="memitem:a2791d623c1dbcf7e7111b8ff1b7daeeb"><td class="memItemLeft" align="right" valign="top">const float8 </td><td class="memItemRight" valign="bottom"><a class="el" href="warp__perspective_8cl.xhtml#a2791d623c1dbcf7e7111b8ff1b7daeeb">apply_perspective_transform</a> (const float2 coord, const float16 mtx)</td></tr> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 107 | <tr class="memdesc:a2791d623c1dbcf7e7111b8ff1b7daeeb"><td class="mdescLeft"> </td><td class="mdescRight">Transforms four 2D coordinates using the formula: <a href="#a2791d623c1dbcf7e7111b8ff1b7daeeb">More...</a><br /></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 108 | <tr class="separator:a2791d623c1dbcf7e7111b8ff1b7daeeb"><td class="memSeparator" colspan="2"> </td></tr> |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 109 | <tr class="memitem:ab8f5d79d7699ec7e2a805a25ca0fca2b"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="warp__perspective_8cl.xhtml#ab8f5d79d7699ec7e2a805a25ca0fca2b">warp_perspective_nearest_neighbour</a> (__global uchar *in_ptr, uint <a class="el" href="depthwise__convolution_8cl.xhtml#a5447e2c4e1aae8fff9290b775fe813ff">in_stride_x</a>, uint in_step_x, uint <a class="el" href="depthwise__convolution_8cl.xhtml#ac353c0687abd8c71a4fa096d322b39ec">in_stride_y</a>, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint <a class="el" href="depthwise__convolution_8cl.xhtml#a68fce1f0ee4080ed89c9427496d625f2">out_stride_x</a>, uint out_step_x, uint <a class="el" href="depthwise__convolution_8cl.xhtml#ac8b6b732372937bba276e6391944d1e1">out_stride_y</a>, uint out_step_y, uint out_offset_first_element_in_bytes, const int width, const int height)</td></tr> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 110 | <tr class="memdesc:ab8f5d79d7699ec7e2a805a25ca0fca2b"><td class="mdescLeft"> </td><td class="mdescRight">Performs perspective transformation on an image interpolating with the NEAREAST NEIGHBOUR method. <a href="#ab8f5d79d7699ec7e2a805a25ca0fca2b">More...</a><br /></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 111 | <tr class="separator:ab8f5d79d7699ec7e2a805a25ca0fca2b"><td class="memSeparator" colspan="2"> </td></tr> |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 112 | <tr class="memitem:a5dba6d401b54fd02d20a2ba246668d93"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="warp__perspective_8cl.xhtml#a5dba6d401b54fd02d20a2ba246668d93">warp_perspective_bilinear</a> (__global uchar *in_ptr, uint <a class="el" href="depthwise__convolution_8cl.xhtml#a5447e2c4e1aae8fff9290b775fe813ff">in_stride_x</a>, uint in_step_x, uint <a class="el" href="depthwise__convolution_8cl.xhtml#ac353c0687abd8c71a4fa096d322b39ec">in_stride_y</a>, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint <a class="el" href="depthwise__convolution_8cl.xhtml#a68fce1f0ee4080ed89c9427496d625f2">out_stride_x</a>, uint out_step_x, uint <a class="el" href="depthwise__convolution_8cl.xhtml#ac8b6b732372937bba276e6391944d1e1">out_stride_y</a>, uint out_step_y, uint out_offset_first_element_in_bytes, const int width, const int height)</td></tr> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 113 | <tr class="memdesc:a5dba6d401b54fd02d20a2ba246668d93"><td class="mdescLeft"> </td><td class="mdescRight">Performs a perspective transform on an image interpolating with the BILINEAR method. <a href="#a5dba6d401b54fd02d20a2ba246668d93">More...</a><br /></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 114 | <tr class="separator:a5dba6d401b54fd02d20a2ba246668d93"><td class="memSeparator" colspan="2"> </td></tr> |
| 115 | </table> |
| 116 | <h2 class="groupheader">Function Documentation</h2> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 117 | <a id="a2791d623c1dbcf7e7111b8ff1b7daeeb"></a> |
| 118 | <h2 class="memtitle"><span class="permalink"><a href="#a2791d623c1dbcf7e7111b8ff1b7daeeb">◆ </a></span>apply_perspective_transform()</h2> |
| 119 | |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 120 | <div class="memitem"> |
| 121 | <div class="memproto"> |
| 122 | <table class="mlabels"> |
| 123 | <tr> |
| 124 | <td class="mlabels-left"> |
| 125 | <table class="memname"> |
| 126 | <tr> |
| 127 | <td class="memname">const float8 apply_perspective_transform </td> |
| 128 | <td>(</td> |
| 129 | <td class="paramtype">const float2 </td> |
| 130 | <td class="paramname"><em>coord</em>, </td> |
| 131 | </tr> |
| 132 | <tr> |
| 133 | <td class="paramkey"></td> |
| 134 | <td></td> |
| 135 | <td class="paramtype">const float16 </td> |
| 136 | <td class="paramname"><em>mtx</em> </td> |
| 137 | </tr> |
| 138 | <tr> |
| 139 | <td></td> |
| 140 | <td>)</td> |
| 141 | <td></td><td></td> |
| 142 | </tr> |
| 143 | </table> |
| 144 | </td> |
| 145 | <td class="mlabels-right"> |
| 146 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 147 | </tr> |
| 148 | </table> |
| 149 | </div><div class="memdoc"> |
| 150 | |
| 151 | <p>Transforms four 2D coordinates using the formula: </p> |
| 152 | <p>x0 = M[1][1] * x + M[1][2] * y + M[1][3] y0 = M[2][1] * x + M[2][2] * y + M[2][3] z0 = M[3][1] * x + M[3][2] * y + M[3][3]</p> |
| 153 | <p>(x0/z0,y0/z0)</p> |
| 154 | <dl class="params"><dt>Parameters</dt><dd> |
| 155 | <table class="params"> |
| 156 | <tr><td class="paramdir">[in]</td><td class="paramname">coord</td><td>2D coordinate to transform. </td></tr> |
| 157 | <tr><td class="paramdir">[in]</td><td class="paramname">mtx</td><td>perspective matrix</td></tr> |
| 158 | </table> |
| 159 | </dd> |
| 160 | </dl> |
| 161 | <dl class="section return"><dt>Returns</dt><dd>a vector float8 containing four 2D transformed values. </dd></dl> |
| 162 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 163 | <p class="definition">Definition at line <a class="el" href="warp__perspective_8cl_source.xhtml#l00046">46</a> of file <a class="el" href="warp__perspective_8cl_source.xhtml">warp_perspective.cl</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 164 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 165 | <p class="reference">Referenced by <a class="el" href="warp__perspective_8cl_source.xhtml#l00119">warp_perspective_bilinear()</a>, and <a class="el" href="warp__perspective_8cl_source.xhtml#l00087">warp_perspective_nearest_neighbour()</a>.</p> |
Anthony Barbier | f45d5a9 | 2018-01-24 16:23:15 +0000 | [diff] [blame] | 166 | <div class="fragment"><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> {</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keyword">const</span> float4 in_x_coords = (float4)(coord.s0, 1 + coord.s0, 2 + coord.s0, 3 + coord.s0);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="comment">// transform [z,z+1,z+2,z+3]</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keyword">const</span> float4 z = (float4)mad(in_x_coords, (float4)(mtx.s2), mad((float4)(coord.s1), (float4)(mtx.s5), (float4)(mtx.s8)));</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="comment">// NOTE: Do not multiply x&y by 1.f/Z as this will result in loss of accuracy and mismatches with VX reference implementation</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="comment">// transform [x,x+1,x+2,x+3]</span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keyword">const</span> float4 new_x = (float4)mad(in_x_coords, (float4)(mtx.s0), mad((float4)(coord.s1), (float4)(mtx.s3), (float4)(mtx.s6))) / z;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="comment">// transform [y,y+1,y+2,y+3]</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keyword">const</span> float4 new_y = (float4)mad(in_x_coords, (float4)(mtx.s1), mad((float4)(coord.s1), (float4)(mtx.s4), (float4)(mtx.s7))) / z;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keywordflow">return</span> (float8)(new_x.s0, new_y.s0, new_x.s1, new_y.s1, new_x.s2, new_y.s2, new_x.s3, new_y.s3);</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> }</div></div><!-- fragment --> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 167 | </div> |
| 168 | </div> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 169 | <a id="aa02a47b9dfa96a2705d5c77044a40048"></a> |
| 170 | <h2 class="memtitle"><span class="permalink"><a href="#aa02a47b9dfa96a2705d5c77044a40048">◆ </a></span>build_perspective_mtx()</h2> |
| 171 | |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 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">const float16 build_perspective_mtx </td> |
| 180 | <td>(</td> |
| 181 | <td class="paramname"></td><td>)</td> |
| 182 | <td></td> |
| 183 | </tr> |
| 184 | </table> |
| 185 | </td> |
| 186 | <td class="mlabels-right"> |
| 187 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 188 | </tr> |
| 189 | </table> |
| 190 | </div><div class="memdoc"> |
| 191 | |
| 192 | <p>Returns the perspective matrix. </p> |
| 193 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 194 | <p class="definition">Definition at line <a class="el" href="warp__perspective_8cl_source.xhtml#l00028">28</a> of file <a class="el" href="warp__perspective_8cl_source.xhtml">warp_perspective.cl</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 195 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 196 | <p class="reference">Referenced by <a class="el" href="warp__perspective_8cl_source.xhtml#l00119">warp_perspective_bilinear()</a>, and <a class="el" href="warp__perspective_8cl_source.xhtml#l00087">warp_perspective_nearest_neighbour()</a>.</p> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 197 | <div class="fragment"><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <span class="keywordflow">return</span> (float16)(MAT0, MAT1, MAT2, MAT3, MAT4, MAT5, MAT6, MAT7, MAT8, 0, 0, 0, (float4)0);</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> }</div></div><!-- fragment --> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 198 | </div> |
| 199 | </div> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 200 | <a id="a5dba6d401b54fd02d20a2ba246668d93"></a> |
| 201 | <h2 class="memtitle"><span class="permalink"><a href="#a5dba6d401b54fd02d20a2ba246668d93">◆ </a></span>warp_perspective_bilinear()</h2> |
| 202 | |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 203 | <div class="memitem"> |
| 204 | <div class="memproto"> |
| 205 | <table class="memname"> |
| 206 | <tr> |
| 207 | <td class="memname">__kernel void warp_perspective_bilinear </td> |
| 208 | <td>(</td> |
| 209 | <td class="paramtype">__global uchar * </td> |
| 210 | <td class="paramname"><em>in_ptr</em>, </td> |
| 211 | </tr> |
| 212 | <tr> |
| 213 | <td class="paramkey"></td> |
| 214 | <td></td> |
| 215 | <td class="paramtype">uint </td> |
| 216 | <td class="paramname"><em>in_stride_x</em>, </td> |
| 217 | </tr> |
| 218 | <tr> |
| 219 | <td class="paramkey"></td> |
| 220 | <td></td> |
| 221 | <td class="paramtype">uint </td> |
| 222 | <td class="paramname"><em>in_step_x</em>, </td> |
| 223 | </tr> |
| 224 | <tr> |
| 225 | <td class="paramkey"></td> |
| 226 | <td></td> |
| 227 | <td class="paramtype">uint </td> |
| 228 | <td class="paramname"><em>in_stride_y</em>, </td> |
| 229 | </tr> |
| 230 | <tr> |
| 231 | <td class="paramkey"></td> |
| 232 | <td></td> |
| 233 | <td class="paramtype">uint </td> |
| 234 | <td class="paramname"><em>in_step_y</em>, </td> |
| 235 | </tr> |
| 236 | <tr> |
| 237 | <td class="paramkey"></td> |
| 238 | <td></td> |
| 239 | <td class="paramtype">uint </td> |
| 240 | <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td> |
| 241 | </tr> |
| 242 | <tr> |
| 243 | <td class="paramkey"></td> |
| 244 | <td></td> |
| 245 | <td class="paramtype">__global uchar * </td> |
| 246 | <td class="paramname"><em>out_ptr</em>, </td> |
| 247 | </tr> |
| 248 | <tr> |
| 249 | <td class="paramkey"></td> |
| 250 | <td></td> |
| 251 | <td class="paramtype">uint </td> |
| 252 | <td class="paramname"><em>out_stride_x</em>, </td> |
| 253 | </tr> |
| 254 | <tr> |
| 255 | <td class="paramkey"></td> |
| 256 | <td></td> |
| 257 | <td class="paramtype">uint </td> |
| 258 | <td class="paramname"><em>out_step_x</em>, </td> |
| 259 | </tr> |
| 260 | <tr> |
| 261 | <td class="paramkey"></td> |
| 262 | <td></td> |
| 263 | <td class="paramtype">uint </td> |
| 264 | <td class="paramname"><em>out_stride_y</em>, </td> |
| 265 | </tr> |
| 266 | <tr> |
| 267 | <td class="paramkey"></td> |
| 268 | <td></td> |
| 269 | <td class="paramtype">uint </td> |
| 270 | <td class="paramname"><em>out_step_y</em>, </td> |
| 271 | </tr> |
| 272 | <tr> |
| 273 | <td class="paramkey"></td> |
| 274 | <td></td> |
| 275 | <td class="paramtype">uint </td> |
| 276 | <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td> |
| 277 | </tr> |
| 278 | <tr> |
| 279 | <td class="paramkey"></td> |
| 280 | <td></td> |
| 281 | <td class="paramtype">const int </td> |
| 282 | <td class="paramname"><em>width</em>, </td> |
| 283 | </tr> |
| 284 | <tr> |
| 285 | <td class="paramkey"></td> |
| 286 | <td></td> |
| 287 | <td class="paramtype">const int </td> |
| 288 | <td class="paramname"><em>height</em> </td> |
| 289 | </tr> |
| 290 | <tr> |
| 291 | <td></td> |
| 292 | <td>)</td> |
| 293 | <td></td><td></td> |
| 294 | </tr> |
| 295 | </table> |
| 296 | </div><div class="memdoc"> |
| 297 | |
| 298 | <p>Performs a perspective transform on an image interpolating with the BILINEAR method. </p> |
| 299 | <p>Input and output are single channel U8.</p> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 300 | <dl class="section attention"><dt>Attention</dt><dd>The matrix coefficients need to be passed at compile time:<br /> |
| 301 | const char build_options [] = "-DMAT0=1 -DMAT1=2 -DMAT2=3 -DMAT3=4 -DMAT4=5 -DMAT5=6 -DMAT6=7 -DMAT7=8 -DMAT8=9"<br /> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 302 | clBuildProgram( program, 0, NULL, build_options, NULL, NULL);</dd></dl> |
| 303 | <dl class="params"><dt>Parameters</dt><dd> |
| 304 | <table class="params"> |
| 305 | <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image. Supported data types: U8. </td></tr> |
| 306 | <tr><td class="paramdir">[in]</td><td class="paramname">in_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr> |
| 307 | <tr><td class="paramdir">[in]</td><td class="paramname">in_step_x</td><td>in_stride_x * number of elements along X processed per work item (in bytes) </td></tr> |
| 308 | <tr><td class="paramdir">[in]</td><td class="paramname">in_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr> |
| 309 | <tr><td class="paramdir">[in]</td><td class="paramname">in_step_y</td><td>in_stride_y * number of elements along Y processed per work item (in bytes) </td></tr> |
| 310 | <tr><td class="paramdir">[in]</td><td class="paramname">in_offset_first_element_in_bytes</td><td>Offset of the first element in the source image </td></tr> |
| 311 | <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image. Supported data types: U8. </td></tr> |
| 312 | <tr><td class="paramdir">[in]</td><td class="paramname">out_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr> |
| 313 | <tr><td class="paramdir">[in]</td><td class="paramname">out_step_x</td><td>out_stride_x * number of elements along X processed per work item (in bytes) </td></tr> |
| 314 | <tr><td class="paramdir">[in]</td><td class="paramname">out_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr> |
| 315 | <tr><td class="paramdir">[in]</td><td class="paramname">out_step_y</td><td>out_stride_y * number of elements along Y processed per work item (in bytes) </td></tr> |
| 316 | <tr><td class="paramdir">[in]</td><td class="paramname">out_offset_first_element_in_bytes</td><td>Offset of the first element in the destination image </td></tr> |
| 317 | <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Width of the destination image </td></tr> |
| 318 | <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>Height of the destination image </td></tr> |
| 319 | </table> |
| 320 | </dd> |
| 321 | </dl> |
| 322 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 323 | <p class="definition">Definition at line <a class="el" href="warp__perspective_8cl_source.xhtml#l00119">119</a> of file <a class="el" href="warp__perspective_8cl_source.xhtml">warp_perspective.cl</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 324 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 325 | <p class="reference">References <a class="el" href="warp__perspective_8cl_source.xhtml#l00046">apply_perspective_transform()</a>, <a class="el" href="warp__helpers_8h_source.xhtml#l00137">bilinear_interpolate()</a>, <a class="el" href="warp__perspective_8cl_source.xhtml#l00028">build_perspective_mtx()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00110">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00113">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>, <a class="el" href="warp__helpers_8h_source.xhtml#l00068">get_current_coords()</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00265">arm_compute::test::validation::in</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00266">arm_compute::test::validation::out</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00150">Image::ptr</a>.</p> |
| 326 | <div class="fragment"><div class="line"><a name="l00124"></a><span class="lineno"> 124</span> {</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">in</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a4334a4a76f8e9628c0fb9e1acf616e2a">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>(in);</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#af8a8a0625e7981212a0af48deb9d2a09">out</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(out);</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  vstore4(<a class="code" href="warp__helpers_8h.xhtml#abea9f226daf3e0ad741d03cf7417d353">bilinear_interpolate</a>(&in, <a class="code" href="warp__perspective_8cl.xhtml#a2791d623c1dbcf7e7111b8ff1b7daeeb">apply_perspective_transform</a>(<a class="code" href="warp__helpers_8h.xhtml#a4caaeeb51ea58015267a9974675226d1">get_current_coords</a>(), <a class="code" href="warp__perspective_8cl.xhtml#aa02a47b9dfa96a2705d5c77044a40048">build_perspective_mtx</a>()), width, height), 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span> }</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00110">helpers.h:110</a></div></div> |
| 327 | <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ad366eaa4cf2d106037d91c30795a5c76"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">arm_compute::test::validation::in</a></div><div class="ttdeci">CLTensor in</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00265">Winograd.cpp:265</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 328 | <div class="ttc" id="warp__perspective_8cl_xhtml_a2791d623c1dbcf7e7111b8ff1b7daeeb"><div class="ttname"><a href="warp__perspective_8cl.xhtml#a2791d623c1dbcf7e7111b8ff1b7daeeb">apply_perspective_transform</a></div><div class="ttdeci">const float8 apply_perspective_transform(const float2 coord, const float16 mtx)</div><div class="ttdoc">Transforms four 2D coordinates using the formula: </div><div class="ttdef"><b>Definition:</b> <a href="warp__perspective_8cl_source.xhtml#l00046">warp_perspective.cl:46</a></div></div> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 329 | <div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a4334a4a76f8e9628c0fb9e1acf616e2a"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a4334a4a76f8e9628c0fb9e1acf616e2a">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT_NO_STEP(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00113">helpers.h:113</a></div></div> |
| 330 | <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_af8a8a0625e7981212a0af48deb9d2a09"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#af8a8a0625e7981212a0af48deb9d2a09">arm_compute::test::validation::out</a></div><div class="ttdeci">CLTensor out</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00266">Winograd.cpp:266</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 331 | <div class="ttc" id="warp__perspective_8cl_xhtml_aa02a47b9dfa96a2705d5c77044a40048"><div class="ttname"><a href="warp__perspective_8cl.xhtml#aa02a47b9dfa96a2705d5c77044a40048">build_perspective_mtx</a></div><div class="ttdeci">const float16 build_perspective_mtx()</div><div class="ttdoc">Returns the perspective matrix. </div><div class="ttdef"><b>Definition:</b> <a href="warp__perspective_8cl_source.xhtml#l00028">warp_perspective.cl:28</a></div></div> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 332 | <div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00148">helpers.h:148</a></div></div> |
| 333 | <div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00150">helpers.h:150</a></div></div> |
| 334 | <div class="ttc" id="warp__helpers_8h_xhtml_a4caaeeb51ea58015267a9974675226d1"><div class="ttname"><a href="warp__helpers_8h.xhtml#a4caaeeb51ea58015267a9974675226d1">get_current_coords</a></div><div class="ttdeci">const float2 get_current_coords()</div><div class="ttdoc">Returns the current thread coordinates. </div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00068">warp_helpers.h:68</a></div></div> |
| 335 | <div class="ttc" id="warp__helpers_8h_xhtml_abea9f226daf3e0ad741d03cf7417d353"><div class="ttname"><a href="warp__helpers_8h.xhtml#abea9f226daf3e0ad741d03cf7417d353">bilinear_interpolate</a></div><div class="ttdeci">const DATA_TYPE4 bilinear_interpolate(const Image *in, const float8 coords, const float width, const float height)</div><div class="ttdoc">Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the ...</div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00137">warp_helpers.h:137</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 336 | </div><!-- fragment --> |
| 337 | </div> |
| 338 | </div> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 339 | <a id="ab8f5d79d7699ec7e2a805a25ca0fca2b"></a> |
| 340 | <h2 class="memtitle"><span class="permalink"><a href="#ab8f5d79d7699ec7e2a805a25ca0fca2b">◆ </a></span>warp_perspective_nearest_neighbour()</h2> |
| 341 | |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 342 | <div class="memitem"> |
| 343 | <div class="memproto"> |
| 344 | <table class="memname"> |
| 345 | <tr> |
| 346 | <td class="memname">__kernel void warp_perspective_nearest_neighbour </td> |
| 347 | <td>(</td> |
| 348 | <td class="paramtype">__global uchar * </td> |
| 349 | <td class="paramname"><em>in_ptr</em>, </td> |
| 350 | </tr> |
| 351 | <tr> |
| 352 | <td class="paramkey"></td> |
| 353 | <td></td> |
| 354 | <td class="paramtype">uint </td> |
| 355 | <td class="paramname"><em>in_stride_x</em>, </td> |
| 356 | </tr> |
| 357 | <tr> |
| 358 | <td class="paramkey"></td> |
| 359 | <td></td> |
| 360 | <td class="paramtype">uint </td> |
| 361 | <td class="paramname"><em>in_step_x</em>, </td> |
| 362 | </tr> |
| 363 | <tr> |
| 364 | <td class="paramkey"></td> |
| 365 | <td></td> |
| 366 | <td class="paramtype">uint </td> |
| 367 | <td class="paramname"><em>in_stride_y</em>, </td> |
| 368 | </tr> |
| 369 | <tr> |
| 370 | <td class="paramkey"></td> |
| 371 | <td></td> |
| 372 | <td class="paramtype">uint </td> |
| 373 | <td class="paramname"><em>in_step_y</em>, </td> |
| 374 | </tr> |
| 375 | <tr> |
| 376 | <td class="paramkey"></td> |
| 377 | <td></td> |
| 378 | <td class="paramtype">uint </td> |
| 379 | <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td> |
| 380 | </tr> |
| 381 | <tr> |
| 382 | <td class="paramkey"></td> |
| 383 | <td></td> |
| 384 | <td class="paramtype">__global uchar * </td> |
| 385 | <td class="paramname"><em>out_ptr</em>, </td> |
| 386 | </tr> |
| 387 | <tr> |
| 388 | <td class="paramkey"></td> |
| 389 | <td></td> |
| 390 | <td class="paramtype">uint </td> |
| 391 | <td class="paramname"><em>out_stride_x</em>, </td> |
| 392 | </tr> |
| 393 | <tr> |
| 394 | <td class="paramkey"></td> |
| 395 | <td></td> |
| 396 | <td class="paramtype">uint </td> |
| 397 | <td class="paramname"><em>out_step_x</em>, </td> |
| 398 | </tr> |
| 399 | <tr> |
| 400 | <td class="paramkey"></td> |
| 401 | <td></td> |
| 402 | <td class="paramtype">uint </td> |
| 403 | <td class="paramname"><em>out_stride_y</em>, </td> |
| 404 | </tr> |
| 405 | <tr> |
| 406 | <td class="paramkey"></td> |
| 407 | <td></td> |
| 408 | <td class="paramtype">uint </td> |
| 409 | <td class="paramname"><em>out_step_y</em>, </td> |
| 410 | </tr> |
| 411 | <tr> |
| 412 | <td class="paramkey"></td> |
| 413 | <td></td> |
| 414 | <td class="paramtype">uint </td> |
| 415 | <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td> |
| 416 | </tr> |
| 417 | <tr> |
| 418 | <td class="paramkey"></td> |
| 419 | <td></td> |
| 420 | <td class="paramtype">const int </td> |
| 421 | <td class="paramname"><em>width</em>, </td> |
| 422 | </tr> |
| 423 | <tr> |
| 424 | <td class="paramkey"></td> |
| 425 | <td></td> |
| 426 | <td class="paramtype">const int </td> |
| 427 | <td class="paramname"><em>height</em> </td> |
| 428 | </tr> |
| 429 | <tr> |
| 430 | <td></td> |
| 431 | <td>)</td> |
| 432 | <td></td><td></td> |
| 433 | </tr> |
| 434 | </table> |
| 435 | </div><div class="memdoc"> |
| 436 | |
| 437 | <p>Performs perspective transformation on an image interpolating with the NEAREAST NEIGHBOUR method. </p> |
| 438 | <p>Input and output are single channel U8.</p> |
| 439 | <p>This kernel performs perspective transform with a 3x3 Matrix M with this method of pixel coordinate translation: x0 = M[1][1] * x + M[1][2] * y + M[1][3] y0 = M[2][1] * x + M[2][2] * y + M[2][3] z0 = M[3][1] * x + M[3][2] * y + M[3][3]</p> |
| 440 | <p>output(x,y) = input(x0/z0,y0/z0)</p> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 441 | <dl class="section attention"><dt>Attention</dt><dd>The matrix coefficients need to be passed at compile time:<br /> |
| 442 | const char build_options [] = "-DMAT0=1 -DMAT1=2 -DMAT2=3 -DMAT3=4 -DMAT4=5 -DMAT5=6 -DMAT6=7 -DMAT7=8 -DMAT8=9"<br /> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 443 | clBuildProgram( program, 0, NULL, build_options, NULL, NULL);</dd></dl> |
| 444 | <dl class="params"><dt>Parameters</dt><dd> |
| 445 | <table class="params"> |
| 446 | <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image. Supported data types: U8. </td></tr> |
| 447 | <tr><td class="paramdir">[in]</td><td class="paramname">in_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr> |
| 448 | <tr><td class="paramdir">[in]</td><td class="paramname">in_step_x</td><td>in_stride_x * number of elements along X processed per work item (in bytes) </td></tr> |
| 449 | <tr><td class="paramdir">[in]</td><td class="paramname">in_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr> |
| 450 | <tr><td class="paramdir">[in]</td><td class="paramname">in_step_y</td><td>in_stride_y * number of elements along Y processed per work item (in bytes) </td></tr> |
| 451 | <tr><td class="paramdir">[in]</td><td class="paramname">in_offset_first_element_in_bytes</td><td>Offset of the first element in the source image </td></tr> |
| 452 | <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image. Supported data types: U8. </td></tr> |
| 453 | <tr><td class="paramdir">[in]</td><td class="paramname">out_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr> |
| 454 | <tr><td class="paramdir">[in]</td><td class="paramname">out_step_x</td><td>out_stride_x * number of elements along X processed per work item (in bytes) </td></tr> |
| 455 | <tr><td class="paramdir">[in]</td><td class="paramname">out_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr> |
| 456 | <tr><td class="paramdir">[in]</td><td class="paramname">out_step_y</td><td>out_stride_y * number of elements along Y processed per work item (in bytes) </td></tr> |
| 457 | <tr><td class="paramdir">[in]</td><td class="paramname">out_offset_first_element_in_bytes</td><td>Offset of the first element in the destination image </td></tr> |
| 458 | <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Width of the destination image </td></tr> |
| 459 | <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>Height of the destination image </td></tr> |
| 460 | </table> |
| 461 | </dd> |
| 462 | </dl> |
| 463 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 464 | <p class="definition">Definition at line <a class="el" href="warp__perspective_8cl_source.xhtml#l00087">87</a> of file <a class="el" href="warp__perspective_8cl_source.xhtml">warp_perspective.cl</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 465 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 466 | <p class="reference">References <a class="el" href="warp__perspective_8cl_source.xhtml#l00046">apply_perspective_transform()</a>, <a class="el" href="warp__perspective_8cl_source.xhtml#l00028">build_perspective_mtx()</a>, <a class="el" href="warp__helpers_8h_source.xhtml#l00049">clamp_to_border()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00110">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00113">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>, <a class="el" href="warp__helpers_8h_source.xhtml#l00068">get_current_coords()</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00265">arm_compute::test::validation::in</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00266">arm_compute::test::validation::out</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00150">Image::ptr</a>, and <a class="el" href="warp__helpers_8h_source.xhtml#l00059">read_texels4()</a>.</p> |
| 467 | <div class="fragment"><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> {</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">in</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a4334a4a76f8e9628c0fb9e1acf616e2a">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>(in);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#af8a8a0625e7981212a0af48deb9d2a09">out</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(out);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  vstore4(<a class="code" href="warp__helpers_8h.xhtml#aba42442a4c991cdbb52727fa370676f1">read_texels4</a>(&in, convert_int8_rtn(<a class="code" href="warp__helpers_8h.xhtml#adbdf2ca9e8fe0b67f9359929ef743126">clamp_to_border</a>(<a class="code" href="warp__perspective_8cl.xhtml#a2791d623c1dbcf7e7111b8ff1b7daeeb">apply_perspective_transform</a>(<a class="code" href="warp__helpers_8h.xhtml#a4caaeeb51ea58015267a9974675226d1">get_current_coords</a>(), <a class="code" href="warp__perspective_8cl.xhtml#aa02a47b9dfa96a2705d5c77044a40048">build_perspective_mtx</a>()), width, height))), 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span> }</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00110">helpers.h:110</a></div></div> |
| 468 | <div class="ttc" id="warp__helpers_8h_xhtml_adbdf2ca9e8fe0b67f9359929ef743126"><div class="ttname"><a href="warp__helpers_8h.xhtml#adbdf2ca9e8fe0b67f9359929ef743126">clamp_to_border</a></div><div class="ttdeci">const float8 clamp_to_border(float8 coords, const float width, const float height)</div><div class="ttdoc">Clamps the given coordinates to the borders. </div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00049">warp_helpers.h:49</a></div></div> |
| 469 | <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ad366eaa4cf2d106037d91c30795a5c76"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">arm_compute::test::validation::in</a></div><div class="ttdeci">CLTensor in</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00265">Winograd.cpp:265</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 470 | <div class="ttc" id="warp__perspective_8cl_xhtml_a2791d623c1dbcf7e7111b8ff1b7daeeb"><div class="ttname"><a href="warp__perspective_8cl.xhtml#a2791d623c1dbcf7e7111b8ff1b7daeeb">apply_perspective_transform</a></div><div class="ttdeci">const float8 apply_perspective_transform(const float2 coord, const float16 mtx)</div><div class="ttdoc">Transforms four 2D coordinates using the formula: </div><div class="ttdef"><b>Definition:</b> <a href="warp__perspective_8cl_source.xhtml#l00046">warp_perspective.cl:46</a></div></div> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 471 | <div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a4334a4a76f8e9628c0fb9e1acf616e2a"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a4334a4a76f8e9628c0fb9e1acf616e2a">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT_NO_STEP(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00113">helpers.h:113</a></div></div> |
| 472 | <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_af8a8a0625e7981212a0af48deb9d2a09"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#af8a8a0625e7981212a0af48deb9d2a09">arm_compute::test::validation::out</a></div><div class="ttdeci">CLTensor out</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00266">Winograd.cpp:266</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 473 | <div class="ttc" id="warp__perspective_8cl_xhtml_aa02a47b9dfa96a2705d5c77044a40048"><div class="ttname"><a href="warp__perspective_8cl.xhtml#aa02a47b9dfa96a2705d5c77044a40048">build_perspective_mtx</a></div><div class="ttdeci">const float16 build_perspective_mtx()</div><div class="ttdoc">Returns the perspective matrix. </div><div class="ttdef"><b>Definition:</b> <a href="warp__perspective_8cl_source.xhtml#l00028">warp_perspective.cl:28</a></div></div> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 474 | <div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00148">helpers.h:148</a></div></div> |
| 475 | <div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00150">helpers.h:150</a></div></div> |
| 476 | <div class="ttc" id="warp__helpers_8h_xhtml_aba42442a4c991cdbb52727fa370676f1"><div class="ttname"><a href="warp__helpers_8h.xhtml#aba42442a4c991cdbb52727fa370676f1">read_texels4</a></div><div class="ttdeci">const DATA_TYPE4 read_texels4(const Image *in, const int8 coords)</div><div class="ttdoc">Reads four texels from the input image. </div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00059">warp_helpers.h:59</a></div></div> |
| 477 | <div class="ttc" id="warp__helpers_8h_xhtml_a4caaeeb51ea58015267a9974675226d1"><div class="ttname"><a href="warp__helpers_8h.xhtml#a4caaeeb51ea58015267a9974675226d1">get_current_coords</a></div><div class="ttdeci">const float2 get_current_coords()</div><div class="ttdoc">Returns the current thread coordinates. </div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00068">warp_helpers.h:68</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 478 | </div><!-- fragment --> |
| 479 | </div> |
| 480 | </div> |
| 481 | </div><!-- contents --> |
| 482 | </div><!-- doc-content --> |
| 483 | <!-- start footer part --> |
| 484 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 485 | <ul> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 486 | <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_aebb8dcc11953d78e620bbef0b9e2183.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_8c278f79c760e5c5fbd911f9870614c1.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_25885286e9dad4fa105b7b25a8031bbf.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="warp__perspective_8cl.xhtml">warp_perspective.cl</a></li> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 487 | <li class="footer">Generated on Thu Nov 22 2018 11:57:43 for Compute Library by |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 488 | <a href="http://www.doxygen.org/index.html"> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 489 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 490 | </ul> |
| 491 | </div> |
| 492 | </body> |
| 493 | </html> |