updated canny to take slice num from args