mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Added Y, UV accessors to cv::MediaFrame
This commit is contained in:
@@ -58,7 +58,7 @@ namespace
|
||||
return o;
|
||||
}
|
||||
|
||||
inline void initTestDataPath()
|
||||
inline bool initTestDataPathSilent()
|
||||
{
|
||||
#ifndef WINRT
|
||||
static bool initialized = false;
|
||||
@@ -66,15 +66,32 @@ namespace
|
||||
{
|
||||
// Since G-API has no own test data (yet), it is taken from the common space
|
||||
const char* testDataPath = getenv("OPENCV_TEST_DATA_PATH");
|
||||
GAPI_Assert(testDataPath != nullptr &&
|
||||
"OPENCV_TEST_DATA_PATH environment variable is either not set or set incorrectly.");
|
||||
|
||||
cvtest::addDataSearchPath(testDataPath);
|
||||
initialized = true;
|
||||
if (testDataPath != nullptr) {
|
||||
cvtest::addDataSearchPath(testDataPath);
|
||||
initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
return initialized;
|
||||
#endif // WINRT
|
||||
}
|
||||
|
||||
inline void initTestDataPath()
|
||||
{
|
||||
bool initialized = initTestDataPathSilent();
|
||||
GAPI_Assert(initialized &&
|
||||
"OPENCV_TEST_DATA_PATH environment variable is either not set or set incorrectly.");
|
||||
}
|
||||
|
||||
inline void initTestDataPathOrSkip()
|
||||
{
|
||||
bool initialized = initTestDataPathSilent();
|
||||
if (!initialized)
|
||||
{
|
||||
throw cvtest::SkipTestException("Can't find test data");
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T> inline void initPointRandU(cv::RNG &rng, cv::Point_<T>& pt)
|
||||
{
|
||||
GAPI_Assert(std::is_integral<T>::value);
|
||||
|
||||
Reference in New Issue
Block a user