Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6830541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:37:48+00:00 2026-05-26T22:37:48+00:00

I’m working on a project to automatically process scanned invoices. In order get a

  • 0

I’m working on a project to automatically process scanned invoices. In order get a better result the OCR engine, I’d like to first remove noise from images. Beside scratches, I’d also like to remove anything that was added to document after it was printed. Many invoice e.g. were ticked off and sometimes it makes parts of the invoice unreadable for OCR.

For example have a look at this image. The description of the second item won’t be readable and I’d like to remove “noise” like that.

So how can I remove handwritten regions like that and still maintain a high quality of the printed text beneath?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:37:49+00:00Added an answer on May 26, 2026 at 10:37 pm

    Scratches and other spots can fairly easily be filtered by just ignoring any pixels that are not of at least a certain colour intensity.

    You have three options for dealing with the lines:

    1. First important question, are the hand writing written in a different colour? A simple solution would be to give everyone blue or red pens and ban black pens from being used. You can then scan the documents in colour, then you can easily just use the Green buffer as your grey-scale image instead of all three buffer. That would be the easiest way to implement this, almost every scanner now days supports colour scanning.

    2. Otherwise you’re going to have to write an algorithm that can detect
      lines within an image, for this to work, you would need to first
      calibrate the algorithm to first know what is the size of a
      character usually, then find any lines that are longer than X
      pixels, then remove the line from there. This is going to be very problematic and not going to work too well for you, and you will spend a long time trying to get it working and it still will never be 100%.

    3. The other way is that after doing your OCR you should present your
      data to an end user to verify it’s correct, you could then present
      them with the scanned image and allow them to overwrite what was
      scanned if it was incorrect.

    Of the three options I would say your best option is just to prevent people from writing on invoices with a black pen. If you can’t do that, then scan the document best you can and provide it to an end user to clarify the problematic fields (you could even flag them as being a problem so the user doesn’t need to check the whole document all the time).

    Edit: one thing that is worth pointing out, is that if you are receiving documents that have been written on and then faxed, you’re not going to be able to do very much with them other than option 3 (try your best and then present to a user).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I have thousands of HTML files to process using Groovy/Java and I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.