function xg = convertToGray(r,g,b)

xg = 0.2126*r + 0.7152*g + 0.0722*b;