The static CascadeClassifier cascadeClassier;
Void faceDetect (Mat img, CascadeClassifier& Cascade, double scale, bool tryflip)
{... }
Void main {
Mat faceImage;
thread thread (faceDetect faceImage, cascadeClassier, 1.0, true);
T.d etach ();
}
Display an error
In the file included the from/usr/include/c + +/4.8/thread: 39:0,
The from SRC/QYFaceDetect. CPP: 7:
The/usr/include/c + +/4.8/functional: In instantiation of 'struct STD: : _Bind_simple & lt; Void (* (CV: : Mat, CV: : CascadeClassifier, double, Boolean)) (CV: : Mat, CV: : CascadeClassifier& , double, Boolean) & gt; ':
The/usr/include/c + +/4.8/thread: 137-47: required from 'STD: : thread: : thread (_Callable & amp; & , _Args & amp; & . ) [with _Callable=void (& amp;) (CV: : Mat, CV: : CascadeClassifier&, double, Boolean); _Args={CV: : Mat&, CV: : CascadeClassifier&, double, Boolean}] '
SRC/QYFaceDetect. CPP: 390-90: the required from here
The/usr/include/c + +/4.8/functional: 1697:61: error: no type named 'type' in 'class STD: : result_of & lt; Void (* (CV: : Mat, CV: : CascadeClassifier, double, Boolean)) (CV: : Mat, CV: : CascadeClassifier& , double, Boolean) & gt; '
Typedef typename result_of & lt; _Callable (_Args... ) & gt; : : type result_type;
^
The/usr/include/c + +/4.8/functional: 1727-9: error: no type named 'type' in 'class STD: : result_of & lt; Void (* (CV: : Mat, CV: : CascadeClassifier, double, Boolean)) (CV: : Mat, CV: : CascadeClassifier& , double, Boolean) & gt; '
_M_invoke (_Index_tuple & lt; _Indices...>)
^
Make: * * * [QYFaceDetect. O] Error 1
I this parameter in strict accordance with the function to, why will appear this problem, please answer,
CodePudding user response:
Cascade with refCodePudding user response: