Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..please i need a help..
There are a gray horizontal lines in the image that i have extracted after watermarking
how can i remove these lines ?!?
Posted
Comments
Nelek 14-Apr-12 13:32pm    
Would you mind to use the "improve question" and add the code you used to extract the image? If you make a screenshot and upload it to imageshack or similar webs so people can really see the issue, it will help us to help you

1 solution

Sorry if it is not helping you. With a busy background, this is extremely difficult to do it the way which would make the change unnoticeable, because a human eye has unprecedented integration ability.

The simple theoretical obstacle for solving this problem is that the part of information from original image (the part with would be "under the line") is lost forever. In general case, you have to make it up somehow.

If the background in the vicinity of this horizontal line is strictly monotonous, the solution of this problem is almost trivial; you should simply replace the pixels in the line (in fact, is some close vicinity) with the background pixels. This is rarely the case; and I don't think you would ask this question if it was the case.

If the background is very smooth, the solution is basically could be something like this: pick up a vertical line at each point of a horizontal line, take all pixel in some wide vicinity of the intersection points (that is, below and above the point) and interpolate the pixels of the intersection points (more exactly, in a short vertical line covering a close vicinity of the intersection points. It would be good to slightly randomize the replaced pixels, their values and the location and size of the replaced area. The problem here is the same: it is extremely hard to foolish a human eye which can see even the most subtle correlations. One other effective way is to slightly degrade the quality of the image by introducing of minor blur, but I'm not sure if you want to sacrifice the overall quality.

And finally, if the line to be removed goes through the busy background, the problem is nearly hopeless. I tried to do such thinks manually, and was not quite successful. At the same time, my relatively experienced eye helps me to see most signs of forgery. Only the real masters can achieve nearly flawless results; and it takes a lot of patience and enormous experience.

Interestingly, this problem is only related to distinct lines, such as scratches. Many other defects, such as dust and even the blemishes on the human skin, are pretty easy to fix.

—SA
 
Share this answer
 
v3
Comments
Nelek 15-Apr-12 6:38am    
Nice explanation. 5
Sergey Alexandrovich Kryukov 15-Apr-12 18:39pm    
Thank you, Nelek.
--SA
VJ Reddy 17-Apr-12 8:01am    
Nice explanation. 5!
Sergey Alexandrovich Kryukov 17-Apr-12 11:16am    
Thank you, VJ.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900