This source file includes following definitions.
- resize_
- remap_
- remap_
- warpAffine_
- warpPerspective_
- assignTo
- pyrDown_
- assignTo
- pyrUp_
- assignTo
- transpose_
#pragma once
#ifndef __OPENCV_CUDEV_EXPR_WARPING_HPP__
#define __OPENCV_CUDEV_EXPR_WARPING_HPP__
#include "../common.hpp"
#include "../ptr2d/traits.hpp"
#include "../ptr2d/resize.hpp"
#include "../ptr2d/remap.hpp"
#include "../ptr2d/warping.hpp"
#include "../grid/pyramids.hpp"
#include "../grid/transpose.hpp"
#include "expr.hpp"
namespace cv { namespace cudev {
template <class SrcPtr>
__host__ Expr<ResizePtrSz<typename PtrTraits<SrcPtr>::ptr_type> >
resize_(const SrcPtr& src, float fx, float fy)
{
return makeExpr(resizePtr(src, fx, fy));
}
template <class SrcPtr, class MapPtr>
__host__ Expr<RemapPtr1Sz<typename PtrTraits<SrcPtr>::ptr_type, typename PtrTraits<MapPtr>::ptr_type> >
remap_(const SrcPtr& src, const MapPtr& map)
{
return makeExpr(remapPtr(src, map));
}
template <class SrcPtr, class MapXPtr, class MapYPtr>
__host__ Expr<RemapPtr2Sz<typename PtrTraits<SrcPtr>::ptr_type, typename PtrTraits<MapXPtr>::ptr_type, typename PtrTraits<MapYPtr>::ptr_type> >
remap_(const SrcPtr& src, const MapXPtr& mapx, const MapYPtr& mapy)
{
return makeExpr(remapPtr(src, mapx, mapy));
}
template <class SrcPtr>
__host__ Expr<RemapPtr1Sz<typename PtrTraits<SrcPtr>::ptr_type, AffineMapPtr> >
warpAffine_(const SrcPtr& src, Size dstSize, const GpuMat_<float>& warpMat)
{
return makeExpr(warpAffinePtr(src, dstSize, warpMat));
}
template <class SrcPtr>
__host__ Expr<RemapPtr1Sz<typename PtrTraits<SrcPtr>::ptr_type, PerspectiveMapPtr> >
warpPerspective_(const SrcPtr& src, Size dstSize, const GpuMat_<float>& warpMat)
{
return makeExpr(warpPerspectivePtr(src, dstSize, warpMat));
}
template <class SrcPtr> struct PyrDownBody
{
SrcPtr src;
template <typename T>
__host__ void assignTo(GpuMat_<T>& dst, Stream& stream = Stream::Null()) const
{
gridPyrDown(src, dst, stream);
}
};
template <class SrcPtr>
__host__ Expr<PyrDownBody<SrcPtr> >
pyrDown_(const SrcPtr& src)
{
PyrDownBody<SrcPtr> body;
body.src = src;
return makeExpr(body);
}
template <class SrcPtr> struct PyrUpBody
{
SrcPtr src;
template <typename T>
__host__ void assignTo(GpuMat_<T>& dst, Stream& stream = Stream::Null()) const
{
gridPyrUp(src, dst, stream);
}
};
template <class SrcPtr>
__host__ Expr<PyrUpBody<SrcPtr> >
pyrUp_(const SrcPtr& src)
{
PyrUpBody<SrcPtr> body;
body.src = src;
return makeExpr(body);
}
template <class SrcPtr> struct TransposeBody
{
SrcPtr src;
template <typename T>
__host__ void assignTo(GpuMat_<T>& dst, Stream& stream = Stream::Null()) const
{
gridTranspose(src, dst, stream);
}
};
template <class SrcPtr>
__host__ Expr<TransposeBody<SrcPtr> >
transpose_(const SrcPtr& src)
{
TransposeBody<SrcPtr> body;
body.src = src;
return makeExpr(body);
}
}}
#endif