bool initModule_contrib()
{
- Ptr<Algorithm> efaces = createEigenfaces_hidden(), ffaces = createFisherfaces_hidden(), lbph = createLBPH_hidden();
+ Ptr<Algorithm> efaces = createEigenfaces_ptr_hidden(), ffaces = createFisherfaces_ptr_hidden(), lbph = createLBPH_ptr_hidden();
return efaces->info() != 0 && ffaces->info() != 0 && lbph->info() != 0;
}
} //namespace cv
#define CV_INIT_ALGORITHM(classname, algname, memberinit) \
- static ::cv::Algorithm* create##classname##_hidden() \
+ static inline ::cv::Algorithm* create##classname##_hidden() \
{ \
return new classname; \
} \
\
- static ::cv::AlgorithmInfo& classname##_info() \
+ static inline ::cv::Ptr< ::cv::Algorithm> create##classname##_ptr_hidden() \
+ { \
+ return ::cv::makePtr<classname>(); \
+ } \
+ \
+ static inline ::cv::AlgorithmInfo& classname##_info() \
{ \
static ::cv::AlgorithmInfo classname##_info_var(algname, create##classname##_hidden); \
return classname##_info_var; \
bool initModule_ml(void)
{
- Ptr<Algorithm> em = createEM_hidden();
+ Ptr<Algorithm> em = createEM_ptr_hidden();
return em->info() != 0;
}
bool initModule_nonfree(void)
{
- Ptr<Algorithm> sift = createSIFT_hidden(), surf = createSURF_hidden();
+ Ptr<Algorithm> sift = createSIFT_ptr_hidden(), surf = createSURF_ptr_hidden();
return sift->info() != 0 && surf->info() != 0;
}
bool initModule_softcascade(void)
{
- Ptr<Algorithm> sc = createSCascade_hidden();
- Ptr<Algorithm> sc1 = createDetector_hidden();
+ Ptr<Algorithm> sc = createSCascade_ptr_hidden();
+ Ptr<Algorithm> sc1 = createDetector_ptr_hidden();
return (sc1->info() != 0) && (sc->info() != 0);
}