Determination of oxidized metals’ oxide layer thickness from local extrema of reflectance spectra: theoretical basis and application to anodized titanium