A stable magnification, low distortions, and a wide depth of field (DoF) make a bilateral telecentric system well-suited for geometrical measurements with a large scope of working distances. However, a limitation of such a telecentric system appear because the magnification changes slightly for different working distances even within the DoF, which results in the measurement error. Therefore, we propose a method to compensate the measurement error in telecentricity. The parameters of the measurement error caused by the telecentricity are analyzed in detail and experiments are implemented to verify the flexibility of the proposed method. Our results show that the stability of the magnification at different working distances is improved after the compensation of the telecentricity error. We believe that our approach can significantly improve the precision of geometrical measurements through the error compensation caused by telecentricity.