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.
PixelFormat
enum with variantsRGB8
,MONO8
,YUV444
,YUV422
,BayerRGGB8
, and so on.- The
PixelFormat
enum implements theFromStr
andDisplay
traits, and it provides thebits_per_pixel
method. ImageData
trait definition giving a common interface for image data.Stride
trait definition for strided image data.- Defines compound traits
OwnedImage
andOwnedImageStride
which implementInto<Vec<u8>>
, allowing to move image data into a rawVec<u8>
. - Can be compiled without standard library support (
no_std
).
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.
cargo build
cargo +nightly build --no-default-features --features "alloc"
cargo +nightly build --no-default-features