  The China Spallation Neutron Source (CSNS) operates in pulsed mode and has a
high neutron flux. This provides opportunities for energy resolved neutron
imaging by using the TOF (Time Of Flight) approach. An Energy resolved neutron
imaging instrument (ERNI) is being built at the CSNS but significant challenges
for the detector persist because it simultaneously requires a spatial
resolution of less than 100 {\mu}m, as well as a microsecond-scale timing
resolution. This study constructs a prototype of an energy resolved neutron
imaging detector based on the fast optical camera, TPX3Cam coupled with an
image intensifier. To evaluate its performance, a series of proof of principle
experiments were performed in the BL20 at the CSNS to measure the spatial
resolution and the neutron wavelength spectrum, and perform neutron imaging
with sliced wavelengths and Bragg edge imaging of the steel sample. A spatial
resolution of 57 {\mu}m was obtained for neutron imaging by using the
centroiding algorithm, the timing resolution was on the microsecond scale and
the measured wavelength spectrum was identical to that measured by a beam
monitor. In addition, any wavelengths can be selected for the neutron imaging
of the given object, and the detector can be used for Bragg edge imaging. The
results show that our detector has good performances and can satisfy the
requirements of ERNI for detectors at the CSNS
