basics.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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="Design Guide" href="index.html" />
  24. <link rel="next" title="Concepts" href="concepts.html" />
  25. <link rel="prev" title="Design Guide" href="index.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="Design Guide" href="index.html"><img src="../_static/prev.png" alt="prev"/></a>
  57. <a class="up" title="Design Guide" href="index.html"><img src="../_static/up.png" alt="up"/></a>
  58. <a class="next" title="Concepts" href="concepts.html"><img src="../_static/next.png" alt="next"/></a>
  59. </div>
  60. <div class="section" id="basics">
  61. <h1>Basics</h1>
  62. <p>Images are essential in any image processing, vision and video project, and
  63. yet the variability in image representations makes it difficult to write
  64. imaging algorithms that are both generic and efficient. In this section we
  65. will describe some of the challenges that we would like to address.</p>
  66. <p>In the following discussion an <em>image</em> is a 2D array of pixels. A <em>pixel</em> is a
  67. set of color channels that represents the color at a given point in an image.
  68. Each <em>channel</em> represents the value of a color component. There are two common
  69. memory structures for an image. <em>Interleaved</em> images are represented by
  70. grouping the pixels together in memory and interleaving all channels together,
  71. whereas <em>planar</em> images keep the channels in separate color planes. Here is a
  72. 4x3 RGB image in which the second pixel of the first row is marked in red,
  73. in interleaved form:</p>
  74. <img alt="../_images/interleaved.jpg" src="../_images/interleaved.jpg" />
  75. <p>and in planar form:</p>
  76. <img alt="../_images/planar.jpg" src="../_images/planar.jpg" />
  77. <p>Note also that rows may optionally be aligned resulting in a potential padding
  78. at the end of rows.</p>
  79. <p>The Generic Image Library (GIL) provides models for images that vary in:</p>
  80. <ul class="simple">
  81. <li>Structure (planar vs. interleaved)</li>
  82. <li>Color space and presence of alpha (RGB, RGBA, CMYK, etc.)</li>
  83. <li>Channel depth (8-bit, 16-bit, etc.)</li>
  84. <li>Order of channels (RGB vs. BGR, etc.)</li>
  85. <li>Row alignment policy (no alignment, word-alignment, etc.)</li>
  86. </ul>
  87. <p>It also supports user-defined models of images, and images whose parameters
  88. are specified at run-time. GIL abstracts image representation from algorithms
  89. applied on images and allows us to write the algorithm once and have it work
  90. on any of the above image variations while generating code that is comparable
  91. in speed to that of hand-writing the algorithm for a specific image type.</p>
  92. <p>This document follows bottom-up design. Each section defines concepts that
  93. build on top of concepts defined in previous sections. It is recommended to
  94. read the sections in order.</p>
  95. </div>
  96. <div class="navbar" style="text-align:right;">
  97. <a class="prev" title="Design Guide" href="index.html"><img src="../_static/prev.png" alt="prev"/></a>
  98. <a class="up" title="Design Guide" href="index.html"><img src="../_static/up.png" alt="up"/></a>
  99. <a class="next" title="Concepts" href="concepts.html"><img src="../_static/next.png" alt="next"/></a>
  100. </div>
  101. </div>
  102. <div class="footer" role="contentinfo">
  103. Last updated on 2019-12-10 00:12:10.
  104. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.6.
  105. </div>
  106. </body>
  107. </html>