InterpolationWrap classes
- group NVCV_CPP_CUDATOOLS_INTERPOLATIONWRAP
-
template<class BW, NVCVInterpolationType I>
class InterpolationWrap : public nvcv::cuda::detail::InterpolationWrapImpl<BW, I> - #include <InterpolationWrap.hpp>
Interpolation wrapper class used to wrap a BorderWrap adding interpolation handling to it.
This class wraps a BorderWrap to add interpolation handling functionality. It provides the operator[] to do the same semantic value access in the wrapped BorderWrap but interpolation aware.
using DataType = ...; using TensorWrap2D = TensorWrap<-1, -1, DataType>; using BorderWrap2D = BorderWrap<TensorWrap2D, NVCV_BORDER_REFLECT, true, true>; using InterpWrap2D = InterpolationWrap<BorderWrap2D, NVCV_INTERP_CUBIC>; TensorWrap2D tensorWrap(...); BorderWrap2D borderWrap(...); InterpWrap2D interpolationAwareTensor(borderWrap); // Now use interpolationAwareTensor instead of borderWrap or tensorWrap to access in-between elements with // on-the-fly interpolation, in this example grid-unaligned pixels use bi-cubic interpolation, grid-aligned // pixels that fall outside the tensor use reflect border extension and inside is the tensor value itself
See also
NVCV_CPP_CUDATOOLS_INTERPOLATIONWRAPS
Note
Each interpolation wrap class below is specialized for one interpolation type.
- Template Parameters:
BW – It is a BorderWrap class with any dimension and type.
I – It is a NVCVInterpolationType defining the interpolation type to be used.
-
template<class BW>
class InterpolationWrap<BW, NVCV_INTERP_NEAREST> : public nvcv::cuda::detail::InterpolationWrapImpl<BW, NVCV_INTERP_NEAREST> - #include <InterpolationWrap.hpp>
Interpolation wrapper class specialized for NVCV_INTERP_NEAREST.
- Template Parameters:
BW – It is a BorderWrap class with any dimension and type.
-
template<class BW>
class InterpolationWrap<BW, NVCV_INTERP_LINEAR> : public nvcv::cuda::detail::InterpolationWrapImpl<BW, NVCV_INTERP_LINEAR> - #include <InterpolationWrap.hpp>
Interpolation wrapper class specialized for NVCV_INTERP_LINEAR.
- Template Parameters:
BW – It is a BorderWrap class with any dimension and type.
-
template<class BW>
class InterpolationWrap<BW, NVCV_INTERP_CUBIC> : public nvcv::cuda::detail::InterpolationWrapImpl<BW, NVCV_INTERP_CUBIC> - #include <InterpolationWrap.hpp>
Interpolation wrapper class specialized for NVCV_INTERP_CUBIC.
- Template Parameters:
BW – It is a BorderWrap class with any dimension and type.
-
template<class BW>
class InterpolationWrap<BW, NVCV_INTERP_AREA> : public nvcv::cuda::detail::InterpolationWrapImpl<BW, NVCV_INTERP_AREA> - #include <InterpolationWrap.hpp>
Interpolation wrapper class specialized for NVCV_INTERP_AREA.
- Template Parameters:
BW – It is a BorderWrap class with any dimension and type.
-
template<class BW, NVCVInterpolationType I>