An image processing library for OCaml providing efficient, composable operations. Additionally, bimage supports most types supported by Bigarray.
Published: 19 May 2022
bimage — Image processing library
bimage is an image processing library for OCaml.
Simple image type based on bigarrays
Supports u8, u16, i32, i64, f32, f64 datatypes
Composable image operations
Image I/O using OpenImageIO (
Image I/O using ImageMagick/GraphicsMagick and stb_image (
GLFW window support (
bimage is distributed under the ISC license.
bimage can be installed with
$ opam install bimage
bimage-io can be installed by running:
$ opam install bimage-io
bimage-unix, which provides
ImageMagick bindings, can be installed by running:
$ opam install bimage-unix
If you don't use
opam consult the
opam file for build instructions.
Type.t: Defines the type of an image:
Color.t: Defines the color of an image:
It's possible to extend the color type by implementing COLOR
Image.t: Image type
Kernel.t: Convolution kernels
Transform.t: Image transformations
Expr.t: Expression combinator
Building blocks for image processing filters
Filter.t: Executable image filter
There is a corresponding file for each of these types in src/.
See examples/ for usage examples
The documentation and API reference is generated from the source interfaces. It can be consulted online or via
odig doc bimage.
In the distribution sample programs and tests are located in the
test directory. They can be built and run with: