Text this: Apparent depth-imaging analysis for refractive index measurement