Skip to content

Commit

Permalink
Fix vpArray contruction from std::vector ambiguity
Browse files Browse the repository at this point in the history
  • Loading branch information
fspindle committed Jul 24, 2024
1 parent 1861a0a commit ed42b09
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tutorial/segmentation/color/tutorial-hsv-range-tuner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ int main(int argc, const char *argv[])

cv::namedWindow(window_detection_name);

vpArray2D<int> hsv_values(hsv_values_trackbar), hsv_values_prev;
vpArray2D<int> hsv_values(hsv_values_trackbar, hsv_values_trackbar.size(), 1);

Check warning on line 190 in tutorial/segmentation/color/tutorial-hsv-range-tuner.cpp

View check run for this annotation

Codecov / codecov/patch

tutorial/segmentation/color/tutorial-hsv-range-tuner.cpp#L190

Added line #L190 was not covered by tests
vpArray2D<int> hsv_values_prev;
if (vpArray2D<int>::loadYAML(opt_hsv_filename, hsv_values)) {
std::cout << "Load hsv values from " << opt_hsv_filename << " previous tuning " << std::endl;
std::cout << hsv_values.t() << std::endl;
Expand Down Expand Up @@ -287,7 +288,7 @@ int main(int argc, const char *argv[])
vpIoTools::makeDirectory(parent);
}

vpArray2D<int> hsv_values_new(hsv_values_trackbar);
vpArray2D<int> hsv_values_new(hsv_values_trackbar, hsv_values_trackbar.size(), 1);

Check warning on line 291 in tutorial/segmentation/color/tutorial-hsv-range-tuner.cpp

View check run for this annotation

Codecov / codecov/patch

tutorial/segmentation/color/tutorial-hsv-range-tuner.cpp#L291

Added line #L291 was not covered by tests
if (hsv_values_new != hsv_values_prev) {
if (vpIoTools::checkFilename(opt_hsv_filename)) {
std::string hsv_filename_backup(opt_hsv_filename + std::string(".previous"));
Expand Down

0 comments on commit ed42b09

Please sign in to comment.