|
|
|
|
@ -385,6 +385,8 @@ if __name__ == "__main__": |
|
|
|
|
print("✅ Perfect match - images are identical") |
|
|
|
|
print("No transformation needed") |
|
|
|
|
exit(1) |
|
|
|
|
else: |
|
|
|
|
print("Done hashing...") |
|
|
|
|
|
|
|
|
|
# Load large images |
|
|
|
|
large_img1 = cv2.imread(file1) # e.g., 4000x3000 pixels |
|
|
|
|
@ -400,13 +402,14 @@ if __name__ == "__main__": |
|
|
|
|
print("Diffent Resolutions") |
|
|
|
|
exit(0) |
|
|
|
|
|
|
|
|
|
print("Done loading images...") |
|
|
|
|
# Align with downscaling (initially process at 1/4 size) |
|
|
|
|
aligned, matrix, angle = align_with_downscaling( |
|
|
|
|
large_img1, large_img2, |
|
|
|
|
downscale_factor=4, |
|
|
|
|
try_common_rotations=True |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
print("Done downscaling...") |
|
|
|
|
# Save result |
|
|
|
|
# cv2.imwrite('aligned_large.jpg', aligned) |
|
|
|
|
|
|
|
|
|
|