|
Boost-Commit : |
From: lbourdev_at_[hidden]
Date: 2007-11-11 14:46:14
Author: lbourdev
Date: 2007-11-11 14:46:14 EST (Sun, 11 Nov 2007)
New Revision: 41015
URL: http://svn.boost.org/trac/boost/changeset/41015
Log:
GIL: Documentation
Text files modified:
trunk/libs/gil/doc/html/gildesignguide.html | 6 +-
trunk/libs/gil/doc/html/giltutorial.html | 6 +-
trunk/libs/gil/doc/index.html | 92 ++++++++++++++++++++++++++++++++++++++-
3 files changed, 95 insertions(+), 9 deletions(-)
Modified: trunk/libs/gil/doc/html/gildesignguide.html
==============================================================================
--- trunk/libs/gil/doc/html/gildesignguide.html (original)
+++ trunk/libs/gil/doc/html/gildesignguide.html 2007-11-11 14:46:14 EST (Sun, 11 Nov 2007)
@@ -1205,7 +1205,7 @@
The algorithms typically delegate the work to their corresponding STL algorithms. For example, <code>copy_pixels</code> calls <code><a class="el" href="http://opensource.adobe.com/gil/html/group___s_t_l_optimizations.html#ga2">std::copy</a></code> either for each row, or, when the images are 1D-traversable, once for all pixels.<p>
In addition, overloads are sometimes provided for the STL algorithms. For example, <code><a class="el" href="http://opensource.adobe.com/gil/html/group___s_t_l_optimizations.html#ga2">std::copy</a></code> for planar iterators is overloaded to perform <code><a class="el" href="http://opensource.adobe.com/gil/html/group___s_t_l_optimizations.html#ga2">std::copy</a></code> for each of the planes. <code><a class="el" href="http://opensource.adobe.com/gil/html/group___s_t_l_optimizations.html#ga2">std::copy</a></code> over bitwise-copiable pixels results in <code><a class="el" href="http://opensource.adobe.com/gil/html/group___s_t_l_optimizations.html#ga2">std::copy</a></code> over unsigned char, which STL typically implements via <code>memmove</code>.<p>
As a result <code>copy_pixels</code> may result in a single call to <code>memmove</code> for interleaved 1D-traversable views, or one per each plane of planar 1D-traversable views, or one per each row of interleaved non-1D-traversable images, etc.<p>
-GIL also provides some beta-versions of image processing algorithms, such as resampling and convolution in a numerics extension available on http://opensource.adobe.com/gil/download.html. This code is in early stage of development and is not optimized for speed<p>
+GIL also provides some beta-versions of image processing algorithms, such as resampling and convolution in a numerics extension available on http://opensource.adobe.com/gil/download.html. This code is in early stage of development and is not optimized for speed<p>
<hr>
<h2><a class="anchor" name="ImageSectionDG">
10. Image</a></h2>
@@ -1267,7 +1267,7 @@
<h2><a class="anchor" name="VariantSecDG">
11. Run-time specified images and image views</a></h2>
The color space, channel depth, channel ordering, and interleaved/planar structure of an image are defined by the type of its template argument, which makes them compile-time bound. Often some of these parameters are available only at run time. Consider, for example, writing a module that opens the image at a given file path, rotates it and saves it back in its original color space and channel depth. How can we possibly write this using our generic image? What type is the image loading code supposed to return?<p>
-GIL's dynamic_image extension allows for images, image views or any GIL constructs to have their parameters defined at run time. Here is an example: <div class="fragment"><pre class="fragment"><span class="preprocessor">#include <<a class="code" href="dynamic__image__all_8hpp.html">boost/gil/extension/dynamic_image/dynamic_image_all.hpp</a>></span>
+GIL's dynamic_image extension allows for images, image views or any GIL constructs to have their parameters defined at run time. Here is an example: <div class="fragment"><pre class="fragment"><span class="preprocessor">#include <<a class="code" href="http://opensource.adobe.com/gil/html/dynamic__image__all_8hpp.html">boost/gil/extension/dynamic_image/dynamic_image_all.hpp</a>></span>
<span class="keyword">using</span> <span class="keyword">namespace </span>boost;
<span class="preprocessor">#define ASSERT_SAME(A,B) BOOST_STATIC_ASSERT((is_same< A,B >::value))</span>
@@ -1413,7 +1413,7 @@
<a class="code" href="http://opensource.adobe.com/gil/html/group___image_view_s_t_l_algorithms_copy_pixels.html#ga0">copy_pixels</a>(av, av);
</pre></div><p>
By having algorithm overloads supporting dynamic constructs, we create a base upon which it is possible to write algorithms that can work with either compile-time or runtime images or views. The following code, for example, uses the GIL I/O extension to turn an image on disk upside down:<p>
-<div class="fragment"><pre class="fragment"><span class="preprocessor">#include <<a class="code" href="jpeg__dynamic__io_8hpp.html">boost\gil\extension\io\jpeg_dynamic_io.hpp</a>></span>
+<div class="fragment"><pre class="fragment"><span class="preprocessor">#include <<a class="code" href="http://opensource.adobe.com/gil/html/jpeg__dynamic__io_8hpp.html">boost\gil\extension\io\jpeg_dynamic_io.hpp</a>></span>
<span class="keyword">template</span> <<span class="keyword">typename</span> Image> <span class="comment">// Could be rgb8_image_t or any_image<...></span>
<span class="keywordtype">void</span> save_180rot(<span class="keyword">const</span> std::string& file_name) {
Modified: trunk/libs/gil/doc/html/giltutorial.html
==============================================================================
--- trunk/libs/gil/doc/html/giltutorial.html (original)
+++ trunk/libs/gil/doc/html/giltutorial.html 2007-11-11 14:46:14 EST (Sun, 11 Nov 2007)
@@ -44,7 +44,7 @@
For simplicity, we will also ignore the boundary cases - the pixels along the edges of the image for which one of the neighbors is not defined. The focus of this document is how to use GIL, not how to create a good gradient generation algorithm.<h3><a class="anchor" name="InterfaceSec">
Interface and Glue Code</a></h3>
Let us first start with 8-bit unsigned grayscale image as the input and 8-bit signed grayscale image as the output. Here is how the interface to our algorithm looks like:<p>
-<div class="fragment"><pre class="fragment"><span class="preprocessor">#include <<a class="code" href="gil__all_8hpp.html">boost/gil/gil_all.hpp</a>></span>
+<div class="fragment"><pre class="fragment"><span class="preprocessor">#include <<a class="code" href="http://opensource.adobe.com/gil/html/gil__all_8hpp.html">boost/gil/gil_all.hpp</a>></span>
<span class="keyword">using</span> <span class="keyword">namespace </span>boost::gil;
<span class="keywordtype">void</span> x_gradient(<span class="keyword">const</span> gray8c_view_t& src, <span class="keyword">const</span> gray8s_view_t& dst) {
@@ -404,7 +404,7 @@
So far we have created a generic function that computes the image gradient of a templated image view. Sometimes, however, the properties of an image view, such as its color space and channel depth, may not be available at compile time. GIL's <code>dynamic_image</code> extension allows for working with GIL constructs that are specified at run time, also called <em>variants</em>. GIL provides models of a run-time instantiated image, <code>any_image</code>, and a run-time instantiated image view, <code>any_image_view</code>. The mechanisms are in place to create other variants, such as <code>any_pixel</code>, <code>any_pixel_iterator</code>, etc. Most of GIL's algorithms and all of the view transformation functions also work with run-time instantiated image views and binary algorithms, such as <code>copy_pixels</code> can have either or both arguments be variants.<p>
Lets make our <code>x_luminosity_gradient</code> algorithm take a variant image view. For simplicity, let's assume that only the source view can be a variant. (As an example of using multiple variants, see GIL's image view algorithm overloads taking multiple variants.)<p>
First, we need to make a function object that contains the templated destination view and has an application operator taking a templated source view:<p>
-<div class="fragment"><pre class="fragment"><span class="preprocessor">#include <<a class="code" href="dynamic__image__all_8hpp.html">boost/gil/extension/dynamic_image/dynamic_image_all.hpp</a>></span>
+<div class="fragment"><pre class="fragment"><span class="preprocessor">#include <<a class="code" href="http://opensource.adobe.com/gil/html/dynamic__image__all_8hpp.html">boost/gil/extension/dynamic_image/dynamic_image_all.hpp</a>></span>
<span class="keyword">template</span> <<span class="keyword">typename</span> DstView>
<span class="keyword">struct </span>x_gradient_obj {
@@ -426,7 +426,7 @@
<code>any_image_view<SrcViews></code> is the image view variant. It is templated over <code>SrcViews</code>, an enumeration of all possible view types the variant can take. <code>src</code> contains inside an index of the currently instantiated type, as well as a block of memory containing the instance. <code>apply_operation</code> goes through a switch statement over the index, each case of which casts the memory to the correct view type and invokes the function object with it. Invoking an algorithm on a variant has the overhead of one switch statement. Algorithms that perform an operation for each pixel in an image view have practically no performance degradation when used with a variant.<p>
Here is how we can construct a variant and invoke the algorithm:<p>
<div class="fragment"><pre class="fragment"><span class="preprocessor">#include <boost/mpl/vector.hpp></span>
-<span class="preprocessor">#include <<a class="code" href="jpeg__dynamic__io_8hpp.html">boost/gil/extension/io/jpeg_dynamic_io.hpp</a>></span>
+<span class="preprocessor">#include <<a class="code" href="http://opensource.adobe.com/gil/html/jpeg__dynamic__io_8hpp.html">boost/gil/extension/io/jpeg_dynamic_io.hpp</a>></span>
<span class="keyword">typedef</span> mpl::vector<gray8_image_t, gray16_image_t, rgb8_image_t, rgb16_image_t> my_img_types;
any_image<my_img_types> runtime_image;
Modified: trunk/libs/gil/doc/index.html
==============================================================================
--- trunk/libs/gil/doc/index.html (original)
+++ trunk/libs/gil/doc/index.html 2007-11-11 14:46:14 EST (Sun, 11 Nov 2007)
@@ -1,3 +1,89 @@
-<html>
-GIL Documentation is available at http://opensource.adobe.com/gil
-</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" xml:lang="en" lang="en"><head><!--
+ Copyright 2005-2007 Adobe Systems Incorporated
+ Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
+ or a copy at http://opensource.adobe.com/licenses.html)
+
+ Some files are held under additional license.
+ Please see "http://opensource.adobe.com/licenses.html" for more information.
+-->
+<title>Adobe Generic Image Library: Main Page</title>
+ <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
+ <link type="text/css" rel="stylesheet" href="adobe_source.css">
+<table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
+<td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
+ <div style="padding: 5px;" align="center">
+ <a title="www.boost.org home page" href="http://www.boost.org/" tabindex="2" style="border: medium none ;">
+ <img src="boost.png" alt="Boost Libraries" style="padding: 3px;">
+ </a>
+ </div>
+ <div style="margin: 5px;">
+ <h3 class="navbar">Information</h3>
+ <ul>
+ <li>GIL ASL Home</li>
+ <li>GIL extensions</li>
+ <li>GIL Discussion Forum</li>
+ <li>Acknowledgements</li>
+ </ul>
+ <h3 class="navbar">Other Resources</h3>
+ <ul>
+ <li>Adobe Open Source</li>
+ <li>SGI STL</li>
+ </ul>
+ </div>
+</td>
+<td style="padding-left: 10px; padding-right: 10px; padding-bottom: 10px;" valign="top" width="100%">
+
+<!-- End Header -->
+
+<br>
+<p>
+</p><h1>Generic Image Library Documentation</h1>
+
+<p>
+<ul>
+
+<li><strong>Video Tutorial </strong>
+
+<p>
+Watch a 55 minute video presentation of GIL. It roughly follows the tutorial, though in some places covers a bit more material. It is slightly outdated.</li>
+
+<p>
+<li><strong>Tutorial </strong>
+
+<p>
+The tutorial gives you a jump start in using the library. It starts with a simple non-generic algorithm that
+is gradually evolved to be more generic, faster and more flexible. The tutorial covers most of what you need to know to make effective use of GIL, but does not systematically
+cover all aspects of the library.</li>
+
+<p>
+<li><strong>Design Guide</strong>
+
+<p>
+The design guide provides a more formal and complete description of the library, including the concepts and the
+design rationale.
+
+<p>
+<li><strong>Doxygen Documentation</strong>
+
+<p>
+Interactive cross-linked documentation
+
+<p>
+<li>Sample files (also included in the GIL download):
+ <ul>
+ <li>x_gradient.cpp Writing an algorithm that operates on generic images</li>
+ <li>dynamic_image.cpp Using images whose properties (color space, channel type) are specified at run time</li>
+ <li>histogram.cpp Creating a histogram</li>
+ <li>interleaved_ptr.cpp,interleaved_ptr.hpp,interleaved_ref.hpp Creating your own pixel reference and pixel iterator</li>
+ <li>mandelbrot.cpp Creating a synthetic image defined by a function</li>
+ <li>packed_pixel.cpp Defining bitmasks and images whose channels or pixels are not byte-aligned</li>
+ <li>resize.cpp Rescaling an image using bilinear sampling (requires the optional Numeric extension)</li>
+ <li>affine.cpp Applying an affine transformation to an image (requires the optional Numeric extension)</li>
+ <li>convolution.cpp Blurring images (requires the optional Numeric extension)</li>
+ </ul>
+
+</ul>
+
+
+</body></html>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk