YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ImageUtils.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_SIG_IMAGEUTILS_H
7#define YARP_SIG_IMAGEUTILS_H
8
9#include <utility> // std::pair
10#include <yarp/sig/Image.h>
11
13
22bool YARP_sig_API vertSplit(const yarp::sig::Image& inImg, yarp::sig::Image& outImgL, yarp::sig::Image& outImgR);
23
32bool YARP_sig_API horzSplit(const yarp::sig::Image& inImg, yarp::sig::Image& outImgUp, yarp::sig::Image& outImgDown);
33
43bool YARP_sig_API horzConcat(const yarp::sig::Image& inImgL, const yarp::sig::Image& inImgR, yarp::sig::Image& outImg);
44
54bool YARP_sig_API vertConcat(const yarp::sig::Image& inImgUp, const yarp::sig::Image& inImgDown, yarp::sig::Image& outImg);
55
66bool YARP_sig_API cropRect(const yarp::sig::Image& inImg,
67 const std::pair<unsigned int, unsigned int>& vertex1,
68 const std::pair<unsigned int, unsigned int>& vertex2,
69 yarp::sig::Image& outImg);
70} // namespace yarp::sig::utils
71
72#endif // YARP_SIG_IMAGEUTILS_H
Base class for storing images.
Definition Image.h:79
bool vertSplit(const yarp::sig::Image &inImg, yarp::sig::Image &outImgL, yarp::sig::Image &outImgR)
Split vertically an image in two images of the same size.
bool cropRect(const yarp::sig::Image &inImg, const std::pair< unsigned int, unsigned int > &vertex1, const std::pair< unsigned int, unsigned int > &vertex2, yarp::sig::Image &outImg)
Crop a rectangle area out of an image given two opposite vertices.
bool horzSplit(const yarp::sig::Image &inImg, yarp::sig::Image &outImgUp, yarp::sig::Image &outImgDown)
Split horizontally an image in two images of the same size.
bool vertConcat(const yarp::sig::Image &inImgUp, const yarp::sig::Image &inImgDown, yarp::sig::Image &outImg)
Concatenate vertically two images of the same size in one with double height.
bool horzConcat(const yarp::sig::Image &inImgL, const yarp::sig::Image &inImgR, yarp::sig::Image &outImg)
Concatenate horizontally two images of the same size in one with double width.
#define YARP_sig_API
Definition api.h:18