In the depth-image-based rendering (DIBR), hole-filling is one of the most important procedures for the quality of DIBR results, especially in modern multi-view 3D-TV systems. To achieve photorealistic performance, we propose a novel inpainting algorithm for hole-filling. Rather than fill the holes in the target image by using neighboring pixels, the proposed method makes use of a reference image which contains the occluded information of the input image. The reference image is first segmented to many planar segments by optical flow and graph cuts optimization, and a set of homography matrices between the reference and target images for all planar segments are estimated by SURF features. Then the segments are transformed by these homography matrices to fill the holes in target image. Finally, exposure compensation is performed to reduce the difference between exposures of the input and reference images. Experimental results reveal that the proposed method can yield satisfactory synthesis quality and outperforms other existing hole-filling methods.