ImageMagick

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?".

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.

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.

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?

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 Backgroundshttp://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 locatedand 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.