PLEASE NOTE
There is a reason why watermarks are there in the first place - to
prevent unauthorised reuse of images. For more information on the
issues around removing watermarks from images, this Wikimedia
article
is just one of many useful resources.
The answer below is intended as an exercise in automatically removing text from an image using the inpainting technique. The first part of this answer assumes an unknown text overlay using binarization. The second part of the answer attempts to deal with a known overlay image but unknown position, using image correlation.
Part 1 - Unknown overlay text, unknown position
For scenarios where the text is a given colour that differs a lot from the rest of the image, this is a job for ChanVeseBinarize[]
. It even works fairly well with translucent text - here's an example with a bit of translucent white text, using a Mathematica test image:
image = Import["http://i.stack.imgur.com/LyJTe.png"]
(* This is where parameters become important *)
binimg = ChanVeseBinarize[image, White, {Automatic, 0.12}, MaxIterations -> 1000];
(* Now we can create the mask *)
maskimg = Dilation[DeleteSmallComponents[binimg, 4], 2.5];
And finally the inpainting, making use of the method options to improve the result. It introduces a few artifacts due to an imperfect mask (for example, look at the red edge of the nose), but it's not bad given the text was translucent to start off with. With fully-white text, it's much better.
Inpaint[image, maskimg, Method -> {"TextureSynthesis", "MaxSamples" -> 1200}, MaxIterations -> 500]

Part 2 - Known overlay text, unknown position
This deals with a known piece of overlay text, and makes use of ImageCorrelate[]
. Here I make no change to the size or orientation of the overlay, but if you look in the documentation of ImageCorrelate[]
under "Generalizations and Extensions" you'll see an example of finding rotated occurrences of a template.
(* The test image is ExampleData[{"TestImage", "Mandrill"}] *)
overlay = Graphics@Text[Style["I love stackexchange", FontFamily -> "Arial",
FontSize -> 32, Bold, White, Opacity[0.8]]];
(* Or you can just import an image I've already prepared *)
compositeimage = Import["http://i.stack.imgur.com/DJEWm.png"]
Then we use ImageCorrelate[]
to find the most likely position for the text in the image, and MaxDetect
to extract its position (the white dot).
corrimage = ImageAdjust@ImageCorrelate[compositeimage, Binarize@overlay];
maxdetect = MaxDetect[ImageAdjust@DistanceTransform@Binarize[corrimage, 0.9]];
maxpos = Flatten@PixelValuePositions[maxdetect, 1];
(* This combines the overlay into a mask at the correct position *)
blankimage = Image@ConstantArray[0, ImageDimensions@compositeimage];
maskimage = ImageCompose[blankimage, Binarize@overlay, maxpos];
(* Dilation important to ensure full coverage of the mask *)
maskimage = Dilation[maskimage, 2];
Finally we can construct a mask from this information and inpaint. Here the performance is much better than above, because the mask is better.
Inpaint[compositeimage, maskimage,
Method -> {"TextureSynthesis", "MaxSamples" -> 1200},
MaxIterations -> 500]
