mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
commit
d9a62c42e5
4
3rdparty/carotene/CMakeLists.txt
vendored
4
3rdparty/carotene/CMakeLists.txt
vendored
@ -27,7 +27,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(carotene_objs OBJECT
|
add_library(carotene_objs OBJECT EXCLUDE_FROM_ALL
|
||||||
${carotene_headers}
|
${carotene_headers}
|
||||||
${carotene_sources}
|
${carotene_sources}
|
||||||
)
|
)
|
||||||
@ -41,4 +41,4 @@ if(WITH_NEON)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# we add dummy file to fix XCode build
|
# we add dummy file to fix XCode build
|
||||||
add_library(carotene STATIC EXCLUDE_FROM_ALL "$<TARGET_OBJECTS:carotene_objs>" "${CAROTENE_SOURCE_DIR}/dummy.cpp")
|
add_library(carotene STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} "$<TARGET_OBJECTS:carotene_objs>" "${CAROTENE_SOURCE_DIR}/dummy.cpp")
|
||||||
|
4
3rdparty/cpufeatures/CMakeLists.txt
vendored
4
3rdparty/cpufeatures/CMakeLists.txt
vendored
@ -14,7 +14,7 @@ if(NOT DEFINED CPUFEATURES_SOURCES)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(${CPUFEATURES_INCLUDE_DIRS})
|
include_directories(${CPUFEATURES_INCLUDE_DIRS})
|
||||||
add_library(${OPENCV_CPUFEATURES_TARGET_NAME} STATIC ${CPUFEATURES_SOURCES})
|
add_library(${OPENCV_CPUFEATURES_TARGET_NAME} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${CPUFEATURES_SOURCES})
|
||||||
|
|
||||||
set_target_properties(${OPENCV_CPUFEATURES_TARGET_NAME}
|
set_target_properties(${OPENCV_CPUFEATURES_TARGET_NAME}
|
||||||
PROPERTIES OUTPUT_NAME cpufeatures
|
PROPERTIES OUTPUT_NAME cpufeatures
|
||||||
@ -29,7 +29,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
ocv_install_target(${OPENCV_CPUFEATURES_TARGET_NAME} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
ocv_install_target(${OPENCV_CPUFEATURES_TARGET_NAME} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ocv_install_3rdparty_licenses(cpufeatures LICENSE README.md)
|
ocv_install_3rdparty_licenses(cpufeatures LICENSE README.md)
|
||||||
|
4
3rdparty/ippicv/CMakeLists.txt
vendored
4
3rdparty/ippicv/CMakeLists.txt
vendored
@ -17,7 +17,7 @@ file(GLOB lib_hdrs ${IPP_IW_PATH}/include/*.h ${IPP_IW_PATH}/include/iw/*.h ${IP
|
|||||||
# Define the library target:
|
# Define the library target:
|
||||||
# ----------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------
|
||||||
|
|
||||||
add_library(${IPP_IW_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
|
add_library(${IPP_IW_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs} ${lib_hdrs})
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
if(CV_GCC OR CV_CLANG OR CV_ICC)
|
if(CV_GCC OR CV_CLANG OR CV_ICC)
|
||||||
@ -41,5 +41,5 @@ if(ENABLE_SOLUTION_FOLDERS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
ocv_install_target(${IPP_IW_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
ocv_install_target(${IPP_IW_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||||
endif()
|
endif()
|
||||||
|
4
3rdparty/ittnotify/CMakeLists.txt
vendored
4
3rdparty/ittnotify/CMakeLists.txt
vendored
@ -37,7 +37,7 @@ set(ITT_SRCS
|
|||||||
src/ittnotify/jitprofiling.c
|
src/ittnotify/jitprofiling.c
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(${ITT_LIBRARY} STATIC ${ITT_SRCS} ${ITT_PUBLIC_HDRS} ${ITT_PRIVATE_HDRS})
|
add_library(${ITT_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${ITT_SRCS} ${ITT_PUBLIC_HDRS} ${ITT_PRIVATE_HDRS})
|
||||||
|
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
if(HAVE_DL_LIBRARY)
|
if(HAVE_DL_LIBRARY)
|
||||||
@ -60,7 +60,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
ocv_install_target(${ITT_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
ocv_install_target(${ITT_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ocv_install_3rdparty_licenses(ittnotify src/ittnotify/LICENSE.BSD src/ittnotify/LICENSE.GPL)
|
ocv_install_3rdparty_licenses(ittnotify src/ittnotify/LICENSE.BSD src/ittnotify/LICENSE.GPL)
|
||||||
|
4
3rdparty/libjasper/CMakeLists.txt
vendored
4
3rdparty/libjasper/CMakeLists.txt
vendored
@ -17,7 +17,7 @@ file(GLOB lib_ext_hdrs jasper/*.h)
|
|||||||
# Define the library target:
|
# Define the library target:
|
||||||
# ----------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------
|
||||||
|
|
||||||
add_library(${JASPER_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs} ${lib_ext_hdrs})
|
add_library(${JASPER_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs} ${lib_hdrs} ${lib_ext_hdrs})
|
||||||
|
|
||||||
if(WIN32 AND NOT MINGW)
|
if(WIN32 AND NOT MINGW)
|
||||||
add_definitions(-DJAS_WIN_MSVC_BUILD)
|
add_definitions(-DJAS_WIN_MSVC_BUILD)
|
||||||
@ -46,7 +46,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
ocv_install_target(${JASPER_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
ocv_install_target(${JASPER_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ocv_install_3rdparty_licenses(jasper LICENSE README copyright)
|
ocv_install_3rdparty_licenses(jasper LICENSE README copyright)
|
||||||
|
4
3rdparty/libjpeg-turbo/CMakeLists.txt
vendored
4
3rdparty/libjpeg-turbo/CMakeLists.txt
vendored
@ -106,7 +106,7 @@ set(JPEG_SOURCES ${JPEG_SOURCES} jsimd_none.c)
|
|||||||
|
|
||||||
ocv_list_add_prefix(JPEG_SOURCES src/)
|
ocv_list_add_prefix(JPEG_SOURCES src/)
|
||||||
|
|
||||||
add_library(${JPEG_LIBRARY} STATIC ${JPEG_SOURCES} ${SIMD_OBJS})
|
add_library(${JPEG_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${JPEG_SOURCES} ${SIMD_OBJS})
|
||||||
|
|
||||||
set_target_properties(${JPEG_LIBRARY}
|
set_target_properties(${JPEG_LIBRARY}
|
||||||
PROPERTIES OUTPUT_NAME ${JPEG_LIBRARY}
|
PROPERTIES OUTPUT_NAME ${JPEG_LIBRARY}
|
||||||
@ -121,7 +121,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
ocv_install_target(${JPEG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
ocv_install_target(${JPEG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ocv_install_3rdparty_licenses(libjpeg-turbo README.md LICENSE.md README.ijg)
|
ocv_install_3rdparty_licenses(libjpeg-turbo README.md LICENSE.md README.ijg)
|
||||||
|
4
3rdparty/libjpeg/CMakeLists.txt
vendored
4
3rdparty/libjpeg/CMakeLists.txt
vendored
@ -19,7 +19,7 @@ endif()
|
|||||||
# Define the library target:
|
# Define the library target:
|
||||||
# ----------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------
|
||||||
|
|
||||||
add_library(${JPEG_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
|
add_library(${JPEG_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs} ${lib_hdrs})
|
||||||
|
|
||||||
if(CV_GCC OR CV_CLANG)
|
if(CV_GCC OR CV_CLANG)
|
||||||
set_source_files_properties(jcdctmgr.c PROPERTIES COMPILE_FLAGS "-O1")
|
set_source_files_properties(jcdctmgr.c PROPERTIES COMPILE_FLAGS "-O1")
|
||||||
@ -42,7 +42,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
ocv_install_target(${JPEG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
ocv_install_target(${JPEG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ocv_install_3rdparty_licenses(libjpeg README)
|
ocv_install_3rdparty_licenses(libjpeg README)
|
||||||
|
4
3rdparty/libpng/CMakeLists.txt
vendored
4
3rdparty/libpng/CMakeLists.txt
vendored
@ -74,7 +74,7 @@ if(MSVC)
|
|||||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||||
endif(MSVC)
|
endif(MSVC)
|
||||||
|
|
||||||
add_library(${PNG_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
|
add_library(${PNG_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs} ${lib_hdrs})
|
||||||
target_link_libraries(${PNG_LIBRARY} ${ZLIB_LIBRARIES})
|
target_link_libraries(${PNG_LIBRARY} ${ZLIB_LIBRARIES})
|
||||||
|
|
||||||
ocv_warnings_disable(CMAKE_C_FLAGS -Wundef -Wcast-align -Wimplicit-fallthrough -Wunused-parameter -Wsign-compare)
|
ocv_warnings_disable(CMAKE_C_FLAGS -Wundef -Wcast-align -Wimplicit-fallthrough -Wunused-parameter -Wsign-compare)
|
||||||
@ -92,7 +92,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
ocv_install_target(${PNG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
ocv_install_target(${PNG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ocv_install_3rdparty_licenses(libpng LICENSE README)
|
ocv_install_3rdparty_licenses(libpng LICENSE README)
|
||||||
|
4
3rdparty/libtiff/CMakeLists.txt
vendored
4
3rdparty/libtiff/CMakeLists.txt
vendored
@ -462,7 +462,7 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4456 /wd4457 /wd4312) # vs2015
|
|||||||
|
|
||||||
ocv_warnings_disable(CMAKE_C_FLAGS /wd4267 /wd4244 /wd4018 /wd4311 /wd4312)
|
ocv_warnings_disable(CMAKE_C_FLAGS /wd4267 /wd4244 /wd4018 /wd4311 /wd4312)
|
||||||
|
|
||||||
add_library(${TIFF_LIBRARY} STATIC ${lib_srcs})
|
add_library(${TIFF_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs})
|
||||||
target_link_libraries(${TIFF_LIBRARY} ${ZLIB_LIBRARIES})
|
target_link_libraries(${TIFF_LIBRARY} ${ZLIB_LIBRARIES})
|
||||||
|
|
||||||
set_target_properties(${TIFF_LIBRARY}
|
set_target_properties(${TIFF_LIBRARY}
|
||||||
@ -479,7 +479,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
ocv_install_target(${TIFF_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
ocv_install_target(${TIFF_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ocv_install_3rdparty_licenses(libtiff COPYRIGHT)
|
ocv_install_3rdparty_licenses(libtiff COPYRIGHT)
|
||||||
|
4
3rdparty/libwebp/CMakeLists.txt
vendored
4
3rdparty/libwebp/CMakeLists.txt
vendored
@ -34,7 +34,7 @@ endif()
|
|||||||
|
|
||||||
add_definitions(-DWEBP_USE_THREAD)
|
add_definitions(-DWEBP_USE_THREAD)
|
||||||
|
|
||||||
add_library(${WEBP_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
|
add_library(${WEBP_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs} ${lib_hdrs})
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
target_link_libraries(${WEBP_LIBRARY} ${CPUFEATURES_LIBRARIES})
|
target_link_libraries(${WEBP_LIBRARY} ${CPUFEATURES_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
@ -59,6 +59,6 @@ if(ENABLE_SOLUTION_FOLDERS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
ocv_install_target(${WEBP_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
ocv_install_target(${WEBP_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
4
3rdparty/openexr/CMakeLists.txt
vendored
4
3rdparty/openexr/CMakeLists.txt
vendored
@ -125,7 +125,7 @@ if(MSVC AND CV_ICC)
|
|||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qrestrict")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qrestrict")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(IlmImf STATIC ${lib_hdrs} ${lib_srcs})
|
add_library(IlmImf STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_hdrs} ${lib_srcs})
|
||||||
target_link_libraries(IlmImf ${ZLIB_LIBRARIES})
|
target_link_libraries(IlmImf ${ZLIB_LIBRARIES})
|
||||||
|
|
||||||
set_target_properties(IlmImf
|
set_target_properties(IlmImf
|
||||||
@ -142,7 +142,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
ocv_install_target(IlmImf EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
ocv_install_target(IlmImf EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ocv_install_3rdparty_licenses(openexr LICENSE AUTHORS.ilmbase AUTHORS.openexr)
|
ocv_install_3rdparty_licenses(openexr LICENSE AUTHORS.ilmbase AUTHORS.openexr)
|
||||||
|
4
3rdparty/protobuf/CMakeLists.txt
vendored
4
3rdparty/protobuf/CMakeLists.txt
vendored
@ -141,7 +141,7 @@ append_if_exist(Protobuf_SRCS
|
|||||||
)
|
)
|
||||||
|
|
||||||
include_directories(BEFORE "${PROTOBUF_ROOT}/src") # ensure using if own headers: https://github.com/opencv/opencv/issues/13328
|
include_directories(BEFORE "${PROTOBUF_ROOT}/src") # ensure using if own headers: https://github.com/opencv/opencv/issues/13328
|
||||||
add_library(libprotobuf STATIC ${Protobuf_SRCS})
|
add_library(libprotobuf STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${Protobuf_SRCS})
|
||||||
target_include_directories(libprotobuf SYSTEM PUBLIC $<BUILD_INTERFACE:${PROTOBUF_ROOT}/src>)
|
target_include_directories(libprotobuf SYSTEM PUBLIC $<BUILD_INTERFACE:${PROTOBUF_ROOT}/src>)
|
||||||
set_target_properties(libprotobuf
|
set_target_properties(libprotobuf
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
@ -157,7 +157,7 @@ get_protobuf_version(Protobuf_VERSION "${PROTOBUF_ROOT}/src")
|
|||||||
set(Protobuf_VERSION ${Protobuf_VERSION} CACHE INTERNAL "" FORCE)
|
set(Protobuf_VERSION ${Protobuf_VERSION} CACHE INTERNAL "" FORCE)
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
ocv_install_target(libprotobuf EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
ocv_install_target(libprotobuf EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ocv_install_3rdparty_licenses(protobuf LICENSE README.md)
|
ocv_install_3rdparty_licenses(protobuf LICENSE README.md)
|
||||||
|
4
3rdparty/quirc/CMakeLists.txt
vendored
4
3rdparty/quirc/CMakeLists.txt
vendored
@ -8,7 +8,7 @@ ocv_include_directories(${CURR_INCLUDE_DIR})
|
|||||||
file(GLOB_RECURSE quirc_headers RELATIVE "${CMAKE_CURRENT_LIST_DIR}" "include/*.h")
|
file(GLOB_RECURSE quirc_headers RELATIVE "${CMAKE_CURRENT_LIST_DIR}" "include/*.h")
|
||||||
file(GLOB_RECURSE quirc_sources RELATIVE "${CMAKE_CURRENT_LIST_DIR}" "src/*.c")
|
file(GLOB_RECURSE quirc_sources RELATIVE "${CMAKE_CURRENT_LIST_DIR}" "src/*.c")
|
||||||
|
|
||||||
add_library(${PROJECT_NAME} STATIC ${quirc_headers} ${quirc_sources})
|
add_library(${PROJECT_NAME} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${quirc_headers} ${quirc_sources})
|
||||||
ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-variable -Wshadow)
|
ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-variable -Wshadow)
|
||||||
|
|
||||||
set_target_properties(${PROJECT_NAME}
|
set_target_properties(${PROJECT_NAME}
|
||||||
@ -24,7 +24,7 @@ if(ENABLE_SOLUTION_FOLDERS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS)
|
if(NOT BUILD_SHARED_LIBS)
|
||||||
ocv_install_target(${PROJECT_NAME} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
ocv_install_target(${PROJECT_NAME} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ocv_install_3rdparty_licenses(${PROJECT_NAME} LICENSE)
|
ocv_install_3rdparty_licenses(${PROJECT_NAME} LICENSE)
|
||||||
|
3
3rdparty/tbb/CMakeLists.txt
vendored
3
3rdparty/tbb/CMakeLists.txt
vendored
@ -108,7 +108,7 @@ set(tbb_version_file "version_string.ver")
|
|||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${tbb_version_file}.cmakein" "${CMAKE_CURRENT_BINARY_DIR}/${tbb_version_file}" @ONLY)
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${tbb_version_file}.cmakein" "${CMAKE_CURRENT_BINARY_DIR}/${tbb_version_file}" @ONLY)
|
||||||
list(APPEND TBB_SOURCE_FILES "${CMAKE_CURRENT_BINARY_DIR}/${tbb_version_file}")
|
list(APPEND TBB_SOURCE_FILES "${CMAKE_CURRENT_BINARY_DIR}/${tbb_version_file}")
|
||||||
|
|
||||||
add_library(tbb ${TBB_SOURCE_FILES})
|
add_library(tbb ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${TBB_SOURCE_FILES})
|
||||||
target_compile_definitions(tbb PUBLIC
|
target_compile_definitions(tbb PUBLIC
|
||||||
TBB_USE_GCC_BUILTINS=1
|
TBB_USE_GCC_BUILTINS=1
|
||||||
__TBB_GCC_BUILTIN_ATOMICS_PRESENT=1
|
__TBB_GCC_BUILTIN_ATOMICS_PRESENT=1
|
||||||
@ -165,6 +165,7 @@ ocv_install_target(tbb EXPORT OpenCVModules
|
|||||||
RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT libs
|
RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT libs
|
||||||
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT libs
|
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT libs
|
||||||
ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev
|
ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev
|
||||||
|
OPTIONAL
|
||||||
)
|
)
|
||||||
|
|
||||||
ocv_install_3rdparty_licenses(tbb "${tbb_src_dir}/LICENSE" "${tbb_src_dir}/README")
|
ocv_install_3rdparty_licenses(tbb "${tbb_src_dir}/LICENSE" "${tbb_src_dir}/README")
|
||||||
|
2
3rdparty/zlib/CMakeLists.txt
vendored
2
3rdparty/zlib/CMakeLists.txt
vendored
@ -76,7 +76,7 @@ set(ZLIB_SRCS
|
|||||||
zutil.c
|
zutil.c
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(${ZLIB_LIBRARY} STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
add_library(${ZLIB_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||||
set_target_properties(${ZLIB_LIBRARY} PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
|
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
|
ocv_warnings_disable(CMAKE_C_FLAGS -Wshorten-64-to-32 -Wattributes -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wshift-negative-value
|
||||||
|
@ -1881,3 +1881,9 @@ function(ocv_update_file filepath content)
|
|||||||
file(WRITE "${filepath}" "${content}")
|
file(WRITE "${filepath}" "${content}")
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
if(NOT BUILD_SHARED_LIBS AND (CMAKE_VERSION VERSION_LESS "3.14.0"))
|
||||||
|
ocv_update(OPENCV_3RDPARTY_EXCLUDE_FROM_ALL "") # avoid CMake warnings: https://gitlab.kitware.com/cmake/cmake/-/issues/18938
|
||||||
|
else()
|
||||||
|
ocv_update(OPENCV_3RDPARTY_EXCLUDE_FROM_ALL "EXCLUDE_FROM_ALL")
|
||||||
|
endif()
|
||||||
|
@ -92,11 +92,11 @@ def main():
|
|||||||
dest="square_size", type=float)
|
dest="square_size", type=float)
|
||||||
parser.add_argument("-R", "--radius_rate", help="circles_radius = square_size/radius_rate", default="5.0",
|
parser.add_argument("-R", "--radius_rate", help="circles_radius = square_size/radius_rate", default="5.0",
|
||||||
action="store", dest="radius_rate", type=float)
|
action="store", dest="radius_rate", type=float)
|
||||||
parser.add_argument("-w", "--page_width", help="page width in units", default="216", action="store",
|
parser.add_argument("-w", "--page_width", help="page width in units", default=argparse.SUPPRESS, action="store",
|
||||||
dest="page_width", type=float)
|
dest="page_width", type=float)
|
||||||
parser.add_argument("-h", "--page_height", help="page height in units", default="279", action="store",
|
parser.add_argument("-h", "--page_height", help="page height in units", default=argparse.SUPPRESS, action="store",
|
||||||
dest="page_width", type=float)
|
dest="page_height", type=float)
|
||||||
parser.add_argument("-a", "--page_size", help="page size, supersedes -h -w arguments", default="A4", action="store",
|
parser.add_argument("-a", "--page_size", help="page size, superseded if -h and -w are set", default="A4", action="store",
|
||||||
dest="page_size", choices=["A0", "A1", "A2", "A3", "A4", "A5"])
|
dest="page_size", choices=["A0", "A1", "A2", "A3", "A4", "A5"])
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@ -111,12 +111,16 @@ def main():
|
|||||||
units = args.units
|
units = args.units
|
||||||
square_size = args.square_size
|
square_size = args.square_size
|
||||||
radius_rate = args.radius_rate
|
radius_rate = args.radius_rate
|
||||||
page_size = args.page_size
|
if 'page_width' and 'page_height' in args:
|
||||||
# page size dict (ISO standard, mm) for easy lookup. format - size: [width, height]
|
page_width = args.page_width
|
||||||
page_sizes = {"A0": [840, 1188], "A1": [594, 840], "A2": [420, 594], "A3": [297, 420], "A4": [210, 297],
|
page_height = args.page_height
|
||||||
"A5": [148, 210]}
|
else:
|
||||||
page_width = page_sizes[page_size.upper()][0]
|
page_size = args.page_size
|
||||||
page_height = page_sizes[page_size.upper()][1]
|
# page size dict (ISO standard, mm) for easy lookup. format - size: [width, height]
|
||||||
|
page_sizes = {"A0": [840, 1188], "A1": [594, 840], "A2": [420, 594], "A3": [297, 420], "A4": [210, 297],
|
||||||
|
"A5": [148, 210]}
|
||||||
|
page_width = page_sizes[page_size][0]
|
||||||
|
page_height = page_sizes[page_size][1]
|
||||||
pm = PatternMaker(columns, rows, output, units, square_size, radius_rate, page_width, page_height)
|
pm = PatternMaker(columns, rows, output, units, square_size, radius_rate, page_width, page_height)
|
||||||
# dict for easy lookup of pattern type
|
# dict for easy lookup of pattern type
|
||||||
mp = {"circles": pm.make_circles_pattern, "acircles": pm.make_acircles_pattern,
|
mp = {"circles": pm.make_circles_pattern, "acircles": pm.make_acircles_pattern,
|
||||||
|
@ -984,7 +984,7 @@ protected:
|
|||||||
bool computeClosestPoints(const vector<Point> &result_integer_hull);
|
bool computeClosestPoints(const vector<Point> &result_integer_hull);
|
||||||
bool computeSidesPoints(const vector<Point> &result_integer_hull);
|
bool computeSidesPoints(const vector<Point> &result_integer_hull);
|
||||||
vector<Point> getPointsNearUnstablePoint(const vector<Point> &side, int start, int end, int step);
|
vector<Point> getPointsNearUnstablePoint(const vector<Point> &side, int start, int end, int step);
|
||||||
bool findAndAddStablePoint(const vector<Point> &result_integer_hull);
|
bool findAndAddStablePoint();
|
||||||
bool findIndexesCurvedSides();
|
bool findIndexesCurvedSides();
|
||||||
bool findIncompleteIndexesCurvedSides();
|
bool findIncompleteIndexesCurvedSides();
|
||||||
Mat getPatternsMask();
|
Mat getPatternsMask();
|
||||||
@ -1265,7 +1265,7 @@ vector<Point> QRDecode::getPointsNearUnstablePoint(const vector<Point> &side, in
|
|||||||
return points;
|
return points;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QRDecode::findAndAddStablePoint(const vector<Point> &result_integer_hull)
|
bool QRDecode::findAndAddStablePoint()
|
||||||
{
|
{
|
||||||
size_t idx_unstable_point = unstable_pair.first;
|
size_t idx_unstable_point = unstable_pair.first;
|
||||||
Point unstable_point = unstable_pair.second;
|
Point unstable_point = unstable_pair.second;
|
||||||
@ -1376,7 +1376,7 @@ bool QRDecode::findAndAddStablePoint(const vector<Point> &result_integer_hull)
|
|||||||
|
|
||||||
bool add_stable_point = true;
|
bool add_stable_point = true;
|
||||||
|
|
||||||
for (size_t i = 0; i < result_integer_hull.size(); i++)
|
for (size_t i = 0; i < original_points.size(); i++)
|
||||||
{
|
{
|
||||||
if(arePointsNearest(stable_point, original_points[i], 3.0))
|
if(arePointsNearest(stable_point, original_points[i], 3.0))
|
||||||
{
|
{
|
||||||
@ -2202,7 +2202,7 @@ bool QRDecode::preparingCurvedQRCodes()
|
|||||||
return false;
|
return false;
|
||||||
if (!computeSidesPoints(result_integer_hull))
|
if (!computeSidesPoints(result_integer_hull))
|
||||||
return false;
|
return false;
|
||||||
if (!findAndAddStablePoint(result_integer_hull))
|
if (!findAndAddStablePoint())
|
||||||
return false;
|
return false;
|
||||||
if (!findIndexesCurvedSides())
|
if (!findIndexesCurvedSides())
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user