I did some experiment on the Affine function. I applied the transformation matrix I got from Air-lab to moving image with skimage, opencv and vips. Can Vips achieve the same result as the other two? I think vips did a lot pading for the result image. But I just need the type of pading like the other two. Vips is supper fast dealing with large WSIs. I don't think cv or skimage can do it as fast as vips.
vips_image = moving_image_vips.affine((T[0][0],
T[0][1],
T[1][0],
T[1][1]),
idx = T[0][2],
idy = T[1][2]
)
warped_sk_image = skimage.transform.warp(np_moving_image.numpy(),
nverse_map=Tinv
)
warped_cv2_image = cv2.warpAffine(moving_image.numpy(),
T[0:2, :],
(fixed_image.size[1], fixed_image.size[0])
)
Here are the results I got from airlab skimage opencv and vips