A sensor, in particular for the spatially resolved detection, includes a substrate, at least one micropatterned sensor element having an electric characteristic whose value varies as a function of the temperature, and at least one diaphragm above a cavity, the sensor element being disposed on the underside of the at least one diaphragm, and the sensor element being contacted via connecting lines, which extend within, on top of or underneath the diaphragm. In particular, a plurality of sensor elements may be formed as diode pixels within a monocrystalline layer formed by epitaxy. Suspension springs, which accommodate the individual sensor elements in elastic and insulating fashion, may be formed within the diaphragm.