diff --git a/image_prediction/stitching/merging.py b/image_prediction/stitching/merging.py index d7b8c7e..0892ba7 100644 --- a/image_prediction/stitching/merging.py +++ b/image_prediction/stitching/merging.py @@ -78,8 +78,8 @@ def make_merger_aggregator(axis) -> Callable[[Iterable[ImageMetadataPair]], Iter # Requires H to be the least element in image-concatenation direction by c1, since the concatenation happens # only in c1 -> c2 direction. pairs = sorted(pairs, key=c1_getter) - aggregation_pair, pairs = juxt(first, rest)(pairs) - return list(reduce(merge_on_head_and_aggregate_in_tail, pairs, [aggregation_pair])) + head_pair, pairs = juxt(first, rest)(pairs) + return list(reduce(merge_on_head_and_aggregate_in_tail, pairs, [head_pair])) c1_getter = make_coord_getter(f"{axis}1") c2_getter = make_coord_getter(f"{axis}2")