Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / gil / doc / html / reference / group___image_processing.html
1 <!-- HTML header for doxygen 1.8.13-->
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"/>
7     <meta name="generator" content="Doxygen 1.8.15"/>
8     <meta name="viewport" content="width=device-width, initial-scale=1"/>
9     <title>Generic Image Library: Image Processing</title>
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="doxygen.css" rel="stylesheet" type="text/css" />
14     <link href="doxygen-boost.css" rel="stylesheet" type="text/css"/>
15   </head>
16   <body>
17     <div class="boost-header">
18       <table border="0" cellpadding="7" cellspacing="0" width="100%" summary="header">
19         <tr>
20           <td valign="top" width="300">
21             <h3><a href="../index.html"><img alt="Boost GIL" src="../_static/gil.png" border="0"></a></h3>
22           </td>
23           <td ><h1 align="center"><a href="../index.html"></a></h1></td>
24           <td></td>
25         </tr>
26       </table>
27     </div>
28     <hr/>
29     <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
30 <!-- Generated by Doxygen 1.8.15 -->
31 <script type="text/javascript" src="menudata.js"></script>
32 <script type="text/javascript" src="menu.js"></script>
33 <script type="text/javascript">
34 /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
35 $(function() {
36   initMenu('',false,false,'search.php','Search');
37 });
38 /* @license-end */</script>
39 <div id="main-nav"></div>
40 </div><!-- top -->
41 <div class="header">
42   <div class="summary">
43 <a href="#enum-members">Enumerations</a> &#124;
44 <a href="#func-members">Functions</a>  </div>
45   <div class="headertitle">
46 <div class="title">Image Processing</div>  </div>
47 </div><!--header-->
48 <div class="contents">
49
50 <p>Image Processing algorithms.  
51 <a href="#details">More...</a></p>
52 <table class="memberdecls">
53 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
54 Enumerations</h2></td></tr>
55 <tr class="memitem:gae73d8b37c737a81ffa26b0c5c62d8f0e"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___image_processing.html#gae73d8b37c737a81ffa26b0c5c62d8f0e">threshold_direction</a> { <a class="el" href="group___image_processing.html#ggae73d8b37c737a81ffa26b0c5c62d8f0eaaf37d08ae228a87dc6b265fd1019c97d">regular</a>, 
56 <a class="el" href="group___image_processing.html#ggae73d8b37c737a81ffa26b0c5c62d8f0eaa91c78e040f7b9d158f381e197f8beb4">inverse</a>
57  }</td></tr>
58 <tr class="separator:gae73d8b37c737a81ffa26b0c5c62d8f0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
59 <tr class="memitem:ga62185ec305fdb480a227c159b9fa5e84"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___image_processing.html#ga62185ec305fdb480a227c159b9fa5e84">threshold_optimal_value</a> { <a class="el" href="group___image_processing.html#gga62185ec305fdb480a227c159b9fa5e84a3d734c6df06af2a3ac4e82483c51c455">otsu</a>
60  }</td></tr>
61 <tr class="memdesc:ga62185ec305fdb480a227c159b9fa5e84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Method of optimal threshold value calculation.  <a href="group___image_processing.html#ga62185ec305fdb480a227c159b9fa5e84">More...</a><br /></td></tr>
62 <tr class="separator:ga62185ec305fdb480a227c159b9fa5e84"><td class="memSeparator" colspan="2">&#160;</td></tr>
63 <tr class="memitem:ga7b2c4d7867de63cfdc39c26d750efab0"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___image_processing.html#ga7b2c4d7867de63cfdc39c26d750efab0">threshold_truncate_mode</a> { <a class="el" href="group___image_processing.html#gga7b2c4d7867de63cfdc39c26d750efab0af0598264a691a8f62272aca0e79af374">threshold</a>, 
64 <a class="el" href="group___image_processing.html#gga7b2c4d7867de63cfdc39c26d750efab0ad02c4c4cde7ae76252540d116a40f23a">zero</a>
65  }</td></tr>
66 <tr class="memdesc:ga7b2c4d7867de63cfdc39c26d750efab0"><td class="mdescLeft">&#160;</td><td class="mdescRight">TODO.  <a href="group___image_processing.html#ga7b2c4d7867de63cfdc39c26d750efab0">More...</a><br /></td></tr>
67 <tr class="separator:ga7b2c4d7867de63cfdc39c26d750efab0"><td class="memSeparator" colspan="2">&#160;</td></tr>
68 <tr class="memitem:ga7dbbf38fa6a0f77880a286cd23be3203"><td class="memItemLeft" align="right" valign="top"><a id="ga7dbbf38fa6a0f77880a286cd23be3203"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>threshold_adaptive_method</b> { <b>mean</b>, 
69 <b>gaussian</b>
70  }</td></tr>
71 <tr class="separator:ga7dbbf38fa6a0f77880a286cd23be3203"><td class="memSeparator" colspan="2">&#160;</td></tr>
72 </table><table class="memberdecls">
73 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
74 Functions</h2></td></tr>
75 <tr class="memitem:ga2074015c3ced619e9075909377c10d5f"><td class="memTemplParams" colspan="2">template&lt;typename SrcView , typename DstView &gt; </td></tr>
76 <tr class="memitem:ga2074015c3ced619e9075909377c10d5f"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___image_processing.html#ga2074015c3ced619e9075909377c10d5f">threshold_binary</a> (SrcView const &amp;src_view, DstView const &amp;dst_view, typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>&lt; DstView &gt;::type threshold_value, typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>&lt; DstView &gt;::type max_value, <a class="el" href="group___image_processing.html#gae73d8b37c737a81ffa26b0c5c62d8f0e">threshold_direction</a> direction=<a class="el" href="group___image_processing.html#ggae73d8b37c737a81ffa26b0c5c62d8f0eaaf37d08ae228a87dc6b265fd1019c97d">threshold_direction::regular</a>)</td></tr>
77 <tr class="memdesc:ga2074015c3ced619e9075909377c10d5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applies fixed threshold to each pixel of image view. Performs image binarization by thresholding channel value of each pixel of given image view.  <a href="group___image_processing.html#ga2074015c3ced619e9075909377c10d5f">More...</a><br /></td></tr>
78 <tr class="separator:ga2074015c3ced619e9075909377c10d5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
79 <tr class="memitem:gaeaf67a8717e170a8eacd7ca80273dd85"><td class="memTemplParams" colspan="2"><a id="gaeaf67a8717e170a8eacd7ca80273dd85"></a>
80 template&lt;typename SrcView , typename DstView &gt; </td></tr>
81 <tr class="memitem:gaeaf67a8717e170a8eacd7ca80273dd85"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___image_processing.html#gaeaf67a8717e170a8eacd7ca80273dd85">threshold_binary</a> (SrcView const &amp;src_view, DstView const &amp;dst_view, typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>&lt; DstView &gt;::type threshold_value, <a class="el" href="group___image_processing.html#gae73d8b37c737a81ffa26b0c5c62d8f0e">threshold_direction</a> direction=<a class="el" href="group___image_processing.html#ggae73d8b37c737a81ffa26b0c5c62d8f0eaaf37d08ae228a87dc6b265fd1019c97d">threshold_direction::regular</a>)</td></tr>
82 <tr class="memdesc:gaeaf67a8717e170a8eacd7ca80273dd85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applies fixed threshold to each pixel of image view. Performs image binarization by thresholding channel value of each pixel of given image view. This variant of threshold_binary automatically deduces maximum value for each channel of pixel based on channel type. If direction is regular, values greater than threshold_value will be set to maximum numeric limit of channel else 0. If direction is inverse, values greater than threshold_value will be set to 0 else maximum numeric limit of channel. <br /></td></tr>
83 <tr class="separator:gaeaf67a8717e170a8eacd7ca80273dd85"><td class="memSeparator" colspan="2">&#160;</td></tr>
84 <tr class="memitem:gacbd19f2c4dc367e744d2aac412f98055"><td class="memTemplParams" colspan="2"><a id="gacbd19f2c4dc367e744d2aac412f98055"></a>
85 template&lt;typename SrcView , typename DstView &gt; </td></tr>
86 <tr class="memitem:gacbd19f2c4dc367e744d2aac412f98055"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___image_processing.html#gacbd19f2c4dc367e744d2aac412f98055">threshold_truncate</a> (SrcView const &amp;src_view, DstView const &amp;dst_view, typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>&lt; DstView &gt;::type threshold_value, <a class="el" href="group___image_processing.html#ga7b2c4d7867de63cfdc39c26d750efab0">threshold_truncate_mode</a> mode=<a class="el" href="group___image_processing.html#gga7b2c4d7867de63cfdc39c26d750efab0af0598264a691a8f62272aca0e79af374">threshold_truncate_mode::threshold</a>, <a class="el" href="group___image_processing.html#gae73d8b37c737a81ffa26b0c5c62d8f0e">threshold_direction</a> direction=<a class="el" href="group___image_processing.html#ggae73d8b37c737a81ffa26b0c5c62d8f0eaaf37d08ae228a87dc6b265fd1019c97d">threshold_direction::regular</a>)</td></tr>
87 <tr class="memdesc:gacbd19f2c4dc367e744d2aac412f98055"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applies truncating threshold to each pixel of image view. Takes an image view and performes truncating threshold operation on each chennel. If mode is threshold and direction is regular: values greater than threshold_value will be set to threshold_value else no change If mode is threshold and direction is inverse: values less than threshold_value will be set to threshold_value else no change If mode is zero and direction is regular: values less than threshold_value will be set to 0 else no change If mode is zero and direction is inverse: values more than threshold_value will be set to 0 else no change. <br /></td></tr>
88 <tr class="separator:gacbd19f2c4dc367e744d2aac412f98055"><td class="memSeparator" colspan="2">&#160;</td></tr>
89 <tr class="memitem:gada979902dabfdd42295b4cb6252e2184"><td class="memTemplParams" colspan="2"><a id="gada979902dabfdd42295b4cb6252e2184"></a>
90 template&lt;typename SrcView , typename DstView &gt; </td></tr>
91 <tr class="memitem:gada979902dabfdd42295b4cb6252e2184"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>threshold_optimal</b> (SrcView const &amp;src_view, DstView const &amp;dst_view, <a class="el" href="group___image_processing.html#ga62185ec305fdb480a227c159b9fa5e84">threshold_optimal_value</a> mode=<a class="el" href="group___image_processing.html#gga62185ec305fdb480a227c159b9fa5e84a3d734c6df06af2a3ac4e82483c51c455">threshold_optimal_value::otsu</a>, <a class="el" href="group___image_processing.html#gae73d8b37c737a81ffa26b0c5c62d8f0e">threshold_direction</a> direction=<a class="el" href="group___image_processing.html#ggae73d8b37c737a81ffa26b0c5c62d8f0eaaf37d08ae228a87dc6b265fd1019c97d">threshold_direction::regular</a>)</td></tr>
92 <tr class="separator:gada979902dabfdd42295b4cb6252e2184"><td class="memSeparator" colspan="2">&#160;</td></tr>
93 <tr class="memitem:ga6f0ba240537fbf6b89f488594c324038"><td class="memTemplParams" colspan="2"><a id="ga6f0ba240537fbf6b89f488594c324038"></a>
94 template&lt;typename SrcView , typename DstView &gt; </td></tr>
95 <tr class="memitem:ga6f0ba240537fbf6b89f488594c324038"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>threshold_adaptive</b> (SrcView const &amp;src_view, DstView const &amp;dst_view, typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>&lt; DstView &gt;::type max_value, std::size_t kernel_size, threshold_adaptive_method method=threshold_adaptive_method::mean, <a class="el" href="group___image_processing.html#gae73d8b37c737a81ffa26b0c5c62d8f0e">threshold_direction</a> direction=<a class="el" href="group___image_processing.html#ggae73d8b37c737a81ffa26b0c5c62d8f0eaaf37d08ae228a87dc6b265fd1019c97d">threshold_direction::regular</a>, typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>&lt; DstView &gt;::type constant=0)</td></tr>
96 <tr class="separator:ga6f0ba240537fbf6b89f488594c324038"><td class="memSeparator" colspan="2">&#160;</td></tr>
97 <tr class="memitem:gad16d2e4a6cb2065f61f62eabd07c3951"><td class="memTemplParams" colspan="2"><a id="gad16d2e4a6cb2065f61f62eabd07c3951"></a>
98 template&lt;typename SrcView , typename DstView &gt; </td></tr>
99 <tr class="memitem:gad16d2e4a6cb2065f61f62eabd07c3951"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>threshold_adaptive</b> (SrcView const &amp;src_view, DstView const &amp;dst_view, std::size_t kernel_size, threshold_adaptive_method method=threshold_adaptive_method::mean, <a class="el" href="group___image_processing.html#gae73d8b37c737a81ffa26b0c5c62d8f0e">threshold_direction</a> direction=<a class="el" href="group___image_processing.html#ggae73d8b37c737a81ffa26b0c5c62d8f0eaaf37d08ae228a87dc6b265fd1019c97d">threshold_direction::regular</a>, int constant=0)</td></tr>
100 <tr class="separator:gad16d2e4a6cb2065f61f62eabd07c3951"><td class="memSeparator" colspan="2">&#160;</td></tr>
101 </table>
102 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
103 <p>Image Processing algorithms. </p>
104 <p>Direction of image segmentation. The direction specifieds which pixels are considered as corresponding to object and which pixels correspond to background.</p>
105 <p>Collection of image processing algorithms currently implemented by GIL. </p>
106 <h2 class="groupheader">Enumeration Type Documentation</h2>
107 <a id="gae73d8b37c737a81ffa26b0c5c62d8f0e"></a>
108 <h2 class="memtitle"><span class="permalink"><a href="#gae73d8b37c737a81ffa26b0c5c62d8f0e">&#9670;&nbsp;</a></span>threshold_direction</h2>
109
110 <div class="memitem">
111 <div class="memproto">
112 <table class="mlabels">
113   <tr>
114   <td class="mlabels-left">
115       <table class="memname">
116         <tr>
117           <td class="memname">enum <a class="el" href="group___image_processing.html#gae73d8b37c737a81ffa26b0c5c62d8f0e">threshold_direction</a></td>
118         </tr>
119       </table>
120   </td>
121   <td class="mlabels-right">
122 <span class="mlabels"><span class="mlabel">strong</span></span>  </td>
123   </tr>
124 </table>
125 </div><div class="memdoc">
126 <table class="fieldtable">
127 <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggae73d8b37c737a81ffa26b0c5c62d8f0eaaf37d08ae228a87dc6b265fd1019c97d"></a>regular&#160;</td><td class="fielddoc"><p>Consider values greater than threshold value. </p>
128 </td></tr>
129 <tr><td class="fieldname"><a id="ggae73d8b37c737a81ffa26b0c5c62d8f0eaa91c78e040f7b9d158f381e197f8beb4"></a>inverse&#160;</td><td class="fielddoc"><p>Consider values less than or equal to threshold value. </p>
130 </td></tr>
131 </table>
132
133 </div>
134 </div>
135 <a id="ga62185ec305fdb480a227c159b9fa5e84"></a>
136 <h2 class="memtitle"><span class="permalink"><a href="#ga62185ec305fdb480a227c159b9fa5e84">&#9670;&nbsp;</a></span>threshold_optimal_value</h2>
137
138 <div class="memitem">
139 <div class="memproto">
140 <table class="mlabels">
141   <tr>
142   <td class="mlabels-left">
143       <table class="memname">
144         <tr>
145           <td class="memname">enum <a class="el" href="group___image_processing.html#ga62185ec305fdb480a227c159b9fa5e84">threshold_optimal_value</a></td>
146         </tr>
147       </table>
148   </td>
149   <td class="mlabels-right">
150 <span class="mlabels"><span class="mlabel">strong</span></span>  </td>
151   </tr>
152 </table>
153 </div><div class="memdoc">
154
155 <p>Method of optimal threshold value calculation. </p>
156 <table class="fieldtable">
157 <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga62185ec305fdb480a227c159b9fa5e84a3d734c6df06af2a3ac4e82483c51c455"></a>otsu&#160;</td><td class="fielddoc"><dl class="todo"><dt><b><a class="el" href="todo.html#_todo000004">Todo:</a></b></dt><dd>TODO </dd></dl>
158 </td></tr>
159 </table>
160
161 </div>
162 </div>
163 <a id="ga7b2c4d7867de63cfdc39c26d750efab0"></a>
164 <h2 class="memtitle"><span class="permalink"><a href="#ga7b2c4d7867de63cfdc39c26d750efab0">&#9670;&nbsp;</a></span>threshold_truncate_mode</h2>
165
166 <div class="memitem">
167 <div class="memproto">
168 <table class="mlabels">
169   <tr>
170   <td class="mlabels-left">
171       <table class="memname">
172         <tr>
173           <td class="memname">enum <a class="el" href="group___image_processing.html#ga7b2c4d7867de63cfdc39c26d750efab0">threshold_truncate_mode</a></td>
174         </tr>
175       </table>
176   </td>
177   <td class="mlabels-right">
178 <span class="mlabels"><span class="mlabel">strong</span></span>  </td>
179   </tr>
180 </table>
181 </div><div class="memdoc">
182
183 <p>TODO. </p>
184 <table class="fieldtable">
185 <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga7b2c4d7867de63cfdc39c26d750efab0af0598264a691a8f62272aca0e79af374"></a>threshold&#160;</td><td class="fielddoc"><dl class="todo"><dt><b><a class="el" href="todo.html#_todo000005">Todo:</a></b></dt><dd>TODO </dd></dl>
186 </td></tr>
187 <tr><td class="fieldname"><a id="gga7b2c4d7867de63cfdc39c26d750efab0ad02c4c4cde7ae76252540d116a40f23a"></a>zero&#160;</td><td class="fielddoc"><dl class="todo"><dt><b><a class="el" href="todo.html#_todo000006">Todo:</a></b></dt><dd>TODO </dd></dl>
188 </td></tr>
189 </table>
190
191 </div>
192 </div>
193 <h2 class="groupheader">Function Documentation</h2>
194 <a id="ga2074015c3ced619e9075909377c10d5f"></a>
195 <h2 class="memtitle"><span class="permalink"><a href="#ga2074015c3ced619e9075909377c10d5f">&#9670;&nbsp;</a></span>threshold_binary()</h2>
196
197 <div class="memitem">
198 <div class="memproto">
199       <table class="memname">
200         <tr>
201           <td class="memname">void boost::gil::threshold_binary </td>
202           <td>(</td>
203           <td class="paramtype">SrcView const &amp;&#160;</td>
204           <td class="paramname"><em>src_view</em>, </td>
205         </tr>
206         <tr>
207           <td class="paramkey"></td>
208           <td></td>
209           <td class="paramtype">DstView const &amp;&#160;</td>
210           <td class="paramname"><em>dst_view</em>, </td>
211         </tr>
212         <tr>
213           <td class="paramkey"></td>
214           <td></td>
215           <td class="paramtype">typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>&lt; DstView &gt;::type&#160;</td>
216           <td class="paramname"><em>threshold_value</em>, </td>
217         </tr>
218         <tr>
219           <td class="paramkey"></td>
220           <td></td>
221           <td class="paramtype">typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>&lt; DstView &gt;::type&#160;</td>
222           <td class="paramname"><em>max_value</em>, </td>
223         </tr>
224         <tr>
225           <td class="paramkey"></td>
226           <td></td>
227           <td class="paramtype"><a class="el" href="group___image_processing.html#gae73d8b37c737a81ffa26b0c5c62d8f0e">threshold_direction</a>&#160;</td>
228           <td class="paramname"><em>direction</em> = <code><a class="el" href="group___image_processing.html#ggae73d8b37c737a81ffa26b0c5c62d8f0eaaf37d08ae228a87dc6b265fd1019c97d">threshold_direction::regular</a></code>&#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>Applies fixed threshold to each pixel of image view. Performs image binarization by thresholding channel value of each pixel of given image view. </p>
239 <dl class="params"><dt>Parameters</dt><dd>
240   <table class="params">
241     <tr><td class="paramname">src_view</td><td>- TODO </td></tr>
242     <tr><td class="paramname">dst_view</td><td>- TODO </td></tr>
243     <tr><td class="paramname">threshold_value</td><td>- TODO </td></tr>
244     <tr><td class="paramname">max_value</td><td>- TODO </td></tr>
245     <tr><td class="paramname">threshold_direction</td><td>- if regular, values greater than threshold_value are set to max_value else set to 0; if inverse, values greater than threshold_value are set to 0 else set to max_value. </td></tr>
246   </table>
247   </dd>
248 </dl>
249
250 </div>
251 </div>
252 </div><!-- contents -->
253      <!-- HTML footer for doxygen 1.8.13-->
254      <!-- start footer part -->
255      <hr class="footer"/>
256      <address class="footer">
257       <small>
258         Generated by &#160;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.8.15
259       </small>
260     </address>
261   </body>
262 </html>