Photoshop: How to remove these lines!?

Soldato
Joined
10 Apr 2004
Posts
13,497
I have a number of PDFs which have these annoying missing lines:

help1.jpg


Doing them manually is a pain.

How would I go about making something to go along and deal every x line of pixels!?

When you delete the row of pixels, everything lines up fine. So I don't know why they are there in the first place!

Thanks!
 
I imagine you could record a PS action to remove the lines at set intervals. But if you are going to reuse that action across multiple docs then the issue would be where the first removal is. If it isn't variable then it should be fine.
 
Probably easiest way would be to use a minimum smoothing filter to make the black profile more "chunky" which will fill in the gaps, then reduce one step back with a maximise type filter, some areas of small detail may need to be masked out first so they aren't turned into solid black or become connected where they weren't before.
 
Last edited:
Buy a new scanner?

I know of no way to get rid of those automatically, there is to my knowledge no way of setting an action to do that specific task.

I would suggest though, using the selection tool on each section and then moving the selection up one pixel with the move tool for each group.

iviyd.jpg

That took about 2 minutes
 
Last edited:
I know of no way to get rid of those automatically, there is to my knowledge no way of setting an action to do that specific task.

You do know the PS actions are recordable? Basically anything you do in PS is recorded and so you set it up once and play it on each document to remove all the lines. But, it's not smart, so if the lines are variable widths apart and variable distances from the top then it won't know. I just used your method in an action.
 
This took less than 20 seconds:

Intermediate stage (I've highlighted in red the area I masked out to preserve finer detail)

stage1.jpg


Then maximised again to:

final.jpg
 
You do know the PS actions are recordable? Basically anything you do in PS is recorded and so you set it up once and play it on each document to remove all the lines. But, it's not smart, so if the lines are variable widths apart and variable distances from the top then it won't know. I just used your method in an action.

I knew about actions, but as you say they aren't very smart, luckily those lines are a set width apart so I guess it would work - we would need a full size image to make a proper one though as I'm assuming that is a cropped image.

Rroff - nice technique - you learn something new every day!
 
Last edited:
I imagine you could record a PS action to remove the lines at set intervals. But if you are going to reuse that action across multiple docs then the issue would be where the first removal is. If it isn't variable then it should be fine.

Thanks, after some googling I actually did this. Works pretty well apart from on some pages there are more lines lol.

These PDFs were scanned in 10+ years ago, and not by me. I wouldn't fancy the task of scanning in 20,000 pages anyway :p


This took less than 20 seconds:

Intermediate stage (I've highlighted in red the area I masked out to preserve finer detail)

stage1.jpg


Then maximised again to:

final.jpg

Thanks,


Might do that from now on!

Cheers guys.
 
Back
Top Bottom