Approach to apply canny edge detector on a video instead of a still image

Using this tutorial you can insert your own code :

# Our operations on the frame come here

gray_image= cv.cvtColor(frame, cv.COLOR_BGR2GRAY)
#applying gaussian low pass filter
gauss_image = cv.GaussianBlur(gray_image, kernel_size,sigmaX,sigmaY)

#applying canny edge detector
edges = cv.Canny(gauss_image,lower_threshold, upper_threshold)
# Display the resulting frame

cv.imshow('frame', edges )