In recent years, machine vision technology has been widely used in production. The scanners of the three-dimensional scanning technology are too expensive to promotion. A new height measurement method of irregular objects is proposed in this paper. Firstly, the color and depth images of objects are collected by using Kinect, then the images collected are needed to preprocessed. The height matrix is obtained by background subtraction method. Finally, the height matrix element values are divided into different interval and then the height of the object is calculated by finding the maximum connected domain. The experimental results show that the relative error is less than 1.56%, which improves the efficiency and accuracy of heightmeasurement, and it realizes the automation of the measurement process and can satisfy therequirement of real-time.