Skip to content
Snippets Groups Projects
Commit 7cb3401a authored by Dorababu A's avatar Dorababu A
Browse files

Extracting sub array

parent f064901a
No related branches found
No related tags found
No related merge requests found
...@@ -63,10 +63,10 @@ def extract_sample(arry,x,y): ...@@ -63,10 +63,10 @@ def extract_sample(arry,x,y):
''' '''
plot the given sample plot the given sample
''' '''
fp_sample = arry[0:64,0:64] fp_sample = arry[0:120,0:120]
print(fp_sample) print(fp_sample)
fp_image = np.reshape(fp_sample, (64,64)) fp_image = np.reshape(fp_sample, (120, 120))
print(fp_image.shape) print(fp_image.shape)
...@@ -80,7 +80,8 @@ def extract_sample(arry,x,y): ...@@ -80,7 +80,8 @@ def extract_sample(arry,x,y):
skeleton = skeletonize(fp_enhance_image) skeleton = skeletonize(fp_enhance_image)
skeleton = np.array(skeleton, dtype=np.uint8) skeleton = np.array(skeleton, dtype=np.uint8)
skeleton = removedot(skeleton) skeleton = removedot(skeleton)
print(skeleton)
plt.subplot(x,2,y) plt.subplot(x,2,y)
plt.imshow(skeleton, 'gray') plt.imshow(skeleton, 'gray')
...@@ -98,6 +99,7 @@ def plot_samples(fp_image, x, y): ...@@ -98,6 +99,7 @@ def plot_samples(fp_image, x, y):
skeleton = np.array(skeleton, dtype=np.uint8) skeleton = np.array(skeleton, dtype=np.uint8)
skeleton = removedot(skeleton) skeleton = removedot(skeleton)
print(skeleton)
plt.subplot(x,4,y) plt.subplot(x,4,y)
plt.imshow(skeleton, 'gray') plt.imshow(skeleton, 'gray')
# plt.show() # plt.show()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment