Added image color average detecting method.