AmeasurementsystemwiththeCCDmatrixandcomputersystemisdesignedtotestthe2Dsizeofanyshapeworkpiecesautomatically.Inaddition,thesystemadoptsthemethodoftherelativemeasurementwhichincreasestheprecisionandthevelocity.Moreimportantly,theprecisioncan'tbechangedwiththeconditionsofthetemperatureandairpressure.Theexperimentsshowthattherelativeprecisionof0.0029andtheabsoluteprecisionof2.97μmareobtained.Theinstrumentmaybeusedintheproductlineandmakethetestingonlinepossible.