Skip to content

Commit fd10a46

Browse files
committed
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2 parents 44087be + 7bba4cf commit fd10a46

File tree

5 files changed

+28
-25
lines changed

5 files changed

+28
-25
lines changed

modules/freetype/CMakeLists.txt

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,24 @@ if(APPLE_FRAMEWORK)
33
ocv_module_disable(freetype)
44
endif()
55

6-
if(PKG_CONFIG_FOUND)
7-
pkg_search_module(FREETYPE freetype2)
8-
pkg_search_module(HARFBUZZ harfbuzz)
9-
endif()
6+
ocv_check_modules(FREETYPE freetype2)
7+
ocv_check_modules(HARFBUZZ harfbuzz)
108

11-
if(NOT FREETYPE_FOUND)
12-
message(STATUS "freetype2: NO")
13-
else()
14-
message(STATUS "freetype2: YES")
15-
endif()
9+
if(OPENCV_INITIAL_PASS)
10+
if(NOT FREETYPE_FOUND)
11+
message(STATUS "freetype2: NO")
12+
else()
13+
message(STATUS "freetype2: YES (ver ${FREETYPE_VERSION})")
14+
endif()
1615

17-
if(NOT HARFBUZZ_FOUND)
18-
message(STATUS "harfbuzz: NO")
19-
else()
20-
message(STATUS "harfbuzz: YES")
16+
if(NOT HARFBUZZ_FOUND)
17+
message(STATUS "harfbuzz: NO")
18+
else()
19+
message(STATUS "harfbuzz: YES (ver ${HARFBUZZ_VERSION})")
20+
endif()
2121
endif()
2222

23-
24-
if( FREETYPE_FOUND AND HARFBUZZ_FOUND )
23+
if(FREETYPE_FOUND AND HARFBUZZ_FOUND)
2524
ocv_define_module(freetype opencv_core opencv_imgproc WRAP python)
2625
ocv_target_link_libraries(${the_module} ${FREETYPE_LIBRARIES} ${HARFBUZZ_LIBRARIES})
2726
ocv_include_directories( ${FREETYPE_INCLUDE_DIRS} ${HARFBUZZ_INCLUDE_DIRS} )

modules/optflow/src/rlof/rlof_localflow.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "../precomp.hpp"
55

66
#include "opencv2/calib3d.hpp" // findHomography
7-
#include "opencv2/highgui.hpp"
87
#include "rlof_localflow.h"
98
#include "berlof_invoker.hpp"
109
#include "rlof_invoker.hpp"

modules/text/CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@ set(the_description "Text Detection and Recognition")
22
ocv_define_module(text opencv_ml opencv_imgproc opencv_core opencv_features2d opencv_dnn OPTIONAL opencv_highgui WRAP python java)
33

44
if(NOT CMAKE_CROSSCOMPILING OR OPENCV_FIND_TESSERACT)
5-
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
6-
find_package(Tesseract QUIET)
5+
find_package(Tesseract QUIET) # Prefer CMake's standard locations (including Tesseract_DIR)
6+
if(NOT Tesseract_FOUND)
7+
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindTesseract.cmake") # OpenCV's fallback
8+
endif()
79
if(Tesseract_FOUND)
8-
message(STATUS "Tesseract: YES")
10+
if(Tesseract_VERSION)
11+
message(STATUS "Tesseract: YES (ver ${Tesseract_VERSION})")
12+
else()
13+
message(STATUS "Tesseract: YES (ver unknown)")
14+
endif()
915
set(HAVE_TESSERACT 1)
1016
ocv_include_directories(${Tesseract_INCLUDE_DIRS})
1117
ocv_target_link_libraries(${the_module} ${Tesseract_LIBRARIES})

modules/text/cmake/FindTesseract.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Tesseract OCR
2-
if(COMMAND pkg_check_modules)
3-
pkg_check_modules(Tesseract tesseract lept)
4-
endif()
2+
ocv_check_modules(Tesseract tesseract) # lept is excluded (not a direct dependency)
53
if(NOT Tesseract_FOUND)
64
find_path(Tesseract_INCLUDE_DIR tesseract/baseapi.h
75
HINTS

modules/xfeatures2d/src/boostdesc.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,10 @@ static void rectifyPatch( const Mat& image, const KeyPoint& kp,
364364
}
365365
else
366366
{
367-
float M_[] = {
368-
1.f, 0.f, -1.f * patchSize/2.0f + kp.pt.x,
369-
0.f, 1.f, -1.f * patchSize/2.0f + kp.pt.y
367+
const float s = scale_factor * (float)kp.size / (float)patchSize;
368+
float M_[] = {
369+
s, 0.f, -s * patchSize/2.0f + kp.pt.x,
370+
0.f, s, -s * patchSize/2.0f + kp.pt.y
370371
};
371372
M = Mat( 2, 3, CV_32FC1, M_ ).clone();
372373
}

0 commit comments

Comments
 (0)