Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
887e6e5e
Commit
887e6e5e
authored
Sep 17, 2017
by
Suman Ghosh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed hard codinginput parameters
parent
efc864c5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
ocr_holistic.cpp
modules/text/src/ocr_holistic.cpp
+7
-7
text_detectorCNN.cpp
modules/text/src/text_detectorCNN.cpp
+8
-8
No files found.
modules/text/src/ocr_holistic.cpp
View file @
887e6e5e
...
...
@@ -271,9 +271,9 @@ protected:
//Size outputGeometry_;//= Size(1,1);
//int channelCount_;
// int inputChannel_ ;//=1;
//const int _inputHeight =32
;
//const int _inputWidth =100
;
//const int _inputChannel =1
;
int
_inputHeight
;
int
_inputWidth
;
int
_inputChannel
;
public
:
DeepCNNOpenCvDNNImpl
(
const
DeepCNNOpenCvDNNImpl
&
dn
)
:
minibatchSz_
(
dn
.
minibatchSz_
),
outputSize_
(
dn
.
outputSize_
){
...
...
@@ -300,8 +300,8 @@ public:
//Implemented to supress Visual Studio warning "assignment operator could not be generated"
}
DeepCNNOpenCvDNNImpl
(
String
modelArchFilename
,
String
modelWeightsFilename
,
Ptr
<
ImagePreprocessor
>
preprocessor
,
int
maxMinibatchSz
,
int
inputWidth
=
100
,
int
inputHeight
=
32
)
:
minibatchSz_
(
maxMinibatchSz
),
_inputWidth
(
inputWidth
),
_inputHeight
(
inputHeight
)
DeepCNNOpenCvDNNImpl
(
String
modelArchFilename
,
String
modelWeightsFilename
,
Ptr
<
ImagePreprocessor
>
preprocessor
,
int
maxMinibatchSz
,
int
inputWidth
=
100
,
int
inputHeight
=
32
,
int
inputChannel
=
1
)
:
minibatchSz_
(
maxMinibatchSz
),
_inputWidth
(
inputWidth
),
_inputHeight
(
inputHeight
)
,
_inputChannel
(
inputChannel
)
{
CV_Assert
(
this
->
minibatchSz_
>
0
);
...
...
@@ -612,13 +612,13 @@ public:
this
->
classifier_
->
classifyBatch
(
inputImageList
,
netOutput
);
for
(
int
k
=
0
;
k
<
netOutput
.
rows
;
k
++
)
{
https
:
//www.google.es/?gfe_rd=cr&dcr=0&ei=4fq7We8Bk9jyB8zPp5AL
{
int
classNum
;
double
confidence
;
NetOutput
::
getClassification
((
float
*
)(
netOutput
.
row
(
k
).
data
),
this
->
classifier_
->
getOutputSize
(),
classNum
,
confidence
);
transcriptionVec
.
push_back
(
this
->
labels_
[
classNum
]);
confidenceVec
.
push_back
(
confidence
);
}
https
:
//www.google.es/?gfe_rd=cr&dcr=0&ei=4fq7We8Bk9jyB8zPp5AL
}
}
...
...
modules/text/src/text_detectorCNN.cpp
View file @
887e6e5e
...
...
@@ -252,9 +252,9 @@ protected:
//Size inputGeometry_;
int
minibatchSz_
;
//The existence of the assignment operator mandates this to be nonconst
//int outputSize_;
const
int
_inputHeight
=
700
;
const
int
_inputWidth
=
700
;
const
int
_inputChannel
=
3
;
int
inputHeight_
;
int
inputWidth_
;
int
inputChannel_
;
public
:
DeepCNNTextDetectorDNNImpl
(
const
DeepCNNTextDetectorDNNImpl
&
dn
)
:
minibatchSz_
(
dn
.
minibatchSz_
){
...
...
@@ -282,8 +282,8 @@ public:
//Implemented to supress Visual Studio warning "assignment operator could not be generated"
}
DeepCNNTextDetectorDNNImpl
(
String
modelArchFilename
,
String
modelWeightsFilename
,
Ptr
<
ImagePreprocessor
>
preprocessor
,
int
maxMinibatchSz
)
:
minibatchSz_
(
maxMinibatchSz
)
DeepCNNTextDetectorDNNImpl
(
String
modelArchFilename
,
String
modelWeightsFilename
,
Ptr
<
ImagePreprocessor
>
preprocessor
,
int
maxMinibatchSz
,
int
inputHeight
=
700
,
int
inputWidth
=
700
,
int
inputChannel
=
3
)
:
minibatchSz_
(
maxMinibatchSz
)
,
inputHeight_
(
inputHeight
),
inputWidth_
(
inputWidth
),
inputChannel_
(
inputChannel
)
{
CV_Assert
(
this
->
minibatchSz_
>
0
);
...
...
@@ -304,9 +304,9 @@ public:
exit
(
-
1
);
}
this
->
inputGeometry_
.
height
=
_inputHeight
;
this
->
inputGeometry_
.
width
=
_inputWidth
;
//inputLayer->width();
this
->
inputChannelCount_
=
_inputChannel
;
//inputLayer->channels();
this
->
inputGeometry_
.
height
=
inputHeight_
;
this
->
inputGeometry_
.
width
=
inputWidth_
;
//inputLayer->width();
this
->
inputChannelCount_
=
inputChannel_
;
//inputLayer->channels();
#else
CV_Error
(
Error
::
StsError
,
"DNN module not available during compilation!"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment