Skip to content

Commit 1357b78

Browse files
committed
Fixed the rustdoc examples
1 parent 6263065 commit 1357b78

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ let ecc_match_img:opencv::core::Mat = ecc_match(
7878
* ~~Figure out what to do with `.reshape()` in `keypoint_match()`~~ fixed?
7979
* ~~Figure out some opencv parameters~~ responsibility sneakily shifted to end user.
8080
* ~~Complete the `sharpness_tenengrad()` function. Mat not square?~~
81-
* (optionally) Reduce resolution before doing orb/ecc matching,
81+
* ~~(optionally) Reduce resolution before doing orb/ecc matching,~~
8282
* options in the example
8383

8484
## License

src/utils.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ impl SetMValue for Mat {
5050
#[inline]
5151
/// ```
5252
/// # use libstacker::{prelude::*, opencv::prelude::* ,opencv::prelude::MatTraitConst};
53+
/// # use crate::libstacker::utils::SetMValue;
5354
/// let mut m = unsafe { opencv::core::Mat::new_rows_cols(1, 3, opencv::core::CV_64FC1).unwrap() };
5455
/// m.set_2d::<f64>(0, 0, -1.0).unwrap();
5556
/// m.set_2d::<f64>(0, 1, -2.0).unwrap();
@@ -111,11 +112,13 @@ impl From<opencv::Error> for StackerError {
111112
/// ```no_run
112113
/// # use libstacker::{utils::imread, prelude::*, opencv::prelude::*, opencv::imgcodecs };
113114
/// # use std::path::Path;
115+
/// # fn a() -> Result<(),StackerError> {
114116
/// let img = imread("image.jpg", imgcodecs::IMREAD_GRAYSCALE)?;
115117
/// match imread(Path::new("image.png"), imgcodecs::IMREAD_COLOR) {
116-
/// Ok(mat) => /* process image */,
117-
/// Err(_) => /* handle opencv error */,
118+
/// Ok(mat) => /* process image */(),
119+
/// Err(_) => /* handle opencv error */(),
118120
/// }
121+
/// # Ok(()) }
119122
/// ```
120123
#[inline(always)]
121124
pub fn imread<P: AsRef<std::path::Path>>(path: P, flags: i32) -> Result<Mat, StackerError> {

0 commit comments

Comments
 (0)