Can we remove the watermarks using ImageMagick
Can we remove the watermarks using ImageMagick
Technical Team,
Issue: Need to remove the watermark(text) diagnally right placed on a .tiff image which consists of text, Both the image text and the watermark text are in the same color(Black).
Critical issues:
1. The watermark text is placed diagnally right on the background of image(.tiff) file.
2. The image file is a scanned format of Document.
3. It is observed that when each pixel values are read from the image, there is no diff between the RGBA values for Text on Image and watermark text.
Can we overcome the issue using Imagemagick tool.
Please sugest the ways to resolve the issue.
Issue: Need to remove the watermark(text) diagnally right placed on a .tiff image which consists of text, Both the image text and the watermark text are in the same color(Black).
Critical issues:
1. The watermark text is placed diagnally right on the background of image(.tiff) file.
2. The image file is a scanned format of Document.
3. It is observed that when each pixel values are read from the image, there is no diff between the RGBA values for Text on Image and watermark text.
Can we overcome the issue using Imagemagick tool.
Please sugest the ways to resolve the issue.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Can we remove the watermarks using ImageMagick
It would be likely impossible to determine if a pixel in the watermark area should be on (for underlying text) or not. Especially without shading (greyscale) effects in the scan.
However if you like to post a small cut-down sample of the problem, people on the forum can give it a go, and make suggestions. Without a sample we'd be simply guessing!
However if you like to post a small cut-down sample of the problem, people on the forum can give it a go, and make suggestions. Without a sample we'd be simply guessing!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Can we remove the watermarks using ImageMagick
4. Removing such a watermark would almost certainly be a copyright violation, if you didn't create the image yourself in the first place, and the person placing the watermark had the right to do so.
Re: Can we remove the watermarks using ImageMagick
1.The sample image is given in the below link.anthony wrote:It would be likely impossible to determine if a pixel in the watermark area should be on (for underlying text) or not. Especially without shading (greyscale) effects in the scan.
However if you like to post a small cut-down sample of the problem, people on the forum can give it a go, and make suggestions. Without a sample we'd be simply guessing!
http://www.flickr.com/photos/65102804@N ... otostream/
The background text "Not" in the image is the watermark which is to be removed.
2.There is no copyright issue involved.
Re: Can we remove the watermarks using ImageMagick
Since the watermark lines are very thin with respect to the main text,
noise reduction should do it, although the main text will be damaged somewhat:
unless there is fine print elsewhere on the document; that will disappear along
with the watermark!
noise reduction should do it, although the main text will be damaged somewhat:
Code: Select all
convert -noise 4x4 input.jpg output.jpg
with the watermark!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Can we remove the watermarks using ImageMagick
morphologic close might be a better way to go -- seems to remove the thin lines without too much distortion of the main text.
convert 5929918592_946af57ae2.jpg -morphology close diamond 5929918592_946af57ae2_close.jpg
see http://www.imagemagick.org/Usage/morphology/
convert 5929918592_946af57ae2.jpg -morphology close diamond 5929918592_946af57ae2_close.jpg
see http://www.imagemagick.org/Usage/morphology/
Re: Can we remove the watermarks using ImageMagick
Thankyou so much.
The "morphologic close diaomand" command worked for my image(WaterMark disapeared).
But the problem is the remaing text in the image had disturbed a bit.
Can we limit this disturbance to a limited area,so that the disturbance is limited to the text under which the watermark is removed (or) can we sharpen the remaining text after the watermark is removed.
The WaterMark in the image is placed diagnally left to right in the middle of the image file.
The "morphologic close diaomand" command worked for my image(WaterMark disapeared).
But the problem is the remaing text in the image had disturbed a bit.
Can we limit this disturbance to a limited area,so that the disturbance is limited to the text under which the watermark is removed (or) can we sharpen the remaining text after the watermark is removed.
The WaterMark in the image is placed diagnally left to right in the middle of the image file.
Re: Can we remove the watermarks using ImageMagick
You could probably use -region something like this ( change the dimensions in region to reflect the area you want to modify ):
Code: Select all
convert 5929918592_946af57ae2.jpg -region 160x180+35+30 -morphology close diamond 5929918592_946af57ae2_close.jpg
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Can we remove the watermarks using ImageMagick
Alturnative is to enlarge the 'closed' text ('erode' the white background), and use it as a mask of the original image.
But you may be left with small pixels from the watermark attached to edges the letters.
basically it comes down to 'how disturbed' you want it.
But you may be left with small pixels from the watermark attached to edges the letters.
basically it comes down to 'how disturbed' you want it.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Can we remove the watermarks using ImageMagick
Can we get the region shown in the below image(Red marked) using the -region option with convert command.
http://www.flickr.com/photos/65102804@N07/5939977114/
How to combine the below two into one command line argument.
1.convert GoodMorning.png -region 360x380+300+320 GoodMorning_level.bmp
2.convert GoodMorning_level.bmp -gravity center -region 1060x1580+300+320 GoodMorning_level.bmp
Thanks & Regards,
Akkisai
http://www.flickr.com/photos/65102804@N07/5939977114/
How to combine the below two into one command line argument.
1.convert GoodMorning.png -region 360x380+300+320 GoodMorning_level.bmp
2.convert GoodMorning_level.bmp -gravity center -region 1060x1580+300+320 GoodMorning_level.bmp
Thanks & Regards,
Akkisai