Made modifications to CannyEdgeDetection to support future multi threading