According to one embodiment, there is provided an optical encoder having a photodetector array comprising motion detection photodetectors and at least one reference photodetector vertically offset from the motion detection photodetectors. The output signal generated by the at least one reference photodetectors is employed to correct undesired variations in the amplitudes of the output signals generated by the motion detection photodetectors. Such variations typically arise from various mechanical and optical misalignments in the optical encoder, and are compensated for by using the reference output signal to add to or subtract from, as required, the amplitudes of motion detection output signals.