YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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
25::cv::Mat toCvMat(yarp::sig::Image& yarpImage);
26
40template<typename T>
41::cv::Mat toCvMat(yarp::sig::ImageOf<T>& yarpImage);
42
60template<typename T>
61yarp::sig::ImageOf<T> fromCvMat(::cv::Mat& cvImage);
62
63} // namespace yarp::cv
64
65#include "Cv-inl.h"
66
67#endif // YARP_CV_CV_H
Typed image class.
Definition Image.h:616
Base class for storing images.
Definition Image.h:79
::cv::Mat toCvMat(yarp::sig::Image &yarpImage)
Convert a yarp::sig::FlexImage to a cv::Mat object.
Definition Cv-inl.h:84
yarp::sig::ImageOf< T > fromCvMat(::cv::Mat &cvImage)
Convert a cv::Mat to a yarp::sig::ImageOf object.
Definition Cv-inl.h:106