function G = exc1( img_path, out_path )
im = imread(img_path);
imshow(im);
if size(im,3) == 3
    print 'ok';
    
im_gray = rgb2gray(im);
imshow(im_gray);
if exist(out_path, 'dir')
    [path, name, ext] = fileparts(img_path);
    imwrite(im_gray, strcat(out_path, name, '_gray', ext));
end

G = im_gray;

end

