Fix set but unused variable in Libmv

This commit is contained in:
Sergey Sharybin
2023-04-18 11:23:49 +02:00
committed by Sergey Sharybin
parent 4f7dc1e4b6
commit 63c20e08c4
2 changed files with 2 additions and 7 deletions

View File

@@ -283,15 +283,13 @@ void AutoTrack::DetectAndTrack(const DetectAndTrackOptions& options) {
// Find tracks in the previous frame that are not in this one.
vector<Marker*> previous_frame_markers_to_track;
int num_skipped = 0;
for (int i = 0; i < previous_frame_markers.size(); ++i) {
if (std::binary_search(tracks_in_this_frame.begin(),
tracks_in_this_frame.end(),
previous_frame_markers[i].track)) {
num_skipped++;
} else {
previous_frame_markers_to_track.push_back(&previous_frame_markers[i]);
continue;
}
previous_frame_markers_to_track.push_back(&previous_frame_markers[i]);
}
// Finally track the markers from the last frame into this one.

View File

@@ -140,7 +140,6 @@ void SelectKeyframesBasedOnGRICAndVariance(const Tracks& _tracks,
int max_image = filtered_tracks.MaxImage();
int next_keyframe = 1;
int number_keyframes = 0;
// Limit correspondence ratio from both sides.
// On the one hand if number of correspondent features is too low,
@@ -162,7 +161,6 @@ void SelectKeyframesBasedOnGRICAndVariance(const Tracks& _tracks,
LG << "Found keyframe " << next_keyframe;
number_keyframes++;
next_keyframe = -1;
for (int candidate_image = current_keyframe + 1;
@@ -406,7 +404,6 @@ void SelectKeyframesBasedOnGRICAndVariance(const Tracks& _tracks,
// However, it's just quick hack and smarter way to do this would be nice
if (next_keyframe == -1) {
next_keyframe = current_keyframe + 10;
number_keyframes = 0;
if (next_keyframe >= max_image)
break;