Use convulation with sobel filter from scratch in python

edge-detection-using-sobel-filter

Here use convulation with sobel filter from scratch in opencv python .

have to detect edge using sobel filter.

  • sobel x derivative kernel (detect vertical edge)
    -1 0 1
    -2 0 2
    -1 0 1
  • sobel y derivative kernel (detect horizontal edge)
    -1 -2 -1
    0 0 0
    1 2 1

input image

output x derivative

output y derivative

combine of x and y derivative

GitHub

View Github