Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / gil / doc / html / image_processing / basics.html
1
2
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">
6   <head>
7     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
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 = {
14           URL_ROOT:    '../',
15           VERSION:     '',
16           COLLAPSE_MODINDEX: false,
17           FILE_SUFFIX: '.html'
18       };
19     </script>
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" /> 
29   </head>
30   <body>
31     <div class="header">
32     <table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
33     "header">
34       <tr>
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>
38         </td>
39
40         <td >
41           <h1 align="center"><a href="../index.html"></a></h1>
42         </td>
43         <td>
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" />
50         </form>
51       </div>
52       <script type="text/javascript">$('#searchbox').show(0);</script>
53         </td>
54       </tr>
55     </table>
56     </div>
57     <hr/>
58     <div class="content">
59     <div class="navbar" style="text-align:right;">
60       
61       
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>
65       
66     </div>
67       
68   <div class="section" id="basics">
69 <h1>Basics</h1>
70 <p>Here are basic concepts that might help to understand documentation
71 written in this folder:</p>
72 <div class="section" id="convolution">
73 <h2>Convolution</h2>
74 <p>The simplest way to look at this is &#8220;tweaking the input so that it would
75 look like the shape provided&#8221;. What exact tweaking is applied depends on
76 the kernel.</p>
77 </div>
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
84 Scharr filter</p>
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
91 array).</p>
92 </div>
93 <hr class="docutils" />
94 <div class="section" id="derivatives">
95 <h2>Derivatives</h2>
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>
99 </div>
100 <hr class="docutils" />
101 <div class="section" id="curvature">
102 <h2>Curvature</h2>
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&#8217;s sigma value.</p>
111 </div>
112 </div>
113
114
115     <div class="navbar" style="text-align:right;">
116       
117       
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>
121       
122     </div>
123     </div>
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.
127     </div>
128   </body>
129 </html>