mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 11:40:44 +08:00
Merge pull request #23377 from LaurentBerger:findsample
use findFile in opengl.cpp sample
This commit is contained in:
commit
68926d595c
@ -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…
Reference in New Issue
Block a user