OpenCV v3.0, VS 2013.
This error comes from the conflict of "min",
and "min" is defined in both minwindef.h and limit.
("c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\limits")
So, I undefined min at minwindef.h.
which is in ..\OpenCV\opencv\modules\videoio\src\precomp.hpp.
I added below lines to precomp.hpp:
..\OpenCV\opencv_contrib\modules\text\src\precomp.hpp
if defined WIN32 || defined WINCE
#if !defined _WIN32_WINNT
#ifdef HAVE_MSMF
#define _WIN32_WINNT 0x0600 // Windows Vista
#else
#define _WIN32_WINNT 0x0500 // Windows 2000
#endif
#endif
#include <windows.h>
#undef small
#undef min
#undef max
#undef abs
endif
is that really the exact error msg ? which compiler / os ?
(and no,
std::numeric_limits<double>::min();
is not missing anything. why do you think so ?)Error 2 error C2589: '(': token not valid to the right '::' D:\OpenCV\opencv_contrib\modules\text\src\erfilter.cpp 1406 1 opencv_text
I have just make a little translation from italian.. Compiling with VS 2013 OpenCV 3.0
Thanks for you answer berak,
If I ask the definition, I get this file:
and this definition :
so, question now is: why does your compiler confuse the 2 ? did you make any chages to the sample code ?
(tried with vs2008, no problem here)
Yes it is, I saw that the other function epsilon, does links to the right definition.. I'll try to find this mess.. thanks!
Dear berek, how do you configure your CMake with your "tesseract" in windows? Where did you put the dependencies file, did you add "entry path" in CMake ? Thanks for your time.
sorry, no real idea about tesseract ;(
but if you use cmake-gui, you'll see a lot of boxes to fill in with pathes to various tesseract / leptonica items
And now the question is how do you make to build module text in vs2008 without tesseract? :) What did you tried? Maybe the others modules? Sorry for this question, but as you see I'm newbie for compilation's world.
oh, sorry, i tried the textdetection.cpp sample (which works without having tesseract on board)
Hey Mau,
I am in the same error. how did u fix it?