#computer-vision #camera-image #pixel-format #machine #definition #data #image-data

no-std machine-vision-formats

Type definitions for working with machine vision cameras

2 releases

0.1.1 Oct 25, 2021
0.1.0 May 29, 2021

#769 in Images

Download history 261/week @ 2023-11-24 221/week @ 2023-12-01 454/week @ 2023-12-08 301/week @ 2023-12-15 97/week @ 2023-12-22 79/week @ 2023-12-29 93/week @ 2024-01-05 178/week @ 2024-01-12 513/week @ 2024-01-19 1062/week @ 2024-01-26 570/week @ 2024-02-02 528/week @ 2024-02-09 297/week @ 2024-02-16 374/week @ 2024-02-23 876/week @ 2024-03-01 125/week @ 2024-03-08

1,690 downloads per month

MIT/Apache

20KB
350 lines

machine-vision-formats

Documentation Crates.io

Type definitions for working with machine vision cameras.

This crate aims to be a lowest common denominator for working with images from machine vision cameras from companies such as Basler, FLIR, and AVT.

  • Can be compiled without standard library support (no_std).
  • Includes strongly-typed pixel formats in the pixel_format module (e.g. RGB8 and Mono8) to ensure correct API use.

Additionally several traits are defined to describe image data:

  • ImageData defines the basics, such as image dimensions and the data buffer.
  • ImageMutData is implemented for images with mutable data.
  • Stride is implemented for images with strided data (i.e. each image row is encoded with exactly the same number of bytes, which may including padding).

This crate is used extensively in Strand Camera.

Potential further improvements

The list of pixel formats variants is currently limited rather limited. Please submit an issue or, better, pull request for any additions needed.

We could also address the question of how endian-ness and packed-ness are handled. Currently, these are not specified.

See also

Test compilation with all feature variants

cargo build
cargo +nightly build --no-default-features --features "alloc"
cargo +nightly build --no-default-features

Code of conduct

Anyone who interacts with this software in any space, including but not limited to this GitHub repository, must follow our code of conduct.

License

Licensed under either of these:

No runtime deps

Features