mirror of
https://github.com/opencv/opencv.git
synced 2024-12-14 00:39:13 +08:00
97681bdfce
imgproc: add optimized warpAffine kernels for 8U/16U/32F + C1/C3/C4 inputs #25984 Merge wtih https://github.com/opencv/opencv_extra/pull/1198. Merge with https://github.com/opencv/opencv_contrib/pull/3787. ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
64 lines
2.7 KiB
CMake
64 lines
2.7 KiB
CMake
set(the_description "Image Processing")
|
|
ocv_add_dispatched_file(accum SSE4_1 AVX AVX2)
|
|
ocv_add_dispatched_file(bilateral_filter SSE2 AVX2)
|
|
ocv_add_dispatched_file(box_filter SSE2 SSE4_1 AVX2)
|
|
ocv_add_dispatched_file(filter SSE2 SSE4_1 AVX2)
|
|
ocv_add_dispatched_file(color_hsv SSE2 SSE4_1 AVX2)
|
|
ocv_add_dispatched_file(color_rgb SSE2 SSE4_1 AVX2)
|
|
ocv_add_dispatched_file(color_yuv SSE2 SSE4_1 AVX2)
|
|
ocv_add_dispatched_file(median_blur SSE2 SSE4_1 AVX2)
|
|
ocv_add_dispatched_file(morph SSE2 SSE4_1 AVX2)
|
|
ocv_add_dispatched_file(smooth SSE2 SSE4_1 AVX2)
|
|
ocv_add_dispatched_file(sumpixels SSE2 AVX2 AVX512_SKX)
|
|
ocv_add_dispatched_file(warp_kernels SSE2 SSE4_1 AVX2 NEON NEON_FP16 RVV LASX)
|
|
ocv_define_module(imgproc opencv_core WRAP java objc python js)
|
|
|
|
ocv_module_include_directories(opencv_imgproc ${ZLIB_INCLUDE_DIRS})
|
|
|
|
if(HAVE_IPP)
|
|
# OPENCV_IPP_ENABLE_ALL is defined in modules/core/CMakeList.txt
|
|
OCV_OPTION(OPENCV_IPP_GAUSSIAN_BLUR "Enable IPP optimizations for GaussianBlur (+8Mb in binary size)" OPENCV_IPP_ENABLE_ALL)
|
|
if(OPENCV_IPP_GAUSSIAN_BLUR)
|
|
ocv_append_source_file_compile_definitions(${CMAKE_CURRENT_SOURCE_DIR}/src/smooth.dispatch.cpp "ENABLE_IPP_GAUSSIAN_BLUR=1")
|
|
endif()
|
|
endif()
|
|
|
|
set(UNIFONT_MD5 "fb79cf5b4f4c89414f1233f14c2eb273")
|
|
set(UNIFONT_NAME "WenQuanYiMicroHei.ttf.gz")
|
|
set(UNIFONT_COMMIT "cc7d85179d69a704bee209aa37ce8a657f2f8b34")
|
|
set(UNIFONT_URL "https://raw.githubusercontent.com/vpisarev/opencv_3rdparty/${UNIFONT_COMMIT}/")
|
|
|
|
unset(HAVE_UNIFONT)
|
|
unset(HAVE_UNIFONT CACHE)
|
|
|
|
if (WITH_UNIFONT)
|
|
ocv_download(FILENAME ${UNIFONT_NAME}
|
|
HASH ${UNIFONT_MD5}
|
|
URL
|
|
"${OPENCV_UNIFONT_URL}"
|
|
"${UNIFONT_URL}"
|
|
DESTINATION_DIR "${CMAKE_CURRENT_BINARY_DIR}"
|
|
ID UNIFONT
|
|
STATUS res
|
|
RELATIVE_URL)
|
|
|
|
if (res)
|
|
message(STATUS "Unicode font has been downloaded successfully.")
|
|
set(HAVE_UNIFONT ON CACHE INTERNAL "")
|
|
else()
|
|
message(STATUS "Unicode font download failed. Turning it off.")
|
|
set(HAVE_UNIFONT OFF CACHE INTERNAL "")
|
|
endif()
|
|
else()
|
|
set(HAVE_UNIFONT OFF CACHE INTERNAL "")
|
|
endif()
|
|
|
|
ocv_blob2hdr("${CMAKE_CURRENT_SOURCE_DIR}/fonts/Rubik.ttf.gz" "${CMAKE_CURRENT_BINARY_DIR}/builtin_font_sans.h" OcvBuiltinFontSans)
|
|
ocv_blob2hdr("${CMAKE_CURRENT_SOURCE_DIR}/fonts/Rubik-Italic.ttf.gz" "${CMAKE_CURRENT_BINARY_DIR}/builtin_font_italic.h" OcvBuiltinFontItalic)
|
|
if (HAVE_UNIFONT)
|
|
ocv_blob2hdr("${CMAKE_CURRENT_BINARY_DIR}/${UNIFONT_NAME}" "${CMAKE_CURRENT_BINARY_DIR}/builtin_font_uni.h" OcvBuiltinFontUni)
|
|
endif()
|
|
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
|
|
ocv_target_link_libraries(${the_module} LINK_PRIVATE ${ZLIB_LIBRARIES})
|
|
ocv_install_3rdparty_licenses(fonts fonts/Rubik_OFL.txt)
|