diff --git a/3rdparty/libjpeg/CMakeLists.txt b/3rdparty/libjpeg/CMakeLists.txt index c0524cc38..69a71e416 100644 --- a/3rdparty/libjpeg/CMakeLists.txt +++ b/3rdparty/libjpeg/CMakeLists.txt @@ -27,7 +27,6 @@ endif() ocv_warnings_disable(CMAKE_C_FLAGS -Wcast-align -Wshadow -Wunused -Wshift-negative-value -Wimplicit-fallthrough) ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-parameter) # clang -ocv_warnings_disable(CMAKE_C_FLAGS /wd4013 /wd4244 /wd4267) # vs2005 set_target_properties(${JPEG_LIBRARY} PROPERTIES OUTPUT_NAME ${JPEG_LIBRARY} diff --git a/3rdparty/zlib/CMakeLists.txt b/3rdparty/zlib/CMakeLists.txt index 9758861a6..9e654ba92 100644 --- a/3rdparty/zlib/CMakeLists.txt +++ b/3rdparty/zlib/CMakeLists.txt @@ -81,7 +81,6 @@ set_target_properties(${ZLIB_LIBRARY} PROPERTIES DEFINE_SYMBOL ZLIB_DLL) ocv_warnings_disable(CMAKE_C_FLAGS -Wshorten-64-to-32 -Wattributes -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wshift-negative-value -Wundef # _LFS64_LARGEFILE is not defined - /wd4267 # MSVS 2015 (x64) + zlib 1.2.11 -Wimplicit-fallthrough ) diff --git a/CMakeLists.txt b/CMakeLists.txt index d95e5db16..db185453d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -617,11 +617,6 @@ endif() ocv_cmake_hook(POST_CMAKE_BUILD_OPTIONS) -# --- Python Support --- -if(NOT IOS) - include(cmake/OpenCVDetectPython.cmake) -endif() - include(cmake/OpenCVCompilerOptions.cmake) ocv_cmake_hook(POST_COMPILER_OPTIONS) diff --git a/cmake/OpenCVDetectCXXCompiler.cmake b/cmake/OpenCVDetectCXXCompiler.cmake index 7f229cde9..92e204a5b 100644 --- a/cmake/OpenCVDetectCXXCompiler.cmake +++ b/cmake/OpenCVDetectCXXCompiler.cmake @@ -171,7 +171,7 @@ elseif(MSVC) set(OpenCV_RUNTIME vc15) elseif(MSVC_VERSION MATCHES "^192[0-9]$") set(OpenCV_RUNTIME vc16) - elseif(MSVC_VERSION MATCHES "^193[0-9]$") + elseif(MSVC_VERSION MATCHES "^19[34][0-9]$") set(OpenCV_RUNTIME vc17) else() message(WARNING "OpenCV does not recognize MSVC_VERSION \"${MSVC_VERSION}\". Cannot set OpenCV_RUNTIME") diff --git a/modules/core/include/opencv2/core/ocl.hpp b/modules/core/include/opencv2/core/ocl.hpp index 4503fa00d..642b0508d 100644 --- a/modules/core/include/opencv2/core/ocl.hpp +++ b/modules/core/include/opencv2/core/ocl.hpp @@ -302,21 +302,6 @@ public: void release(); - class CV_EXPORTS UserContext { - public: - virtual ~UserContext(); - }; - template - inline void setUserContext(const std::shared_ptr& userContext) { - setUserContext(typeid(T), userContext); - } - template - inline std::shared_ptr getUserContext() { - return std::dynamic_pointer_cast(getUserContext(typeid(T))); - } - void setUserContext(std::type_index typeId, const std::shared_ptr& userContext); - std::shared_ptr getUserContext(std::type_index typeId); - struct Impl; inline Impl* getImpl() const { return (Impl*)p; } inline bool empty() const { return !p; } diff --git a/modules/core/src/ocl_disabled.impl.hpp b/modules/core/src/ocl_disabled.impl.hpp index a217979a1..0ba30d024 100644 --- a/modules/core/src/ocl_disabled.impl.hpp +++ b/modules/core/src/ocl_disabled.impl.hpp @@ -177,11 +177,6 @@ void* Context::getOpenCLContextProperty(int /*propertyId*/) const { OCL_NOT_AVAI bool Context::useSVM() const { return false; } void Context::setUseSVM(bool enabled) { } -Context::UserContext::~UserContext() { } - -void Context::setUserContext(std::type_index /*typeId*/, const std::shared_ptr& /*userContext*/) { OCL_NOT_AVAILABLE(); } -std::shared_ptr Context::getUserContext(std::type_index /*typeId*/) { OCL_NOT_AVAILABLE(); } - /* static */ Context Context::fromHandle(void* context) { OCL_NOT_AVAILABLE(); } /* static */ Context Context::fromDevice(const ocl::Device& device) { OCL_NOT_AVAILABLE(); } /* static */ Context Context::create(const std::string& configuration) { OCL_NOT_AVAILABLE(); } diff --git a/modules/imgcodecs/src/macosx_conversions.mm b/modules/imgcodecs/src/macosx_conversions.mm index 0023e06260..8a4bc0b211 100644 --- a/modules/imgcodecs/src/macosx_conversions.mm +++ b/modules/imgcodecs/src/macosx_conversions.mm @@ -9,6 +9,7 @@ CV_EXPORTS NSImage* MatToNSImage(const cv::Mat& image); CV_EXPORTS void NSImageToMat(const NSImage* image, cv::Mat& m, bool alphaExist); NSImage* MatToNSImage(const cv::Mat& image) { +#if !NSIMAGE_UNAVAILABLE_MACCATALYST // Creating CGImage from cv::Mat CGImageRef imageRef = MatToCGImage(image); @@ -17,9 +18,22 @@ NSImage* MatToNSImage(const cv::Mat& image) { CGImageRelease(imageRef); return nsImage; +#else + @throw [NSException + exceptionWithName:@"NSGenericException" + reason:@"NSImage is not supported on Mac Catalyst" + userInfo:nil]; +#endif } void NSImageToMat(const NSImage* image, cv::Mat& m, bool alphaExist) { +#if !NSIMAGE_UNAVAILABLE_MACCATALYST CGImageRef imageRef = [image CGImageForProposedRect:NULL context:NULL hints:NULL]; CGImageToMat(imageRef, m, alphaExist); +#else + @throw [NSException + exceptionWithName:@"NSGenericException" + reason:@"NSImage is not supported on Mac Catalyst" + userInfo:nil]; +#endif } diff --git a/samples/dnn/dnn_model_runner/dnn_conversion/requirements.txt b/samples/dnn/dnn_model_runner/dnn_conversion/requirements.txt deleted file mode 100644 index 6887c2ab2..000000000 --- a/samples/dnn/dnn_model_runner/dnn_conversion/requirements.txt +++ /dev/null @@ -1,15 +0,0 @@ -# Python 3.7.5 -onnx>=1.7.0 -numpy>=1.19.1 - -torch>=1.5.1 -torchvision>=0.6.1 - -tensorflow>=2.1.0 -tensorflow-gpu>=2.1.0 - -paddlepaddle>=2.0.0 -paddlepaddle-gpu>=2.0.0 -paddlehub>=2.1.0 -paddle2onnx>=0.5.1 -paddleseg>=2.0.0 \ No newline at end of file