An image processing library implemented in pure-C
Ocular is a library for common and advanced image processing algorithms, without the use of any external dependencies. Suggestions for new features are welcome.
Note: Big-Endian RGBA byte-order is expected for all pixel data.
The documentation of the exported functions can be found at Library Documentation.
- Grayscale
- RGB
- HSL
- Average Luminance Threshold
- Color matrix
- Sepia
- Chroma Key
- Lookup (remap colors)
- Saturation
- Gamma
- Brightness/Contrast
- Exposure
- False color (mix between two colors using luminance)
- Haze (add/remove)
- Opacity
- Levels (like Photoshop)
- Hue
- Highlight/Shadow/Tint
- Highlight/Shadow
- Monochrome
- Color Invert
- Luminance Threshold (similar to Photoshop Threshold filter)
- White Balance
- Vibrance
- Skin Tone
- Auto Contrast
- Auto Gamma Correction
- Auto Level
- Auto White Balance
- Equalize (like Photoshop)
- Auto Threshold (with 13 methods)
- Backlight Repair (corrects extremely low or non-uniform lighting)
- Image Blending (supports 27 Photoshop modes)
- Bilateral (selectively blurs preserving edges and other details)
- Average (Mean) Blur
- Gaussian Blur
- Box Blur
- Motion Blur
- Median Blur
- Radial Blur
- Surface Blur
- Skin Smoothing
- Erode/Dilate
- Unsharp Mask
- Sharpen
- Canny Edge
- Gradient Edge
- Sobel Edge
- Pixelate (Mosaic)
- Oil Paint
- 2D Convolution
- Deskewing
- Resampling (resize) [Nearest-neighbor, bilinear, bicubic and lanzcos]
- Retrieve average image luminosity
- Retrieve average color
- Retrieve image size
- Crop
- Flip (Vertical/Horizontal)
- Bilinear image rotation
- Hough transform line detection
Note: These are primarly used for included filters and added on as needed basis.
- RGB <--> YIQ
- RGB <--> HSL
- RGB <--> HSV
- RGB <--> YCbCr
To compile the library, simply do the following:
cmake .
make
This will out the following 3 files:
- static library
lib\libocular.xxx
- dynamic link library
bin\ocular.dll
- console demo
bin\demo.exe
I'm working on a full-featured image viewer app in C# for showing-casing library features using the compiled DLL.
I have a very long list of features to implement, some advanced features include:
retinex, automatic red-eye removal and possibly deblurring.