Browse Source

Fix compilation without wechat_qrcode on Mac OS.

pull/461/head
Canming Huang 4 years ago
parent
commit
06f3e2a655
  1. 12
      Emgu.CV.Extern/wechat_qrcode/wechat_qrcode_c.cpp

12
Emgu.CV.Extern/wechat_qrcode/wechat_qrcode_c.cpp

@ -11,7 +11,7 @@ cv::wechat_qrcode::WeChatQRCode* cveWeChatQRCodeCreate(
cv::String* superResolutionPrototxtPath,
cv::String* superResolutionCaffeModelPath)
{
#if HAVE_OPENCV_WECHAT_QRCODE
#ifdef HAVE_OPENCV_WECHAT_QRCODE
return new cv::wechat_qrcode::WeChatQRCode(
*detectorPrototxtPath,
*detectorCaffeModelPath,
@ -19,17 +19,17 @@ cv::wechat_qrcode::WeChatQRCode* cveWeChatQRCodeCreate(
*superResolutionCaffeModelPath);
#else
throw_no_wechat_qrcode();
#endif;
#endif
}
void cveWeChatQRCodeRelease(cv::wechat_qrcode::WeChatQRCode** detector)
{
#if HAVE_OPENCV_WECHAT_QRCODE
#ifdef HAVE_OPENCV_WECHAT_QRCODE
delete* detector;
*detector = 0;
#else
throw_no_wechat_qrcode();
#endif;
#endif
}
void cveWeChatQRCodeDetectAndDecode(
@ -38,7 +38,7 @@ void cveWeChatQRCodeDetectAndDecode(
cv::_OutputArray* points,
std::vector<std::string>* results)
{
#if HAVE_OPENCV_WECHAT_QRCODE
#ifdef HAVE_OPENCV_WECHAT_QRCODE
std::vector<std::string> r = detector->detectAndDecode(*img, *points);
results->clear();
for (std::vector<std::string>::iterator it = r.begin(); it != r.end(); it++)
@ -47,5 +47,5 @@ void cveWeChatQRCodeDetectAndDecode(
}
#else
throw_no_wechat_qrcode();
#endif;
#endif
}
Loading…
Cancel
Save