Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Maintenance on Friday 28.3. at 13:00. ETA 60 - 90 minutes.
Show more breadcrumbs
Nicolas Pope
ftl
Commits
a73f1618
Commit
a73f1618
authored
4 years ago
by
Sebastian Hahta
Browse files
Options
Downloads
Patches
Plain Diff
aruco display app
parent
a97cdd20
No related branches found
No related tags found
No related merge requests found
Pipeline
#28637
passed
4 years ago
Stage: all
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+2
-0
2 additions, 0 deletions
CMakeLists.txt
applications/aruco/CMakeLists.txt
+11
-0
11 additions, 0 deletions
applications/aruco/CMakeLists.txt
applications/aruco/src/main.cpp
+50
-0
50 additions, 0 deletions
applications/aruco/src/main.cpp
with
63 additions
and
0 deletions
CMakeLists.txt
+
2
−
0
View file @
a73f1618
...
...
@@ -487,6 +487,8 @@ if (HAVE_NANOGUI)
add_subdirectory
(
applications/gui2
)
endif
()
add_subdirectory
(
applications/aruco
)
### Generate Build Configuration Files =========================================
configure_file
(
${
CMAKE_SOURCE_DIR
}
/components/common/cpp/include/ftl/config.h.in
...
...
This diff is collapsed.
Click to expand it.
applications/aruco/CMakeLists.txt
0 → 100644
+
11
−
0
View file @
a73f1618
set
(
FTLARUCOSRC
src/main.cpp
)
add_executable
(
ftl-aruco
${
FTLARUCOSRC
}
)
target_include_directories
(
ftl-aruco PRIVATE src
)
target_link_libraries
(
ftl-aruco ftlcommon Threads::Threads
${
OpenCV_LIBS
}
)
This diff is collapsed.
Click to expand it.
applications/aruco/src/main.cpp
0 → 100644
+
50
−
0
View file @
a73f1618
#include
<ftl/timer.hpp>
#include
<ftl/configuration.hpp>
#include
<opencv2/highgui.hpp>
#include
<opencv2/aruco.hpp>
#include
<vector>
#include
<string>
int
main
(
int
argc
,
char
**
argv
)
{
std
::
vector
<
cv
::
Mat
>
tags
;
unsigned
int
ntags
=
10
;
cv
::
Ptr
<
cv
::
aruco
::
Dictionary
>
dict
=
cv
::
aruco
::
getPredefinedDictionary
(
cv
::
aruco
::
DICT_4X4_50
);
unsigned
int
size
=
1024
;
unsigned
int
margin
=
1
;
unsigned
int
delay
=
100
;
argc
--
;
argv
++
;
auto
opts
=
ftl
::
config
::
read_options
(
&
argv
,
&
argc
);
if
(
opts
.
count
(
"delay"
))
delay
=
std
::
stoi
(
opts
[
"delay"
]);
if
(
opts
.
count
(
"dict"
))
dict
=
cv
::
aruco
::
getPredefinedDictionary
(
std
::
stoi
(
opts
[
"dict"
]));
if
(
opts
.
count
(
"ntags"
))
ntags
=
std
::
stoi
(
opts
[
"ntags"
]);
if
(
opts
.
count
(
"size"
))
size
=
std
::
stoi
(
opts
[
"size"
]);
for
(
unsigned
int
i
=
0
;
i
<
ntags
;
i
++
)
{
cv
::
aruco
::
drawMarker
(
dict
,
i
,
size
,
tags
.
emplace_back
(),
margin
);
}
int
id
=
0
;
ftl
::
timer
::
setInterval
(
delay
);
ftl
::
timer
::
setHighPrecision
(
true
);
auto
h
=
ftl
::
timer
::
add
(
ftl
::
timer
::
kTimerMain
,
[
&
](
uint64_t
){
cv
::
imshow
(
"ArUco"
,
tags
[
id
]);
if
(
cv
::
waitKey
(
1
)
==
27
)
{
ftl
::
timer
::
stop
(
false
);
}
id
=
(
id
+
1
)
%
ntags
;
return
true
;
});
ftl
::
timer
::
start
(
true
);
return
0
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment