mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
Merge pull request #19495 from dbudniko:gapi_media_frame_size
Add Media Frame size function and corresponding tests * add media frame size and tests * Address comments from Ruslan and Asya
This commit is contained in:
@@ -427,5 +427,10 @@ GOpaque<Size> streaming::size(const GOpaque<Rect>& r)
|
||||
return streaming::GSizeR::on(r);
|
||||
}
|
||||
|
||||
GOpaque<Size> streaming::size(const GFrame& src)
|
||||
{
|
||||
return streaming::GSizeMF::on(src);
|
||||
}
|
||||
|
||||
} //namespace gapi
|
||||
} //namespace cv
|
||||
|
||||
@@ -692,6 +692,14 @@ GAPI_OCV_KERNEL(GCPUSizeR, cv::gapi::streaming::GSizeR)
|
||||
}
|
||||
};
|
||||
|
||||
GAPI_OCV_KERNEL(GCPUSizeMF, cv::gapi::streaming::GSizeMF)
|
||||
{
|
||||
static void run(const cv::MediaFrame& in, cv::Size& out)
|
||||
{
|
||||
out = in.desc().size;
|
||||
}
|
||||
};
|
||||
|
||||
cv::gapi::GKernelPackage cv::gapi::core::cpu::kernels()
|
||||
{
|
||||
static auto pkg = cv::gapi::kernels
|
||||
@@ -771,6 +779,7 @@ cv::gapi::GKernelPackage cv::gapi::core::cpu::kernels()
|
||||
, GCPUParseYolo
|
||||
, GCPUSize
|
||||
, GCPUSizeR
|
||||
>();
|
||||
, GCPUSizeMF
|
||||
>();
|
||||
return pkg;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user