Extensions & Patches for GIL

<!> Warning — This code is being ripped from a larger research project. Suggestions on how to improve the quality of the code and documentation are welcome. <!>

Overview

This project is based on the Generic Image Library (GIL) from boost/Adobe.

The GIL provides a generic representation of images so that code can be written to process an image regardless of the pixel format, and whether the image is planar or interleaved. The GIL provides a great starting point for programmers interested in generic image processing. This site is my personal extensions to GIL that adds support for some of the features I find useful.

In particular, I am working on:

  • GilPatch (gil.patch) — A patch file against the boost HEAD revision of GIL so that I can have a raster of any type, not just GIL pixels. For instance, an image of integers would be: gil::image<int>::view_t
    <!>That was supposed to be true already, but I found some issues with this in their last release.
    <!>The patch file has a lot of diffs caused by white space changes introduced by my editor. I will remove these when I get a chance.
  • transform_view— A function, which is similar to the 'add_deref' function GIL already provides, except that I use boost tools and some assumptions to infer the extra types required by the 'add_deref' function.
  • make_pixelbased— A function, to turn an image that is not PixelBased into a grayscale image (a.k.a. make_grayscale).
  • remove_pixelbased — A function, to turn a grayscale image that is PixelBased into a non-PixelBased image.
  • make_palette_view — A function, which uses any iterator as a palette.

License

This project is under the boost license (http://www.boost.org/LICENSE_1_0.txt). However, I have not yet added the proper disclaimer to all files.

Header Install

This project is header only — you don't need to build anything unless you want to run the tests. If you just want the headers, use

  svn co http://bugx.i3dea.asu.edu/svn/gilx/gilx/trunk/include 

and then apply gil.patch to the HEAD revision of Boost.Gil.

Test Install

Windows

This project uses SCons for build-scripting, so you need to install Python to build it. I use some of my own python scripts (http://bugx.i3dea.asu.edu/projects/build ) to automate some tasks.

  1. Install python from http://www.python.org
  2. Install the MinGW tools (compiler, make, debugger, etc.)
  3. Install boost from http://www.boost.org. You will want the HEAD revision of GIL. You may need to rename the '.lib' files to '.a' files so that mingw can find them properly.
  4. Apply gil.patch against the boost HEAD revision of GIL.
  5. Install the jpeg, tiff, png, and zlib libraries.
  6. Use subversion to checkout the sources from http://bugx.i3dea.asu.edu/svn/gilx/trunk
  7. Run
             build.bat test
    
    To compile and run the test cases.

Linux

<!> These steps are not tested. Please let me know if they don't work. <!>

  1. Install python from http://www.python.org
  2. Install the GNU GCC tools (compiler, make, debugger, etc.)
  3. Install boost from http://www.boost.org. You will want the HEAD revision of GIL.
  4. Apply gil.patch against the boost HEAD revision of GIL.
  5. Install the jpeg, tiff, png, and zlib libraries.
  6. Use subversion to checkout the sources from http://bugx.i3dea.asu.edu/svn/gilx/trunk
  7. Run
             python ./scons/scons.py test
    
    To compile and run the test cases.



For a complete list of local wiki pages, see TitleIndex.

Attachments