Commit 1918ec7b authored by Nathaniel Callens's avatar Nathaniel Callens

histograms

parent a8ba0e24
...@@ -68,9 +68,10 @@ if __name__ == '__main__': ...@@ -68,9 +68,10 @@ if __name__ == '__main__':
tiff3.append(os.path.join(scene, s)) tiff3.append(os.path.join(scene, s))
cameras = [tiff0, tiff1, tiff2, tiff3] cameras = [tiff0, tiff1, tiff2, tiff3]
diff = []
i = 0 i = 0
for cam in cameras: fig, axs = plt.subplots(nrows=2, ncols=2, figsize=(15,12))
for cam, ax in zip(cameras, axs.ravel()):
diff = []
for ii in range(len(cam)): for ii in range(len(cam)):
image = Image.open(cam[ii]) #Open the image and read it as an Image object image = Image.open(cam[ii]) #Open the image and read it as an Image object
image = np.array(image)[1:,:] #Convert to an array, leaving out the first row because the first row is just housekeeping data image = np.array(image)[1:,:] #Convert to an array, leaving out the first row because the first row is just housekeeping data
...@@ -86,8 +87,7 @@ if __name__ == '__main__': ...@@ -86,8 +87,7 @@ if __name__ == '__main__':
else: else:
surrounding.append(image[ind1+i, ind1+j]) #Add the other 8 pixels to the list surrounding.append(image[ind1+i, ind1+j]) #Add the other 8 pixels to the list
diff.append(np.max(surrounding)-np.min(surrounding)) diff.append(np.max(surrounding)-np.min(surrounding))
plt.subplot(2,2,i+1) ax.hist(diff)
plt.hist(diff)
i += 1 i += 1
plt.tight_layout() plt.tight_layout()
plt.show() plt.show()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment