diff --git a/ReadRawData/pyScripts/Merge.py b/ReadRawData/pyScripts/Merge.py index f95826b2caa649f94d64030a9a06c32b8fbc2e6c..29dfb5add392a899c282c3db625bd9eb21dd3791 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 ''' @@ -55,18 +55,18 @@ def plot_sample(fp_image): skeleton = np.array(skeleton, dtype=np.uint8) skeleton = removedot(skeleton) + plt.subplot(x,2,y) plt.imshow(skeleton, 'gray') - plt.show() # extract sub array -def extract_sample(arry): +def extract_sample(arry,x,y): ''' plot the given sample ''' - fp_sample = arry[0:32:1,0:32:1] + fp_sample = arry[0:64,0:64] print(fp_sample) - fp_image = np.reshape(fp_sample, (32,32)) + fp_image = np.reshape(fp_sample, (64,64)) print(fp_image.shape) @@ -81,8 +81,8 @@ def extract_sample(arry): skeleton = np.array(skeleton, dtype=np.uint8) skeleton = removedot(skeleton) + plt.subplot(x,2,y) plt.imshow(skeleton, 'gray') - plt.show() # plot fp samples @@ -122,9 +122,9 @@ if __name__ == "__main__": arr7 = np.array(temps[6]).reshape(160,160) arr8 = np.array(temps[7]).reshape(160,160) - plot_sample(arr1) + plot_sample(arr1, 1, 1) - # extract_sample(arr1) + extract_sample(arr1, 1, 2) ''' # plot samples @@ -138,9 +138,9 @@ if __name__ == "__main__": plot_samples(arr7,2,7) plot_samples(arr8,2,8) - - plt.show() ''' + plt.show() + # Merging all samples to single array