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
16namespace yarp::cv {
17
31template<typename T>
32::cv::Mat toCvMat(yarp::sig::ImageOf<T>& yarpImage);
33
51template<typename T>
52yarp::sig::ImageOf<T> fromCvMat(::cv::Mat& cvImage);
53
54} // namespace yarp::cv
55
56#include "Cv-inl.h"
57
58#endif // YARP_CV_CV_H
Typed image class.
Definition: Image.h:653
::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:86