Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Monado
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Merge Requests
10
Merge Requests
10
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Monado
Monado
Commits
67d33550
Commit
67d33550
authored
Jan 17, 2020
by
Jakob Bornecrantz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
t/calib: Change how default arguments are applied
parent
8564bbec
Pipeline
#98412
passed with stages
in 5 minutes and 44 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
28 deletions
+44
-28
src/xrt/auxiliary/tracking/t_tracking.h
src/xrt/auxiliary/tracking/t_tracking.h
+41
-23
src/xrt/state_trackers/gui/gui_scene_calibrate.c
src/xrt/state_trackers/gui/gui_scene_calibrate.c
+3
-5
No files found.
src/xrt/auxiliary/tracking/t_tracking.h
View file @
67d33550
...
...
@@ -299,29 +299,6 @@ t_psvr_create(struct xrt_frame_context *xfctx,
*
*/
#define T_CALIBRATION_DEFAULT_PARAMS \
{ \
false, T_BOARD_CHECKERS, \
{ \
9, 7, 0.025f, true, 5, \
}, \
{ \
9, \
7, \
0.025f, \
}, \
{ \
5, \
17, \
0.02f, \
}, \
{ \
false, \
20, \
}, \
20, 5, 20, 1, false, true \
}
/*!
* Board pattern type.
*/
...
...
@@ -399,6 +376,47 @@ struct t_calibration_params
bool
save_images
;
};
/*!
* Sets the calibration parameters to the their default values.
*/
static
inline
void
t_calibration_params_default
(
struct
t_calibration_params
*
p
)
{
p
->
use_fisheye
=
true
;
p
->
pattern
=
T_BOARD_CHECKERS
;
// Checker board.
p
->
checkers
.
cols
=
9
;
p
->
checkers
.
rows
=
7
;
p
->
checkers
.
size_meters
=
0
.
025
f
;
p
->
checkers
.
subpixel_enable
=
true
;
p
->
checkers
.
subpixel_size
=
5
;
// Symmetrical circles.
p
->
circles
.
cols
=
9
;
p
->
circles
.
rows
=
7
;
p
->
circles
.
distance_meters
=
0
.
025
f
;
// Asymmetrical circles.
p
->
asymmetric_circles
.
cols
=
5
;
p
->
asymmetric_circles
.
rows
=
7
;
p
->
asymmetric_circles
.
diagonal_distance_meters
=
0
.
02
f
;
// Loading of images.
p
->
load
.
enabled
=
false
;
p
->
load
.
num_images
=
20
;
// Frame collection info.
p
->
num_cooldown_frames
=
20
;
p
->
num_wait_for
=
5
;
p
->
num_collect_total
=
20
;
p
->
num_collect_restart
=
1
;
// Misc.
p
->
mirror_rgb_image
=
false
;
p
->
save_images
=
true
;
}
/*!
* @brief Create the camera calibration frame sink.
*
...
...
src/xrt/state_trackers/gui/gui_scene_calibrate.c
View file @
67d33550
...
...
@@ -275,16 +275,14 @@ gui_scene_calibrate(struct gui_program *p,
{
struct
calibration_scene
*
cs
=
U_TYPED_CALLOC
(
struct
calibration_scene
);
#ifdef XRT_HAVE_OPENCV
struct
t_calibration_params
def
=
T_CALIBRATION_DEFAULT_PARAMS
;
cs
->
params
=
def
;
#endif
cs
->
base
.
render
=
scene_render_select
;
cs
->
base
.
destroy
=
scene_destroy
;
cs
->
xfctx
=
xfctx
;
cs
->
xfs
=
xfs
;
cs
->
mode
=
mode
;
#ifdef XRT_HAVE_OPENCV
t_calibration_params_default
(
&
cs
->
params
);
#endif
gui_scene_push_front
(
p
,
&
cs
->
base
);
}
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