Convert a cv::Mat to a yarp::sig::ImageOf object.
- Parameters
-
[in] | cvImage | cv::Mat input. Since the argument is passed as right-reference, the integrity of the data of the input cv::Mat is not guaranteed. |
- Note
- The input cv::Mat's type(e.g. CV_8UC1) must be compatible with the output yarp image pixel type requested. E.g.:
- CV_8UC3 -> ImageOf<PixelRgb>/<PixelBgr>/<PixelHsv> OK
- CV_8UC1 -> ImageOf<PixelMono> OK
- CV_8UC3 -> ImageOf<PixelMono> NOT OK
- CV_8UC1 -> ImageOf<PixelRgb>/<PixelBgr>/<PixelHsv> NOT OK Please pay attention to the number of channels and pixel depth. Moreover pay attention on the lifetime of the memory of the input image, since no copy is involved.
- Returns
- the resulting yarp::sig::ImageOf.
Definition at line 91 of file Cv-inl.h.