MCPcopy Create free account
hub / github.com/WallBreaker2/op / FindOpenCvSampleImage

Function FindOpenCvSampleImage

tests/opencv_test.cpp:40–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40std::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
57std::wstring FindDemoAsset(const std::wstring &file_name) {
58 const auto cwd = std::filesystem::current_path();

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected