From d075943d72104587c7c53797f9d77ad5b64b561d Mon Sep 17 00:00:00 2001 From: kvos Date: Fri, 29 Jun 2018 11:47:49 +1000 Subject: [PATCH] added plot --- read_images.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/read_images.py b/read_images.py index 2015a37..261b452 100644 --- a/read_images.py +++ b/read_images.py @@ -162,12 +162,22 @@ for i in range(N): # plot rgb image plt.figure() + plt.subplot(121) plt.axis('off') plt.imshow(im_display) # classify image in 4 classes (sand, whitewater, water, other) with NN classifier im_classif, im_labels = sds.classify_image_NN_nopan(im_ms, cloud_mask, min_beach_size, plot_bool) - + + plt.subplot(122) + plt.axis('off') + im = np.copy(im_display) + colours = np.array([[1,128/255,0/255],[204/255,1,1],[0,0,204/255]]) + for k in range(0,im_labels.shape[2]): + im[im_labels[:,:,k],0] = colours[k,0] + im[im_labels[:,:,k],1] = colours[k,1] + im[im_labels[:,:,k],2] = colours[k,2] + plt.imshow(im) # store the data cloud_cover_ts.append(cloud_cover) acc_georef_ts.append(metadata[satname]['acc_georef'][i])