New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ifstream in text module not working #1
Comments
@Neuroforge I have this code:
It's work for me. |
Hello. This is turning out to be a Visual Studio problem. Still investigating, but i feel we can close this for now. Anyone searching this problem.
|
I've tried both relative and full paths. I have the files at each level of the project structure, and in the c drive root directory. And i tried "C:\trained_classifierNM1.xml" then "trained_classifierNM1.xml" Could this be a configuration in visual studio somewhere? |
this is my project: Before unrar opencvBinaries in C:/ |
Ok..... so that totally worked. This looks like some sort of folder permissions thing then. I don't understand why it won't do that in my user directory projects. Thank you. I will use your project as a template for now. Thank you. Also, please maintain this project. OpenCV is a nightmare to build and get working with varying configs and builds. You should also perhaps think about releasing via NUGET. Your hard work is appreciated. |
Hello,
I am calling a function from OpenCV that uses ifstream in C++. ifstream doesn't seem to work when tried in isolation. This works from source, but your copy has tesseract bundled in for VS2015, any idea what could be the problem?
Ptr er_filter1 = createERFilterNM1(loadClassifierNM1("trained_classifierNM1.xml"), 8, 0.00015f, 0.13f, 0.2f, true, 0.1f);
But getting.....
OpenCV Error: Bad argument (Default classifier file not found!) in cv::text::ERClassifierNM1::ERClassifierNM1, file ~\opencv_contrib-3.1.0\modules\text\src\erfilter.cpp, line 1039
The offending line is.....
if (ifstream(filename.c_str()))
{
.. Stuff works ....
}
else
{
error!!
}
Everything worked in VS2013 but i have to switch to VS2015.
I cannot get ifstream to work at all, even though the file is located in the .exe folder itsself or project directory. Everywhere really.
It's like ifstream has stopped working during the switch to VS2015
https://github.com/opencv/opencv_cont...
The text was updated successfully, but these errors were encountered: