Background removal apps and web-based services don't do well with noisy images like this one of sheet music on thin parchment paper which has text from the next page bleeding through:
However, ImageMagick works, well... magic: $ convert in.png -fill white -fuzz 80% +opaque "#000000" out.png
If the results aren't satisfactory, try tweaking the fuzz value (e.g., 20%). For multiple images, use a for loop: $ for i in *.png; do convert "$i" -fill white -fuzz 20% +opaque "#000000" "$i-out.png"; done
Converted a multi-page PDF to individual PNG images for processing via this Automator workflow (before discovering that the first convert command above works equally well on multipage PDFs):
For despeckling PDFs, see 4lex4's ScanTailor Advanced (which "merges the features of the ScanTailor Featured and ScanTailor Enhanced versions, brings new ones and fixes") or this newer fork. macOS instructions and cross-platform guide | 4lex4's 2017 announcement on DIY Book Scanner
/nix | Feb 02, 2018