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.hpp>
14
15namespace yarp::cv {
16
24::cv::Mat toCvMat(const yarp::sig::Image& yarpImage);
25
39template<typename T>
40::cv::Mat toCvMat(const yarp::sig::ImageOf<T>& yarpImage);
41
59template<typename T>
60yarp::sig::ImageOf<T> fromCvMat(const ::cv::Mat& cvImage);
61
62} // namespace yarp::cv
63
64#include "Cv-inl.h"
65
66#endif // YARP_CV_CV_H
Typed image class.
Definition Image.h:603
Base class for storing images.
Definition Image.h:79
yarp::sig::ImageOf< T > fromCvMat(const ::cv::Mat &cvImage)
Convert a cv::Mat to a yarp::sig::ImageOf object.
Definition Cv-inl.h:106
::cv::Mat toCvMat(const yarp::sig::Image &yarpImage)
Convert a yarp::sig::FlexImage to a cv::Mat object.
Definition Cv-inl.h:84