Skip to content

Instantly share code, notes, and snippets.

@SamratSahoo
Created June 18, 2020 03:16
Show Gist options
  • Select an option

  • Save SamratSahoo/72da32f1687a69f3fb6f4ccd2f007d5a to your computer and use it in GitHub Desktop.

Select an option

Save SamratSahoo/72da32f1687a69f3fb6f4ccd2f007d5a to your computer and use it in GitHub Desktop.
if __name__ == '__main__':
# Grayscale Image
image = processImage('Image.jpeg')
# Edge Detection Kernel
kernel = np.array([[-1, -1, -1], [-1, 8, -1], [-1, -1, -1]])
# Convolve and Save Output
output = convolve2D(image, kernel, padding=2)
cv2.imwrite('2DConvolved.jpg', output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment