Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

Could OpenCV return a matrix for a function?

$
0
0
Is a really simple question, but I need the answer. Image this code #include "opencv2/opencv.hpp" #include #include #include // for controlling float print precision #include // string to number conversion using namespace cv; using namespace std; int main() { //I load two diferents frames for a video ..... Mat error ,m1,m2; Mat m1 = frame1; Mat m2 = frame2; error = Mat matrix_error(m1,m2); imshow("",error); waitKey(0); } In functions.h #ifndef FUNCTIONS_H_ #define FUNCTIONS_H_ #include "opencv2/opencv.hpp" #include #include #include // for controlling float print precision #include using namespace cv; using namespace std; Mat matrix_error (const Mat& F1, const Mat& F2); #endif /* FUNCTIONS_H_ */ functions.cpp Mat matrix_error (const Mat& F1, const Mat& F2) { Mat s1; absdiff(F1, F2, s1); return s1; } The error ls Description "‘matrix_error’ was not declared in this scope". I know that im doing a really stupid mistake, but IDK where. If someone could help me I will appreciate. Thanks.

Viewing all articles
Browse latest Browse all 41027

Trending Articles