IP Library Granted Patent US 8,593,478
Granted Patent B2
US 8,593,478 · App. 12/907,936 · Granted Nov 26, 2013

Extraction of a color palette model from an image of a document

Inventors: Eamonn O'Brien-Strain (San Francisco, CA); Clayton Brian Atkins (Mountain View, CA); Niranjan Damera-Venkata (Mountain View, CA); Jerry J Liu (Sunnyvale, CA)
Assignee: Hewlett-Packard Development Company, L.P.
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,593,478
App. No.
12/907,936
Filed
Oct 19, 2010
Granted
Nov 26, 2013
Kind
B2
Art Unit
2612
USPC
345/589
Abstract

A system and method are provided for determining a color palette model from an image of a document. Pixel values of the image of the document are clustered to provide image clusters. Color layers of the image are determined, each color layer corresponding to an image cluster. Aspects of the color palette model can be determined using the color layers. Aspects of the color palette model include a foreground-background color pair for a content block in the document and a background-area color of the document.

Claims (53)

1. A method performed by a physical computing system comprising at least one processor for determining a color palette model from an image of a document, said method comprising:

clustering pixel values of the image of the document to provide image clusters;

determining color layers of the image, wherein each color layer corresponds to an image cluster;

for a content block detected in a first color layer of the image of the document, determining a second color layer of the image of the document for which a coincident content block is detected in the inverse color layer of that second color layer; and

determining the color of the first color layer and the color of the second color layer as a foreground-background color pair for the content block in a color palette model of the image of the document,

wherein the clustering, determining color layers, determining a second color layer, and determining the foreground-background color pair are performed using the computing system.

2. The method of claim 1 , wherein each color layer has the color of a mean, a mode, or a median of the pixel values in the image cluster.

3. The method of claim 1 , wherein the content block is a text block, and wherein the method further comprises applying text detection to a color layer of the image of the document to detect the text block in the first color layer, and applying the text detection to the inverse color layer corresponding to other color layers of the document to determine the second color layer having the coincident text block in the inverse color layer of that second color layer.

4. The method of claim 1 , wherein the content block is a graphics object, and wherein the method further comprises applying line detection to a color layer of the image of the document to detect the graphics object in the first color layer, and applying line detection to the inverse color layer corresponding to other color layers of the document to determine the second color layer having the coincident graphics object in the inverse color layer of that second color layer.

5. The method of claim 4 , wherein the line detection is a Hough transform, and wherein detecting the graphics block comprises detecting peaks in the Hough transform of the first color layer, and detecting the coincident graphics object comprises detecting coinciding peaks in the Hough transform of the inverse color layer of another of the color layers of the document.

6. The method of claim 1 , further comprising, prior to the clustering, rescaling the image of the document to a smaller size without interpolating pixel values.

7. A method performed by a computing system comprising at least one processor for determining a color palette model from an image of a document, said method comprising:

clustering pixel values of an image of a document to provide image clusters;

determining color layers of the image, wherein each color layer corresponds to an image cluster;

applying an erode filter to a given color layer of the image of the document a predetermined number of times to provide a corresponding eroded color layer; and

determining the color of the given color layer as a background-area color in a color palette model of the image of the document if the number of pixels of the corresponding eroded color layer is above a predetermined threshold value,

wherein the clustering, determining color layers, applying the erode filter, and determining the background-area color are performed using the computing system.

8. The method of claim 7 , wherein each color layer has the color of a mean, a mode, or a median of the pixel values in the image cluster.

9. The method of claim 7 , further comprising, prior to the clustering, rescaling the image of the document to a smaller size without interpolating pixel values.

10. Apparatus for processing image data, comprising:

a memory storing computer-readable instructions; and

a processor coupled to the memory, to execute the instructions, and based at least in part on the execution of the instructions, to perform operations comprising:

clustering pixel values of the image of a document to provide image clusters;

determining color layers of the image, wherein each color layer corresponds to an image cluster;

for a content block detected in a first color layer of the image of the document, determining a second color layer of the image of the document for which a coincident content block is detected in the inverse color layer of that second color layer; and

determining the color of the first color layer and the color of the second color layer as a foreground-background color pair for the content block in a color palette model of the image of the document.

11. The apparatus of claim 10 , wherein the content block is a text block, and wherein the method further comprises applying text detection to a color layer of the image of the document to detect the text block in the first color layer, and applying the text detection to the inverse color layer corresponding to other color layers of the image of the document to determine the second color layer having the coincident text block in the inverse color layer of that second color layer.

12. The apparatus of claim 10 , wherein the content block is a graphics object, and wherein the method further comprises applying line detection to a color layer of the image of the document to detect the graphics object in the first color layer, and applying line detection to the inverse color layer corresponding to other color layers of the image of the document to determine the second color layer having the coincident graphics object in the inverse color layer of that second color layer.

13. The apparatus of claim 12 , wherein the line detection is a Hough transform, and wherein detecting the graphics block comprises detecting peaks in the Hough transform of the first color layer, and detecting the coincident graphics object comprises detecting coinciding peaks in the Hough transform of the inverse color layer of another of the color layers of the image of the document.

14. Apparatus for processing image data, comprising:

a memory storing computer-readable instructions; and

a processor coupled to the memory, to execute the instructions, and based at least in part on the execution of the instructions, to perform operations comprising:

clustering pixel values of an image of a document to provide image clusters;

determining color layers of the image, wherein each color layer corresponds to an image cluster;

applying an erode filter to a given color layer of to image of the document a predetermined number of times to provide a corresponding eroded color layer; and

determining the color of the given color layer as a background-area color in a color palette model of the image of the document if the number of pixels of the corresponding eroded color layer is above a predetermined threshold value.

15. At least one computer-readable medium storing computer-readable program code adapted to be executed by a computer to implement a method comprising:

a memory storing computer-readable instructions; and

a processor coupled to the memory, to execute the instructions, and based at least in part on the execution of the instructions, to perform operations comprising:

clustering pixel values of the image of a document to provide image clusters;

determining color layers of the image, wherein each color layer corresponds to an image cluster;

for a content block detected in a first color layer of the image of the document, determining a second color layer of the image of the document for which a coincident content block is detected in the inverse color layer of that second color layer; and

determining the color of the first color layer and the color of the second color layer as a foreground-background color pair for the content block in a color palette model of the image of the document.

16. The computer-readable medium of claim 15 , wherein the content block is a text block, and wherein the method further comprises applying text detection to a color layer of the image of the document to detect the text block in the first color layer, and applying the text detection to the inverse color layer corresponding to other color layers of the image of the document to determine the second color layer having the coincident text block in the inverse color layer of that second color layer.

17. The computer-readable medium of claim 15 , wherein the content block is a graphics object, and wherein the method further comprises applying line detection to a color layer of the image of the document to detect the graphics object in the first color layer, and applying line detection to the inverse color layer corresponding to other color layers of the image of the document to determine the second color layer having the coincident graphics object in the inverse color layer of that second color layer.

18. The computer-readable medium of claim 17 , wherein the line detection is a Hough transform, and wherein detecting the graphics block comprises detecting peaks in the Hough transform of the first color layer, and detecting the coincident graphics object comprises detecting coinciding peaks in the Hough transform of the inverse color layer of another of the color layers of the image of the document.

19. At least one computer-readable medium storing computer-readable program code adapted to be executed by a computer to implement a method comprising:

a memory storing computer-readable instructions; and

a processor coupled to the memory, to execute the instructions, and based at least in part on the execution of the instructions, to perform operations comprising:

clustering pixel values of an image of a document to provide image clusters;

determining color layers of the image, wherein each color layer corresponds to an image cluster;

applying an erode filter to a given color layer of the image of the document a predetermined number of times to provide a corresponding eroded color layer; and

determining the color of the given color layer as a background-area color in a color palette model of the image of the document if the number of pixels of the corresponding eroded color layer is above a predetermined threshold value.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 8, 2011
From: O'BRIEN-STRAIN, EAMONN; ATKINS, CLAYTON BRIAN; DAMERA-VENKATA, NIRANJAN; LIU, JERRY J.
To: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
Reel/Frame 025923/0680 →
Continuity (1)
Related Publication 20120092359A1 · Apr 19, 2012