Либо я делаю что-то очень неправильное, либо есть проблема с cv :: max.
Я называю это наиболее очевидным способом:
#include<iostream>
#include<opencv2/opencv.hpp>
int main() {
cv::Mat t1 = cv::Mat::zeros(cv::Size(3,3), CV_8UC1);
cv::Mat t2 = cv::Mat::zeros(cv::Size(3,3), CV_8UC1);
cv::Mat t3;
cv::max(t1,t2,&t3);
return 0;
}
и получение:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:500:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view:176:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__string:56:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:2627:12: error:
called object type 'cv::Mat *' is not a function or function pointer
return __comp(__a, __b) ? __b : __a;
^~~~~~
В настоящее время используется OSX Mojave, AppleClang 10. OpenCV4.1.0.
Я попробую на другой настройке в ближайшее время.