opencv 0.46.2

Rust bindings for OpenCV
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use opencv::{
	Result,
	core,
};

#[test]
fn convert_type_str() -> Result<()> {
	if core::have_opencl()? {
		// this function writes to buf argument and returns it
		let mut test = "test".to_string();
		assert_eq!("noconvert", core::convert_type_str(1, 1, 1, &mut test)?);
		assert_eq!("", test);
		assert_eq!("convert_ushort_sat", core::convert_type_str(1, 2, 1, &mut test)?);
		assert_eq!("convert_ushort_sat", test);
	}
	Ok(())
}