akaze-1.0.0-fix-pr268.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. From 8feb4250e9021401624add16c965e61eb4faafd5 Mon Sep 17 00:00:00 2001
  2. From: Kyle Wilson <kylewilson@WC-14551.local>
  3. Date: Mon, 3 Apr 2023 14:55:50 -0400
  4. Subject: [PATCH] bugfix for akaze compile error issue 267
  5. Change-Id: Icd675387f35faf399541721bd7b50e9e906b3582
  6. ---
  7. src/nldiffusion_functions.cpp | 4 ++--
  8. 1 file changed, 2 insertions(+), 2 deletions(-)
  9. diff --git a/src/lib/nldiffusion_functions.cpp b/src/lib/nldiffusion_functions.cpp
  10. index 02604ecaa..65520f2d3 100644
  11. --- a/src/lib/nldiffusion_functions.cpp
  12. +++ b/src/lib/nldiffusion_functions.cpp
  13. @@ -253,7 +253,7 @@ void halfsample_image(const RowMatrixXf& src, RowMatrixXf& dst) {
  14. // Compute the row resize first.
  15. const int y = static_cast<int>(y_kernel_size * i);
  16. y_kernel_mul(0) = 1 - (y_kernel_size * i - y);
  17. - y_kernel_mul(y_kernel_clamped_size - 1) -=
  18. + y_kernel_mul(static_cast<int>(y_kernel_clamped_size - 1)) -=
  19. y_kernel_mul.sum() - y_kernel_size;
  20. temp_row =
  21. @@ -264,7 +264,7 @@ void halfsample_image(const RowMatrixXf& src, RowMatrixXf& dst) {
  22. for (int j = 0; j < dst.cols(); j++) {
  23. const int x = static_cast<int>(x_kernel_size * j);
  24. x_kernel_mul(0) = 1 - (x_kernel_size * j - x);
  25. - x_kernel_mul(x_kernel_clamped_size - 1) -=
  26. + x_kernel_mul(static_cast<int>(x_kernel_clamped_size - 1)) -=
  27. x_kernel_mul.sum() - x_kernel_size;
  28. dst(i, j) =
  29. x_kernel_mul.dot(temp_row.segment(x, x_kernel_clamped_size));