In this paper, we shall propose a method to invert halftone images. We shall use a modified look-up table to reconstruct gray level images from halftone images. In the modified look-up table training phase, we shall use a sliding window to get halftone patterns and their corresponding gray-level lists. The modified look-up table can be obtained by calculating the centroid of the gray-level lists. In the image reconstruction phase, we shall use the sliding window to slide around the pixel to reconstruct so that we can get candidate gray values. The reconstructed gray value can be obtained by calculating the centroid of the candidate gray values. Experimental results have shown that our method indeed can get satisfied results.