An optical detector 50 comprises a plurality of pixels, each pixel comprising a photodiode operable to detect light incident on that pixel and to generate a signal indicative of an intensity of that light. The plurality of pixels comprises a plurality of pixel pairs, and for each pixel pair, in a configuration mode, the detector is arranged to compare the signal generated by a first pixel of the pair with the signal generated by a second pixel of the pair. The plurality of pixels may comprise an array and the signal indicative of intensity generated by each pixel may be connected to either a first output 52 or a second output 54 depending on the result of the comparison. In an experiment mode, the signals indicative of intensity received at the first output 52 may be summed and those received at the second output 54 may be summed. The difference between the two summed signals may be obtained. The optical detector may be a speckle knife edge detector used in laser ultrasonic evaluation of both rough and smooth surfaces.