Home > Graphics, Ubuntu > How to Remove Watermarks & Timestamps from Photos with GIMP

How to Remove Watermarks & Timestamps from Photos with GIMP

September 12th, 2017 Leave a comment Go to comments

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:

  1. Crop, if the watermark is on the edges… Easiest method, but for most case this won’t do…
  2. 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”.
  3. 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:


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…

Click to Enlarge

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.

Before (left) vs After (right)

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.

Click for Full Size

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.

Click for Full Size

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.

Click for Full Size

And indeed the result is not perfect, but it may not be that noticeable unless your focus on the filtered area.

Click for Full Size

 

  1. Brett Cooper
    September 12th, 2017 at 12:26 | #1

    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/

  2. willmore
    September 12th, 2017 at 17:25 | #2

    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.

  3. September 12th, 2017 at 17:42 | #3

    @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”.

  4. September 12th, 2017 at 19:51 | #4

    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!

  5. willmore
    September 12th, 2017 at 23:17 | #5

    @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. 😉

  1. No trackbacks yet.