use findFile in opengl.cpp sample

pull/23377/head
unknown 2 years ago
parent 0052d46b8e
commit abfa5c586a
  1. 4
      samples/opengl/opengl.cpp

@ -50,12 +50,12 @@ int main(int argc, char* argv[])
if (argc < 2) if (argc < 2)
{ {
cout << "Usage: " << argv[0] << " image" << endl; cout << "Usage: " << argv[0] << " image" << endl;
filename = "../data/lena.jpg"; filename = "lena.jpg";
} }
else else
filename = argv[1]; filename = argv[1];
Mat img = imread(filename); Mat img = imread(samples::findFile(filename));
if (img.empty()) if (img.empty())
{ {
cerr << "Can't open image " << filename << endl; cerr << "Can't open image " << filename << endl;

Loading…
Cancel
Save