-2

I'm using OpenCV 4.2.0 on Ubuntu 18.04. This code here

#include <opencv2/core.hpp>

#include <iostream>

#define DIR "../data/checkerboard_images"
#define PATTERN "*_color.png"

int main(int argc, char** argv){

    //load filenames
    std::vector<cv::String> v;

    cv::utils::fs::glob(DIR, PATTERN, v);

    return 0;
}

gives me the following

error: ‘cv::utils::fs’ has not been declared

I think I have to include some files, but I can't figure out the right one, please help.

EDIT: I have to include (thank you @spinkoo)

#include <opencv2/core/utils/filesystem.hpp>

and to get rid of CODAN errors on Eclipse editor I have followed this

Enrico R.
  • 21
  • 5

1 Answers1

1

you are missing the following include

#include <opencv2/core/utils/filesystem.hpp>
Spinkoo
  • 2,080
  • 1
  • 7
  • 23