A photodetector with a front surface and a back surface , wherein the photodetector comprises a silicon substrate with a corresponding front surface and a corresponding back surface , and the silicon substrate comprises one or more field-effect transistor pixels which comprise: - a source region on the front surface of the silicon substrate and a conductive source electrode connected to the source region , - a gate region on the front surface of the silicon substrate and a conductive gate electrode connected to the gate region , - a drain region on the front surface of the silicon substrate and a conductive drain electrode connected to the drain region , - a transistor channel region encompassing the source, gate and drain regions on the front surface of the silicon substrate, wherein the silicon substrate has been doped to a first conductivity type in the transistor channel region , - a transistor well encompassing the transistor channel region on the front surface of the silicon substrate, wherein the silicon substrate has been doped to a second conductivity type in the transistor well , characterized in that - the one or more field-effect transistor pixels further comprise a cavity extending from the back surface of the silicon substrate to the transistor channel region , wherein the top of the cavity comprises a photoactive layer which is in contact with the transistor channel region and configured to generate a photovoltage at the interface between the photoactive layer and the transistor channel region , and wherein the cavity also comprises an at least partly transparent encapsulation layer overlying the photoactive layer in the cavity, and that - one or more openings in the back surface of the photodetector are aligned with one or more field-effect transistor pixels and allow electromagnetic radiation to reach the cavity in the one or more field-effect transistor pixels. - a source region on the front surface of the silicon substrate and a conductive source electrode connected to the source region , - a gate region on the front surface of the silicon substrate and a conductive gate electrode connected to the gate region , - a drain region on the front surface of the silicon substrate and a conductive drain electrode connected to the drain region , - a transistor channel region encompassing the source, gate and drain regions on the front surface of the silicon substrate, wherein the silicon substrate has been doped to a first conductivity type in the transistor channel region , - a transistor well encompassing the transistor channel region on the front surface of the silicon substrate, wherein the silicon substrate has been doped to a second conductivity type in the transistor well , - the one or more field-effect transistor pixels further comprise a cavity extending from the back surface of the silicon substrate to the transistor channel region , wherein the top of the cavity comprises a photoactive layer which is in contact with the transistor channel region and configured to generate a photovoltage at the interface between the photoactive layer and the transistor channel region , and wherein the cavity also comprises an at least partly transparent encapsulation layer overlying the photoactive layer in the cavity, and that - one or more openings in the back surface of the photodetector are aligned with one or more field-effect transistor pixels and allow electromagnetic radiation to reach the cavity in the one or more field-effect transistor pixels. <EOS>