Introduction - If you have any usage issues, please Google them yourself
canny edge detection operator, smooth image with a Gaussian filter, and then the first order partial derivatives of the finite difference to calculate the gradient magnitude and direction.