Edge detection using Sobel filter