From 96c9c85d654aaaccbf9542a4450a1396712caa83 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Wed, 15 May 2024 17:03:40 +0300 Subject: [PATCH] More warning fixes for Ubuntu 24.04. --- modules/intensity_transform/src/bimef.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/intensity_transform/src/bimef.cpp b/modules/intensity_transform/src/bimef.cpp index 2500d2abe8..9cad67578f 100644 --- a/modules/intensity_transform/src/bimef.cpp +++ b/modules/intensity_transform/src/bimef.cpp @@ -226,15 +226,15 @@ static Mat solveLinearEquation(const Mat_& img, Mat_& W_h_, Mat_ tin(img_t.ptr(), img_t.rows*img_t.cols); Eigen::VectorXf x = cg.solve(tin); - Mat_ tout(img.rows, img.cols); - tout.forEach( + Mat tout(img.rows, img.cols, CV_32FC1); + tout.forEach( [&](float &pixel, const int * position) -> void { pixel = x(position[1]*img.rows + position[0]); } ); - return std::move(tout); + return tout; } static Mat_ tsmooth(const Mat_& src, float lambda=0.01f, float sigma=3.0f, float sharpness=0.001f)