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
e99ddb33
Commit
e99ddb33
authored
5 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Show camera frustrums
parent
1ca5d80e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
applications/gui/src/camera.cpp
+1
-1
1 addition, 1 deletion
applications/gui/src/camera.cpp
applications/gui/src/overlay.cpp
+18
-1
18 additions, 1 deletion
applications/gui/src/overlay.cpp
applications/gui/src/overlay.hpp
+2
-1
2 additions, 1 deletion
applications/gui/src/overlay.hpp
with
21 additions
and
3 deletions
applications/gui/src/camera.cpp
+
1
−
1
View file @
e99ddb33
...
...
@@ -268,7 +268,7 @@ void ftl::gui::Camera::_draw(ftl::rgbd::FrameSet &fs) {
pos
/=
pos
[
3
];
auto
name
=
fs
.
frames
[
i
].
get
<
std
::
string
>
(
"name"
);
ftl
::
overlay
::
drawCamera
(
state_
.
getLeft
(),
im1_
,
over_depth
,
fs
.
frames
[
i
].
getLeftCamera
(),
pose
,
cv
::
Scalar
(
0
,
0
,
255
,
255
),
0.2
);
ftl
::
overlay
::
drawCamera
(
state_
.
getLeft
(),
im1_
,
over_depth
,
fs
.
frames
[
i
].
getLeftCamera
(),
pose
,
cv
::
Scalar
(
0
,
0
,
255
,
255
),
0.2
,
screen_
->
root
()
->
value
(
"show_frustrum"
,
false
)
);
if
(
name
)
ftl
::
overlay
::
drawText
(
state_
.
getLeft
(),
im1_
,
over_depth
,
*
name
,
pos
,
0.5
,
cv
::
Scalar
(
0
,
0
,
255
,
255
));
}
}
...
...
This diff is collapsed.
Click to expand it.
applications/gui/src/overlay.cpp
+
18
−
1
View file @
e99ddb33
...
...
@@ -117,7 +117,7 @@ void ftl::overlay::drawCamera(
const
ftl
::
rgbd
::
Camera
&
camera
,
const
Eigen
::
Matrix4d
&
pose
,
const
cv
::
Scalar
&
linecolour
,
double
scale
)
{
double
scale
,
bool
frustrum
)
{
//double size2 = size;
...
...
@@ -155,6 +155,23 @@ void ftl::overlay::drawCamera(
draw3DLine
(
vcam
,
colour
,
depth
,
p100
,
p110
,
linecolour
);
draw3DLine
(
vcam
,
colour
,
depth
,
p110
,
origin
,
linecolour
);
if
(
frustrum
)
{
const
double
fscale
=
16.0
;
Eigen
::
Vector4d
f110
=
pose
.
inverse
()
*
Eigen
::
Vector4d
(
-
width2
*
fscale
,
-
height2
*
fscale
,
scale
*
fscale
,
1
);
Eigen
::
Vector4d
f100
=
pose
.
inverse
()
*
Eigen
::
Vector4d
(
-
width2
*
fscale
,
height2
*
fscale
,
scale
*
fscale
,
1
);
Eigen
::
Vector4d
f010
=
pose
.
inverse
()
*
Eigen
::
Vector4d
(
width2
*
fscale
,
-
height2
*
fscale
,
scale
*
fscale
,
1
);
Eigen
::
Vector4d
f000
=
pose
.
inverse
()
*
Eigen
::
Vector4d
(
width2
*
fscale
,
height2
*
fscale
,
scale
*
fscale
,
1
);
draw3DLine
(
vcam
,
colour
,
depth
,
f000
,
p000
,
cv
::
Scalar
(
0
,
255
,
0
,
0
));
draw3DLine
(
vcam
,
colour
,
depth
,
f010
,
p010
,
cv
::
Scalar
(
0
,
255
,
0
,
0
));
draw3DLine
(
vcam
,
colour
,
depth
,
f100
,
p100
,
cv
::
Scalar
(
0
,
255
,
0
,
0
));
draw3DLine
(
vcam
,
colour
,
depth
,
f110
,
p110
,
cv
::
Scalar
(
0
,
255
,
0
,
0
));
draw3DLine
(
vcam
,
colour
,
depth
,
f000
,
f010
,
cv
::
Scalar
(
0
,
255
,
0
,
0
));
draw3DLine
(
vcam
,
colour
,
depth
,
f000
,
f100
,
cv
::
Scalar
(
0
,
255
,
0
,
0
));
draw3DLine
(
vcam
,
colour
,
depth
,
f010
,
f110
,
cv
::
Scalar
(
0
,
255
,
0
,
0
));
draw3DLine
(
vcam
,
colour
,
depth
,
f100
,
f110
,
cv
::
Scalar
(
0
,
255
,
0
,
0
));
}
}
void
ftl
::
overlay
::
drawText
(
...
...
This diff is collapsed.
Click to expand it.
applications/gui/src/overlay.hpp
+
2
−
1
View file @
e99ddb33
...
...
@@ -51,7 +51,8 @@ void drawCamera(
const
ftl
::
rgbd
::
Camera
&
camera
,
const
Eigen
::
Matrix4d
&
pose
,
const
cv
::
Scalar
&
linecolour
,
double
scale
);
double
scale
=
1.0
,
bool
frustrum
=
false
);
}
}
...
...
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