Skip to content

Commit

Permalink
Improve image alignment with bad images
Browse files Browse the repository at this point in the history
  • Loading branch information
gb119 committed Dec 17, 2020
1 parent b249470 commit bd474e6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Stoner/Image/imagefuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,11 @@ def align(im, ref, method="scharr", **kargs):
ref = transform.rescale(ref, scale, order=3)

prefilter = kargs.pop("prefilter", True)

tvec, data = align_methods[method][0](working, ref, **kargs)
try:
tvec, data = align_methods[method][0](working, ref, **kargs)
except Exception:
tvec = (0, 0)
data = im

if scale:
tvec /= scale
Expand Down

0 comments on commit bd474e6

Please sign in to comment.