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
Show more breadcrumbs
Nicolas Pope
ftl
Commits
a7039981
Commit
a7039981
authored
5 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Fix for runtime aruco config
parent
e45bbabe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#22522
passed
5 years ago
Stage: all
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/operators/src/aruco.cpp
+20
-9
20 additions, 9 deletions
components/operators/src/aruco.cpp
with
20 additions
and
9 deletions
components/operators/src/aruco.cpp
+
20
−
9
View file @
a7039981
#include
"ftl/operators/detectandtrack.hpp"
#include
"ftl/codecs/transformation.hpp"
#define LOGURU_REPLACE_GLOG 1
#include
<loguru.hpp>
using
ftl
::
operators
::
ArUco
;
using
ftl
::
rgbd
::
Frame
;
...
...
@@ -18,18 +21,22 @@ ArUco::ArUco(ftl::Configurable *cfg) : ftl::operators::Operator(cfg) {
params_
=
cv
::
aruco
::
DetectorParameters
::
create
();
debug_
=
cfg
->
value
(
"debug"
,
false
);
estimate_pose_
=
cfg
->
value
(
"estimate_pose"
,
false
);
auto
marker_size
=
cfg
->
get
<
float
>
(
"marker_size"
);
if
(
!
marker_size
||
(
*
marker_size
<
0.0
f
))
{
marker_size_
=
0.
0
;
estimate_pose_
=
false
;
}
else
{
marker_size_
=
*
marker_size
;
}
//
estimate_pose_ = cfg->value("estimate_pose", false);
//
auto marker_size = cfg->get<float>("marker_size");
//
if (!marker_size || (*marker_size <
=
0.0f)) {
//
marker_size_ = 0.
1f
;
//
estimate_pose_ = false;
//
}
//
else {
//
marker_size_ = *marker_size;
//
}
channel_in_
=
Channel
::
Colour
;
channel_out_
=
Channel
::
Transforms
;
cfg
->
on
(
"dictionary"
,
[
this
,
cfg
](
const
ftl
::
config
::
Event
&
e
)
{
dictionary_
=
cv
::
aruco
::
getPredefinedDictionary
(
cfg
->
value
(
"dictionary"
,
0
));
});
}
bool
ArUco
::
apply
(
Frame
&
in
,
Frame
&
out
,
cudaStream_t
stream
)
{
...
...
@@ -38,6 +45,10 @@ bool ArUco::apply(Frame &in, Frame &out, cudaStream_t stream) {
Frame
*
inptr
=
&
in
;
Frame
*
outptr
=
&
out
;
estimate_pose_
=
config
()
->
value
(
"estimate_pose"
,
false
);
debug_
=
config
()
->
value
(
"debug"
,
false
);
marker_size_
=
config
()
->
value
(
"marker_size"
,
0.1
f
);
job_
=
std
::
move
(
ftl
::
pool
.
push
([
this
,
inptr
,
outptr
,
stream
](
int
id
)
{
Frame
&
in
=
*
inptr
;
Frame
&
out
=
*
outptr
;
...
...
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