Skip to content

Instantly share code, notes, and snippets.

@lucifermorningstar1305
Created January 4, 2020 12:09
Show Gist options
  • Save lucifermorningstar1305/ca5fec31cd4b3a0d22da0d448282461e to your computer and use it in GitHub Desktop.
Save lucifermorningstar1305/ca5fec31cd4b3a0d22da0d448282461e to your computer and use it in GitHub Desktop.
Median Filter Application
gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
Gm = cv2.medianBlur(gray,3)
imgs = np.array([gray, Gm])
labels = ['Original','Filtered']
for i in range(1, column*row+1):
ax = fig.add_subplot(row,column,i)
ax.set_title(labels[i-1])
plt.imshow(imgs[i-1], cmap='gray')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment