Hello everyone,
I hope you are all well. I have installed opencv with extra modules with help of this [https://putuyuwono.wordpress.com/2015/04/23/building-and-installing-opencv-3-0-on-windows-7-64-bit/] tutorial. During configuration stage I have a message which says "Tesseract: NO"
After installation I have created a simple scene text detection project. And I have succesfully detected text in images.
After this part, I have tried to run ocr with below code. // img1 is a CV_8UC3 typed mat image. and output is a string variable.
Ptr<ocrtesseract> ocr = OCRTesseract::create(); ocr->run(img1, output);
This piece of code runs without any error but does not give me any ocr result. I have tried different images but result is the same.
I have also tried to set parameters for create function.
Ptr<ocrtesseract> ocr = OCRTesseract::create("C:\Program Files (x86)\Tesseract-OCR\tessdata", "eng", "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
Unfortunatelly this did not went well too. I did not get any errors but did not get a result too.
How can I make my code work?
Thanks in advance.
Here is full log of after CMAKE configuration.
FP16: Compiler support is available found IPP (ICV version): 9.0.1 [9.0.1] at: C:/opencv-3.0/source/opencv/3rdparty/ippicv/unpack/ippicv_win Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7") Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.6") Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.4") Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.2") Found apache ant 1.8.2: C:/NVPACK/apache-ant-1.8.2/bin/ant.bat Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file Caffe: NO Protobuf: NO Glog: NO Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR) Build libprotobuf from sources: libprotobuf not found into system The protocol buffer compiler not found Tesseract: NO
General configuration for OpenCV 3.1.0-dev ===================================== Version control: unknown
Extra modules: Location (extra): C:/opencv-3.0/source/opencv_contrib/modules Version control (extra): unknown
Platform: Timestamp: 2016-08-19T14:52:58Z Host: Windows 10.0.10586 AMD64 CMake: 3.6.1 CMake generator: Visual Studio 14 2015 Win64 CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe MSVC: 1900
C/C++: Built as dynamic libs?: YES C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe (ver 19.0.23506.0) C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /wd4251 /wd4324 /wd4275 /wd4589 /MP4 /MD /O2 /Ob2 /DNDEBUG /Zi C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /wd4251 /wd4324 /wd4275 /wd4589 /MP4 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP4 /MD /O2 /Ob2 /DNDEBUG /Zi C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP4 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 Linker flags (Release): /machine:x64 /INCREMENTAL:NO /debug Linker flags (Debug): /machine:x64 /debug /INCREMENTAL Precompiled headers: YES Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32 vfw32 3rdparty dependencies: zlib libjpeg libwebp libpng libtiff libjasper IlmImf libprotobuf
OpenCV modules: To be built: core flann imgproc ml photo reg surface_matching video dnn fuzzy imgcodecs shape videoio highgui objdetect plot superres ts xobjdetect xphoto bgsegm bioinspired dpm face features2d line_descriptor saliency text calib3d ccalib datasets rgbd stereo structured_light tracking videostab xfeatures2d ximgproc aruco optflow stitching Disabled: world contrib_world Disabled by dependency: - Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 python3 viz cvv hdf matlab sfm
Windows RT support: NO
GUI: QT: NO Win32 UI: YES OpenGL support: NO VTK support: NO
Media I/O: ZLib: build (ver 1.2.8) JPEG: build (ver 90) WEBP: build (ver 0.3.1) PNG: build (ver 1.6.19) TIFF: build (ver 42 - 4.0.2) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1) GDAL: NO GDCM: NO
Video I/O: Video for Windows: YES DC1394 1.x: NO DC1394 2.x: NO FFMPEG: YES (prebuilt binaries) codec: YES (ver 57.48.101) format: YES (ver 57.41.100) util: YES (ver 55.28.100) swscale: YES (ver 4.1.100) resample: NO gentoo-style: YES GStreamer: NO OpenNI: NO OpenNI PrimeSensor Modules: NO OpenNI2: NO PvAPI: NO GigEVisionSDK: NO DirectShow: YES Media Foundation: NO XIMEA: NO Intel PerC: NO
Parallel framework: Concurrency
Other third-party libraries: Use IPP: 9.0.1 [9.0.1] at: C:/opencv-3.0/source/opencv/3rdparty/ippicv/unpack/ippicv_win Use IPP Async: NO Use Eigen: NO Use Cuda: NO Use OpenCL: YES Use custom HAL: NO
OpenCL: <dynamic loading="" of="" opencl="" library=""> Include path: C:/opencv-3.0/source/opencv/3rdparty/include/opencl/1.2 Use AMDFFT: NO Use AMDBLAS: NO
Python 2: Interpreter: NO
Python 3: Interpreter: NO
Python (for build): NO
Java: ant: C:/NVPACK/apache-ant-1.8.2/bin/ant.bat (ver 1.8.2) JNI: C:/NVPACK/jdk1.7.0_71/include C:/NVPACK/jdk1.7.0_71/include/win32 C:/NVPACK/jdk1.7.0_71/include Java wrappers: NO Java tests: NO
Matlab: Matlab not found or implicitly disabled
Documentation: Doxygen: NO PlantUML: NO
Tests and samples: Tests: YES Performance tests: YES C/C++ Examples: NO
Install path: C:/opencv-3.0/build/install
cvconfig.h is in: C:/opencv-3.0/build
Configuring done