I am working with hyperspectral image data in R, so I have subset an image to a region of 5000 pixels, each containing a vector 254 bands in length.

I would like to cluster this data in order to try and map regions with similar surface composition.

Due to differences in surface reflectance, if I plot two pixels, where for example: x=1:254, y=0:1 (reflectance)

They may have very similar shape (values across all bands) but be vertically offset from one another due to the overall reflectance of the surface.

For my region I have a mean spectrum, and each pixel contains a vector of 254 residual values. I can't use Euclidean distance to compare vectors, because it will change depending on the overall reflectance, so I'm not sure if there's a more appropriate measure to use that will give me a better comparison.

Apologies for my novice question.

*Edit: This question is also posted at: http://stats.stackexchange.com/questions/67781/appropriate-distance-measures