Created
February 26, 2021 12:18
-
-
Save maxastyler/332e4fa7283f4bbd9487cf4e2b9e1d69 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
xb = (400, 600) | |
first_order_yb = (700, 970) | |
zero_order_yb = (320, 600) | |
grey_values = range(256) | |
first_order_sums = [np.load(f"./LUTOrders/LUTOrders_{i}.npy")[xb[0]:xb[1], first_order_yb[0]:first_order_yb[1]].sum() for i in grey_values] | |
zero_order_sums = [np.load(f"./LUTOrders/LUTOrders_{i}.npy")[xb[0]:xb[1], zero_order_yb[0]:zero_order_yb[1]].sum() for i in grey_values] | |
plt.plot(grey_values, zero_order_sums, label="Zero order") | |
plt.plot(grey_values, first_order_sums, label="First order") | |
plt.ylim(0, None) | |
plt.title("summed intensity vs grey value") | |
plt.legend() | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment