I have been straggling with the concept of feature normalization for the hyperspectral images. Respect to my problem I have attached a picture of my problem which clearly stands the issue which I have.
It would help if you could provide more information on your case. Are you struggling with a particular application? How does feature scaling relate to the rest of your workflow?
Based on what information you provided, I'll attempt a general answer:
I suggest using the first option, i.e. scaling each band individually.
Some background information: I assume you want to scale your hyperspectral data in preparation for some kind of machine learning method. Many of these methods are sensitive to scaling, i.e. Euclidean distances in the data. If, for example, your hyperspectral data covers vegetated areas, the variation in reflectance will be much higher in the near infrared region than in the visible region. This effectively means that without scaling, the near infrared region will be much more dominant in your model than the visible spectral region.
This scaling only makes sense when you average over a single band. You'll want to know how far a particular pixel is from its mean, not the average reflectance of a pixel and how far each band is from that (which would be the case in the second formula for the mean you showed).
I have found the answer:
For a classification task, feature scaling should be done for each individual pixel, not for the individual band. That means, we need to compute mean for the individual pixel over all bands since each pixel in B dimension represents a specific object which we want to be classified. Therefore we need to scale the observation not variable. First formula in the picture.
Note: We do feature scaling on variable if we would like to do a regression task.