basics.html 5.4 KB

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