1#![deny(unsafe_op_in_unsafe_fn)]
7#![warn(missing_docs)]
8
9pub mod error;
10pub mod mat;
11pub mod point;
12pub mod rect;
13pub mod size;
14pub mod scalar;
15pub mod range;
16pub mod types;
17pub mod memory;
18pub mod traits;
19
20pub use error::{Error, Result};
21pub use mat::{Mat, MatTrait, MatType};
22pub use point::{Point, Point2f, Point2d, Point3f, Point3d};
23pub use rect::{Rect, Rect2f, Rect2d};
24pub use size::{Size, Size2f, Size2d};
25pub use scalar::{Scalar, VecN};
26pub use range::Range;
27pub use types::*;
28
29pub const OPENCV_VERSION: &str = "4.8.0";
31
32pub fn init() -> Result<()> {
34 log::info!("Initializing OpenCV Core module v{}", OPENCV_VERSION);
35 memory::init_allocators()?;
36 Ok(())
37}
38
39#[cfg(test)]
40mod tests {
41 use super::*;
42
43 #[test]
44 fn test_init() {
45 assert!(init().is_ok());
46 }
47
48 #[test]
49 fn test_version() {
50 assert_eq!(OPENCV_VERSION, "4.8.0");
51 }
52}