  In this work we explore for the first time the applicability of using
$\gamma$-ray imaging in neutron capture measurements to identify and suppress
spatially localized background. For this aim, a pinhole gamma camera is
assembled, tested and characterized in terms of energy and spatial performance.
It consists of a monolithic CeBr$_3$ scintillating crystal coupled to a
position-sensitive photomultiplier and readout through an integrated circuit
AMIC2GR. The pinhole collimator is a massive carven block of lead. A series of
dedicated measurements with calibrated sources and with a neutron beam incident
on a $^{197}$Au sample have been carried out at n_TOF, achieving an enhancement
of a factor of two in the signal-to-background ratio when selecting only those
events coming from the direction of the sample.
