I’m working on a project that involves Video Processing on a GPU. I can get OpenCV aspects of my code to work in one file, and CUDA aspects of my code to work in another file. But for some reason, when I combine both pieces together (I’m doing a simple test program in which they do not interact) I get the following errors:
function “cv::Mat_<Tp>::t" returns incomplete type "cv::MatExpr<cv::MatExpr_Op2_<cv::Mat, double, cv::Mat, cv::MatOp_T_cv::Mat>, cv::Mat>”
This error occurs in: cxmat.hpp at line 730
no suitable user-defined conversion from “cv::MatExpr_<cv::MatExpr_Op3_<cv::Mat, cv::Scalar, int, cv::Mat, cv::MatOp_Bin_cv::Mat>, cv::Mat>” to “cv::MatExpr_<cv::MatExpr_Op3_<cv::Mat, cv::Scalar, int, cv::Mat, cv::MatOp_BinS_cv::Mat>, cv::Mat>” exists
This error occurs in: cxmat.hpp at line 2978
error PRJ0019: A tool returned an error code from “Performing Custom Build Step”
I also had another error in cxoperations.hpp that I was able to resolve by changing “r = Range(0, d.size());” to “const_castcv::Range&( r ) = Range(0, d.size());” (I found this fix in another thread on these forums)
I’m completely lost and these errors seem to stem from header files and not directly from my code. Furthermore, if I comment out all of the OpenCV portions of my code, I still get these errors when I keep the highgui.h and cv.h header files.
Any help/guidance would be much appreciated. I realize this may be more of an OpenCV concern than a CUDA one, but I’m not certain of that and it might just be a question that can be solved by someone who has a very deep understanding of C++.