Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mobile_robotics
wolf_projects
wolf_lib
plugins
vision
Commits
ac3d8360
Commit
ac3d8360
authored
May 10, 2022
by
Joan Solà Ortega
Browse files
Delete unused file
parent
50467068
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/yaml/processor_bundle_adjustment_yaml.cpp
deleted
100644 → 0
View file @
50467068
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Solà Ortega (jsola@iri.upc.edu)
// All rights reserved.
//
// This file is part of WOLF
// WOLF is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
// wolf yaml
#include
"core/yaml/yaml_conversion.h"
// wolf
#include
"core/processor/factory_processor.h"
// yaml-cpp library
#include
<yaml-cpp/yaml.h>
#include
"vision/processor/processor_bundle_adjustment.h"
namespace
wolf
{
namespace
{
static
ParamsProcessorBasePtr
createParamsProcessorBundleAdjustment
(
const
std
::
string
&
_filename_dot_yaml
)
{
YAML
::
Node
config
=
YAML
::
LoadFile
(
_filename_dot_yaml
);
if
(
config
.
IsNull
())
{
WOLF_ERROR
(
"Invalid YAML file!"
);
return
nullptr
;
}
else
if
(
config
[
"type"
].
as
<
std
::
string
>
()
==
"ProcessorBundleAdjustment"
)
{
ParamsProcessorBundleAdjustmentPtr
params
=
std
::
make_shared
<
ParamsProcessorBundleAdjustment
>
();
YAML
::
Node
vision_utils
=
config
[
"vision_utils"
];
params
->
yaml_file_params_vision_utils
=
vision_utils
[
"YAML file params"
].
as
<
std
::
string
>
();
// relative to global path for Vision Utils YAML
assert
(
params
->
yaml_file_params_vision_utils
.
at
(
0
)
!=
(
'/'
)
&&
"The parameter YAML FILE PARAMS (in processor params YAML file) must be specified with a path relative to the processor YAML file."
);
unsigned
first
=
_filename_dot_yaml
.
find
(
"/"
);
unsigned
last
=
_filename_dot_yaml
.
find_last_of
(
"/"
);
std
::
string
strNew
=
_filename_dot_yaml
.
substr
(
first
,
last
-
first
);
params
->
yaml_file_params_vision_utils
=
_filename_dot_yaml
.
substr
(
first
,
last
-
first
)
+
"/"
+
params
->
yaml_file_params_vision_utils
;
YAML
::
Node
algorithm
=
config
[
"algorithm"
];
params
->
time_tolerance
=
algorithm
[
"time tolerance"
]
.
as
<
double
>
();
params
->
voting_active
=
algorithm
[
"voting active"
]
.
as
<
bool
>
();
params
->
delete_ambiguities
=
algorithm
[
"delete ambiguities"
]
.
as
<
bool
>
();
params
->
min_features_for_keyframe
=
algorithm
[
"minimum features for keyframe"
]
.
as
<
unsigned
int
>
();
params
->
max_new_features
=
algorithm
[
"maximum new features"
]
.
as
<
unsigned
int
>
();
params
->
n_cells_h
=
algorithm
[
"grid horiz cells"
]
.
as
<
int
>
();
params
->
n_cells_v
=
algorithm
[
"grid vert cells"
]
.
as
<
int
>
();
params
->
min_response_new_feature
=
algorithm
[
"min response new features"
]
.
as
<
int
>
();
params
->
min_track_length_for_factor
=
algorithm
[
"min track length for factor"
].
as
<
int
>
();
YAML
::
Node
noise
=
config
[
"noise"
];
params
->
pixel_noise_std
=
noise
[
"pixel noise std"
].
as
<
double
>
();
return
params
;
}
else
{
WOLF_ERROR
(
"Wrong processor type! Should be
\"
TRACKER BUNDLE ADJUSTMENT
\"
"
);
return
nullptr
;
}
return
nullptr
;
}
// Register in the FactorySensor
const
bool
WOLF_UNUSED
registered_prc_bundle_adjustment
=
FactoryParamsProcessor
::
registerCreator
(
"ProcessorBundleAdjustment"
,
createParamsProcessorBundleAdjustment
);
}
// namespace [unnamed]
}
// namespace wolf
src/yaml/sensor_camera_yaml.cpp
View file @
ac3d8360
...
...
@@ -26,12 +26,12 @@
* \author: jsola
*/
//
wolf yaml
#include
"
core/yaml/yaml_conversion
.h"
//
this plugin
#include
"
vision/sensor/sensor_camera
.h"
// wolf
#include
"vision/sensor/sensor_camera.h"
#include
"core/sensor/factory_sensor.h"
#include
"core/yaml/yaml_conversion.h"
// yaml-cpp library
#include
<yaml-cpp/yaml.h>
...
...
Write
Preview
Supports
Markdown
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