IP Library Granted Patent US 8,041,139
Granted Patent B2
US 8,041,139 · App. 12/205,767 · Granted Oct 18, 2011

Method and apparatus for calculating the background color of an image

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,041,139
App. No.
12/205,767
Granted
Oct 18, 2011
Kind
B2
Abstract

A method, device and computer readable storage media for enhancing an image for optical character recognition by detecting the edges of the image to create an edge detected image, binarizing the edge detected image to create a binary edge image for processing, dilating the binary edge image to create a dilated binary edge image, taking the XOR difference between the binary edge image and the dilated binary edge image to obtain a text boundary, superimposing the text boundary on the image and determining the pixels of the image that are covered by the text boundary, calculating the average grayscale value of the pixels of the image that are covered by the text boundary, and setting background pixels of the image to the calculated average grayscale value of the pixels of the image that are covered by the text boundary. The method optionally includes the steps of performing edge filling and hole filling on the binary edge image to create an updated binary edge image and filling holes in the dilated binary edge image to create an updated dilated binary edge image, whereby the XOR difference is taken between the updated binary edge image and the updated dilated binary edge image. The image may be binarized for optimal results after the background images have been set to the calculated average grayscale value of the pixels that are covered by the text boundary.

Claims (32)

1. A method of enhancing an image for optical character recognition, comprising:

detecting the edges of the image to create an edge detected image;

binarizing the edge detected image to create a binary edge image for processing;

dilating the binary edge image to create a dilated binary edge image;

taking the XOR difference between the binary edge image and the dilated binary edge image to obtain a text boundary;

superimposing the text boundary on the image and determining the pixels of the image that are covered by the text boundary;

calculating the average grayscale value of the pixels of the image that are covered by the text boundary; and

setting background pixels of the image to the calculated average grayscale value of the pixels of the image that are covered by the text boundary.

2. A method as in claim 1 , further comprising performing edge filling and hole filling on the binary edge image to create an updated binary edge image and filling holes in the dilated binary edge image to create an updated dilated binary edge image, whereby the XOR difference is taken between the updated binary edge image and the updated dilated binary edge image.

3. A method as in claim 1 , further comprising binarizing the image after the background images have been set to the calculated average grayscale value of the pixels of the image that are covered by the text boundary.

4. A computer readable memory device having instructions thereon that when processed by a processor cause the implementation of a method of enhancing an image for optical character recognition, the method comprising:

detecting the edges of the image to create an edge detected image;

binarizing the edge detected image to create a binary edge image for processing;

dilating the binary edge image to create a dilated binary edge image;

taking the XOR difference between the binary edge image and the dilated binary edge image to obtain a text boundary;

superimposing the text boundary on the image and determining the pixels of the image that are covered by the text boundary;

calculating the average grayscale value of the pixels of the image that are covered by the text boundary; and

setting background pixels of the image to the calculated average grayscale value of the pixels of the image that are covered by the text boundary.

5. The memory device as in claim 4 , further comprising instructions for performing edge filling and hole filling on the binary edge image to create an updated binary edge image and filling holes in the dilated binary edge image to create an updated dilated binary edge image, and for taking the XOR difference between the updated binary edge image and the updated dilated binary edge image.

6. A memory device as in claim 4 , further comprising instructions for binarizing the image after the background images have been set to the calculated average grayscale value of the pixels of the image that are covered by the text boundary.

7. A device for enhancing an image for optical character recognition, comprising:

a scanner that scans the image to obtain a grayscale image; and

a processor that processes the grayscale image by:

detecting the edges of the image to create an edge detected image;

binarizing the edge detected image to create a binary edge image for processing;

dilating the binary edge image to create a dilated binary edge image;

taking the XOR difference between the binary edge image and the dilated binary edge image to obtain a text boundary;

superimposing the text boundary on the image and determining the pixels of the image that are covered by the text boundary;

calculating the average grayscale value of the pixels of the image that are covered by the text boundary; and

setting background pixels of the image to the calculated average grayscale value of the pixels of the image that are covered by the text boundary.

8. A device as in claim 7 , wherein the processor further performs edge filling and hole filling on the binary edge image to create an updated binary edge image and fills holes in the dilated binary edge image to create an updated dilated binary edge image, whereby the XOR difference is taken between the updated binary edge image and the updated dilated binary edge image.

9. A device as in claim 7 , wherein the processor further binarizes the image after the background images have been set to the calculated average grayscale value of the pixels of the image that are covered by the text boundary.

Assignments (8)
RELEASE OF SECURITY INTEREST Recorded Jan 9, 2023
From: PACIFIC WESTERN BANK
To: THE NEAT COMPANY, INC.
Reel/Frame 062317/0169 →
SECURITY INTEREST Recorded Mar 25, 2016
From: THE NEAT COMPANY, INC.
To: PACIFIC WESTERN BANK
Reel/Frame 038102/0247 →
RELEASE OF SECURITY INTEREST Recorded Mar 14, 2016
From: SILICON VALLEY BANK
To: THE NEAT COMPANY, INC.
Reel/Frame 037972/0560 →
SECURITY INTEREST Recorded Aug 15, 2014
From: THE NEAT COMPANY, INC.
To: HERCULES TECHNOLOGY GROWTH CAPITAL, INC.
Reel/Frame 033548/0607 →
FIRST AMENDMENT TO INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded Dec 9, 2013
From: THE NEAT COMPANY, INC.
To: SILICON VALLEY BANK
Reel/Frame 031784/0736 →
SECURITY AGREEMENT Recorded Mar 12, 2009
From: THE NEAT COMPANY, INC.
To: SILICON VALLEY BANK
Reel/Frame 022389/0753 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 20, 2009
From: MA, HUANFENG
To: THE NEAT COMPANY, INC. DOING BUSINESS AS NEATRECEIPTS, INC.
Reel/Frame 022287/0285 →
MERGER Recorded Feb 9, 2009
From: DIGITAL BUSINESS PROCESSES, INC.
To: THE NEAT COMPANY, INC. DOING BUSINESS AS NEATRECEIPTS, INC.
Reel/Frame 022222/0788 →