mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge pull request #19516 from dbudniko:dbudniko/gapi_render_frame_cpu
Render Frame NV12 on CPU * render frame on CPU * doxygen fix * address review from Alexey * comment fixes * Address comments from Ruslan * remove NV12 specific * mat clone and more renaming * misprint fix
This commit is contained in:
@@ -97,6 +97,17 @@ void GAPI_EXPORTS render(cv::Mat& y_plane,
|
||||
const Prims& prims,
|
||||
cv::GCompileArgs&& args = {});
|
||||
|
||||
/** @brief The function renders on the input media frame passed drawing primitivies
|
||||
|
||||
@param frame input Media Frame : @ref cv::MediaFrame.
|
||||
@param prims vector of drawing primitivies
|
||||
@param args graph compile time parameters
|
||||
*/
|
||||
void GAPI_EXPORTS render(cv::MediaFrame& frame,
|
||||
const Prims& prims,
|
||||
cv::GCompileArgs&& args = {});
|
||||
|
||||
|
||||
G_TYPED_KERNEL_M(GRenderNV12, <GMat2(cv::GMat,cv::GMat,cv::GArray<wip::draw::Prim>)>, "org.opencv.render.nv12")
|
||||
{
|
||||
static GMatDesc2 outMeta(GMatDesc y_plane, GMatDesc uv_plane, GArrayDesc)
|
||||
@@ -113,6 +124,14 @@ G_TYPED_KERNEL(GRenderBGR, <cv::GMat(cv::GMat,cv::GArray<wip::draw::Prim>)>, "or
|
||||
}
|
||||
};
|
||||
|
||||
G_TYPED_KERNEL(GRenderFrame, <cv::GFrame(cv::GFrame, cv::GArray<wip::draw::Prim>)>, "org.opencv.render.frame")
|
||||
{
|
||||
static GFrameDesc outMeta(GFrameDesc desc, GArrayDesc)
|
||||
{
|
||||
return desc;
|
||||
}
|
||||
};
|
||||
|
||||
/** @brief Renders on 3 channels input
|
||||
|
||||
Output image must be 8-bit unsigned planar 3-channel image
|
||||
@@ -134,6 +153,17 @@ uv image must be 8-bit unsigned planar 2-channel image @ref CV_8UC2
|
||||
GAPI_EXPORTS GMat2 renderNV12(const GMat& y,
|
||||
const GMat& uv,
|
||||
const GArray<Prim>& prims);
|
||||
|
||||
/** @brief Renders Media Frame
|
||||
|
||||
Output media frame frame cv::MediaFrame
|
||||
|
||||
@param m_frame input image: cv::MediaFrame @ref cv::MediaFrame
|
||||
@param prims draw primitives
|
||||
*/
|
||||
GAPI_EXPORTS GFrame renderFrame(const GFrame& m_frame,
|
||||
const GArray<Prim>& prims);
|
||||
|
||||
//! @} gapi_draw_api
|
||||
|
||||
} // namespace draw
|
||||
|
||||
Reference in New Issue
Block a user