Commit 802e8010 authored by Nathaniel Callens's avatar Nathaniel Callens

images added from elphel computer

parent 671803c7
...@@ -18,7 +18,7 @@ import sys ...@@ -18,7 +18,7 @@ import sys
from PIL import Image from PIL import Image
def file_extractor(dirname="/media/elphel/SSD3-4GB/lwir16-proc/captures/teasdale/scenes"): def file_extractor(dirname="images"):
files = os.listdir(dirname) files = os.listdir(dirname)
scenes = [] scenes = []
for file in files: for file in files:
...@@ -41,12 +41,7 @@ def image_extractor(scenes): ...@@ -41,12 +41,7 @@ def image_extractor(scenes):
images.append(os.path.join(folder, im)) images.append(os.path.join(folder, im))
return images #returns a list of file paths to .tiff files in the specified directory given in file_extractor return images #returns a list of file paths to .tiff files in the specified directory given in file_extractor
if __name__ == '__main__': def im_distribution(images):
"""For boundary cases: Start by grabbing the shape of the images and saving those
as variables. Then, if statements for if row == 0 or row == maximum and if
col == 0 or col == maximum. Then grab corresponding open pixels. Then proceed to do
an and statement that handles the corners"""
tiff0 = [] tiff0 = []
tiff1 = [] tiff1 = []
tiff2 = [] tiff2 = []
...@@ -95,21 +90,16 @@ if __name__ == '__main__': ...@@ -95,21 +90,16 @@ if __name__ == '__main__':
jj += 1 jj += 1
plt.tight_layout() plt.tight_layout()
plt.show() plt.show()
return
if __name__ == '__main__':
"""For boundary cases: Start by grabbing the shape of the images and saving those
as variables. Then, if statements for if row == 0 or row == maximum and if
col == 0 or col == maximum. Then grab corresponding open pixels. Then proceed to do
an and statement that handles the corners"""
"""scene_names = file_extractor("images") scenes = file_extractor()
images = image_extractor(scene_names) images = image_extractor(scenes)
im = Image.open(images[0])
imarray = np.array(im)
randos = np.random.randint(0,len(images), 10)
i, j = np.random.randint(0,imarray.shape[0]), np.random.randint(0,imarray.shape[1])
image_array = []
for r in randos:
image_array.append(np.array(Image.open(images[r])))
indices = [val[i][j] for val in image_array]"""
\ No newline at end of file
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