Skip to content

This is to see how a kernel will convolve over an image and what will be its output after convolution

Notifications You must be signed in to change notification settings

sahil210695/convolution-evolution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Convolution is Evolution 😎

This is to see how a kernel will convolve over an image and what will be its output after convolution

Kernels that we are using:

  • Horizontal kernel will extract all horizontal edges
  • Vertical kernel will extract all vertical edges
  • Edge kernel will extract all edges

Demo Image

Demo Image

Kernels with their output:

  1. Horizontal Kernel
np.array([
    [-1, -1, -1],
    [ 0,  0,  0],
    [ 1,  1,  1],
])

Horizontal Kernel

  1. Vertical Kernel
np.array([
    [-1,  0,  1],
    [-1,  0,  1],
    [-1,  0,  1],
])

Vertical Kernel

  1. Edge Kernel
np.array([
    [-1, -1, -1],
    [-1,  8, -1],
    [-1, -1, -1],
])

Edge Kernel

UI

I have created UI for this demo using Streamlit

  • pip install streamlit
  • streamlit run app.py