InterpolationWrap classes
- group InterpolationWrap classes
-
template<class BW, NVCVInterpolationType I, bool ReadTapByValue = false>
class InterpolationWrap : public nvcv::cuda::detail::InterpolationWrapImpl<BW, I, ReadTapByValue> - #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.
ReadTapByValue – Whether to opt constant-border taps into BorderWrap::value. This policy has no element-width clamp, unlike InterpolationVarShapeWrap.
-
template<class BW, bool ReadTapByValue>
class InterpolationWrap<BW, NVCV_INTERP_NEAREST, ReadTapByValue> : public nvcv::cuda::detail::InterpolationWrapImpl<BW, NVCV_INTERP_NEAREST, ReadTapByValue> - #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, bool ReadTapByValue>
class InterpolationWrap<BW, NVCV_INTERP_LINEAR, ReadTapByValue> : public nvcv::cuda::detail::InterpolationWrapImpl<BW, NVCV_INTERP_LINEAR, ReadTapByValue> - #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, bool ReadTapByValue>
class InterpolationWrap<BW, NVCV_INTERP_CUBIC, ReadTapByValue> : public nvcv::cuda::detail::InterpolationWrapImpl<BW, NVCV_INTERP_CUBIC, ReadTapByValue> - #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, bool ReadTapByValue>
class InterpolationWrap<BW, NVCV_INTERP_AREA, ReadTapByValue> : public nvcv::cuda::detail::InterpolationWrapImpl<BW, NVCV_INTERP_AREA, ReadTapByValue> - #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, bool ReadTapByValue = false>