mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 23:29:03 +08:00
25 lines
1.3 KiB
Diff
25 lines
1.3 KiB
Diff
|
--- 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)),
|