11 using DScalar =
DScalar2<double, Eigen::Matrix<double, -1, 1>, Eigen::Matrix<double, -1, -1>>;
15 virtual double sample(
const double u,
const double v)
const = 0;
38 return static_cast<S
>(0.0);
44 return A * u +
B * v +
C;
67 double sample(
const double u,
const double v)
const override {
return evaluate<double>(u, v); }
70 return evaluate<DScalar>(u, v);
74 template <
typename Derived>
89 double sample(
const double u,
const double v)
const override
91 return static_cast<const Derived*
>(
this)->
sample(u, v);
95 return static_cast<const Derived*
>(
this)->
sample(u, v);
110 T x = u *
static_cast<std::decay_t<T>
>(w);
111 T y = v *
static_cast<std::decay_t<T>
>(h);
115 static_cast<size_t>(w),
116 static_cast<size_t>(h),
125 double sample(
const double u,
const double v)
const override {
return sample_T<double>(u, v); }
128 return sample_T<DScalar>(u, v);
WrappingMode get_wrapping_mode_x() const
const ImageMatrixf & get_raw_image() const
WrappingMode get_wrapping_mode_y() const
double sample(const double u, const double v) const override
DScalar sample(const DScalar &u, const DScalar &v) const override
auto evaluate_linear(const S &u, const S &v) const
void set_coefficients(double a, const double b, const double c)
auto evaluate(const S &u, const S &v) const
SamplingAnalyticFunction(const FunctionType type, const double a, const double b, const double c)
double sample(const double u, const double v) const override
T sample_T(T u, T v) const
DScalar sample(const DScalar &u, const DScalar &v) const override
virtual double sample(const double u, const double v) const =0
virtual DScalar sample(const DScalar &u, const DScalar &v) const =0
double sample(const double u, const double v) const override
SamplingImage(const Image &img)
DScalar sample(const DScalar &u, const DScalar &v) const override
SamplingAnalyticFunction_FunctionType
const BicubicMatrix & get_bicubic_matrix()
std::decay_t< T > eval_bicubic_coeffs(const BicubicVector< float > &coeffs, const T &sx, const T &sy)
Eigen::Matrix< T, 16, 1 > BicubicVector
double get_value(float x)
BicubicVector< float > extract_samples(const size_t width, const size_t height, const float *buffer, const double sx_, const double sy_, const WrappingMode mode_x, const WrappingMode mode_y)
Automatic differentiation scalar with first- and second-order derivatives.