Can Retrobatch remove grey backgrounds from scanned PDFs?

I have a large number of PDFs that I’ve scanned over the years, both text and sheet music. They have a light grey background that makes them difficult to read and wastes ink when printing.

Is there a way to remove this background and get to just black and white?

Thank you for any suggestions.

Hello, and welcome!

There are a couple of ways to do this, but assuming the top left corner of your images are always going to be the gray color, the attached workflow should do the trick:

BackgroundToWhite.retrobatch (10.3 KB)

This uses the “Instant Alpha” node to remove the background, and then adds a white background via the “Matte” node.

Try that out and let me know how it works for you.

If it turns out that some of your sheet music doesn’t have a gray background in the top left, you can instead use the “Replace Color” node to target a specific grey.

Thank you very much! With some fiddling and adjusting the tolerance I was able to get a clean page. Is there a way to go through each page of a PDF and perform the same operation? Is that something the Pro version can do?

Thanks again

The Pro version of Retrobatch has a “Layer & Page Splitter” node, which will split out PDF pages for you. You would put that right before the Instant Alpha node.

-gus

@ccgus Do you have any plans to add AI background removal (or other AI-augmented tools) to Retrobatch? I was trying this workflow and “Instant Alpha” okay, but doesn’t remove backgrounds as cleanly as, say, https://clipdrop.co/

It’d be great to have more context-aware functionality.

Eventually, yes. I don’t have anything to announce yet, but it’s something I’m very very interested in doing. Hopefully without blowing up the size of Retrobatch to hundreds of megabytes.