3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5 <html xmlns="http://www.w3.org/1999/xhtml">
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9 <title>Basics - Boost.GIL documentation</title>
10 <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
11 <link rel="stylesheet" href="../_static/style.css" type="text/css" />
12 <script type="text/javascript">
13 var DOCUMENTATION_OPTIONS = {
16 COLLAPSE_MODINDEX: false,
20 <script type="text/javascript" src="../_static/jquery.js"></script>
21 <script type="text/javascript" src="../_static/underscore.js"></script>
22 <script type="text/javascript" src="../_static/doctools.js"></script>
23 <link rel="index" title="Index" href="../genindex.html" />
24 <link rel="search" title="Search" href="../search.html" />
25 <link rel="top" title="Boost.GIL documentation" href="../index.html" />
26 <link rel="up" title="Image Processing" href="index.html" />
27 <link rel="next" title="Affine region detectors" href="affine-region-detectors.html" />
28 <link rel="prev" title="Overview" href="overview.html" />
32 <table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
35 <td valign="top" width="300">
36 <h3><a href="../index.html"><img
37 alt="C++ Boost" src="../_static/gil.png" border="0"></a></h3>
41 <h1 align="center"><a href="../index.html"></a></h1>
44 <div id="searchbox" style="display: none">
45 <form class="search" action="../search.html" method="get">
46 <input type="text" name="q" size="18" />
47 <input type="submit" value="Search" />
48 <input type="hidden" name="check_keywords" value="yes" />
49 <input type="hidden" name="area" value="default" />
52 <script type="text/javascript">$('#searchbox').show(0);</script>
59 <div class="navbar" style="text-align:right;">
62 <a class="prev" title="Overview" href="overview.html"><img src="../_static/prev.png" alt="prev"/></a>
63 <a class="up" title="Image Processing" href="index.html"><img src="../_static/up.png" alt="up"/></a>
64 <a class="next" title="Affine region detectors" href="affine-region-detectors.html"><img src="../_static/next.png" alt="next"/></a>
68 <div class="section" id="basics">
70 <p>Here are basic concepts that might help to understand documentation
71 written in this folder:</p>
72 <div class="section" id="convolution">
74 <p>The simplest way to look at this is “tweaking the input so that it would
75 look like the shape provided”. What exact tweaking is applied depends on
78 <hr class="docutils" />
79 <div class="section" id="filters-kernels-weights">
80 <h2>Filters, kernels, weights</h2>
81 <p>Those three words usually mean the same thing, unless context is clear
82 about a different usage. Simply put, they are matrices, that are used to
83 achieve certain effects on the image. Lets consider a simple one, 3 by 3
85 <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>
86 <p>The filter above, when convolved with a single channel image
87 (intensity/luminance strength), will produce a gradient in X
88 (horizontal) direction. There is filtering that cannot be done with a
89 kernel though, and one good example is median filter (mean is the
90 arithmetic mean, whereas median will be the center element of a sorted
93 <hr class="docutils" />
94 <div class="section" id="derivatives">
96 <p>A derivative of an image is a gradient in one of two directions: x
97 (horizontal) and y (vertical). To compute a derivative, one can use
98 Scharr, Sobel and other gradient filters.</p>
100 <hr class="docutils" />
101 <div class="section" id="curvature">
103 <p>The word, when used alone, will mean the curvature that would be
104 generated if values of an image would be plotted in 3D graph. X and Z
105 axises (which form horizontal plane) will correspond to X and Y indices
106 of an image, and Y axis will correspond to value at that pixel. By
107 little stretch of an imagination, filters (another names are kernels,
108 weights) could be considered an image (or any 2D matrix). A mean filter
109 would draw a flat plane, whereas Gaussian filter would draw a hill that
110 gets sharper depending on it’s sigma value.</p>
115 <div class="navbar" style="text-align:right;">
118 <a class="prev" title="Overview" href="overview.html"><img src="../_static/prev.png" alt="prev"/></a>
119 <a class="up" title="Image Processing" href="index.html"><img src="../_static/up.png" alt="up"/></a>
120 <a class="next" title="Affine region detectors" href="affine-region-detectors.html"><img src="../_static/next.png" alt="next"/></a>
124 <div class="footer" role="contentinfo">
125 Last updated on 2019-12-10 00:12:10.
126 Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.6.