OpenCV Class Reference
Contains functions for using ic4::ImageBuffer objects using OpenCV. More...
Static Public Member Functions
static cv::Mat |
Wraps the passed image buffer in an OpenCV |
static bool |
Checks whether wrap can work on the image buffer's pixel format. |
static cv::Mat |
Creates a copy of the image buffer and stores it in an OpenCV |
Detailed Description
Contains functions for using ic4::ImageBuffer objects using OpenCV.
The OpenCV interop support functions are declared in ic4interop/interop-OpenCV.h
.
Member Function Documentation
◆ canWrap()
|
inlinestatic |
Checks whether wrap can work on the image buffer's pixel format.
- Parameters
-
[in] buffer An image buffer
- Returns
true
, if the contents of the image buffer can be wrapped in an OpenCVcv::Mat
, otherwisefalse
.
- Remarks
- Wrapping the contents of an image buffer in an OpenCV
cv::Mat
is only possible if the pixel format is one of the following:Mono8
or any Bayer8 formatMono16
or any Bayer16 formatBGRa8
,BGR8
orBGRa16
YCbCr422_8
orYUV422_8
◆ copy()
|
inlinestatic |
Creates a copy of the image buffer and stores it in an OpenCV cv::Mat
.
- Parameters
-
[in] buffer An image buffer [out] err Reference to an error handler. See Error Handling for details.
- Returns
- An OpenCV
cv::Mat
containing a copy of the image data from the passed image buffer.
◆ wrap()
|
inlinestatic |
Wraps the passed image buffer in an OpenCV cv::Mat
.
- Parameters
-
[in] buffer An image buffer [out] err Reference to an error handler. See Error Handling for details.
- Returns
- An OpenCV
cv::Mat
using the image buffer's memory as pixel storage
- Remarks
- Wrapping the contents of an image buffer in an OpenCV
cv::Mat
is only possible if the pixel format is one of the following:Mono8
or any Bayer8 formatMono16
or any Bayer16 formatBGRa8
,BGR8
orBGRa16
YCbCr422_8
orYUV422_8