boost/libs/gil/doc/html/reference/group___image_processing.html
2021-10-05 21:37:46 +02:00

263 lines
20 KiB
HTML

<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Generic Image Library: Image Processing</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-boost.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="boost-header">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary="header">
<tr>
<td valign="top" width="300">
<h3><a href="../index.html"><img alt="Boost GIL" src="../_static/gil.png" border="0"></a></h3>
</td>
<td ><h1 align="center"><a href="../index.html"></a></h1></td>
<td></td>
</tr>
</table>
</div>
<hr/>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Image Processing</div> </div>
</div><!--header-->
<div class="contents">
<p>Image Processing algorithms.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<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>,
<a class="el" href="group___image_processing.html#ggae73d8b37c737a81ffa26b0c5c62d8f0eaa91c78e040f7b9d158f381e197f8beb4">inverse</a>
}</td></tr>
<tr class="separator:gae73d8b37c737a81ffa26b0c5c62d8f0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
}</td></tr>
<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>
<tr class="separator:ga62185ec305fdb480a227c159b9fa5e84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>,
<a class="el" href="group___image_processing.html#gga7b2c4d7867de63cfdc39c26d750efab0ad02c4c4cde7ae76252540d116a40f23a">zero</a>
}</td></tr>
<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>
<tr class="separator:ga7b2c4d7867de63cfdc39c26d750efab0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>,
<b>gaussian</b>
}</td></tr>
<tr class="separator:ga7dbbf38fa6a0f77880a286cd23be3203"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga2074015c3ced619e9075909377c10d5f"><td class="memTemplParams" colspan="2">template&lt;typename SrcView , typename DstView &gt; </td></tr>
<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>
<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>
<tr class="separator:ga2074015c3ced619e9075909377c10d5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeaf67a8717e170a8eacd7ca80273dd85"><td class="memTemplParams" colspan="2"><a id="gaeaf67a8717e170a8eacd7ca80273dd85"></a>
template&lt;typename SrcView , typename DstView &gt; </td></tr>
<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>
<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>
<tr class="separator:gaeaf67a8717e170a8eacd7ca80273dd85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacbd19f2c4dc367e744d2aac412f98055"><td class="memTemplParams" colspan="2"><a id="gacbd19f2c4dc367e744d2aac412f98055"></a>
template&lt;typename SrcView , typename DstView &gt; </td></tr>
<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>
<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 performs 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 or equal to threshold_value will be set to threshold_value else no change If mode is zero and direction is regular: values less than or equal to 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>
<tr class="separator:gacbd19f2c4dc367e744d2aac412f98055"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gada979902dabfdd42295b4cb6252e2184"><td class="memTemplParams" colspan="2"><a id="gada979902dabfdd42295b4cb6252e2184"></a>
template&lt;typename SrcView , typename DstView &gt; </td></tr>
<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>
<tr class="separator:gada979902dabfdd42295b4cb6252e2184"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6f0ba240537fbf6b89f488594c324038"><td class="memTemplParams" colspan="2"><a id="ga6f0ba240537fbf6b89f488594c324038"></a>
template&lt;typename SrcView , typename DstView &gt; </td></tr>
<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>
<tr class="separator:ga6f0ba240537fbf6b89f488594c324038"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad16d2e4a6cb2065f61f62eabd07c3951"><td class="memTemplParams" colspan="2"><a id="gad16d2e4a6cb2065f61f62eabd07c3951"></a>
template&lt;typename SrcView , typename DstView &gt; </td></tr>
<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>
<tr class="separator:gad16d2e4a6cb2065f61f62eabd07c3951"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Image Processing algorithms. </p>
<p>Direction of image segmentation. The direction specifies which pixels are considered as corresponding to object and which pixels correspond to background.</p>
<p>Collection of image processing algorithms currently implemented by GIL. </p>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="gae73d8b37c737a81ffa26b0c5c62d8f0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae73d8b37c737a81ffa26b0c5c62d8f0e">&#9670;&nbsp;</a></span>threshold_direction</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="group___image_processing.html#gae73d8b37c737a81ffa26b0c5c62d8f0e">threshold_direction</a></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<table class="fieldtable">
<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>
</td></tr>
<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>
</td></tr>
</table>
</div>
</div>
<a id="ga62185ec305fdb480a227c159b9fa5e84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga62185ec305fdb480a227c159b9fa5e84">&#9670;&nbsp;</a></span>threshold_optimal_value</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="group___image_processing.html#ga62185ec305fdb480a227c159b9fa5e84">threshold_optimal_value</a></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Method of optimal threshold value calculation. </p>
<table class="fieldtable">
<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#_todo000006">Todo:</a></b></dt><dd>TODO </dd></dl>
</td></tr>
</table>
</div>
</div>
<a id="ga7b2c4d7867de63cfdc39c26d750efab0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7b2c4d7867de63cfdc39c26d750efab0">&#9670;&nbsp;</a></span>threshold_truncate_mode</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="group___image_processing.html#ga7b2c4d7867de63cfdc39c26d750efab0">threshold_truncate_mode</a></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>TODO. </p>
<table class="fieldtable">
<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#_todo000007">Todo:</a></b></dt><dd>TODO </dd></dl>
</td></tr>
<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#_todo000008">Todo:</a></b></dt><dd>TODO </dd></dl>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga2074015c3ced619e9075909377c10d5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2074015c3ced619e9075909377c10d5f">&#9670;&nbsp;</a></span>threshold_binary()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void boost::gil::threshold_binary </td>
<td>(</td>
<td class="paramtype">SrcView const &amp;&#160;</td>
<td class="paramname"><em>src_view</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">DstView const &amp;&#160;</td>
<td class="paramname"><em>dst_view</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>&lt; DstView &gt;::type&#160;</td>
<td class="paramname"><em>threshold_value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">typename <a class="el" href="structboost_1_1gil_1_1channel__type.html">channel_type</a>&lt; DstView &gt;::type&#160;</td>
<td class="paramname"><em>max_value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group___image_processing.html#gae73d8b37c737a81ffa26b0c5c62d8f0e">threshold_direction</a>&#160;</td>
<td class="paramname"><em>direction</em> = <code><a class="el" href="group___image_processing.html#ggae73d8b37c737a81ffa26b0c5c62d8f0eaaf37d08ae228a87dc6b265fd1019c97d">threshold_direction::regular</a></code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<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>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">src_view</td><td>- TODO </td></tr>
<tr><td class="paramname">dst_view</td><td>- TODO </td></tr>
<tr><td class="paramname">threshold_value</td><td>- TODO </td></tr>
<tr><td class="paramname">max_value</td><td>- TODO </td></tr>
<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>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.13-->
<!-- start footer part -->
<hr class="footer"/>
<address class="footer">
<small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.8.15
</small>
</address>
</body>
</html>