  The ability to form images through hair-thin optical fibres promises to open
up new applications from biomedical imaging to industrial inspection.
Unfortunately, deployment has been limited because small changes in mechanical
deformation (e.g. bending) and temperature can completely scramble optical
information, distorting images. Since such changes are dynamic, correcting them
requires measurement of the fibre transmission matrix (TM) in situ immediately
before imaging. TM calibration typically requires access to both the proximal
and distal facets of the fibre simultaneously, which is not feasible during
most realistic usage scenarios without compromising the thin form factor with
bulky distal optics. Here, we introduce a new approach to determine the TM of
multi-mode fibre (MMF) or multi-core fibre (MCF) in a reflection-mode
configuration without access to the distal facet. A thin stack of structured
metasurface reflectors is used at the distal facet to introduce
wavelength-dependent, spatially heterogeneous reflectance profiles. We derive a
first-order fibre model that compensates these wavelength-dependent changes in
the TM and show that, consequently, the reflected data at 3 wavelengths can be
used to unambiguously reconstruct the full TM by an iterative optimisation
algorithm. We then present a method for sample illumination and imaging
following TM reconstruction. Unlike previous approaches, our method does not
require the TM to be unitary making it applicable to physically realistic fibre
systems. We demonstrate TM reconstruction and imaging first using simulated
non-unitary fibres and noisy reflection matrices, then using much larger
experimentally-measured TMs of a densely-packed MCF, and finally on an
experimentally-measured multi-wavelength set of TMs recorded from a MMF. Our
findings pave the way for online transmission matrix calibration in situ in
hair-thin optical fibres
