Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
8532e651
Commit
8532e651
authored
Aug 13, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
parents
90780db9
15e7f41a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
18 deletions
+89
-18
CMakeLists.txt
modules/hfs/CMakeLists.txt
+1
-0
CMakeLists.txt
modules/text/CMakeLists.txt
+14
-18
tesseract_test.cpp
modules/text/cmake/checks/tesseract_test.cpp
+12
-0
init.cmake
modules/text/cmake/init.cmake
+59
-0
CMakeLists.txt
modules/xfeatures2d/CMakeLists.txt
+3
-0
No files found.
modules/hfs/CMakeLists.txt
View file @
8532e651
if
(
HAVE_CUDA
)
add_definitions
(
-D_HFS_CUDA_ON_
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wundef
)
endif
()
set
(
the_description
"Hierarchical Feature Selection for Efficient Image Segmentation"
)
...
...
modules/text/CMakeLists.txt
View file @
8532e651
set
(
the_description
"Text Detection and Recognition"
)
ocv_define_module
(
text opencv_ml opencv_imgproc opencv_core opencv_features2d opencv_dnn OPTIONAL opencv_highgui WRAP python java
)
set
(
__extra_deps
""
)
if
(
DEBUG_opencv_text
)
list
(
APPEND __extra_deps PRIVATE_REQUIRED opencv_highgui
)
endif
()
ocv_define_module
(
text
opencv_ml opencv_imgproc opencv_core opencv_features2d opencv_dnn
${
__extra_deps
}
WRAP
python
java
)
if
(
NOT CMAKE_CROSSCOMPILING OR OPENCV_FIND_TESSERACT
)
find_package
(
Tesseract QUIET
)
# Prefer CMake's standard locations (including Tesseract_DIR)
if
(
NOT Tesseract_FOUND
)
include
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/FindTesseract.cmake"
)
# OpenCV's fallback
endif
()
if
(
Tesseract_FOUND
)
if
(
Tesseract_VERSION
)
message
(
STATUS
"Tesseract: YES (ver
${
Tesseract_VERSION
}
)"
)
else
()
message
(
STATUS
"Tesseract: YES (ver unknown)"
)
endif
()
set
(
HAVE_TESSERACT 1
)
ocv_include_directories
(
${
Tesseract_INCLUDE_DIRS
}
)
ocv_target_link_libraries
(
${
the_module
}
${
Tesseract_LIBRARIES
}
)
else
()
message
(
STATUS
"Tesseract: NO"
)
endif
()
if
(
TARGET ocv.3rdparty.tesseract
)
ocv_target_link_libraries
(
${
the_module
}
LINK_PRIVATE ocv.3rdparty.tesseract
)
endif
()
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/text_config.hpp.in
...
...
modules/text/cmake/checks/tesseract_test.cpp
0 → 100644
View file @
8532e651
#if !defined(USE_STD_NAMESPACE)
#define USE_STD_NAMESPACE
#endif
#include <tesseract/baseapi.h>
#include <tesseract/resultiterator.h>
static
void
test
()
{
tesseract
::
TessBaseAPI
tess
;
}
int
main
()
{
test
();
return
0
;
}
modules/text/cmake/init.cmake
0 → 100644
View file @
8532e651
OCV_OPTION
(
WITH_TESSERACT
"Include Tesseract OCR library support"
(
NOT CMAKE_CROSSCOMPILING
)
VERIFY HAVE_TESSERACT
)
if
(
NOT HAVE_TESSERACT
AND
(
WITH_TESSERACT OR OPENCV_FIND_TESSERACT
)
)
if
(
NOT Tesseract_FOUND
)
find_package
(
Tesseract QUIET
)
# Prefer CMake's standard locations (including Tesseract_DIR)
endif
()
if
(
NOT Tesseract_FOUND
)
include
(
"
${
CMAKE_CURRENT_LIST_DIR
}
/FindTesseract.cmake"
)
# OpenCV's fallback
endif
()
if
(
Tesseract_FOUND
)
if
(
Tesseract_VERSION
)
message
(
STATUS
"Tesseract: YES (ver
${
Tesseract_VERSION
}
)"
)
else
()
message
(
STATUS
"Tesseract: YES (ver unknown)"
)
endif
()
if
(
NOT ENABLE_CXX11 AND NOT OPENCV_SKIP_TESSERACT_BUILD_CHECK
)
try_compile
(
__VALID_TESSERACT
"
${
OpenCV_BINARY_DIR
}
/cmake_check/tesseract"
"
${
CMAKE_CURRENT_LIST_DIR
}
/checks/tesseract_test.cpp"
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES:STRING=
${
Tesseract_INCLUDE_DIRS
}
"
LINK_LIBRARIES
${
Tesseract_LIBRARIES
}
OUTPUT_VARIABLE TRY_OUT
)
if
(
NOT __VALID_TESSERACT
)
if
(
OPENCV_DEBUG_TESSERACT_BUILD
)
message
(
STATUS
"
${
TRY_OUT
}
"
)
endif
()
message
(
STATUS
"Can't use Tesseract (details: https://github.com/opencv/opencv_contrib/pull/2220)"
)
return
()
endif
()
endif
()
set
(
HAVE_TESSERACT 1
)
set
(
HAVE_TESSERACT 1
)
# TODO use ocv_add_external_target
set
(
name
"tesseract"
)
set
(
inc
"
${
Tesseract_INCLUDE_DIRS
}
"
)
set
(
link
"
${
Tesseract_LIBRARIES
}
"
)
set
(
def
""
)
if
(
BUILD_SHARED_LIBS
)
set
(
imp IMPORTED
)
endif
()
add_library
(
ocv.3rdparty.
${
name
}
INTERFACE
${
imp
}
)
set_target_properties
(
ocv.3rdparty.
${
name
}
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES
"
${
inc
}
"
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
"
${
inc
}
"
INTERFACE_LINK_LIBRARIES
"
${
link
}
"
INTERFACE_COMPILE_DEFINITIONS
"
${
def
}
"
)
if
(
NOT BUILD_SHARED_LIBS
)
install
(
TARGETS ocv.3rdparty.
${
name
}
EXPORT OpenCVModules
)
endif
()
else
()
message
(
STATUS
"Tesseract: NO"
)
endif
()
endif
()
modules/xfeatures2d/CMakeLists.txt
View file @
8532e651
set
(
the_description
"Contributed/Experimental Algorithms for Salient 2D Features Detection"
)
if
(
HAVE_CUDA
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wundef
)
endif
()
ocv_define_module
(
xfeatures2d opencv_core opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_shape opencv_ml opencv_cudaarithm WRAP python java
)
include
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/download_vgg.cmake
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment