samples: use findFile() in T-API samples

This commit is contained in:
Alexander Alekhin
2018-11-11 13:26:24 +00:00
parent e8e2197032
commit 9ea8c775f8
6 changed files with 24 additions and 24 deletions
+6 -2
View File
@@ -63,8 +63,9 @@ int main(int argc, char** argv)
setTrackbarPos("Tile Size", "CLAHE", cur_tilesize.width);
setTrackbarPos("Clip Limit", "CLAHE", cur_clip);
if(infile != "")
if(!infile.empty())
{
infile = samples::findFile(infile);
imread(infile).copyTo(frame);
if(frame.empty())
{
@@ -87,7 +88,10 @@ int main(int argc, char** argv)
else
imread(infile).copyTo(frame);
if(frame.empty())
continue;
{
waitKey();
break;
}
cvtColor(frame, frame, COLOR_BGR2GRAY);
pFilter->apply(frame, outframe);