code: public static int brightnessNTSC(int rgb) {
  		int r = (rgb >> 16) & 0xff;
  		int g = (rgb >> 8) & 0xff;
  		int b = rgb & 0xff;
  		return (int)(r*0.299f + g*0.587f + b*0.114f);
  	}
docs: Return the NTSC gray level of an RGB value.
  @param rgb1 the input pixel
  @return the gray level (0-255)