YARP
Yet Another Robot Platform
Cv.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_CV_CV_H
10 #define YARP_CV_CV_H
11 
12 #include <yarp/sig/Image.h>
13 
14 #include <type_traits>
15 #include <opencv2/core/core.hpp>
16 #include <opencv2/imgproc/imgproc.hpp>
17 #include <opencv2/imgproc/types_c.h>
18 
19 namespace yarp {
20 namespace cv {
21 
35 template<typename T>
36 ::cv::Mat toCvMat(yarp::sig::ImageOf<T>& yarpImage);
37 
55 template<typename T>
56 yarp::sig::ImageOf<T> fromCvMat(::cv::Mat& cvImage);
57 
58 } // namespace cv
59 } // namespace yarp
60 
61 #include "Cv-inl.h"
62 
63 #endif // YARP_CV_CV_H
yarp::cv::toCvMat
::cv::Mat toCvMat(yarp::sig::ImageOf< T > &yarpImage)
Convert a yarp::sig::ImageOf to a cv::Mat object.
yarp::sig::ImageOf
Typed image class.
Definition: Image.h:647
yarp::cv::fromCvMat
yarp::sig::ImageOf< T > fromCvMat(::cv::Mat &cvImage)
Convert a cv::Mat to a yarp::sig::ImageOf object.
Definition: Cv-inl.h:91
Image.h
Cv-inl.h
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18