in reply to Re: Abstract image registration or feature detection
in thread Abstract image registration or feature detection [UPDATED w examples]

Ironically given your kind words, and as proved by some emails just today on the PDL mailing lists, I am not at all a linear-algebra expert. However, if you're trying to solve linear least-squares systems, then check out mlls (using QR or LQ factorisation) and mllss (using SVD) in PDL::LinearAlgebra. If you want to try Levenberg-Marquardt, check out PDL::Fit::Levmar.

One other observation for more idiomatic PDL usage is that if you're taking several slices (e.g. your sx, sy, s1) and doing the same to each, it'll be quicker to do something like:

my ($sx, $sy, $s1) = $red_in->slice('0:2')->mv(0,-1)->sumover->dog;