No 2D Image correlation option?
Hello,
I recently ran into the problem of having to register 2D images together. Unfortunately it does not seem like this works with spam.
Providing the 2D files directly results in an error since the program expects 3D arrays. The "workaround" of stacking the same image x times and saving it as "3D" also does not work all the time. It works in some cases (but only on some binning levels) or results in one of 2 errors:
spam.DIC.registerMultiscale(): working on binning: 1 Start correlation with Error = 0.11 Iteration Number:0 (Elapsed Time: 0:00:00) -> Singular spam.DIC.registerMultiscale(): binning 1 did not converge (return Status = -2), not continuing
or
spam.DIC.registerMultiscale(): working on binning: 4 Traceback (most recent call last): File "/home/.conda/envs/spam/bin/spam-reg", line 120, in <module> imShowProgress=args.GRAPH, File "/home/.conda/envs/spam/lib/python3.7/site-packages/spam/DIC/registration.py", line 885, in registerMultiscale imShowProgress=imShowProgress, File "/home/.conda/envs/spam/lib/python3.7/site-packages/spam/DIC/registration.py", line 268, in register vmin = -im1crop.max() File "/home/.conda/envs/spam/lib/python3.7/site-packages/numpy/core/_methods.py", line 40, in _amax return umr_maximum(a, axis, None, out, keepdims, initial, where) ValueError: zero-size array to reduction operation maximum which has no identity
Ir there a workaround or other option to use spam with 2D images?