With the increasing miniaturisation and integration of electronic products and the increase of heat,it is necessary to design and introduce heat sinks and install fans.The volume of electronic components,especially the height,is very important for the structural and thermal design of electronic devices.This paper presents a design scheme of an online height measurement device based on laser triangulation and commercial charge coupled device(CCD).It analyzes the principles of electronic component height measurement,and expounds the composition and working principle of the laser measurement system.In addition,the commonly used methods to determine the cen-ter position are compared and analysed.These methods include circle fitting,gray centroid and extension method or Gaussian fitting.These methods usually lead to different results.The experimental results show that the fitting speed of the gray centroid is faster.The 3D model of components is given through measurement,and the error factors affecting measurement are analysed.