pineapple-src/externals/vcpkg/ports/theia/eigen-3.4.patch
2022-07-23 03:01:36 +02:00

24 lines
1.3 KiB
Diff
Executable file

--- a/libraries/akaze/src/nldiffusion_functions.cpp
+++ b/libraries/akaze/src/nldiffusion_functions.cpp
@@ -222,8 +222,8 @@ void halfsample_image(const RowMatrixXf& src, RowMatrixXf& dst) {
// Do the whole resampling in one pass by using neighboring values. First, we
// compute the borders.
- const double x_kernel_size = static_cast<double>(src.cols()) / dst.cols();
- const double y_kernel_size = static_cast<double>(src.rows()) / dst.rows();
+ const int x_kernel_size = static_cast<double>(src.cols()) / dst.cols();
+ const int y_kernel_size = static_cast<double>(src.rows()) / dst.rows();
// Do simple linear interpolation.
if (x_kernel_size == 2 && y_kernel_size == 2) {
@@ -237,8 +237,8 @@ void halfsample_image(const RowMatrixXf& src, RowMatrixXf& dst) {
return;
}
- const double x_kernel_clamped_size = static_cast<int>(ceil(x_kernel_size));
- const double y_kernel_clamped_size = static_cast<int>(ceil(y_kernel_size));
+ const int x_kernel_clamped_size = static_cast<int>(ceil(static_cast<double>(src.cols()) / dst.cols()));
+ const int y_kernel_clamped_size = static_cast<int>(ceil(static_cast<double>(src.rows()) / dst.rows()));
// Set up precomputed factor matrices.
Eigen::RowVectorXf x_kernel_mul(static_cast<int>(x_kernel_clamped_size)),