Skip to content

Commit

Permalink
fix sign of LM Hessian
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisThielemans committed May 13, 2024
1 parent d9219d9 commit 9f45458
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ LM_gradient(DiscretisedDensity<3, float>& output_image,

/* Hessian
\sum_e A_e^t (y_e/(A_e lambda+ c)^2 A_e rhs)
\sum_e -A_e^t (y_e/(A_e lambda+ c)^2 A_e rhs)
*/
inline void
LM_Hessian(DiscretisedDensity<3, float>& output_image,
Expand All @@ -801,7 +801,7 @@ LM_Hessian(DiscretisedDensity<3, float>& output_image,

if (measured_bin.get_bin_value() > max_quotient * fwd)
return; // cancel singularity
const auto measured_div_fwd2 = measured_bin.get_bin_value() / square(fwd);
const auto measured_div_fwd2 = -measured_bin.get_bin_value() / square(fwd);

// forward project rhs
fwd_bin.set_bin_value(0.0f);
Expand Down

0 comments on commit 9f45458

Please sign in to comment.