@@ -271,9 +271,9 @@ class DeepCNNOpenCvDNNImpl: public DeepCNN{
271
271
// Size outputGeometry_;//= Size(1,1);
272
272
// int channelCount_;
273
273
// int inputChannel_ ;//=1;
274
- const int _inputHeight =32 ;
275
- const int _inputWidth =100 ;
276
- const int _inputChannel =1 ;
274
+ // const int _inputHeight =32;
275
+ // const int _inputWidth =100;
276
+ // const int _inputChannel =1;
277
277
public:
278
278
DeepCNNOpenCvDNNImpl (const DeepCNNOpenCvDNNImpl& dn):
279
279
minibatchSz_ (dn.minibatchSz_),outputSize_(dn.outputSize_){
@@ -300,8 +300,8 @@ class DeepCNNOpenCvDNNImpl: public DeepCNN{
300
300
// Implemented to supress Visual Studio warning "assignment operator could not be generated"
301
301
}
302
302
303
- DeepCNNOpenCvDNNImpl (String modelArchFilename, String modelWeightsFilename,Ptr<ImagePreprocessor> preprocessor, int maxMinibatchSz)
304
- :minibatchSz_(maxMinibatchSz)
303
+ DeepCNNOpenCvDNNImpl (String modelArchFilename, String modelWeightsFilename,Ptr<ImagePreprocessor> preprocessor, int maxMinibatchSz, int inputWidth = 100 , int inputHeight = 32 )
304
+ :minibatchSz_(maxMinibatchSz),_inputWidth(inputWidth),_inputHeight(inputHeight)
305
305
{
306
306
307
307
CV_Assert (this ->minibatchSz_ >0 );
@@ -612,13 +612,13 @@ class OCRHolisticWordRecognizerImpl: public OCRHolisticWordRecognizer{
612
612
this ->classifier_ ->classifyBatch (inputImageList,netOutput);
613
613
614
614
for (int k=0 ;k<netOutput.rows ;k++)
615
- {
615
+ {https: // www.google.es/?gfe_rd=cr&dcr=0&ei=4fq7We8Bk9jyB8zPp5AL
616
616
int classNum;
617
617
double confidence;
618
618
NetOutput::getClassification ((float *)(netOutput.row (k).data ),this ->classifier_ ->getOutputSize (),classNum,confidence);
619
619
transcriptionVec.push_back (this ->labels_ [classNum]);
620
620
confidenceVec.push_back (confidence);
621
- }
621
+ }https: // www.google.es/?gfe_rd=cr&dcr=0&ei=4fq7We8Bk9jyB8zPp5AL
622
622
}
623
623
624
624
0 commit comments