Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
56f17b78
Commit
56f17b78
authored
Jun 14, 2010
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added some on-screen help
parent
2d2cc3ec
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
select3dobj.cpp
samples/cpp/select3dobj.cpp
+11
-2
No files found.
samples/cpp/select3dobj.cpp
View file @
56f17b78
...
...
@@ -230,7 +230,7 @@ static int select3DBox(const string& windowname, const string& selWinName, const
box
.
clear
();
return
c
==
' '
?
-
1
:
-
100
;
}
if
(
c
==
'\r'
||
c
==
'\n'
&&
nobjpt
==
4
&&
box
[
3
].
z
>
0
)
if
(
(
c
==
'\r'
||
c
==
'\n'
)
&&
nobjpt
==
4
&&
box
[
3
].
z
!=
0
)
return
1
;
}
}
...
...
@@ -321,6 +321,13 @@ int main(int argc, char** argv)
{
const
char
*
help
=
"Usage: select3dobj -w <board_width -h <board_height> [-s <square_size>]
\n
"
"
\t
-i <intrinsics_filename> -o <output_prefix> [video_filename/cameraId]
\n
"
;
const
char
*
screen_help
=
"Actions:
\n
"
"
\t
Select object as 3D box with the mouse. That's it
\n
"
"
\t
ESC - Reset the selection
\n
"
"
\t
SPACE - Skip the frame; move to the next frame (not in video mode)
\n
"
"
\t
ENTER - Confirm the selection. Grab next object in video mode.
\n
"
"
\t
q - Exit the program
\n
"
;
if
(
argc
<
5
)
{
...
...
@@ -448,6 +455,8 @@ int main(int argc, char** argv)
int
frameIdx
=
0
;
bool
grabNext
=
!
imageList
.
empty
();
puts
(
screen_help
);
for
(
int
i
=
0
;;
i
++
)
{
Mat
frame0
;
...
...
@@ -540,7 +549,7 @@ int main(int argc, char** argv)
imshow
(
"View"
,
shownFrame
);
imshow
(
"Selected Object"
,
selectedObjFrame
);
int
c
=
waitKey
(
imageList
.
empty
()
?
30
:
300
);
int
c
=
waitKey
(
imageList
.
empty
()
&&
!
box
.
empty
()
?
30
:
300
);
if
(
c
==
'q'
||
c
==
'Q'
)
break
;
if
(
c
==
'\r'
||
c
==
'\n'
)
...
...
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