YARP
Yet Another Robot Platform
Cv.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef YARP_CV_CV_H
7 #define YARP_CV_CV_H
8 
9 #include <yarp/sig/Image.h>
10 
11 #include <type_traits>
12 #include <opencv2/core/core.hpp>
13 #include <opencv2/imgproc/imgproc.hpp>
14 #include <opencv2/imgproc/types_c.h>
15 
16 namespace yarp {
17 namespace cv {
18 
32 template<typename T>
33 ::cv::Mat toCvMat(yarp::sig::ImageOf<T>& yarpImage);
34 
52 template<typename T>
53 yarp::sig::ImageOf<T> fromCvMat(::cv::Mat& cvImage);
54 
55 } // namespace cv
56 } // namespace yarp
57 
58 #include "Cv-inl.h"
59 
60 #endif // YARP_CV_CV_H
Typed image class.
Definition: Image.h:658
::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.
Definition: Cv-inl.h:88
The main, catch-all namespace for YARP.
Definition: dirs.h:16