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">
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"/>
17 <div class="boost-header">
18 <table border="0" cellpadding="7" cellspacing="0" width="100%" summary="header">
20 <td valign="top" width="300">
21 <h3><a href="../index.html"><img alt="Boost GIL" src="../_static/gil.png" border="0"></a></h3>
23 <td ><h1 align="center"><a href="../index.html"></a></h1></td>
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&dn=gpl-2.0.txt GPL-v2 */
36 initMenu('',false,false,'search.php','Search');
38 /* @license-end */</script>
39 <div id="main-nav"></div>
43 <a href="#enum-members">Enumerations</a> |
44 <a href="#func-members">Functions</a> </div>
45 <div class="headertitle">
46 <div class="title">Image Processing</div> </div>
48 <div class="contents">
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  </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>
58 <tr class="separator:gae73d8b37c737a81ffa26b0c5c62d8f0e"><td class="memSeparator" colspan="2"> </td></tr>
59 <tr class="memitem:ga62185ec305fdb480a227c159b9fa5e84"><td class="memItemLeft" align="right" valign="top">enum  </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>
61 <tr class="memdesc:ga62185ec305fdb480a227c159b9fa5e84"><td class="mdescLeft"> </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"> </td></tr>
63 <tr class="memitem:ga7b2c4d7867de63cfdc39c26d750efab0"><td class="memItemLeft" align="right" valign="top">enum  </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>
66 <tr class="memdesc:ga7b2c4d7867de63cfdc39c26d750efab0"><td class="mdescLeft"> </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"> </td></tr>
68 <tr class="memitem:ga7dbbf38fa6a0f77880a286cd23be3203"><td class="memItemLeft" align="right" valign="top"><a id="ga7dbbf38fa6a0f77880a286cd23be3203"></a>enum  </td><td class="memItemRight" valign="bottom"><b>threshold_adaptive_method</b> { <b>mean</b>,
71 <tr class="separator:ga7dbbf38fa6a0f77880a286cd23be3203"><td class="memSeparator" colspan="2"> </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<typename SrcView , typename DstView > </td></tr>
76 <tr class="memitem:ga2074015c3ced619e9075909377c10d5f"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___image_processing.html#ga2074015c3ced619e9075909377c10d5f">threshold_binary</a> (SrcView const &src_view, DstView const &dst_view, typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>< DstView >::type threshold_value, typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>< DstView >::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"> </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"> </td></tr>
79 <tr class="memitem:gaeaf67a8717e170a8eacd7ca80273dd85"><td class="memTemplParams" colspan="2"><a id="gaeaf67a8717e170a8eacd7ca80273dd85"></a>
80 template<typename SrcView , typename DstView > </td></tr>
81 <tr class="memitem:gaeaf67a8717e170a8eacd7ca80273dd85"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___image_processing.html#gaeaf67a8717e170a8eacd7ca80273dd85">threshold_binary</a> (SrcView const &src_view, DstView const &dst_view, typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>< DstView >::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"> </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"> </td></tr>
84 <tr class="memitem:gacbd19f2c4dc367e744d2aac412f98055"><td class="memTemplParams" colspan="2"><a id="gacbd19f2c4dc367e744d2aac412f98055"></a>
85 template<typename SrcView , typename DstView > </td></tr>
86 <tr class="memitem:gacbd19f2c4dc367e744d2aac412f98055"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___image_processing.html#gacbd19f2c4dc367e744d2aac412f98055">threshold_truncate</a> (SrcView const &src_view, DstView const &dst_view, typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>< DstView >::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"> </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"> </td></tr>
89 <tr class="memitem:gada979902dabfdd42295b4cb6252e2184"><td class="memTemplParams" colspan="2"><a id="gada979902dabfdd42295b4cb6252e2184"></a>
90 template<typename SrcView , typename DstView > </td></tr>
91 <tr class="memitem:gada979902dabfdd42295b4cb6252e2184"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>threshold_optimal</b> (SrcView const &src_view, DstView const &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"> </td></tr>
93 <tr class="memitem:ga6f0ba240537fbf6b89f488594c324038"><td class="memTemplParams" colspan="2"><a id="ga6f0ba240537fbf6b89f488594c324038"></a>
94 template<typename SrcView , typename DstView > </td></tr>
95 <tr class="memitem:ga6f0ba240537fbf6b89f488594c324038"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>threshold_adaptive</b> (SrcView const &src_view, DstView const &dst_view, typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>< DstView >::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>< DstView >::type constant=0)</td></tr>
96 <tr class="separator:ga6f0ba240537fbf6b89f488594c324038"><td class="memSeparator" colspan="2"> </td></tr>
97 <tr class="memitem:gad16d2e4a6cb2065f61f62eabd07c3951"><td class="memTemplParams" colspan="2"><a id="gad16d2e4a6cb2065f61f62eabd07c3951"></a>
98 template<typename SrcView , typename DstView > </td></tr>
99 <tr class="memitem:gad16d2e4a6cb2065f61f62eabd07c3951"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><b>threshold_adaptive</b> (SrcView const &src_view, DstView const &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"> </td></tr>
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">◆ </a></span>threshold_direction</h2>
110 <div class="memitem">
111 <div class="memproto">
112 <table class="mlabels">
114 <td class="mlabels-left">
115 <table class="memname">
117 <td class="memname">enum <a class="el" href="group___image_processing.html#gae73d8b37c737a81ffa26b0c5c62d8f0e">threshold_direction</a></td>
121 <td class="mlabels-right">
122 <span class="mlabels"><span class="mlabel">strong</span></span> </td>
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 </td><td class="fielddoc"><p>Consider values greater than threshold value. </p>
129 <tr><td class="fieldname"><a id="ggae73d8b37c737a81ffa26b0c5c62d8f0eaa91c78e040f7b9d158f381e197f8beb4"></a>inverse </td><td class="fielddoc"><p>Consider values less than or equal to threshold value. </p>
135 <a id="ga62185ec305fdb480a227c159b9fa5e84"></a>
136 <h2 class="memtitle"><span class="permalink"><a href="#ga62185ec305fdb480a227c159b9fa5e84">◆ </a></span>threshold_optimal_value</h2>
138 <div class="memitem">
139 <div class="memproto">
140 <table class="mlabels">
142 <td class="mlabels-left">
143 <table class="memname">
145 <td class="memname">enum <a class="el" href="group___image_processing.html#ga62185ec305fdb480a227c159b9fa5e84">threshold_optimal_value</a></td>
149 <td class="mlabels-right">
150 <span class="mlabels"><span class="mlabel">strong</span></span> </td>
153 </div><div class="memdoc">
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 </td><td class="fielddoc"><dl class="todo"><dt><b><a class="el" href="todo.html#_todo000004">Todo:</a></b></dt><dd>TODO </dd></dl>
163 <a id="ga7b2c4d7867de63cfdc39c26d750efab0"></a>
164 <h2 class="memtitle"><span class="permalink"><a href="#ga7b2c4d7867de63cfdc39c26d750efab0">◆ </a></span>threshold_truncate_mode</h2>
166 <div class="memitem">
167 <div class="memproto">
168 <table class="mlabels">
170 <td class="mlabels-left">
171 <table class="memname">
173 <td class="memname">enum <a class="el" href="group___image_processing.html#ga7b2c4d7867de63cfdc39c26d750efab0">threshold_truncate_mode</a></td>
177 <td class="mlabels-right">
178 <span class="mlabels"><span class="mlabel">strong</span></span> </td>
181 </div><div class="memdoc">
184 <table class="fieldtable">
185 <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga7b2c4d7867de63cfdc39c26d750efab0af0598264a691a8f62272aca0e79af374"></a>threshold </td><td class="fielddoc"><dl class="todo"><dt><b><a class="el" href="todo.html#_todo000005">Todo:</a></b></dt><dd>TODO </dd></dl>
187 <tr><td class="fieldname"><a id="gga7b2c4d7867de63cfdc39c26d750efab0ad02c4c4cde7ae76252540d116a40f23a"></a>zero </td><td class="fielddoc"><dl class="todo"><dt><b><a class="el" href="todo.html#_todo000006">Todo:</a></b></dt><dd>TODO </dd></dl>
193 <h2 class="groupheader">Function Documentation</h2>
194 <a id="ga2074015c3ced619e9075909377c10d5f"></a>
195 <h2 class="memtitle"><span class="permalink"><a href="#ga2074015c3ced619e9075909377c10d5f">◆ </a></span>threshold_binary()</h2>
197 <div class="memitem">
198 <div class="memproto">
199 <table class="memname">
201 <td class="memname">void boost::gil::threshold_binary </td>
203 <td class="paramtype">SrcView const & </td>
204 <td class="paramname"><em>src_view</em>, </td>
207 <td class="paramkey"></td>
209 <td class="paramtype">DstView const & </td>
210 <td class="paramname"><em>dst_view</em>, </td>
213 <td class="paramkey"></td>
215 <td class="paramtype">typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>< DstView >::type </td>
216 <td class="paramname"><em>threshold_value</em>, </td>
219 <td class="paramkey"></td>
221 <td class="paramtype">typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>< DstView >::type </td>
222 <td class="paramname"><em>max_value</em>, </td>
225 <td class="paramkey"></td>
227 <td class="paramtype"><a class="el" href="group___image_processing.html#gae73d8b37c737a81ffa26b0c5c62d8f0e">threshold_direction</a> </td>
228 <td class="paramname"><em>direction</em> = <code><a class="el" href="group___image_processing.html#ggae73d8b37c737a81ffa26b0c5c62d8f0eaaf37d08ae228a87dc6b265fd1019c97d">threshold_direction::regular</a></code> </td>
236 </div><div class="memdoc">
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>
252 </div><!-- contents -->
253 <!-- HTML footer for doxygen 1.8.13-->
254 <!-- start footer part -->
256 <address class="footer">
258 Generated by  <a href="http://www.doxygen.org/index.html">doxygen</a> 1.8.15