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
ac5fb1d8
Commit
ac5fb1d8
authored
Oct 22, 2015
by
Maksim Shabunin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #347 from sturkmen72:master
parents
35c300f5
e58699e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
webcam_demo.cpp
modules/text/samples/webcam_demo.cpp
+8
-7
No files found.
modules/text/samples/webcam_demo.cpp
View file @
ac5fb1d8
...
...
@@ -234,7 +234,8 @@ int main(int argc, char* argv[])
frame
.
copyTo
(
out_img
);
float
scale_img
=
(
float
)(
600.
f
/
frame
.
rows
);
int
scale
=
downsize
?
2
:
1
;
float
scale_img
=
(
float
)((
600.
f
/
frame
.
rows
)
/
scale
);
float
scale_font
=
(
float
)(
2
-
scale_img
)
/
1.4
f
;
vector
<
string
>
words_detection
;
float
min_confidence1
=
0.
f
,
min_confidence2
=
0.
f
;
...
...
@@ -318,13 +319,13 @@ int main(int argc, char* argv[])
t_all
=
((
double
)
getTickCount
()
-
t_all
)
*
1000
/
getTickFrequency
();
char
buff
[
100
];
sprintf
(
buff
,
"%2.1f Fps. @
640x480"
,
(
float
)(
1000
/
t_all
)
);
sprintf
(
buff
,
"%2.1f Fps. @
%dx%d"
,
(
float
)(
1000
/
t_all
),
out_img
.
cols
,
out_img
.
rows
);
string
fps_info
=
buff
;
rectangle
(
out_img
,
Point
(
out_img
.
rows
-
160
,
out_img
.
rows
-
70
),
Point
(
out_img
.
cols
,
out_img
.
rows
),
Scalar
(
255
,
255
,
255
),
-
1
);
putText
(
out_img
,
fps_info
,
Point
(
10
,
out_img
.
rows
-
10
),
FONT_HERSHEY_DUPLEX
,
scale_font
,
Scalar
(
255
,
0
,
0
));
putText
(
out_img
,
region_types_str
[
REGION_TYPE
],
Point
(
out_img
.
rows
-
150
,
out_img
.
rows
-
50
),
FONT_HERSHEY_DUPLEX
,
scale_font
,
Scalar
(
255
,
0
,
0
));
putText
(
out_img
,
grouping_algorithms_str
[
GROUPING_ALGORITHM
],
Point
(
out_img
.
rows
-
150
,
out_img
.
rows
-
30
),
FONT_HERSHEY_DUPLEX
,
scale_font
,
Scalar
(
255
,
0
,
0
));
putText
(
out_img
,
recognitions_str
[
RECOGNITION
],
Point
(
out_img
.
rows
-
150
,
out_img
.
rows
-
10
),
FONT_HERSHEY_DUPLEX
,
scale_font
,
Scalar
(
255
,
0
,
0
));
rectangle
(
out_img
,
Point
(
out_img
.
rows
-
(
160
/
scale
),
out_img
.
rows
-
(
70
/
scale
)
),
Point
(
out_img
.
cols
,
out_img
.
rows
),
Scalar
(
255
,
255
,
255
),
-
1
);
putText
(
out_img
,
fps_info
,
Point
(
10
,
out_img
.
rows
-
(
10
/
scale
)
),
FONT_HERSHEY_DUPLEX
,
scale_font
,
Scalar
(
255
,
0
,
0
));
putText
(
out_img
,
region_types_str
[
REGION_TYPE
],
Point
(
out_img
.
rows
-
(
150
/
scale
),
out_img
.
rows
-
(
50
/
scale
)
),
FONT_HERSHEY_DUPLEX
,
scale_font
,
Scalar
(
255
,
0
,
0
));
putText
(
out_img
,
grouping_algorithms_str
[
GROUPING_ALGORITHM
],
Point
(
out_img
.
rows
-
(
150
/
scale
),
out_img
.
rows
-
(
30
/
scale
)
),
FONT_HERSHEY_DUPLEX
,
scale_font
,
Scalar
(
255
,
0
,
0
));
putText
(
out_img
,
recognitions_str
[
RECOGNITION
],
Point
(
out_img
.
rows
-
(
150
/
scale
),
out_img
.
rows
-
(
10
/
scale
)
),
FONT_HERSHEY_DUPLEX
,
scale_font
,
Scalar
(
255
,
0
,
0
));
imshow
(
"recognition"
,
out_img
);
...
...
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