function [mag,ori] = CV_Sobel(im)
%

[num_rows,num_cols] = size(im);
mag = zeros(num_rows,num_cols);
ori = zeros(num_rows,num_cols);

[dx,dy] = gradient(im);
mag = sqrt(dx.^2 + dy.^2);
ori1 = atan2(dy,dx);
ori = posori(ori1);

