Imagine is a 256-bit image processing engine that serves as the foundation for several of my image and computer vision research projects. I began this project in 2009 after scouring the web and being unable to find an image processing library that fit my particular needs. In particular, I was interested in a library that was:
Fast: multi-threaded vectorized CPU implementations plus CUDA GPU implementations
Portable: able to run on PCs and mobile devices without significant updates
Readable: well written and documented code
Accurate: reliable implementation that consistently produces correct results
Usable: the library must support common image file formats
Lightweight: does not contain significant bloat or extraneous features
My primary goal for Imagine was that it be powerful yet also easy to understand. By avoiding unnecessary complexity, I believe that this software is approachable for engineers without extensive image processing experience, and serves as a great learning resource.
Over the years a number of professors have used this library as a teaching aid in their courses and the feedback has been unanimously positive. The code is highly commented with descriptive explanations of both the theories and the practical considerations that went into the implementation.
Imagine contains a 256 bit (64 bits per channel) image processing engine that relies upon a fully customizable set of filters, formats, and types. Types are described by a flexible data format that allows developers to easily create data layouts that are automatically accepted and interpreted by the rest of the engine. A preselected set is provided that includes some of the most common formats, including:
Filters are the primary workhorse of Imagine and they are comprised of kernels and operators. Kernels provide a common interface to perform image sampling while operators are responsible for image manipulation tasks. Both of these systems are supported by an array of helpers that manage data conversion, packing, and other tasks required by the engine.
Imagine currently supports the following configurable kernels:
Imagine currently supports the following operators which in turn rely upon the kernels to sample images. In this manner, a simple blur operator automatically supports gaussian blur, coverage blur, etc.
Haar Wavelet Transform
Depth of field (requires D16 companion)
Lens Glare and Flare
Convert Space (RGB,YUV,HSV, etc.)
Discrete Cosine Transform
Clarify (noise removal)
Ripple and Wave
Imagine supports the following image file formats. Also note, adding a new image format to Imagine is easy and (usually) does not require any updates to the rest of the engine.
24 and 32 bit Bitmaps (.bmp)
Portable network graphics (.png)
Joint Photographic Experts Group (.jpeg, .jpg)
Portable Graymaps (.pgm, .ppm)
24 and 32 bit uncompressed Targa (.tga)
Primitive Texture Compression (.ptc)
OpenEXR HDR Images (.exr)
Tagged Image File Format (.tiff, .tif)
Imagine is currently closed source because it is being used under a commercial license by a partner. However, I have made an early and unoptimized version of the resampling code available at the link below.
Imagine Resampler Source Code
For more information about the inner workings of Imagine, check out this blog post.