Commit 49fb5ae7 authored by mederic_fourmy's avatar mederic_fourmy
Browse files

votefor KF slightly modified + install error fixed

parent b88cc71b
......@@ -34,6 +34,5 @@ test/map_apriltag_save.yaml
build_release/
apriltag.found
apriltagw.found
Testing/Temporary/LastTest.log
Testing/Temporary/CTestCostData.txt
......@@ -141,7 +141,6 @@ SET(HDRS_CAPTURE
SET(HDRS_COMMON
)
SET(HDRS_FACTOR
include/core/factor/factor_kf_lmk_pose_3d_with_extrinsics.h
)
SET(HDRS_FEATURE
include/apriltag/feature/feature_apriltag.h
......
......@@ -28,10 +28,10 @@ noise:
std_pix: 20 # pixel error
vote:
voting active: true
voting_active: true
min_time_vote: 0 # s
max_time_vote: 0 # s
min_features_for_keyframe: 12
min_features_for_keyframe: 12 # does not make sense
nb_vote_for_every_first: 50
reestimate_last_frame: true # for a better prior on the new keyframe: use only if no motion processor
......
......@@ -335,13 +335,18 @@ bool ProcessorTrackerLandmarkApriltag::voteForKeyFrame() const
double dt_incoming_origin = getIncoming()->getTimeStamp().get() - getOrigin()->getTimeStamp().get();
bool more_than_min_time_vote = dt_incoming_origin > min_time_vote_;
bool too_long_since_last_KF = dt_incoming_origin > max_time_vote_;
bool enough_features_in_last = detections_last_.size() >= min_features_for_keyframe_;
bool enough_features_in_incoming = detections_incoming_.size() >= min_features_for_keyframe_;
// no detection in incoming capture and a minimum time since last KF has past
if (enough_features_in_last and !enough_features_in_incoming and more_than_min_time_vote)
return true;
// the elapsed time since last KF is too long
if (too_long_since_last_KF){
if (enough_features_in_last and too_long_since_last_KF){
return true;
}
// no detection in incoming capture and a minimum time since last KF has past
if ((detections_incoming_.size() < min_features_for_keyframe_) and more_than_min_time_vote)
return true;
// Vote for every image processed at the beginning if possible
if (nb_vote_ < nb_vote_for_every_first_){
......
......@@ -62,7 +62,7 @@ static ParamsProcessorBasePtr createParamsProcessorLandmarkApriltag(const std::s
params->std_pix_ = noise["std_pix"] .as<double>();
YAML::Node vote = config["vote"];
params->voting_active = vote["voting active"] .as<bool>();
params->voting_active = vote["voting_active"] .as<bool>();
params->min_time_vote_ = vote["min_time_vote"] .as<double>();
params->max_time_vote_ = vote["max_time_vote"] .as<double>();
params->min_features_for_keyframe = vote["min_features_for_keyframe"] .as<unsigned int>();
......
......@@ -28,10 +28,10 @@ noise:
std_pix: 20 # pixel error
vote:
voting active: true
voting_active: true
min_time_vote: 0 # s
max_time_vote: 0 # s
min_features_for_keyframe: 12
min_features_for_keyframe: 12 # no sense
nb_vote_for_every_first: 50
reestimate_last_frame: true # for a better prior on the new keyframe: use only if no motion processor
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment