From 952c655df5a146a9daa28ade07432be77ceb598d Mon Sep 17 00:00:00 2001
From: dorababu <dorababu@subcom.tech>
Date: Thu, 8 Dec 2022 10:02:01 +0530
Subject: [PATCH] plt all samples

---
 ReadRawData/pyScripts/Merge.py | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/ReadRawData/pyScripts/Merge.py b/ReadRawData/pyScripts/Merge.py
index 26ed396..89cc256 100644
--- a/ReadRawData/pyScripts/Merge.py
+++ b/ReadRawData/pyScripts/Merge.py
@@ -41,7 +41,7 @@ def removedot(invertThin):
     return temp2
 
 # plot fp sample 
-def plot_sample(fp_image):
+def plot_sample(fp_image, x, y):
     '''
     plot the given sample
     '''
@@ -53,8 +53,9 @@ def plot_sample(fp_image):
     skeleton = np.array(skeleton, dtype=np.uint8)
     skeleton = removedot(skeleton)
 
+    plt.subplot(x,4,y)
     plt.imshow(skeleton, 'gray')
-    plt.show()
+    # plt.show()
 
 
 # main function 
@@ -63,14 +64,32 @@ if __name__ == "__main__":
     # Read fp data from the text file
 
     temps = np.loadtxt("fpData/fp_image.txt")
+    print(temps)
     
     # shaping array as pixels 160x160 i.e, 25600 samples
     arr1 = np.array(temps[0]).reshape(160,160)
     arr2 = np.array(temps[1]).reshape(160,160)
     arr3 = np.array(temps[2]).reshape(160,160)
     arr4 = np.array(temps[3]).reshape(160,160)
+    
+    arr5 = np.array(temps[4]).reshape(160,160)
+    arr6 = np.array(temps[5]).reshape(160,160)
+    arr7 = np.array(temps[6]).reshape(160,160)
+    arr8 = np.array(temps[7]).reshape(160,160)
+
+    # plot samples 
+    plot_sample(arr1,2,1)
+    plot_sample(arr2,2,2)
+    plot_sample(arr3,2,3)
+    plot_sample(arr4,2,4)
+
+    plot_sample(arr5,2,5)
+    plot_sample(arr6,2,6)
+    plot_sample(arr7,2,7)
+    plot_sample(arr8,2,8)
+  
 
-    plot_sample(arr1)
+    plt.show()
     
     '''
     fp_array1 = np.concatenate((arr1,arr2), axis=1)
-- 
GitLab