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
e80393b4
Commit
e80393b4
authored
Oct 02, 2017
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1389 from alalek:fix_msvs2017_warning
parents
98ded863
0de0ba7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
tr_icdar_benchmark.cpp
modules/datasets/samples/tr_icdar_benchmark.cpp
+10
-4
tr_svt_benchmark.cpp
modules/datasets/samples/tr_svt_benchmark.cpp
+7
-1
No files found.
modules/datasets/samples/tr_icdar_benchmark.cpp
View file @
e80393b4
...
...
@@ -133,6 +133,12 @@ void er_draw(vector<Mat> &channels, vector<vector<ERStat> > ®ions, vector<Vec
}
}
// std::toupper is int->int
static
char
char_toupper
(
char
ch
)
{
return
(
char
)
std
::
toupper
((
int
)
ch
);
}
int
main
(
int
argc
,
char
*
argv
[])
{
const
char
*
keys
=
...
...
@@ -200,7 +206,7 @@ int main(int argc, char *argv[])
for
(
size_t
w
=
0
;
w
<
example
->
words
.
size
();
w
++
)
{
string
w_upper
=
example
->
words
[
w
].
value
;
transform
(
w_upper
.
begin
(),
w_upper
.
end
(),
w_upper
.
begin
(),
::
toupper
);
transform
(
w_upper
.
begin
(),
w_upper
.
end
(),
w_upper
.
begin
(),
char_
toupper
);
if
((
find
(
lex
->
begin
(),
lex
->
end
(),
w_upper
)
==
lex
->
end
())
&&
(
is_word_spotting
)
&&
(
selected_lex
!=
0
))
example
->
words
[
w
].
value
=
"###"
;
...
...
@@ -297,7 +303,7 @@ int main(int argc, char *argv[])
continue
;
}
std
::
transform
(
words
[
j
].
begin
(),
words
[
j
].
end
(),
words
[
j
].
begin
(),
::
toupper
);
std
::
transform
(
words
[
j
].
begin
(),
words
[
j
].
end
(),
words
[
j
].
begin
(),
char_
toupper
);
/* Increase confidence of predicted words matching a word in the lexicon */
if
(
lex
->
size
()
>
0
)
...
...
@@ -413,7 +419,7 @@ int main(int argc, char *argv[])
}
}
std
::
transform
(
t
.
value
.
begin
(),
t
.
value
.
end
(),
t
.
value
.
begin
(),
::
toupper
);
std
::
transform
(
t
.
value
.
begin
(),
t
.
value
.
end
(),
t
.
value
.
begin
(),
char_
toupper
);
if
(((
t
.
value
==
final_words
[
j
])
||
(
alnum_value
==
final_words
[
j
]))
&&
!
(
final_boxes
[
j
].
tl
().
x
>
t
.
x
+
t
.
width
||
final_boxes
[
j
].
br
().
x
<
t
.
x
||
final_boxes
[
j
].
tl
().
y
>
t
.
y
+
t
.
height
||
final_boxes
[
j
].
br
().
y
<
t
.
y
))
...
...
@@ -430,7 +436,7 @@ int main(int argc, char *argv[])
for
(
vector
<
word
>::
iterator
it
=
example
->
words
.
begin
();
it
!=
example
->
words
.
end
();
++
it
)
{
word
&
t
=
(
*
it
);
std
::
transform
(
t
.
value
.
begin
(),
t
.
value
.
end
(),
t
.
value
.
begin
(),
::
toupper
);
std
::
transform
(
t
.
value
.
begin
(),
t
.
value
.
end
(),
t
.
value
.
begin
(),
char_
toupper
);
if
((
t
.
value
==
"###"
)
&&
!
(
final_boxes
[
j
].
tl
().
x
>
t
.
x
+
t
.
width
||
final_boxes
[
j
].
br
().
x
<
t
.
x
||
final_boxes
[
j
].
tl
().
y
>
t
.
y
+
t
.
height
||
final_boxes
[
j
].
br
().
y
<
t
.
y
))
...
...
modules/datasets/samples/tr_svt_benchmark.cpp
View file @
e80393b4
...
...
@@ -133,6 +133,12 @@ void er_draw(vector<Mat> &channels, vector<vector<ERStat> > ®ions, vector<Vec
}
}
// std::toupper is int->int
static
char
char_toupper
(
char
ch
)
{
return
(
char
)
std
::
toupper
((
int
)
ch
);
}
int
main
(
int
argc
,
char
*
argv
[])
{
const
char
*
keys
=
...
...
@@ -244,7 +250,7 @@ int main(int argc, char *argv[])
continue
;
}
std
::
transform
(
words
[
j
].
begin
(),
words
[
j
].
end
(),
words
[
j
].
begin
(),
::
toupper
);
std
::
transform
(
words
[
j
].
begin
(),
words
[
j
].
end
(),
words
[
j
].
begin
(),
char_
toupper
);
if
(
find
(
example
->
lex
.
begin
(),
example
->
lex
.
end
(),
words
[
j
])
==
example
->
lex
.
end
())
{
...
...
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