-
-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
When using nearest_aligned the output is noticeably shifted down and to the right. This affects my models severely and causes noticeable warping in their output.
I used this code in augmentations.py to produce the output images:
if __name__ == '__main__':
img = cv2.imread('test.png')
img_A, _ = Scale(img=img, scale=4, algo=997, ds_kernel=None, img_type='cv2')
cv2.imwrite('output.png', img_A)
Output from nearest_aligned as per the above code:

Output from convert test.png -interpolate Average -filter point -resize 25% magick-nearest.png:

Explicitly sampling the top left corner closely matches the offset from nearest_aligned:
convert test.png -define sample:offset=0%x0% -sample 25% magick-sampled-top-left.png

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels