col2gray - convert an image to a grayscale image Calling Sequence: img = col2gray(im,my_select) Parmeters: im: matrix of an input image my_selcet: select a mothod for converting img: output image,it's a grayscale image Description: this function provides three methods for converting an image to a grayscale image: (1)average. rgb=R/3+G/3+B/3 (2)max. rgb=max(R,G,B) (3)weighted average. rgb=0.11*R+0.59*G+0.30*B if my_select=1,then we use the first method to convert the image to a grayscale image Example: im = imread("lena.png"); img = col2gray(im,2);