1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge pull request #21369 from UnaNancyOwen:fix_uwp

Fix support objdetect module for UWP

* Fix support objdetect module for UWP

* Fix define module for objdetect

* Remove conditional compilation from public headers

* Add StsNotImplemented for FaceDetectorYN/FaceRecognizerSF

* Fix typo error message

* Fix error message

* coding style, eliminate warnings
This commit is contained in:
Tsukasa Sugiura
2022-01-19 00:47:36 +09:00
committed by GitHub
parent 7f6dcc2745
commit ed6ca0d7fa
3 changed files with 31 additions and 1 deletions
+10
View File
@@ -4,13 +4,17 @@
#include "precomp.hpp"
#include "opencv2/core.hpp"
#ifdef HAVE_OPENCV_DNN
#include "opencv2/dnn.hpp"
#endif
#include <algorithm>
namespace cv
{
#ifdef HAVE_OPENCV_DNN
class FaceRecognizerSFImpl : public FaceRecognizerSF
{
public:
@@ -173,10 +177,16 @@ private:
private:
dnn::Net net;
};
#endif
Ptr<FaceRecognizerSF> FaceRecognizerSF::create(const String& model, const String& config, int backend_id, int target_id)
{
#ifdef HAVE_OPENCV_DNN
return makePtr<FaceRecognizerSFImpl>(model, config, backend_id, target_id);
#else
CV_UNUSED(model); CV_UNUSED(config); CV_UNUSED(backend_id); CV_UNUSED(target_id);
CV_Error(cv::Error::StsNotImplemented, "cv::FaceRecognizerSF requires enabled 'dnn' module");
#endif
}
} // namespace cv