Image inpainting refers to restoring a corrupted image with missing information. When the damaged region (inpainting domain) of image is assumed to be known beforehand, the inpainting problem has been extensively studied by many researchers. However, in many applications, the inpainting domain may not be readily available. In this essay, based on a TV model, we will propose an explicit iterative algorithm to simultaneously detect and recovery damaged pixels of the given image. The experiments on some image restoration task indicate that our algorithms is efficient and fast.