Simplify realigning images
The following discussion from !169 should be addressed:
-
@anton-akhmerov started a discussion: (+11 comments) I feel the logic here and below is unnecessarily fragile. Instead we could.
- compute all distances between corner markers we found and the reference ones using scipy.spatial.distance.cdist.
- Find the closest original marker to every one we found (
np.argmin
) - Feed to
getPerspectiveTransform
. - Eliminate the corner marker section of
zesje.images
This would also be more robust I think.
Edited by Ghost User