1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +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:
Dmitry Budnikov
2021-02-10 22:23:54 +03:00
committed by GitHub
parent c527b3cefd
commit 1162cef978
6 changed files with 71 additions and 1 deletions
@@ -591,6 +591,12 @@ G_TYPED_KERNEL(GSizeR, <GOpaque<Size>(GOpaque<Rect>)>, "org.opencv.streaming.siz
return empty_gopaque_desc();
}
};
G_TYPED_KERNEL(GSizeMF, <GOpaque<Size>(GFrame)>, "org.opencv.streaming.sizeMF") {
static GOpaqueDesc outMeta(const GFrameDesc&) {
return empty_gopaque_desc();
}
};
} // namespace streaming
//! @addtogroup gapi_math
@@ -1940,6 +1946,15 @@ Gets dimensions from rectangle.
@return Size (rectangle dimensions).
*/
GAPI_EXPORTS GOpaque<Size> size(const GOpaque<Rect>& r);
/** @brief Gets dimensions from MediaFrame.
@note Function textual ID is "org.opencv.streaming.sizeMF"
@param src Input frame
@return Size (frame dimensions).
*/
GAPI_EXPORTS GOpaque<Size> size(const GFrame& src);
} //namespace streaming
} //namespace gapi
} //namespace cv