We were doing some experiment on scipy.ndimage.affine_transform
From our understanding, it is a linear transformation through spline interpolation method. Thus, it could reduce the overall image intensity range if some parts of the image is cut off, but not increase the image range.
But strangely enough, in certain situations, if we print the min and max value of the image, it has a random increase in range (min value becomes smaller or max value becomes larger after the affine_transform function)
Could it be that we are understanding something wrong?
Below is a colab version of how to replicate this issue. https://colab.research.google.com/drive/1x7a68yTk3150R0_NQsJI1_-apSgPf3UC?usp=sharing
Basically, I am just creating a random numpy array and an affine matrix, which is sometimes changing the range of values.
Thank you in advance!