remove image watermark from jpg

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
leescott
Posts: 10
Joined: 2011-11-03T06:13:21-07:00
Authentication code: 8675308

remove image watermark from jpg

Post by leescott »

I have some jpg files.These jpgs have image watermark on.
The watermark position is not the same in each image,but morphology of watermark is alike.
How to detect watermark?how to get watermark?And,How to remove it from jpg?
My file contains 16 jpg,all in one at here,http://ifile.it/uiynaxg .(example)
Thanks for your help!
Last edited by leescott on 2011-11-09T18:59:59-07:00, edited 2 times in total.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: remove image watermark from jpg

Post by Bonzo »

Are these files legaly yours?

Nobody will be able to tell you anything without an example.
leescott
Posts: 10
Joined: 2011-11-03T06:13:21-07:00
Authentication code: 8675308

Re: remove image watermark from jpg

Post by leescott »

Bonzo wrote:Are these files legaly yours?

Nobody will be able to tell you anything without an example.
these JPG can get freely from web.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: remove image watermark from jpg

Post by anthony »

Doesn't mean they are yours, but unless it is a trademark, it is typically free to use.

However the link you provided seems to be restricted to you only. I certainly cant download them.
Try a 'public' directory on dropbox (its free for 2G without time limit)
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
leescott
Posts: 10
Joined: 2011-11-03T06:13:21-07:00
Authentication code: 8675308

Re: remove image watermark from jpg

Post by leescott »

anthony wrote: Howeve rthe link you provided seems to be restricted to you only. I certainally cant download them.
Try a 'public' directory on dropbox.
Thanks!
I upload it once again.And you could try anyone,first site need "get ticket".

http://ifile.it/uiynaxg
http://www.box.net/shared/h6eucdf5pjclesaa3cs5
leescott
Posts: 10
Joined: 2011-11-03T06:13:21-07:00
Authentication code: 8675308

Re: remove image watermark from jpg

Post by leescott »

I get a watermark,but its position and size may be different.
Is there easy ways to remove it?
Thanks all help!
http://www.flickr.com/photos/72068543@N ... hotostream
http://www.flickr.com/photos/72068543@N ... hotostream
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: remove image watermark from jpg

Post by fmw42 »

Your first file is totally black as far as I can see. The second file has a very faint watermark image, but I know of no way to remove that. Best I can suggest is see Anthony's notes at http://www.imagemagick.org/Usage/masking/#bg_remove and especially http://www.imagemagick.org/Usage/maskin ... background

The only way I can think of that would help in some small way would be to open it in Photoshop or Gimp or some tool that allows clone painting and paint over the watermark with appropriate image texture from nearby in the image.

Perhaps someone else might have more insight.
leescott
Posts: 10
Joined: 2011-11-03T06:13:21-07:00
Authentication code: 8675308

Re: remove image watermark from jpg

Post by leescott »

fmw42 wrote:Your first file is totally black as far as I can see.
Thank you!
The first one is watermark image .
First,maybe I should resize picture 1 equal to picture 2 ,resize watermark in pic 1 equal to the one in picture 2,and relocate watermark in pic 1 to align two watermarks.
Then,remove background.
How to do this?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: remove image watermark from jpg

Post by anthony »

If you can get not just a black image watermark, but also a white image watermark, then you can figure out the exact semi-transparent watermark that is 'over' composited onto the image.
See Background Removal using Two Backgrounds
http://www.imagemagick.org/Usage/maskin ... background

If this is the type of watermarking used, it is then only a matter of figuring out exactly where the watermark is located
and reverse the modification that was made to the pixels.

---

However. The watermark does not look like a semi-transparent overlay image, but some type of color modification of the image. This isn't a straight forward, to undo without knowing the exact formula used for the wartermarking process.

If you can get a range of images with and without the watermark so you can create a table of colors (un-watermarked, vs, wartermarked colors), you may be able to work out a general colormapping for effected pixels (see HALD Color Lookup Table) that maps from watermarked back to a un-watermarked color.

It is then only a matter of locating the watermark, and thus masking the pixels that need to be fixed, then applying that HALD colormapping to just the effected pixels so as to reverse the watermark. Location would probably require the use of a unscale correlation techniques (location of a sub-image or pattern), which is a difficult task itself.

Both tasks are tricky and difficult, and can require a lot of work!

This method should work for any 'fixed' watermark technique, but as I mentioned it requires the discovery of how a 3-d array or color pixels are modified by the specific markmarking technique.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
leescott
Posts: 10
Joined: 2011-11-03T06:13:21-07:00
Authentication code: 8675308

Re: remove image watermark from jpg

Post by leescott »

Thank two experts for reply!
I can't imagine things are so difficult,and I must say to myself "giving up".
Happy new year! :D 8) :lol:
leescott
Posts: 10
Joined: 2011-11-03T06:13:21-07:00
Authentication code: 8675308

Re: remove image watermark from jpg

Post by leescott »

I found a white page,having a watermark.Maybe white page differs from color page.(White page can be treated with other software,like ScanKromsator.)
http://www.flickr.com/photos/72068543@N ... hotostream
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: remove image watermark from jpg

Post by anthony »

On a white page, you are only dealing with two colors involving thin lines, so some threshold or morphology can be used to restore colors.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply