2021-10-05 21:37:46 +02:00

129 lines
5.4 KiB
HTML

<!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/html; charset=utf-8" />
<title>Basics - Boost.GIL documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: '.html'
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="top" title="Boost.GIL documentation" href="../index.html" />
<link rel="up" title="Image Processing" href="index.html" />
<link rel="next" title="Affine region detectors" href="affine-region-detectors.html" />
<link rel="prev" title="Overview" href="overview.html" />
</head>
<body>
<div class="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="C++ Boost" src="../_static/gil.png" border="0"></a></h3>
</td>
<td >
<h1 align="center"><a href="../index.html"></a></h1>
</td>
<td>
<div id="searchbox" style="display: none">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Search" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</td>
</tr>
</table>
</div>
<hr/>
<div class="content">
<div class="navbar" style="text-align:right;">
<a class="prev" title="Overview" href="overview.html"><img src="../_static/prev.png" alt="prev"/></a>
<a class="up" title="Image Processing" href="index.html"><img src="../_static/up.png" alt="up"/></a>
<a class="next" title="Affine region detectors" href="affine-region-detectors.html"><img src="../_static/next.png" alt="next"/></a>
</div>
<div class="section" id="basics">
<h1>Basics</h1>
<p>Here are basic concepts that might help to understand documentation
written in this folder:</p>
<div class="section" id="convolution">
<h2>Convolution</h2>
<p>The simplest way to look at this is &#8220;tweaking the input so that it would
look like the shape provided&#8221;. What exact tweaking is applied depends on
the kernel.</p>
</div>
<hr class="docutils" />
<div class="section" id="filters-kernels-weights">
<h2>Filters, kernels, weights</h2>
<p>Those three words usually mean the same thing, unless context is clear
about a different usage. Simply put, they are matrices, that are used to
achieve certain effects on the image. Lets consider a simple one, 3 by 3
Scharr filter</p>
<p><code class="docutils literal"><span class="pre">ScharrX</span> <span class="pre">=</span> <span class="pre">[1,0,-1][1,0,-1][1,0,-1]</span></code></p>
<p>The filter above, when convolved with a single channel image
(intensity/luminance strength), will produce a gradient in X
(horizontal) direction. There is filtering that cannot be done with a
kernel though, and one good example is median filter (mean is the
arithmetic mean, whereas median will be the center element of a sorted
array).</p>
</div>
<hr class="docutils" />
<div class="section" id="derivatives">
<h2>Derivatives</h2>
<p>A derivative of an image is a gradient in one of two directions: x
(horizontal) and y (vertical). To compute a derivative, one can use
Scharr, Sobel and other gradient filters.</p>
</div>
<hr class="docutils" />
<div class="section" id="curvature">
<h2>Curvature</h2>
<p>The word, when used alone, will mean the curvature that would be
generated if values of an image would be plotted in 3D graph. X and Z
axises (which form horizontal plane) will correspond to X and Y indices
of an image, and Y axis will correspond to value at that pixel. By
little stretch of an imagination, filters (another names are kernels,
weights) could be considered an image (or any 2D matrix). A mean filter
would draw a flat plane, whereas Gaussian filter would draw a hill that
gets sharper depending on it&#8217;s sigma value.</p>
</div>
</div>
<div class="navbar" style="text-align:right;">
<a class="prev" title="Overview" href="overview.html"><img src="../_static/prev.png" alt="prev"/></a>
<a class="up" title="Image Processing" href="index.html"><img src="../_static/up.png" alt="up"/></a>
<a class="next" title="Affine region detectors" href="affine-region-detectors.html"><img src="../_static/next.png" alt="next"/></a>
</div>
</div>
<div class="footer" role="contentinfo">
Last updated on 2021-04-13 16:04:40.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.6.
</div>
</body>
</html>