Skip to content

Commit

Permalink
update 3.4.20 and 4.8.0 and some ci fix and highgui fix (#53)
Browse files Browse the repository at this point in the history
* update 3.4.20 patch

* update 4.8.0 patch

* update toolchain and ci

* split ios simulator

* fix wasm simd build

* enable cxx11 for opencv2

* workaround for macos build

* workaround for ios build

* do not convert RGB/BGR inplace on imencode/imwrite

* Update stb_image.h

* enable stbi neon

* Update highgui.cpp

* mac catalyst

* add test project

* opencv2 link openmp

* opencv 2.4.13.7 on newer msvc

* enable c++11 test

* test all packages
  • Loading branch information
nihui authored Aug 14, 2023
1 parent 1b825e7 commit fc1635b
Show file tree
Hide file tree
Showing 21 changed files with 3,650 additions and 1,464 deletions.
3,173 changes: 2,287 additions & 886 deletions .github/workflows/release.yml

Large diffs are not rendered by default.

228 changes: 122 additions & 106 deletions README.md

Large diffs are not rendered by default.

19 changes: 15 additions & 4 deletions highgui/src/highgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
#include "exif.hpp"

#define STB_IMAGE_IMPLEMENTATION
#if __ARM_NEON
#define STBI_NEON
#endif
#define STBI_NO_THREAD_LOCALS
#define STBI_ONLY_JPEG
#define STBI_ONLY_PNG
Expand Down Expand Up @@ -201,12 +204,16 @@ bool imwrite(const String& filename, InputArray _img, const std::vector<int>& pa
else if (img.type() == CV_8UC3)
{
c = 3;
cvtColor(img, img, COLOR_BGR2RGB);
Mat img2;
cvtColor(img, img2, COLOR_BGR2RGB);
img = img2;
}
else if (img.type() == CV_8UC4)
{
c = 4;
cvtColor(img, img, COLOR_BGRA2RGBA);
Mat img2;
cvtColor(img, img2, COLOR_BGRA2RGBA);
img = img2;
}
else
{
Expand Down Expand Up @@ -368,12 +375,16 @@ bool imencode(const String& ext, InputArray _img, std::vector<uchar>& buf, const
else if (img.type() == CV_8UC3)
{
c = 3;
cvtColor(img, img, COLOR_BGR2RGB);
Mat img2;
cvtColor(img, img2, COLOR_BGR2RGB);
img = img2;
}
else if (img.type() == CV_8UC4)
{
c = 4;
cvtColor(img, img, COLOR_BGRA2RGBA);
Mat img2;
cvtColor(img, img2, COLOR_BGRA2RGBA);
img = img2;
}
else
{
Expand Down
144 changes: 117 additions & 27 deletions highgui/src/stb_image.h

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions opencv-2.4.13.7-enable-cxx11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff -Nuarp opencv-2.4.13.7.orig/cmake/OpenCVDetectCXXCompiler.cmake opencv-2.4.13.7/cmake/OpenCVDetectCXXCompiler.cmake
--- opencv-2.4.13.7.orig/cmake/OpenCVDetectCXXCompiler.cmake 2018-07-02 20:41:56.000000000 +0800
+++ opencv-2.4.13.7/cmake/OpenCVDetectCXXCompiler.cmake 2023-08-06 19:27:16.226755305 +0800
@@ -114,3 +114,7 @@ elseif(MINGW)
set(OpenCV_ARCH x86)
endif()
endif()
+
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
+set(CMAKE_CXX_EXTENSIONS OFF)
16 changes: 16 additions & 0 deletions opencv-2.4.13.7-link-openmp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff -Nuarp opencv-2.4.13.7.orig/modules/core/CMakeLists.txt opencv-2.4.13.7/modules/core/CMakeLists.txt
--- opencv-2.4.13.7.orig/modules/core/CMakeLists.txt 2018-07-02 20:41:56.000000000 +0800
+++ opencv-2.4.13.7/modules/core/CMakeLists.txt 2023-08-13 19:26:51.073833956 +0800
@@ -52,7 +52,11 @@ else()
HEADERS ${lib_cuda_hdrs} ${lib_cuda_hdrs_detail})
endif()

-ocv_create_module()
+if(HAVE_OPENMP AND DEFINED OpenMP_CXX_LIBRARIES AND OpenMP_CXX_LIBRARIES)
+ ocv_create_module(${OpenMP_CXX_LIBRARIES})
+else()
+ ocv_create_module()
+endif()
ocv_add_precompiled_headers(${the_module})

ocv_add_accuracy_tests()
28 changes: 28 additions & 0 deletions opencv-2.4.13.7-newer-msvc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff -Nuarp opencv-2.4.13.7.orig/cmake/OpenCVConfig.cmake opencv-2.4.13.7/cmake/OpenCVConfig.cmake
--- opencv-2.4.13.7.orig/cmake/OpenCVConfig.cmake 2018-07-02 20:41:56.000000000 +0800
+++ opencv-2.4.13.7/cmake/OpenCVConfig.cmake 2023-08-13 22:11:10.193931771 +0800
@@ -85,6 +85,10 @@ elseif(MSVC)
set(OpenCV_RUNTIME vc14)
elseif(MSVC_VERSION MATCHES "^191[0-9]$")
set(OpenCV_RUNTIME vc15)
+ elseif(MSVC_VERSION MATCHES "^192[0-9]$")
+ set(OpenCV_RUNTIME vc16)
+ elseif(MSVC_VERSION MATCHES "^193[0-9]$")
+ set(OpenCV_RUNTIME vc17)
endif()
elseif(MINGW)
set(OpenCV_RUNTIME mingw)
diff -Nuarp opencv-2.4.13.7.orig/cmake/OpenCVDetectCXXCompiler.cmake opencv-2.4.13.7/cmake/OpenCVDetectCXXCompiler.cmake
--- opencv-2.4.13.7.orig/cmake/OpenCVDetectCXXCompiler.cmake 2018-07-02 20:41:56.000000000 +0800
+++ opencv-2.4.13.7/cmake/OpenCVDetectCXXCompiler.cmake 2023-08-13 22:11:03.358965110 +0800
@@ -104,6 +104,10 @@ elseif(MSVC)
set(OpenCV_RUNTIME vc14)
elseif(MSVC_VERSION MATCHES "^191[0-9]$")
set(OpenCV_RUNTIME vc15)
+ elseif(MSVC_VERSION MATCHES "^192[0-9]$")
+ set(OpenCV_RUNTIME vc16)
+ elseif(MSVC_VERSION MATCHES "^193[0-9]$")
+ set(OpenCV_RUNTIME vc17)
endif()
elseif(MINGW)
set(OpenCV_RUNTIME mingw)
12 changes: 0 additions & 12 deletions opencv-3.4.18-no-zlib.patch

This file was deleted.

11 changes: 11 additions & 0 deletions opencv-3.4.20-fix-emscripten-include.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff -Nuarp opencv-3.4.20.orig/modules/core/include/opencv2/core/hal/intrin_wasm.hpp opencv-3.4.20/modules/core/include/opencv2/core/hal/intrin_wasm.hpp
--- opencv-3.4.20.orig/modules/core/include/opencv2/core/hal/intrin_wasm.hpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/include/opencv2/core/hal/intrin_wasm.hpp 2023-08-06 19:09:44.971191540 +0800
@@ -8,6 +8,7 @@
#include <limits>
#include <cstring>
#include <algorithm>
+#include <emscripten/version.h>
#include "opencv2/core/saturate.hpp"

#define CV_SIMD128 1
14 changes: 14 additions & 0 deletions opencv-3.4.20-link-openmp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff -Nuarp opencv-3.4.20.orig/modules/core/CMakeLists.txt opencv-3.4.20/modules/core/CMakeLists.txt
--- opencv-3.4.20.orig/modules/core/CMakeLists.txt 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/CMakeLists.txt 2023-08-13 19:39:56.659037366 +0800
@@ -31,6 +31,10 @@ if(HAVE_TBB)
list(APPEND extra_libs tbb)
endif()

+if(HAVE_OPENMP AND DEFINED OpenMP_CXX_LIBRARIES AND OpenMP_CXX_LIBRARIES)
+ list(APPEND extra_libs ${OpenMP_CXX_LIBRARIES})
+endif()
+
if(DEFINED WINRT AND NOT DEFINED ENABLE_WINRT_MODE_NATIVE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW")
endif()
90 changes: 45 additions & 45 deletions opencv-3.4.18-no-rtti.patch → opencv-3.4.20-no-rtti.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -Nuarp opencv-3.4.18.orig/modules/core/include/opencv2/core/bindings_utils.hpp opencv-3.4.18/modules/core/include/opencv2/core/bindings_utils.hpp
--- opencv-3.4.18.orig/modules/core/include/opencv2/core/bindings_utils.hpp 2022-06-05 00:52:44.000000000 +0800
+++ opencv-3.4.18/modules/core/include/opencv2/core/bindings_utils.hpp 2022-11-16 17:32:38.096053227 +0800
diff -Nuarp opencv-3.4.20.orig/modules/core/include/opencv2/core/bindings_utils.hpp opencv-3.4.20/modules/core/include/opencv2/core/bindings_utils.hpp
--- opencv-3.4.20.orig/modules/core/include/opencv2/core/bindings_utils.hpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/include/opencv2/core/bindings_utils.hpp 2023-08-06 11:05:19.958163689 +0800
@@ -185,12 +185,6 @@ void generateVectorOfMat(size_t len, int
}

Expand Down Expand Up @@ -29,9 +29,9 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/include/opencv2/core/bindings_utils.
return p.getArrayResult();
}

diff -Nuarp opencv-3.4.18.orig/modules/core/src/async.cpp opencv-3.4.18/modules/core/src/async.cpp
--- opencv-3.4.18.orig/modules/core/src/async.cpp 2022-06-05 00:52:44.000000000 +0800
+++ opencv-3.4.18/modules/core/src/async.cpp 2022-11-16 17:32:38.097053227 +0800
diff -Nuarp opencv-3.4.20.orig/modules/core/src/async.cpp opencv-3.4.20/modules/core/src/async.cpp
--- opencv-3.4.20.orig/modules/core/src/async.cpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/src/async.cpp 2023-08-06 11:05:19.958163689 +0800
@@ -118,7 +118,6 @@ struct AsyncArray::Impl
if (has_exception)
{
Expand All @@ -40,9 +40,9 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/src/async.cpp opencv-3.4.18/modules/
}
CV_Error(Error::StsInternal, "AsyncArray: invalid state of 'has_result = true'");
}
diff -Nuarp opencv-3.4.18.orig/modules/core/src/bindings_utils.cpp opencv-3.4.18/modules/core/src/bindings_utils.cpp
--- opencv-3.4.18.orig/modules/core/src/bindings_utils.cpp 2022-06-05 00:52:44.000000000 +0800
+++ opencv-3.4.18/modules/core/src/bindings_utils.cpp 2022-11-16 17:32:38.098053227 +0800
diff -Nuarp opencv-3.4.20.orig/modules/core/src/bindings_utils.cpp opencv-3.4.20/modules/core/src/bindings_utils.cpp
--- opencv-3.4.20.orig/modules/core/src/bindings_utils.cpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/src/bindings_utils.cpp 2023-08-06 11:05:19.958163689 +0800
@@ -15,7 +15,7 @@ String dumpInputArray(InputArray argumen
return "InputArray: noArray()";
std::ostringstream ss;
Expand Down Expand Up @@ -123,9 +123,9 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/src/bindings_utils.cpp opencv-3.4.18
return ss.str();
}

diff -Nuarp opencv-3.4.18.orig/modules/core/src/command_line_parser.cpp opencv-3.4.18/modules/core/src/command_line_parser.cpp
--- opencv-3.4.18.orig/modules/core/src/command_line_parser.cpp 2022-06-05 00:52:44.000000000 +0800
+++ opencv-3.4.18/modules/core/src/command_line_parser.cpp 2022-11-16 17:32:38.099053227 +0800
diff -Nuarp opencv-3.4.20.orig/modules/core/src/command_line_parser.cpp opencv-3.4.20/modules/core/src/command_line_parser.cpp
--- opencv-3.4.20.orig/modules/core/src/command_line_parser.cpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/src/command_line_parser.cpp 2023-08-06 11:05:19.958163689 +0800
@@ -124,7 +124,6 @@ static void from_str(const String& str,

void CommandLineParser::getByName(const String& name, bool space_delete, int type, void* dst) const
Expand Down Expand Up @@ -222,9 +222,9 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/src/command_line_parser.cpp opencv-3
}

return vec;
diff -Nuarp opencv-3.4.18.orig/modules/core/src/glob.cpp opencv-3.4.18/modules/core/src/glob.cpp
--- opencv-3.4.18.orig/modules/core/src/glob.cpp 2022-06-05 00:52:44.000000000 +0800
+++ opencv-3.4.18/modules/core/src/glob.cpp 2022-11-16 17:32:38.099053227 +0800
diff -Nuarp opencv-3.4.20.orig/modules/core/src/glob.cpp opencv-3.4.20/modules/core/src/glob.cpp
--- opencv-3.4.20.orig/modules/core/src/glob.cpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/src/glob.cpp 2023-08-06 11:05:19.958163689 +0800
@@ -231,7 +231,6 @@ static void glob_rec(const cv::String& d
if ((dir = opendir (directory.c_str())) != 0)
{
Expand All @@ -245,9 +245,9 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/src/glob.cpp opencv-3.4.18/modules/c
closedir(dir);
}
else
diff -Nuarp opencv-3.4.18.orig/modules/core/src/matrix.cpp opencv-3.4.18/modules/core/src/matrix.cpp
--- opencv-3.4.18.orig/modules/core/src/matrix.cpp 2022-06-05 00:52:44.000000000 +0800
+++ opencv-3.4.18/modules/core/src/matrix.cpp 2022-11-16 17:32:38.100053227 +0800
diff -Nuarp opencv-3.4.20.orig/modules/core/src/matrix.cpp opencv-3.4.20/modules/core/src/matrix.cpp
--- opencv-3.4.20.orig/modules/core/src/matrix.cpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/src/matrix.cpp 2023-08-06 11:05:19.958163689 +0800
@@ -640,18 +640,10 @@ void Mat::create(int d, const int* _size
#endif
if(!a)
Expand Down Expand Up @@ -287,10 +287,10 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/src/matrix.cpp opencv-3.4.18/modules

updateContinuityFlag();

diff -Nuarp opencv-3.4.18.orig/modules/core/src/parallel.cpp opencv-3.4.18/modules/core/src/parallel.cpp
--- opencv-3.4.18.orig/modules/core/src/parallel.cpp 2022-06-05 00:52:44.000000000 +0800
+++ opencv-3.4.18/modules/core/src/parallel.cpp 2022-11-16 17:32:38.101053227 +0800
@@ -335,29 +335,9 @@ namespace {
diff -Nuarp opencv-3.4.20.orig/modules/core/src/parallel.cpp opencv-3.4.20/modules/core/src/parallel.cpp
--- opencv-3.4.20.orig/modules/core/src/parallel.cpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/src/parallel.cpp 2023-08-06 11:05:19.959163685 +0800
@@ -338,29 +338,9 @@ namespace {
CV_TRACE_ARG_VALUE(range_end, "range.end", (int64)r.end);
#endif

Expand Down Expand Up @@ -320,7 +320,7 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/src/parallel.cpp opencv-3.4.18/modul

if (!ctx.is_rng_used && !(cv::theRNG() == ctx.rng))
ctx.is_rng_used = true;
@@ -490,16 +470,10 @@ void parallel_for_(const cv::Range& rang
@@ -493,16 +473,10 @@ void parallel_for_(const cv::Range& rang
isNotNestedRegion = CV_XADD(&flagNestedParallelFor, 1) == 0;
if (isNotNestedRegion)
{
Expand All @@ -337,9 +337,9 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/src/parallel.cpp opencv-3.4.18/modul
}
else // nested parallel_for_() calls are not parallelized
#endif // CV_PARALLEL_FRAMEWORK
diff -Nuarp opencv-3.4.18.orig/modules/core/src/persistence_c.cpp opencv-3.4.18/modules/core/src/persistence_c.cpp
--- opencv-3.4.18.orig/modules/core/src/persistence_c.cpp 2022-06-05 00:52:44.000000000 +0800
+++ opencv-3.4.18/modules/core/src/persistence_c.cpp 2022-11-16 17:32:38.102053227 +0800
diff -Nuarp opencv-3.4.20.orig/modules/core/src/persistence_c.cpp opencv-3.4.20/modules/core/src/persistence_c.cpp
--- opencv-3.4.20.orig/modules/core/src/persistence_c.cpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/src/persistence_c.cpp 2023-08-06 11:05:19.959163685 +0800
@@ -456,17 +456,10 @@ cvOpenFileStorage(const char* query, CvM
CV_Assert(fs);
memset( fs, 0, sizeof(*fs));
Expand All @@ -358,9 +358,9 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/src/persistence_c.cpp opencv-3.4.18/
}

/* closes file storage and deallocates buffers */
diff -Nuarp opencv-3.4.18.orig/modules/core/src/persistence_types.cpp opencv-3.4.18/modules/core/src/persistence_types.cpp
--- opencv-3.4.18.orig/modules/core/src/persistence_types.cpp 2022-06-05 00:52:44.000000000 +0800
+++ opencv-3.4.18/modules/core/src/persistence_types.cpp 2022-11-16 17:32:38.102053227 +0800
diff -Nuarp opencv-3.4.20.orig/modules/core/src/persistence_types.cpp opencv-3.4.20/modules/core/src/persistence_types.cpp
--- opencv-3.4.20.orig/modules/core/src/persistence_types.cpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/src/persistence_types.cpp 2023-08-06 11:05:19.959163685 +0800
@@ -756,13 +756,9 @@ static void* icvReadSeq( CvFileStorage*
flags |= CV_SEQ_FLAG_HOLE;
if( !strstr(flags_str, "untyped") )
Expand All @@ -375,10 +375,10 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/src/persistence_types.cpp opencv-3.4
}
}

diff -Nuarp opencv-3.4.18.orig/modules/core/src/system.cpp opencv-3.4.18/modules/core/src/system.cpp
--- opencv-3.4.18.orig/modules/core/src/system.cpp 2022-06-05 00:52:44.000000000 +0800
+++ opencv-3.4.18/modules/core/src/system.cpp 2022-11-16 17:32:38.103053227 +0800
@@ -1214,8 +1214,6 @@ void error( const Exception& exc )
diff -Nuarp opencv-3.4.20.orig/modules/core/src/system.cpp opencv-3.4.20/modules/core/src/system.cpp
--- opencv-3.4.20.orig/modules/core/src/system.cpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/src/system.cpp 2023-08-06 11:05:19.959163685 +0800
@@ -1259,8 +1259,6 @@ void error( const Exception& exc )
static volatile int* p = 0;
*p = 0;
}
Expand All @@ -387,7 +387,7 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/src/system.cpp opencv-3.4.18/modules
}

void error(int _code, const String& _err, const char* _func, const char* _file, int _line)
@@ -2094,7 +2092,7 @@ inline bool parseOption(const std::strin
@@ -2139,7 +2137,7 @@ inline bool parseOption(const std::strin
{
return false;
}
Expand All @@ -396,7 +396,7 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/src/system.cpp opencv-3.4.18/modules
}

template<>
@@ -2119,7 +2117,7 @@ inline size_t parseOption(const std::str
@@ -2164,7 +2162,7 @@ inline size_t parseOption(const std::str
return v * 1024 * 1024;
else if (suffixStr == "KB" || suffixStr == "Kb" || suffixStr == "kb")
return v * 1024;
Expand All @@ -405,7 +405,7 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/src/system.cpp opencv-3.4.18/modules
}

template<>
@@ -2162,16 +2160,11 @@ static inline const char * envRead(const
@@ -2207,16 +2205,11 @@ static inline const char * envRead(const
template<typename T>
inline T read(const std::string & k, const T & defaultValue)
{
Expand All @@ -422,9 +422,9 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/src/system.cpp opencv-3.4.18/modules
return defaultValue;
}

diff -Nuarp opencv-3.4.18.orig/modules/core/src/umatrix.cpp opencv-3.4.18/modules/core/src/umatrix.cpp
--- opencv-3.4.18.orig/modules/core/src/umatrix.cpp 2022-06-05 00:52:44.000000000 +0800
+++ opencv-3.4.18/modules/core/src/umatrix.cpp 2022-11-16 17:32:38.103053227 +0800
diff -Nuarp opencv-3.4.20.orig/modules/core/src/umatrix.cpp opencv-3.4.20/modules/core/src/umatrix.cpp
--- opencv-3.4.20.orig/modules/core/src/umatrix.cpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/src/umatrix.cpp 2023-08-06 11:05:19.959163685 +0800
@@ -516,14 +516,9 @@ UMat Mat::getUMat(int accessFlags, UMatU
new_u->originalUMatData = u;
}
Expand Down Expand Up @@ -503,9 +503,9 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/src/umatrix.cpp opencv-3.4.18/module
CV_XADD(&u->refcount, -1);
CV_Assert(u->data != 0 && "Error mapping of UMat to host memory.");
return Mat();
diff -Nuarp opencv-3.4.18.orig/modules/core/src/utils/filesystem.cpp opencv-3.4.18/modules/core/src/utils/filesystem.cpp
--- opencv-3.4.18.orig/modules/core/src/utils/filesystem.cpp 2022-06-05 00:52:44.000000000 +0800
+++ opencv-3.4.18/modules/core/src/utils/filesystem.cpp 2022-11-16 17:32:38.103053227 +0800
diff -Nuarp opencv-3.4.20.orig/modules/core/src/utils/filesystem.cpp opencv-3.4.20/modules/core/src/utils/filesystem.cpp
--- opencv-3.4.20.orig/modules/core/src/utils/filesystem.cpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/src/utils/filesystem.cpp 2023-08-06 11:05:19.960163681 +0800
@@ -492,14 +492,9 @@ cv::String getCacheDirectory(const char*
&& !utils::fs::isDirectory(default_cache_path))
{
Expand All @@ -521,9 +521,9 @@ diff -Nuarp opencv-3.4.18.orig/modules/core/src/utils/filesystem.cpp opencv-3.4.
if (!existedCacheDirs.empty())
{
CV_LOG_WARNING(NULL, "Creating new OpenCV cache directory: " << default_cache_path);
diff -Nuarp opencv-3.4.18.orig/modules/imgproc/src/contours.cpp opencv-3.4.18/modules/imgproc/src/contours.cpp
--- opencv-3.4.18.orig/modules/imgproc/src/contours.cpp 2022-06-05 00:52:44.000000000 +0800
+++ opencv-3.4.18/modules/imgproc/src/contours.cpp 2022-11-16 17:32:38.103053227 +0800
diff -Nuarp opencv-3.4.20.orig/modules/imgproc/src/contours.cpp opencv-3.4.20/modules/imgproc/src/contours.cpp
--- opencv-3.4.20.orig/modules/imgproc/src/contours.cpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/imgproc/src/contours.cpp 2023-08-06 11:05:19.960163681 +0800
@@ -1761,7 +1761,6 @@ cvFindContours_Impl( void* img, CvMemS
}
else
Expand Down
12 changes: 12 additions & 0 deletions opencv-3.4.20-no-zlib.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -Nuarp opencv-3.4.20.orig/modules/core/src/persistence.hpp opencv-3.4.20/modules/core/src/persistence.hpp
--- opencv-3.4.20.orig/modules/core/src/persistence.hpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/src/persistence.hpp 2023-08-06 11:09:02.718289684 +0800
@@ -12,7 +12,7 @@
#include <string>
#include <iterator>

-#define USE_ZLIB 1
+#define USE_ZLIB 0
#if USE_ZLIB
# ifndef _LFS64_LARGEFILE
# define _LFS64_LARGEFILE 0
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff -Nuarp opencv-3.4.18.orig/modules/core/include/opencv2/core/cvdef.h opencv-3.4.18/modules/core/include/opencv2/core/cvdef.h
--- opencv-3.4.18.orig/modules/core/include/opencv2/core/cvdef.h 2022-06-05 00:52:44.000000000 +0800
+++ opencv-3.4.18/modules/core/include/opencv2/core/cvdef.h 2022-11-16 17:36:04.411050025 +0800
@@ -532,33 +532,7 @@ Cv64suf;
diff -Nuarp opencv-3.4.20.orig/modules/core/include/opencv2/core/cvdef.h opencv-3.4.20/modules/core/include/opencv2/core/cvdef.h
--- opencv-3.4.20.orig/modules/core/include/opencv2/core/cvdef.h 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20/modules/core/include/opencv2/core/cvdef.h 2023-08-06 11:12:38.619404492 +0800
@@ -534,33 +534,7 @@ Cv64suf;
* exchange-add operation for atomic operations on reference counters *
\****************************************************************************************/

Expand Down
12 changes: 0 additions & 12 deletions opencv-4.6.0-no-zlib.patch

This file was deleted.

Loading

0 comments on commit fc1635b

Please sign in to comment.