Software implementation of Canny by following OpenCV Canny documentation works