11 return static_cast<double>(x);
18 DScalar2<
double, Eigen::Matrix<double, 2, 1>, Eigen::Matrix<double, 2, 2>> x)
24 DScalar2<
double, Eigen::Matrix<double, -1, 1>, Eigen::Matrix<double, -1, -1>> x)
49 using ImageScalar = std::decay_t<T>;
51 const auto xx = sx - (floor(
get_value(sx) - 0.5f) + 0.5f);
52 const auto yy = sy - (floor(
get_value(sy) - 0.5f) + 0.5f);
66 vv(7) = xx * xx * xx * yy;
70 vv(10) = xx * xx * yy * yy;
71 vv(11) = xx * xx * xx * yy * yy;
73 vv(12) = yy * yy * yy;
74 vv(13) = xx * yy * yy * yy;
75 vv(14) = xx * xx * yy * yy * yy;
76 vv(15) = xx * xx * xx * yy * yy * yy;
78 return coeffs.cast<ImageScalar>().dot(vv);
BicubicMatrix make_samples_to_bicubic_coeffs_operator()
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)
Eigen::Matrix< float, 16, 16 > BicubicMatrix
Automatic differentiation scalar with first- and second-order derivatives.