Centroid error is the crucial limit to the performance of the Shack-Hartmann wave-front sensor. The previous studies showed that the centroid error was affected by the discrete sample, the photon noise and the readout noise of the CCD. For many special characters, a CMOS camera is also used in the Shack-Hartmann wave-front sensor. Compared to a CCD, the sensitivity of a CMOS camera is obviously non-uniform. In this paper, a detailed analysis of the centroid error induced by the sensitivity non-uniformity of pixels is presented. The theoretical results are represented and demonstrated through an experiment. The results show that the error induced by the sensitivity non-uniformity is only dependent upon the detector, and has no relationship with the other factors. For the CMOS camera mentioned in this paper, the centroid error is less than 0.015 pixels.