blob: a3d3fbe8086b08f959cce05974b12cafd77db63d [file] [log] [blame]
Anthony Barbier871448e2017-03-24 14:54:29 +00001<!-- 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"/>
Anthony Barbier8140e1e2017-12-14 23:48:46 +00007<meta name="generator" content="Doxygen 1.8.11"/>
Anthony Barbier871448e2017-03-24 14:54:29 +00008<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
Anthony Barbierdbdab852017-06-23 15:42:00 +01009<title>Compute Library: src/core/CL/cl_kernels/threshold.cl File Reference</title>
Anthony Barbier871448e2017-03-24 14:54:29 +000010<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 Barbier8140e1e2017-12-14 23:48:46 +000015<script type="text/javascript" src="navtreedata.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000016<script type="text/javascript" src="navtree.js"></script>
17<script type="text/javascript">
18 $(document).ready(initResizable);
19 $(window).load(resizeHeight);
20</script>
21<link href="search/search.css" rel="stylesheet" type="text/css"/>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000022<script type="text/javascript" src="search/searchdata.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000023<script type="text/javascript" src="search/search.js"></script>
24<script type="text/javascript">
Anthony Barbier8140e1e2017-12-14 23:48:46 +000025 $(document).ready(function() { init_search(); });
Anthony Barbier871448e2017-03-24 14:54:29 +000026</script>
27<script type="text/x-mathjax-config">
28 MathJax.Hub.Config({
29 extensions: ["tex2jax.js"],
30 jax: ["input/TeX","output/HTML-CSS"],
31});
Anthony Barbier8140e1e2017-12-14 23:48:46 +000032</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000033<link href="doxygen.css" rel="stylesheet" type="text/css" />
34</head>
35<body>
36<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
37<div id="titlearea">
38<table cellspacing="0" cellpadding="0">
39 <tbody>
40 <tr style="height: 56px;">
41 <td style="padding-left: 0.5em;">
Anthony Barbierdbdab852017-06-23 15:42:00 +010042 <div id="projectname">Compute Library
Anthony Barbier8140e1e2017-12-14 23:48:46 +000043 &#160;<span id="projectnumber">17.12</span>
Anthony Barbier871448e2017-03-24 14:54:29 +000044 </div>
45 </td>
46 </tr>
47 </tbody>
48</table>
49</div>
50<!-- end header part -->
Anthony Barbier8140e1e2017-12-14 23:48:46 +000051<!-- Generated by Doxygen 1.8.11 -->
Anthony Barbier871448e2017-03-24 14:54:29 +000052<script type="text/javascript">
53var searchBox = new SearchBox("searchBox", "search",false,'Search');
54</script>
55 <div id="navrow1" class="tabs">
56 <ul class="tablist">
57 <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
Anthony Barbierdbdab852017-06-23 15:42:00 +010058 <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +000059 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
60 <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
61 <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
62 <li>
63 <div id="MSearchBox" class="MSearchBoxInactive">
64 <span class="left">
65 <img id="MSearchSelect" src="search/mag_sel.png"
66 onmouseover="return searchBox.OnSearchSelectShow()"
67 onmouseout="return searchBox.OnSearchSelectHide()"
68 alt=""/>
69 <input type="text" id="MSearchField" value="Search" accesskey="S"
70 onfocus="searchBox.OnSearchFieldFocus(true)"
71 onblur="searchBox.OnSearchFieldFocus(false)"
72 onkeyup="searchBox.OnSearchFieldChange(event)"/>
73 </span><span class="right">
74 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
75 </span>
76 </div>
77 </li>
78 </ul>
79 </div>
80 <div id="navrow2" class="tabs2">
81 <ul class="tablist">
82 <li><a href="files.xhtml"><span>File&#160;List</span></a></li>
83 <li><a href="globals.xhtml"><span>Globals</span></a></li>
84 </ul>
85 </div>
86</div><!-- top -->
87<div id="side-nav" class="ui-resizable side-nav-resizable">
88 <div id="nav-tree">
89 <div id="nav-tree-contents">
90 <div id="nav-sync" class="sync"></div>
91 </div>
92 </div>
93 <div id="splitbar" style="-moz-user-select:none;"
94 class="ui-resizable-handle">
95 </div>
96</div>
97<script type="text/javascript">
98$(document).ready(function(){initNavTree('threshold_8cl.xhtml','');});
99</script>
100<div id="doc-content">
101<!-- window showing the filter options -->
102<div id="MSearchSelectWindow"
103 onmouseover="return searchBox.OnSearchSelectShow()"
104 onmouseout="return searchBox.OnSearchSelectHide()"
105 onkeydown="return searchBox.OnSearchSelectKey(event)">
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000106</div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000107
108<!-- iframe showing the search results (closed by default) -->
109<div id="MSearchResultsWindow">
110<iframe src="javascript:void(0)" frameborder="0"
111 name="MSearchResults" id="MSearchResults">
112</iframe>
113</div>
114
115<div class="header">
116 <div class="summary">
117<a href="#func-members">Functions</a> </div>
118 <div class="headertitle">
119<div class="title">threshold.cl File Reference</div> </div>
120</div><!--header-->
121<div class="contents">
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000122<div class="textblock"><code>#include &quot;<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br />
Anthony Barbier871448e2017-03-24 14:54:29 +0000123</div>
124<p><a href="threshold_8cl_source.xhtml">Go to the source code of this file.</a></p>
125<table class="memberdecls">
126<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
127Functions</h2></td></tr>
128<tr class="memitem:a6c8801a257e3e3d80af8b60967975d42"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="threshold_8cl.xhtml#a6c8801a257e3e3d80af8b60967975d42">threshold_binary</a> (__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, uint out_step_y, uint out_offset_first_element_in_bytes, const uchar false_val, const uchar true_val, const uchar threshold)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000129<tr class="memdesc:a6c8801a257e3e3d80af8b60967975d42"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform binary thresholding on an image. <a href="#a6c8801a257e3e3d80af8b60967975d42">More...</a><br /></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000130<tr class="separator:a6c8801a257e3e3d80af8b60967975d42"><td class="memSeparator" colspan="2">&#160;</td></tr>
131<tr class="memitem:a2e3f1b089d9b33880c9bb6e98f294bba"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="threshold_8cl.xhtml#a2e3f1b089d9b33880c9bb6e98f294bba">threshold_range</a> (__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, uint out_step_y, uint out_offset_first_element_in_bytes, const uchar false_val, const uchar true_val, const uchar lower, const uchar upper)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000132<tr class="memdesc:a2e3f1b089d9b33880c9bb6e98f294bba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform range thresholding on an image. <a href="#a2e3f1b089d9b33880c9bb6e98f294bba">More...</a><br /></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000133<tr class="separator:a2e3f1b089d9b33880c9bb6e98f294bba"><td class="memSeparator" colspan="2">&#160;</td></tr>
134</table>
135<h2 class="groupheader">Function Documentation</h2>
136<a class="anchor" id="a6c8801a257e3e3d80af8b60967975d42"></a>
137<div class="memitem">
138<div class="memproto">
139 <table class="memname">
140 <tr>
141 <td class="memname">__kernel void threshold_binary </td>
142 <td>(</td>
143 <td class="paramtype">__global uchar *&#160;</td>
144 <td class="paramname"><em>in_ptr</em>, </td>
145 </tr>
146 <tr>
147 <td class="paramkey"></td>
148 <td></td>
149 <td class="paramtype">uint&#160;</td>
150 <td class="paramname"><em>in_stride_x</em>, </td>
151 </tr>
152 <tr>
153 <td class="paramkey"></td>
154 <td></td>
155 <td class="paramtype">uint&#160;</td>
156 <td class="paramname"><em>in_step_x</em>, </td>
157 </tr>
158 <tr>
159 <td class="paramkey"></td>
160 <td></td>
161 <td class="paramtype">uint&#160;</td>
162 <td class="paramname"><em>in_stride_y</em>, </td>
163 </tr>
164 <tr>
165 <td class="paramkey"></td>
166 <td></td>
167 <td class="paramtype">uint&#160;</td>
168 <td class="paramname"><em>in_step_y</em>, </td>
169 </tr>
170 <tr>
171 <td class="paramkey"></td>
172 <td></td>
173 <td class="paramtype">uint&#160;</td>
174 <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td>
175 </tr>
176 <tr>
177 <td class="paramkey"></td>
178 <td></td>
179 <td class="paramtype">__global uchar *&#160;</td>
180 <td class="paramname"><em>out_ptr</em>, </td>
181 </tr>
182 <tr>
183 <td class="paramkey"></td>
184 <td></td>
185 <td class="paramtype">uint&#160;</td>
186 <td class="paramname"><em>out_stride_x</em>, </td>
187 </tr>
188 <tr>
189 <td class="paramkey"></td>
190 <td></td>
191 <td class="paramtype">uint&#160;</td>
192 <td class="paramname"><em>out_step_x</em>, </td>
193 </tr>
194 <tr>
195 <td class="paramkey"></td>
196 <td></td>
197 <td class="paramtype">uint&#160;</td>
198 <td class="paramname"><em>out_stride_y</em>, </td>
199 </tr>
200 <tr>
201 <td class="paramkey"></td>
202 <td></td>
203 <td class="paramtype">uint&#160;</td>
204 <td class="paramname"><em>out_step_y</em>, </td>
205 </tr>
206 <tr>
207 <td class="paramkey"></td>
208 <td></td>
209 <td class="paramtype">uint&#160;</td>
210 <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td>
211 </tr>
212 <tr>
213 <td class="paramkey"></td>
214 <td></td>
215 <td class="paramtype">const uchar&#160;</td>
216 <td class="paramname"><em>false_val</em>, </td>
217 </tr>
218 <tr>
219 <td class="paramkey"></td>
220 <td></td>
221 <td class="paramtype">const uchar&#160;</td>
222 <td class="paramname"><em>true_val</em>, </td>
223 </tr>
224 <tr>
225 <td class="paramkey"></td>
226 <td></td>
227 <td class="paramtype">const uchar&#160;</td>
228 <td class="paramname"><em>threshold</em>&#160;</td>
229 </tr>
230 <tr>
231 <td></td>
232 <td>)</td>
233 <td></td><td></td>
234 </tr>
235 </table>
236</div><div class="memdoc">
237
238<p>Perform binary thresholding on an image. </p>
239<dl class="params"><dt>Parameters</dt><dd>
240 <table class="params">
241 <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image </td></tr>
242 <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>
243 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
244 <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>
245 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
246 <tr><td class="paramdir">[in]</td><td class="paramname">in_offset_first_element_in_bytes</td><td>The offset of the first element in the first source image </td></tr>
247 <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image </td></tr>
248 <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>
249 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
250 <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>
251 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
252 <tr><td class="paramdir">[in]</td><td class="paramname">out_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
253 <tr><td class="paramdir">[in]</td><td class="paramname">false_val</td><td>False value </td></tr>
254 <tr><td class="paramdir">[in]</td><td class="paramname">true_val</td><td>True value </td></tr>
255 <tr><td class="paramdir">[in]</td><td class="paramname">threshold</td><td>The thresold value </td></tr>
256 </table>
257 </dd>
258</dl>
259
260<p>Definition at line <a class="el" href="threshold_8cl_source.xhtml#l00044">44</a> of file <a class="el" href="threshold_8cl_source.xhtml">threshold.cl</a>.</p>
261
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000262<p>References <a class="el" href="helpers_8h_source.xhtml#l00102">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00142">Image::ptr</a>.</p>
263<div class="fragment"><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;{</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> in = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(in);</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> out = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(out);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="comment">// Load data</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; uchar16 in_data = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="comment">// Perform binary thresholding</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; in_data = select((uchar16)false_val, (uchar16)true_val, in_data &gt; (uchar16)<a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a6cae310822a46019ba25a00ddb0f7e62">threshold</a>);</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="comment">// Store result</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; vstore16(in_data, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="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="helpers_8h_source.xhtml#l00102">helpers.h:102</a></div></div>
264<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="helpers_8h_source.xhtml#l00140">helpers.h:140</a></div></div>
265<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="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
266<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_1_1reference_xhtml_a6cae310822a46019ba25a00ddb0f7e62"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a6cae310822a46019ba25a00ddb0f7e62">arm_compute::test::validation::reference::threshold</a></div><div class="ttdeci">SimpleTensor&lt; T &gt; threshold(const SimpleTensor&lt; T &gt; &amp;src, T threshold, T false_value, T true_value, ThresholdType type, T upper)</div><div class="ttdef"><b>Definition:</b> <a href="reference_2_threshold_8cpp_source.xhtml#l00035">Threshold.cpp:35</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000267</div><!-- fragment -->
268</div>
269</div>
270<a class="anchor" id="a2e3f1b089d9b33880c9bb6e98f294bba"></a>
271<div class="memitem">
272<div class="memproto">
273 <table class="memname">
274 <tr>
275 <td class="memname">__kernel void threshold_range </td>
276 <td>(</td>
277 <td class="paramtype">__global uchar *&#160;</td>
278 <td class="paramname"><em>in_ptr</em>, </td>
279 </tr>
280 <tr>
281 <td class="paramkey"></td>
282 <td></td>
283 <td class="paramtype">uint&#160;</td>
284 <td class="paramname"><em>in_stride_x</em>, </td>
285 </tr>
286 <tr>
287 <td class="paramkey"></td>
288 <td></td>
289 <td class="paramtype">uint&#160;</td>
290 <td class="paramname"><em>in_step_x</em>, </td>
291 </tr>
292 <tr>
293 <td class="paramkey"></td>
294 <td></td>
295 <td class="paramtype">uint&#160;</td>
296 <td class="paramname"><em>in_stride_y</em>, </td>
297 </tr>
298 <tr>
299 <td class="paramkey"></td>
300 <td></td>
301 <td class="paramtype">uint&#160;</td>
302 <td class="paramname"><em>in_step_y</em>, </td>
303 </tr>
304 <tr>
305 <td class="paramkey"></td>
306 <td></td>
307 <td class="paramtype">uint&#160;</td>
308 <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td>
309 </tr>
310 <tr>
311 <td class="paramkey"></td>
312 <td></td>
313 <td class="paramtype">__global uchar *&#160;</td>
314 <td class="paramname"><em>out_ptr</em>, </td>
315 </tr>
316 <tr>
317 <td class="paramkey"></td>
318 <td></td>
319 <td class="paramtype">uint&#160;</td>
320 <td class="paramname"><em>out_stride_x</em>, </td>
321 </tr>
322 <tr>
323 <td class="paramkey"></td>
324 <td></td>
325 <td class="paramtype">uint&#160;</td>
326 <td class="paramname"><em>out_step_x</em>, </td>
327 </tr>
328 <tr>
329 <td class="paramkey"></td>
330 <td></td>
331 <td class="paramtype">uint&#160;</td>
332 <td class="paramname"><em>out_stride_y</em>, </td>
333 </tr>
334 <tr>
335 <td class="paramkey"></td>
336 <td></td>
337 <td class="paramtype">uint&#160;</td>
338 <td class="paramname"><em>out_step_y</em>, </td>
339 </tr>
340 <tr>
341 <td class="paramkey"></td>
342 <td></td>
343 <td class="paramtype">uint&#160;</td>
344 <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td>
345 </tr>
346 <tr>
347 <td class="paramkey"></td>
348 <td></td>
349 <td class="paramtype">const uchar&#160;</td>
350 <td class="paramname"><em>false_val</em>, </td>
351 </tr>
352 <tr>
353 <td class="paramkey"></td>
354 <td></td>
355 <td class="paramtype">const uchar&#160;</td>
356 <td class="paramname"><em>true_val</em>, </td>
357 </tr>
358 <tr>
359 <td class="paramkey"></td>
360 <td></td>
361 <td class="paramtype">const uchar&#160;</td>
362 <td class="paramname"><em>lower</em>, </td>
363 </tr>
364 <tr>
365 <td class="paramkey"></td>
366 <td></td>
367 <td class="paramtype">const uchar&#160;</td>
368 <td class="paramname"><em>upper</em>&#160;</td>
369 </tr>
370 <tr>
371 <td></td>
372 <td>)</td>
373 <td></td><td></td>
374 </tr>
375 </table>
376</div><div class="memdoc">
377
378<p>Perform range thresholding on an image. </p>
379<dl class="params"><dt>Parameters</dt><dd>
380 <table class="params">
381 <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image </td></tr>
382 <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>
383 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
384 <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>
385 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
386 <tr><td class="paramdir">[in]</td><td class="paramname">in_offset_first_element_in_bytes</td><td>The offset of the first element in the first source image </td></tr>
387 <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image </td></tr>
388 <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>
389 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
390 <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>
391 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
392 <tr><td class="paramdir">[in]</td><td class="paramname">out_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
393 <tr><td class="paramdir">[in]</td><td class="paramname">false_val</td><td>False value </td></tr>
394 <tr><td class="paramdir">[in]</td><td class="paramname">true_val</td><td>True value </td></tr>
395 <tr><td class="paramdir">[in]</td><td class="paramname">lower</td><td>Lower threshold </td></tr>
396 <tr><td class="paramdir">[in]</td><td class="paramname">upper</td><td>Upper threshold </td></tr>
397 </table>
398 </dd>
399</dl>
400
401<p>Definition at line <a class="el" href="threshold_8cl_source.xhtml#l00084">84</a> of file <a class="el" href="threshold_8cl_source.xhtml">threshold.cl</a>.</p>
402
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000403<p>References <a class="el" href="helpers_8h_source.xhtml#l00102">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00142">Image::ptr</a>.</p>
404<div class="fragment"><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;{</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> in = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(in);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> out = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(out);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="comment">// Load data</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; uchar16 in_data = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="comment">// Perform range thresholding</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; in_data = select((uchar16)true_val, (uchar16)false_val, in_data &gt; (uchar16)upper || in_data &lt; (uchar16)lower);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="comment">// Store result</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; vstore16(in_data, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="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="helpers_8h_source.xhtml#l00102">helpers.h:102</a></div></div>
405<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="helpers_8h_source.xhtml#l00140">helpers.h:140</a></div></div>
406<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="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000407</div><!-- fragment -->
408</div>
409</div>
410</div><!-- contents -->
411</div><!-- doc-content -->
412<!-- start footer part -->
413<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
414 <ul>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000415 <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="threshold_8cl.xhtml">threshold.cl</a></li>
416 <li class="footer">Generated on Thu Dec 14 2017 23:48:34 for Compute Library by
Anthony Barbier871448e2017-03-24 14:54:29 +0000417 <a href="http://www.doxygen.org/index.html">
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000418 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000419 </ul>
420</div>
421</body>
422</html>