Watermarks can be seen on some photographs for copyright reasons, but in some cases even people or companies who clearly don’t own copyrights add watermarks, such as online resellers who add watermarks on top of photos provided by manufacturers, and some camera adds date & time automatically to photos if you’ve used the settings to enable it. I’ve recently read a blog post on Google Research about making watermarks more effective, as some computer algorithm could remove watermarks automatically. Since I often waste time while searching for watermark-free version of the photo, I decided to check if I could find such program running in Linux. I did not but I found a somewhat old blog post explaining how to use GIMP to perform the task with three different methods:
- Crop, if the watermark is on the edges… Easiest method, but for most case this won’t do…
- Content-aware filling using resynthetiser plugin. Automatic and easy, but results will depend on source since it will use adjacent pixels around the zone to “heal”.
- Manual removal. Works most of the time, but is time consuming
I tried the second method with the instructions provided, but the plugin failed to install. Eventually, I realized installation is even easier today in Ubuntu 16.04:
1 |
sudo apt install gimp gimp-resynthesizer |
The last package will install resynthesizer and extra filters. We can now load the photo with watermarks, select the marker mark with the rectangle, ellipse, or free select tools, and apply the filter with Filters->Enhance->Heal selection…
The following window with show up. The context sampling width set the number of pixels outside the selected zone you want to use. You can then select samples from all four edges, left and right sides, or above and below. The option will depend on the image, as for example for a watermark covering the white and black zone of the left sided of the phone, I had to select “Above and below”.
Finally, the Filling order allows to randomize the filter, or use inwards towards center, or outwards from center. You can experiment with options to find the one that works best with your source image. As you can see from the image below, the results are not quite perfect on the images I used, but still better than me using the smudge tool. Results will be better when the watermark is on a homogeneous zone with no sharp lines or large differences in colors.
I also tried with some photos since it’s likely to work better, starting with a scan of an old photo with some rather pale timestamp watermark on the bottom right side on top of water.
I selected two zones before applying “Heal selection” filter, and it worked very well as shown in the watermark free photo below.
I took two photo with a point and shoot camera with timestamp enable for further testing. In the first I make sure the timestamp was on top of tree leaves.
I applied the filter with default settings and the results are impressive. Even if you download the full size picture, and zoom in you may not be able to sport the filtered zone that easily.
The filter is bound not to work as well on the last photo since the timestamp is placed on top of a mixture of water and plants.
And indeed the result is not perfect, but it may not be that noticeable unless your focus on the filtered area.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress
To download for windows check out. http://registry.gimp.org/node/27986
Or this if you need help installing it. http://templatetoaster.com/tutorials/gimp-resynthesizer-plugin/
Did you include the wrong ‘before’ image for the bird on the pole? I don’t see any watermarks on that image. Maybe they’re too subtle for me to see.
@willmore
It’s the correct image. The timestamp is orange, located in the right bottom corner, and yes, a little hard to see, and that’s why I used the word “pale”.
That’s funny, I had the exact same train of thought after seeing Google’s article, and wound up with the same solution. So far I’ve only really used it to remove watermarks on plain backgrounds or gradients, where it works pretty well. Often the results where a logo is emblazoned across the center of a picture are ugly. But it’s better than just trying to crop out unnecessary watermarks all the time!
@Jean-Luc Aufranc (CNXSoft)
Sorry, I’m deuteroptic and can’t see red/orange very well, I totally missed seeing it. That’s probably not a good solution to watermark removal. 😉