Using MATLAB to realize edge detection