We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I don't know how to use this library.
use opencv::{core, highgui, imgcodecs, imgproc, prelude::*}; fn main() { let s = imgcodecs::imread("~/Downloads/s.jpg", imgcodecs::IMREAD_COLOR).unwrap(); let t = imgcodecs::imread("~/Downloads/t.jpg", imgcodecs::IMREAD_COLOR).unwrap(); let mask = imgcodecs::imread("", imgcodecs::IMREAD_GRAYSCALE).unwrap(); let zero = Mat::zeros( s.rows() - t.rows() + 1, s.cols() - t.cols() + 1, core::CV_32FC1, ) .unwrap(); let mut result = zero.to_mat().unwrap(); imgproc::match_template(&s, &t, &result, imgproc::TM_CCORR_NORMED, &mask); }
The version of opencv is 0.36 As shown above.
How do I modify it to make it work?
The text was updated successfully, but these errors were encountered:
You need to pass mutable reference because it's an output argument:
&mut result
Sorry, something went wrong.
Thanks, I got it.
No branches or pull requests
I don't know how to use this library.
The version of opencv is 0.36

As shown above.
How do I modify it to make it work?
The text was updated successfully, but these errors were encountered: