Merge pull request #23377 from LaurentBerger:findsample

use findFile in opengl.cpp sample
This commit is contained in:
Alexander Smorkalov 2023-03-21 12:58:58 +03:00 committed by GitHub
commit 68926d595c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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