15
15
#include < utility>
16
16
#include < vector>
17
17
18
- // Lluis:DONT KNOW WHY ITS NOT VISIBLE HERE
19
- #define CV_StsNotImplemented (-213 )
20
- #define CV_StsError (-2 )
21
-
22
-
23
-
24
- // Luis: should this be moved elsewhere?
18
+ // should this be moved elsewhere?
25
19
// In precomp.hpp It doesn't work
26
20
#ifdef HAVE_CAFFE
27
21
#include " caffe/caffe.hpp"
30
24
31
25
namespace cv { namespace text {
32
26
33
- // Lluis: Maybe OpenCV has a routine better suited
27
+ // Maybe OpenCV has a routine better suited
34
28
inline bool fileExists (String filename) {
35
29
std::ifstream f (filename.c_str ());
36
30
return f.good ();
@@ -55,7 +49,7 @@ class DictNetCaffeImpl: public DictNet{
55
49
input.convertTo (output, CV_32FC1);
56
50
}
57
51
}else {
58
- CV_Error (CV_StsError ," Expecting images with either 1 or 3 channels" );
52
+ CV_Error (Error::StsError ," Expecting images with either 1 or 3 channels" );
59
53
}
60
54
resize (output,output,this ->inputGeometry_ );
61
55
Scalar dev,mean;
@@ -120,7 +114,7 @@ class DictNetCaffeImpl: public DictNet{
120
114
this ->outputSize_ =net_->output_blobs ()[0 ]->channels ();
121
115
122
116
#else
123
- CV_Error (CV_StsError ," Caffe not available during compilation!" );
117
+ CV_Error (Error::StsError ," Caffe not available during compilation!" );
124
118
#endif
125
119
}
126
120
@@ -166,7 +160,7 @@ Ptr<DictNet> DictNet::create(String archFilename,String weightsFilename,int mini
166
160
break ;
167
161
case OCR_HOLISTIC_BACKEND_NONE:
168
162
default :
169
- CV_Error (CV_StsError ," DictNet::create backend not implemented" );
163
+ CV_Error (Error::StsError ," DictNet::create backend not implemented" );
170
164
return Ptr<DictNet>();
171
165
break ;
172
166
}
@@ -208,7 +202,7 @@ class OCRHolisticWordRecognizerImpl: public OCRHolisticWordRecognizer{
208
202
CV_Assert (fileExists (vocabullaryFilename));// this fails for some rason
209
203
std::ifstream labelsFile (vocabullaryFilename.c_str ());
210
204
if (!labelsFile){
211
- CV_Error (CV_StsError ," Could not read Labels from file" );
205
+ CV_Error (Error::StsError ," Could not read Labels from file" );
212
206
}
213
207
std::string line;
214
208
while (std::getline (labelsFile, line)){
0 commit comments