mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
Merge pull request #12919 from berak:fix_dnn_sample_common
This commit is contained in:
commit
1c1d653f3a
@ -58,10 +58,12 @@ std::string findFile(const std::string& filename)
|
|||||||
if (filename.empty() || utils::fs::exists(filename))
|
if (filename.empty() || utils::fs::exists(filename))
|
||||||
return filename;
|
return filename;
|
||||||
|
|
||||||
std::string extraPaths[] = {getenv("OPENCV_DNN_TEST_DATA_PATH"),
|
const char* extraPaths[] = {getenv("OPENCV_DNN_TEST_DATA_PATH"),
|
||||||
getenv("OPENCV_TEST_DATA_PATH")};
|
getenv("OPENCV_TEST_DATA_PATH")};
|
||||||
for (int i = 0; i < 2; ++i)
|
for (int i = 0; i < 2; ++i)
|
||||||
{
|
{
|
||||||
|
if (extraPaths[i] == NULL)
|
||||||
|
continue;
|
||||||
std::string absPath = utils::fs::join(extraPaths[i], utils::fs::join("dnn", filename));
|
std::string absPath = utils::fs::join(extraPaths[i], utils::fs::join("dnn", filename));
|
||||||
if (utils::fs::exists(absPath))
|
if (utils::fs::exists(absPath))
|
||||||
return absPath;
|
return absPath;
|
||||||
|
Loading…
Reference in New Issue
Block a user