How can i remove this watermark...
How can i remove this watermark...
Hello, I have an image like this:
I want to remove the center text (VuiLen.com) since sometimes it makes the comic page harder to read...
With photoshop I can do this by:
1. Hue Composite the original image with an same-size image filled with ED8EEB (237,142,235)
2. Use the Color Dodge Composition for the result image with an same-size image filled with 127114 (18,133,20)
3. Saturation the result image with black (000000)
4. Multiply the result image with itself about 2-5 times
and the result is like this:
How can I do this with imagemagick?
And can you find a better solution? (This method is not good... It remove not only the text but also the light parts of the image...)
Thank you very much,
vanhoa
I want to remove the center text (VuiLen.com) since sometimes it makes the comic page harder to read...
With photoshop I can do this by:
1. Hue Composite the original image with an same-size image filled with ED8EEB (237,142,235)
2. Use the Color Dodge Composition for the result image with an same-size image filled with 127114 (18,133,20)
3. Saturation the result image with black (000000)
4. Multiply the result image with itself about 2-5 times
and the result is like this:
How can I do this with imagemagick?
And can you find a better solution? (This method is not good... It remove not only the text but also the light parts of the image...)
Thank you very much,
vanhoa
Last edited by vanhoa on 2009-08-11T11:06:28-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How can i remove this watermark...
try this:
convert Untitled3.jpg -colorspace HSB -channel B -separate -channel rgb -white-threshold 75% Untitled3_b_wt75.png
convert Untitled3.jpg -colorspace HSB -channel B -separate -channel rgb -white-threshold 75% Untitled3_b_wt75.png
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How can i remove this watermark...
What you really want is to somehow remove just the color parts.
The colors are however added to all three color channels, which makes it much more difficult.
However your steps do not define what 'Hue Composite' does!!! and how it composes with the specific color you describe. Where did you get these steps from?
I look forward to other peoples responses to this problem!
NOTE: once you have the technique down, apply the exact same operators to a HALT: image. You can than very quickly re-apply ALL the color modifications to ANY image using that modified HALT image!
http://www.imagemagick.org/Usage/color/#hald-clut
The colors are however added to all three color channels, which makes it much more difficult.
However your steps do not define what 'Hue Composite' does!!! and how it composes with the specific color you describe. Where did you get these steps from?
I look forward to other peoples responses to this problem!
NOTE: once you have the technique down, apply the exact same operators to a HALT: image. You can than very quickly re-apply ALL the color modifications to ANY image using that modified HALT image!
http://www.imagemagick.org/Usage/color/#hald-clut
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: How can i remove this watermark...
Thank you fmw42, works very well
To anthony, I use the word 'Hue Composition' from Photoshop. About the steps... I dont know why I can find it, I opened Photoshop, think about the result, and try the steps I can think up and see the result... But I really dont know how can I obtain them Sorry for my bad English
To anthony, I use the word 'Hue Composition' from Photoshop. About the steps... I dont know why I can find it, I opened Photoshop, think about the result, and try the steps I can think up and see the result... But I really dont know how can I obtain them Sorry for my bad English
Re: How can i remove this watermark...
fmw42, your solution has a little prblem with this image
Last edited by vanhoa on 2009-08-11T11:06:57-07:00, edited 1 time in total.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How can i remove this watermark...
I think the best steps would be to first isolate the pixels that are 'colorful'.
then figure out how type of color should be removed.
If the exact same watermark is being used on the exact same sized image, over and over, then on step would be to recover the watermark that was used, in terms of color and transparency.
What that the difference between the water mark and the specific color should be able to be extracted, especially once the 'transparency' is known, so you know how much a specific color is watermark and how much original image.
That is it should be posible to recover a near perfect replica of the original image!!!
then figure out how type of color should be removed.
If the exact same watermark is being used on the exact same sized image, over and over, then on step would be to recover the watermark that was used, in terms of color and transparency.
What that the difference between the water mark and the specific color should be able to be extracted, especially once the 'transparency' is known, so you know how much a specific color is watermark and how much original image.
That is it should be posible to recover a near perfect replica of the original image!!!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: How can i remove this watermark...
The wartermark position is not the same in each image...
About the transparency, we can get the level easily by comparing the color at the pink-wartermarked blackest pixel and the pink-wartermarked whitest pixel.
...
Here is the detailed steps in my solutions:
Here is the original (croped) image:
Adding a upper layer filled with pink (ED8EEB:237,142,235) and compositing by Hue composition:
Adding a upper layer filled with green (127114: 18,133,20) and compositing by Color dogle composition:
Saturation with a upper level black-filled image:
Flatten the layers, multiply the result image by itself:
And it's the final image. Compare it (right) with the original (left):
About the transparency, we can get the level easily by comparing the color at the pink-wartermarked blackest pixel and the pink-wartermarked whitest pixel.
...
Here is the detailed steps in my solutions:
Here is the original (croped) image:
Adding a upper layer filled with pink (ED8EEB:237,142,235) and compositing by Hue composition:
Adding a upper layer filled with green (127114: 18,133,20) and compositing by Color dogle composition:
Saturation with a upper level black-filled image:
Flatten the layers, multiply the result image by itself:
And it's the final image. Compare it (right) with the original (left):
Last edited by vanhoa on 2009-08-11T11:07:19-07:00, edited 1 time in total.
Re: How can i remove this watermark...
I've found 2 other solutions:
First:
Layer 1 is the original image with only the blue chanel (subtracted the red chanel and the green chanel).
Layer 2 is the original image, compositing with the layer1 by "Soft Light".
____________________________
Second:
Layer 1 is the original image, applied the "Sharpen edge" filter.
Layer 2 is filled with ED8EEB, compositing method is "Hue".
Layer 3 is filled with 127114, compositing method is "Color dodge".
Layer 4 is filled with 127114, compositing method is "Overlay".
Layer 5 is filled with ED8EEB, compositing method is "Overlay".
Layer 6 is filled with 000000, compositing method is "Saturation".
First:
Layer 1 is the original image with only the blue chanel (subtracted the red chanel and the green chanel).
Layer 2 is the original image, compositing with the layer1 by "Soft Light".
____________________________
Second:
Layer 1 is the original image, applied the "Sharpen edge" filter.
Layer 2 is filled with ED8EEB, compositing method is "Hue".
Layer 3 is filled with 127114, compositing method is "Color dodge".
Layer 4 is filled with 127114, compositing method is "Overlay".
Layer 5 is filled with ED8EEB, compositing method is "Overlay".
Layer 6 is filled with 000000, compositing method is "Saturation".
Last edited by vanhoa on 2009-08-11T11:06:11-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How can i remove this watermark...
try post processing your result with my approach (and vary the threshold value if needed)
Re: How can i remove this watermark...
Hello fmw42, I really new to imagemagick and it seems that I can not write the code myself... Please help me
Re: How can i remove this watermark...
well this works:
Code: Select all
\( +clone -colorspace HSB -channel B -separate -channel rgb -white-threshold 80% \) +swap -channel rgb -compose overlay -composite -colorspace Gray
Re: How can i remove this watermark...
I've tried to remove the wartermark with php, just recolor the color pixel and here is the result: