IP Library Granted Patent US 8,520,966
Granted Patent B2
US 8,520,966 · App. 12/414,450 · Granted Aug 27, 2013

Image background enhancement for color images

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,520,966
App. No.
12/414,450
Granted
Aug 27, 2013
Kind
B2
Abstract

A technique is provided for enhancing the background of an original document image. In the case of a black-and-white image, the background color of the original document image is detected, the desired enhanced background color of the original document image is determined from a background pixel value P b that is in the center of the background color range, and the original document image is enhanced to the desired enhanced background color. However, if the background of the original document image is in color, the technique further includes obtaining color image histograms of red, blue and green colors of the original document image, smoothing the histograms, and comparing the histograms to determine if they have the same shape. If the histograms do not have the same shape, and hence the background is in color, the background color of the original document image is detected for each color channel and the background color is enhanced for each channel based on table values so that the hue of the background is not changed.

Claims (463)

1. A computer-implemented method of enhancing the background of an original document image having a colored background, comprising:

detecting the background color of the original document image by:

obtaining color image histograms of red, blue and green colors of the original document image,

smoothing said histograms,

comparing the smoothed histograms to determine if they have the same shape, and

if the histograms have the same shape, detecting the background color of the original document image for each color channel in a first way, while if the histograms do not have the same shape, detecting the background color of the original document image for each color channel in a second way;

determining the desired enhanced background color of the original document image from a background pixel value P b that is in the center of the background color range; and

enhancing the original document image to the desired enhanced background color.

2. The method of claim 1 , wherein smoothing said histograms comprises calculating for an image histogram H, a smoothing range R, and a pixel resolution N, the smoothed histogram H s as:

H

s

(

i

)

=

1

2

R

+

1

j

=

i

-

R

i

+

R

H

(

j

)

,

(

i

=

0

,

1

,

,

N

)

.

3. The method of claim 1 , wherein detecting the background color of the original document image comprises finding all peaks in said color image histograms, determining factors F l and F r as a function of one or more of the peak pixel values in said color image histograms, and providing factor values F l and F r to a function to find the left pixel value P lb of the background color range and the right pixel value P rb of the background color range, whereby pixel values in the color range defined by P lb and P rb are determined to be part of the color image background.

4. The method of claim 3 , wherein determining the desired enhanced background color P eb of the original document image comprises:

if P eb for a red, green, or blue color channel has a value of N, generating a look-up table LT as follows, where i is the image pixel value of a specific color channel that is in the range [0, N], B is a small value that can always be safely set to pure black value 0, and P lb takes the value of P lbRed , P lbGreen or P lbBlue depending on the color channel:

LT

(

i

)

=

{

0

i

B

N

i

P

lb

N

·

(

i

-

B

)

P

lb

-

B

Otherwise

;

if P eb for the red, green or blue color channel does not have a value of N, generating a look-up table LT as follows, where P rb takes the value of P rbRed , P rbGreen or P rbBlue depending on the color channel:

LT

(

i

)

=

{

P

eb

if

P

lb

i

P

rb

i

Otherwise

;

and

enhancing the image background such that for each image pixel with value p in a specific color channel of the original document image the pixel value is changed from p to LT(p) in that channel.

5. The method of claim 4 , wherein if one channel of background color is set to a saturated value N, computing a color changing value C Color for red, green, and blue, respectively, as:

C

Color

=

{

N

-

P

bColor

if

P

ebColor

=

N

0

Otherwise

;

and

if any calculated value of C Color has a non-zero value, then computing a color saturation pixel threshold P s as P s =N−max(C Red , C Green , C Blue ) and generating a look-up table LT2 for the color adjustment as follows, where i is the image pixel value of the color channel that is in the range [0, N]:

LT

2

(

i

)

=

{

N

if

i

P

s

i

·

N

P

s

Otherwise

.

6. A system for enhancing the background of an original document image having a colored background, comprising:

a memory that stores a binary representation of the original document image; and

a processor that detects the background color of the original document image by obtaining color image histograms of red, blue and green colors of the original document image, smoothing said histograms, comparing the smoothed histograms to determine if they have the same shape and, if the histograms have the same shape, detecting the background color of the original document image for each color channel in a first way, while if the histograms do not have the same shape, detecting that the background color of the original document image for each color channel in a second way; determines the desired enhanced background color of the original document image from a background pixel value P b that is in the center of the background color range; and enhances the original document image to the desired enhanced background color.

7. The system of claim 6 , wherein the processor smoothes said histograms by calculating for an image histogram H, a smoothing range R, and a pixel resolution N, the smoothed histogram H s as:

H

s

(

i

)

=

1

2

R

+

1

j

=

i

-

R

i

+

R

H

(

j

)

,

(

i

=

0

,

1

,

,

N

)

.

8. The system of claim 6 , wherein the processor detects the background color of the original document image by finding all peaks in said color image histograms, determining factors F l and F r as a function of one or more of the peak pixel values in said color image histograms, and providing factor values F l and F r to a function to find the left pixel value P lb of the background color range and the right pixel value P rb of the background color range, whereby pixel values in the color range defined by P lb and P rb are determined to be part of the color image background.

9. The system of claim 8 , wherein the processor determines the desired enhanced background color P eb of the original document image by:

if P eb for a red, green, or blue color channel has a value of N, generating a look-up table LT as follows, where i is the image pixel value of a specific color channel that is in the range [0, N], B is a small value that can always be safely set to pure black value 0, and P lb takes the value of P lbRed , P lbGreen or P lbBlue depending on the color channel:

LT

(

i

)

=

{

0

i

B

N

i

P

lb

N

·

(

i

-

B

)

P

lb

-

B

Otherwise

;

if P eb for the red, green or blue color channel does not have a value of N, generating a look-up table LT as follows, where P rb takes the value of P rbRed , P rbGreen or P rbBlue depending on the color channel:

LT

(

i

)

=

{

P

eb

if

P

lb

i

P

rb

i

Otherwise

;

and

enhancing the image background such that for each image pixel with value p in a specific color channel of the original document image the pixel value is changed from p to LT(p) in that channel.

10. The system of claim 9 , wherein if one channel of background color is set to a saturated value N, the processor computes a color changing value C Color for red, green, and blue, respectively, as:

C

Color

=

{

N

-

P

bColor

if

P

ebColor

=

N

0

Otherwise

;

and

if any calculated value of C Color has a non-zero value, then the processor computes a color saturation pixel threshold P s as P s =N−max(C Red , C Green , C Blue ) and generates a look-up table LT2 for the color adjustment as follows, where i is the image pixel value of the color channel that is in the range [0, N]:

LT

2

(

i

)

=

{

N

if

i

P

s

i

·

N

P

s

Otherwise

.

11. A computer readable storage medium containing instructions stored thereon that when processed by a processor cause said processor to implement a method of enhancing the background of an original document image having a colored background, the instructions comprising instructions for:

detecting the background color of the original document image by:

obtaining color image histograms of red, blue and green colors of the original document image,

smoothing said histograms,

comparing the smoothed histograms to determine if they have the same shape, and

if the histograms have the same shape, detecting the background color of the original document image for each color channel in a first way, while if the histograms do not have the same shape, detecting the background color of the original document image for each color channel in a second way;

determining the desired enhanced background color of the original document image from a background pixel value P b that is in the center of the background color range; and

enhancing the original document image to the desired enhanced background color.

12. The medium of claim 11 , wherein the instructions for smoothing said histograms comprises instructions for calculating for an image histogram H, a smoothing range R, and a pixel resolution N, the smoothed histogram H s as:

H

s

(

i

)

=

1

2

R

+

1

j

=

i

-

R

i

+

R

H

(

j

)

,

(

i

=

0

,

1

,

,

N

)

.

13. The medium of claim 11 , wherein the instructions for detecting the background color of the original document image comprises instructions for finding all peaks in said color image histograms, determining factors F l and F r as a function of one or more of the peak pixel values in said color image histograms, and providing factor values F l and F r to a function to find the left pixel value P lb of the background color range and the right pixel value P rb of the background color range, whereby pixel values in the color range defined by P lb and P rb are determined to be part of the color image background.

14. The medium of claim 13 , wherein the instructions for determining the desired enhanced background color P eb of the original document image comprises instructions for:

if P eb for a red, green, or blue color channel has a value of N, generating a look-up table LT as follows, where i is the image pixel value of a specific color channel that is in the range [0, N], B is a small value that can always be safely set to pure black value 0, and P lb takes the value of P lbRed , P lbGreen or P lbBlue depending on the color channel:

LT

(

i

)

=

{

0

i

B

N

i

P

lb

N

·

(

i

-

B

)

P

lb

-

B

Otherwise

;

if P eb for the red, green or blue color channel does not have a value of N, generating a look-up table LT as follows, where P rb takes the value of P rbRed , P rbGreen or P rbBlue depending on the color channel:

LT

(

i

)

=

{

P

eb

if

P

lb

i

P

rb

i

Otherwise

;

and

enhancing the image background such that for each image pixel with value p in a specific color channel of the original document image the pixel value is changed from p to LT(p) in that channel.

15. The medium of claim 14 , wherein if one channel of background color is set to a saturated value N, further comprising instructions for computing a color changing value C Color for red, green, and blue, respectively, as:

C

Color

=

{

N

-

P

bColor

if

P

ebColor

=

N

0

Otherwise

;

and

if any calculated value of C color has a non-zero value, then further comprising instructions for computing a color saturation pixel threshold P s as P s =N−max(C Red , C Green , C Blue ) and generating a look-up table LT2 for the color adjustment as follows, where i is the image pixel value of the color channel that is in the range [0, N]:

LT

2

(

i

)

=

{

N

if

i

P

s

i

·

N

P

s

Otherwise

.

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 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 8, 2013
From: MA, HUANFENG
To: THE NEAT COMPANY, INC. DOING BUSINESS AS NEATRECEIPTS, INC.
Reel/Frame 031361/0691 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 8, 2013
From: MA, HUANFENG
To: THE NEAT COMPANY, INC. DOING BUSINESS AS NEATRECEIPTS, INC.
Reel/Frame 031361/0492 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 23, 2013
From: MA, HUANFENG
To: THE NEAT COMPANY
Reel/Frame 030475/0868 →