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
271a9b40
Commit
271a9b40
authored
Aug 09, 2015
by
lluis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix w64 warnings
parent
6f4a09ca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
tr_icdar_benchmark.cpp
modules/datasets/samples/tr_icdar_benchmark.cpp
+3
-3
tr_icdar.cpp
modules/datasets/src/tr_icdar.cpp
+3
-3
No files found.
modules/datasets/samples/tr_icdar_benchmark.cpp
View file @
271a9b40
...
...
@@ -286,8 +286,8 @@ int main(int argc, char *argv[])
boxes
[
j
].
y
+=
nm_boxes
[
i
].
y
-
15
;
}
float
min_confidence
=
(
ocr_is_tesseract
)
?
51.
:
0.
;
float
min_confidence4
=
(
ocr_is_tesseract
)
?
60.
:
0.
;
float
min_confidence
=
(
ocr_is_tesseract
)
?
(
float
)
51.
:
(
float
)
0.
;
float
min_confidence4
=
(
ocr_is_tesseract
)
?
(
float
)
60.
:
(
float
)
0.
;
//cout << " word = " << words[j] << "\t confidence = " << confidences[j] << endl;
if
((
words
[
j
].
size
()
<
2
)
||
(
confidences
[
j
]
<
min_confidence
)
||
((
words
[
j
].
size
()
==
2
)
&&
(
words
[
j
][
0
]
==
words
[
j
][
1
]))
||
...
...
@@ -353,7 +353,7 @@ int main(int argc, char *argv[])
/* Predicted words which are not in the lexicon are filtered
or changed to match one (when edit distance ratio < 0.34)*/
float
max_edit_distance_ratio
=
0.34
;
float
max_edit_distance_ratio
=
(
float
)
0.34
;
for
(
size_t
j
=
0
;
j
<
final_boxes
.
size
();
j
++
)
{
...
...
modules/datasets/src/tr_icdar.cpp
View file @
271a9b40
...
...
@@ -87,7 +87,7 @@ void TR_icdarImp::objParseFiles(const string &path, int img_id, vector<Ptr <Obje
line
.
erase
(
remove
(
line
.
begin
(),
line
.
end
(),
'\n'
),
line
.
end
());
line
.
erase
(
remove
(
line
.
begin
(),
line
.
end
(),
'\r'
),
line
.
end
());
//Ignore byte-order marks (BOM first utf character in W$ files)
if
(
(
line
[
0
]
==
(
char
)
0xEF
)
&&
(
line
[
1
]
==
(
char
)
0xBB
)
&&
(
line
[
2
]
==
(
char
)
0xBF
)
)
if
(
(
line
[
0
]
==
(
char
)
0xEF
u
)
&&
(
line
[
1
]
==
(
char
)
0xBBu
)
&&
(
line
[
2
]
==
(
char
)
0xBFu
)
)
line
.
erase
(
line
.
begin
(),
line
.
begin
()
+
3
);
vector
<
string
>
fields
;
split
(
line
,
fields
,
','
);
...
...
@@ -111,7 +111,7 @@ void TR_icdarImp::objParseFiles(const string &path, int img_id, vector<Ptr <Obje
line
.
erase
(
remove
(
line
.
begin
(),
line
.
end
(),
'\n'
),
line
.
end
());
line
.
erase
(
remove
(
line
.
begin
(),
line
.
end
(),
'\r'
),
line
.
end
());
//Ignore byte-order marks (BOM first utf character in W$ files)
if
(
(
line
[
0
]
==
(
char
)
0xEF
)
&&
(
line
[
1
]
==
(
char
)
0xBB
)
&&
(
line
[
2
]
==
(
char
)
0xBF
)
)
if
(
(
line
[
0
]
==
(
char
)
0xEF
u
)
&&
(
line
[
1
]
==
(
char
)
0xBBu
)
&&
(
line
[
2
]
==
(
char
)
0xBFu
)
)
line
.
erase
(
line
.
begin
(),
line
.
begin
()
+
3
);
curr
->
lex100
.
push_back
(
line
);
}
...
...
@@ -130,7 +130,7 @@ void TR_icdarImp::objParseFiles(const string &path, int img_id, vector<Ptr <Obje
line
.
erase
(
remove
(
line
.
begin
(),
line
.
end
(),
'\n'
),
line
.
end
());
line
.
erase
(
remove
(
line
.
begin
(),
line
.
end
(),
'\r'
),
line
.
end
());
//Ignore byte-order marks (BOM first utf character in W$ files)
if
(
(
line
[
0
]
==
(
char
)
0xEF
)
&&
(
line
[
1
]
==
(
char
)
0xBB
)
&&
(
line
[
2
]
==
(
char
)
0xBF
)
)
if
(
(
line
[
0
]
==
(
char
)
0xEF
u
)
&&
(
line
[
1
]
==
(
char
)
0xBBu
)
&&
(
line
[
2
]
==
(
char
)
0xBFu
)
)
line
.
erase
(
line
.
begin
(),
line
.
begin
()
+
3
);
curr
->
lexFull
.
push_back
(
line
);
}
...
...
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