| 38 | } |
| 39 | |
| 40 | std::wstring FindOpenCvSampleImage(const std::wstring &file_name) { |
| 41 | const auto cwd = std::filesystem::current_path(); |
| 42 | const std::vector<std::filesystem::path> candidates = { |
| 43 | cwd / L"build" / L"_deps" / L"opencv" / L"opencv-4.13.0" / L"samples" / L"data" / file_name, |
| 44 | cwd.parent_path() / L"build" / L"_deps" / L"opencv" / L"opencv-4.13.0" / L"samples" / L"data" / file_name, |
| 45 | cwd.parent_path().parent_path() / L"build" / L"_deps" / L"opencv" / L"opencv-4.13.0" / L"samples" / |
| 46 | L"data" / file_name, |
| 47 | }; |
| 48 | |
| 49 | for (const auto &candidate : candidates) { |
| 50 | if (std::filesystem::exists(candidate)) { |
| 51 | return candidate.wstring(); |
| 52 | } |
| 53 | } |
| 54 | return L""; |
| 55 | } |
| 56 | |
| 57 | std::wstring FindDemoAsset(const std::wstring &file_name) { |
| 58 | const auto cwd = std::filesystem::current_path(); |