AFAIK the formula is for color images only, and gives the weight of the 3 color components.