Image stitching is a cost-effective way to expand the field-of-view of imaging system. The traditional homography-based image stitching uses a global homography transformation matrix for image transformation, which is stable, but only works well for flat scenes, relative far scenes or the scenes which are captured by the camera with rotation only. The AsProjective-As-Possible and Content-Preserving-Warping methods, which are realized by mesh optimization, improve the stitching result to a certain degree, but there is obvious ghost in the near scenes or images which have relatively large parallax. In this paper, an image stitching method which utilizes depth information and mesh optimization is proposed. The feature points are detected and then clustered, and the depth information are used to assign weights to each mesh to compute homography for each mesh respectively. Experiments show proposed method has better results than other methods.