Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- import matplotlib.image as img
- import numpy as np
- native = img.imread('native.jpg')
- dlss = img.imread('dlss.jpg')
- fsr = img.imread('fsr.jpg')
- x_start, x_end, y_start, y_end = 0,1000,800,1960
- mse_of_section = lambda z: np.mean((z[y_start:y_end, x_start:x_end] - native[y_start:y_end, x_start:x_end])**2)
- print('Native - DLSS MSE: ' + str(mse_of_section(dlss)))
- print('Native - FSR MSE: ' + str(mse_of_section(fsr)))
- for img,img_name in zip([native, dlss, fsr], ['native', 'dlss', 'fsr']):
- plt.figure()
- plt.imshow(img[y_start:y_end, x_start:x_end])
- plt.savefig(f'cropped_{img_name}.png')
- plt.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement