9 #ifndef YARP_CV_CV_INL_H
10 #define YARP_CV_CV_INL_H
82 if (convert_code_to_cv<T>::value >= 0)
84 ::cv::cvtColor(outMat, outMat, convert_code_to_cv<T>::value);
93 constexpr
size_t align_8_bytes = 8;
94 constexpr
size_t align_4_bytes = 4;
104 if (cvImage.step % align_8_bytes == 0) {
107 else if (cvImage.step % align_4_bytes == 0) {
110 outImg.
setExternal(cvImage.data, cvImage.cols, cvImage.rows);
void setQuantum(size_t imgQuantum)
size_t width() const
Gets width of image in pixels.
void setExternal(const void *data, size_t imgWidth, size_t imgHeight)
Use this to wrap an external image.
size_t getRowSize() const
Size of the underlying image buffer rows.
unsigned char * getRawImage() const
Access to the internal image buffer.
size_t height() const
Gets height of image in pixels.
::cv::Mat toCvMat(yarp::sig::ImageOf< T > &yarpImage)
Convert a yarp::sig::ImageOf to a cv::Mat object.
yarp::sig::ImageOf< T > fromCvMat(::cv::Mat &cvImage)
Convert a cv::Mat to a yarp::sig::ImageOf object.
char PixelMonoSigned
Signed byte pixel type.
yarp::os::NetUint16 PixelMono16
16-bit monochrome pixel type.
unsigned char PixelMono
Monochrome pixel type.
float PixelFloat
Floating point pixel type.
yarp::os::NetInt32 PixelInt
32-bit integer pixel type.
The main, catch-all namespace for YARP.
Packed RGB pixel type, with pixels stored in reverse order.
Floating point HSV pixel type.
Packed HSV (hue/saturation/value pixel type.
Floating point RGB pixel type.
Signed, packed RGB pixel type.