A python code that uses the OpenCV and Numpy library to convert an image to a pencil sketch. Matrix division and gradient calculation is used to form the final pencil sketch image.
Launch the Jupyter Notebook and run this Pencil_Sketchmethod.ipynb file
Add the images in the same file path as your notebook file. Change the file variable's text.
file='images\cat.jpg'