Method of producing character templates using unsegmented samples
First Claim
1. A method of operating a machine to train a set of character templates;
- the machine including a processor and a memory device for storing data;
the data stored in the memory device including instruction data the processor executes to operate the machine;
the processor being connected to the memory device for accessing the data stored therein;
the method comprising;
operating the processor to receive and store, in the memory device of the machine, an image definition data structure including a plurality of image pixel positions defining an image;
the image definition data structure, hereafter referred to as an image glyph source, including a plurality of glyphs occurring therein;
each glyph being an image instance of a respective one of a plurality of characters in a character set;
the set of character templates being trained representing respective ones of the plurality of characters in the character set;
operating the processor to receive and store, in the memory device of the machine, a plurality of labeled glyph position data items;
each labeled glyph position data item indicating one of the plurality of image pixel positions in the image glyph source as an image glyph source location of a glyph occurring therein;
each labeled glyph position data item further indicating a glyph label, hereafter referred to as a respectively paired glyph label, paired with the image pixel position identifying the glyph indicated by the image pixel position as a respective one of the plurality of characters in the character set;
operating the processor to determine a sample image region included in the image glyph source for each labeled glyph position data item;
the sample image region including the image pixel position indicating the image glyph source location of a glyph and being identified as a training data sample for the character template indicated by the respectively paired glyph label;
each sample image region including a plurality of image pixel positions in the image glyph source, hereafter referred to as sample pixel positions, each indicating a sample pixel value;
operating the processor to produce, for each respective character template to be trained, a template image region including a plurality of template pixel positions for storing the respective character template; and
operating the processor to produce the set of character templates using the template image regions and the sample image regions;
producing the set of character templates including(a) computing template pixel scores for respective ones of the template pixel positions in the template image regions using the sample pixel values indicated by the sample pixel positions included in the sample image regions;
(b) assigning a foreground pixel value to a template pixel position, referred to as an assigned template pixel position, in one of the template image regions;
the assigned template pixel position being selected on the basis of the template pixel scores;
(c) modifying the sample pixel values of the sample pixel positions used in computing the template pixel score for the assigned template pixel position to indicate modified sample pixel values that, when used in computing a subsequent template pixel score for an unassigned template pixel position, reduce the chance that a foreground pixel value will be assigned to the unassigned template pixel position on the basis of the subsequent template pixel score; and
(d) repeating substeps (a), (b) and (c) until a stopping condition indicates that the set of character templates is complete.
4 Assignments
0 Petitions
Accused Products
Abstract
A method for producing, or training, a set of character templates uses as the source of training samples an image source of character images, called glyphs, that are not previously segmented or isolated for training. Also used is a labeled glyph position data structure that includes, for each glyph in the image source, a glyph image position in the image source associating an image location of the glyph with a character label paired with the glyph image position that indicates the character in the character set being trained. The labeled glyph position data is used to identify a collection of glyph sample image regions in the image source for each character in the character set; each glyph sample image region is large enough to contain a glyph and typically contains adjacent glyphs for other characters. The invention mathematically characterizes the template construction problem using unsegmented samples as an optimization problem that optimizes a function that represents the set of character templates being trained as an ideal image to be reconstructed to match the input image. The method produces all of the character templates contemporaneously by using a novel pixel scoring technique that implements an approximation of a maximum likelihood criterion subject to a constraint on the templates produced which holds that foreground pixels in adjacently positioned character images have substantially nonoverlapping foreground pixels. The character templates produced may be binary templates or arrays of pixel color probability values, and may also have substantially disjoint supports, such that adjacently imaged templates have substantially no overlapping foreground pixels.
204 Citations
24 Claims
-
1. A method of operating a machine to train a set of character templates;
- the machine including a processor and a memory device for storing data;
the data stored in the memory device including instruction data the processor executes to operate the machine;
the processor being connected to the memory device for accessing the data stored therein;
the method comprising;operating the processor to receive and store, in the memory device of the machine, an image definition data structure including a plurality of image pixel positions defining an image;
the image definition data structure, hereafter referred to as an image glyph source, including a plurality of glyphs occurring therein;
each glyph being an image instance of a respective one of a plurality of characters in a character set;
the set of character templates being trained representing respective ones of the plurality of characters in the character set;operating the processor to receive and store, in the memory device of the machine, a plurality of labeled glyph position data items;
each labeled glyph position data item indicating one of the plurality of image pixel positions in the image glyph source as an image glyph source location of a glyph occurring therein;
each labeled glyph position data item further indicating a glyph label, hereafter referred to as a respectively paired glyph label, paired with the image pixel position identifying the glyph indicated by the image pixel position as a respective one of the plurality of characters in the character set;operating the processor to determine a sample image region included in the image glyph source for each labeled glyph position data item;
the sample image region including the image pixel position indicating the image glyph source location of a glyph and being identified as a training data sample for the character template indicated by the respectively paired glyph label;
each sample image region including a plurality of image pixel positions in the image glyph source, hereafter referred to as sample pixel positions, each indicating a sample pixel value;operating the processor to produce, for each respective character template to be trained, a template image region including a plurality of template pixel positions for storing the respective character template; and operating the processor to produce the set of character templates using the template image regions and the sample image regions;
producing the set of character templates including(a) computing template pixel scores for respective ones of the template pixel positions in the template image regions using the sample pixel values indicated by the sample pixel positions included in the sample image regions; (b) assigning a foreground pixel value to a template pixel position, referred to as an assigned template pixel position, in one of the template image regions;
the assigned template pixel position being selected on the basis of the template pixel scores;(c) modifying the sample pixel values of the sample pixel positions used in computing the template pixel score for the assigned template pixel position to indicate modified sample pixel values that, when used in computing a subsequent template pixel score for an unassigned template pixel position, reduce the chance that a foreground pixel value will be assigned to the unassigned template pixel position on the basis of the subsequent template pixel score; and (d) repeating substeps (a), (b) and (c) until a stopping condition indicates that the set of character templates is complete. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
- the machine including a processor and a memory device for storing data;
-
16. A method of operating a machine to train a set of character templates;
- the machine including a processor and a memory device for storing data;
the data stored in the memory device including instruction data the processor executes to operate the machine;
the processor being connected to the memory device for accessing the data stored therein;
the method comprising;operating the processor to receive and store, in the memory device of the machine, an image definition data structure including a plurality of image pixel positions defining an image;
the image definition data structure, hereafter referred to as an image glyph source, including a plurality of glyphs occurring therein;
each glyph being an image instance of a respective one of a plurality of characters in a character set;
the set of character templates being trained representing respective ones of the plurality of characters in the character set;operating the processor to receive and store, in the memory device of the machine, a plurality of labeled glyph position data items;
each labeled glyph position data item indicating one of the plurality of image pixel positions in the image glyph source as an image glyph source location of a glyph occurring therein;
each labeled glyph position data item further indicating a glyph label, hereafter referred to as a respectively paired glyph label, paired with the image pixel position identifying the glyph indicated by the image pixel position as a respective one of the plurality of characters in the character set;operating the processor to produce, for each respective character template to be trained, a template image region including a plurality of template pixel positions for storing the respective character template; operating the processor to determine a sample image region included in the image glyph source for each labeled glyph position data item;
the sample image region including the image pixel position indicating the image glyph source location of a glyph and being identified as a training data sample for the character template indicated by the respectively paired glyph label;
each sample image region including a plurality of image pixel positions in the image glyph source, hereafter referred to as sample pixel positions, each indicating a sample pixel value; andoperating the processor to produce the set of character templates using the template image regions and the sample image regions;
producing the set of character templates including(a) producing an image definition data structure for defining and storing an ideal image;
the ideal image being represented as a function of the set of character templates being trained, and being a reconstruction of the image glyph source formed by positioning respective ones of the character templates in an image plane at image pixel positions identified as image glyph source locations of glyphs occurring in the image glyph source;
each respective one of the character templates positioned in the ideal image being identified by the glyph label paired with the image glyph source location;(b) computing pixel scores for template pixel positions in template image regions using selected ones of the sample pixel positions in selected ones of the sample image regions included in the image source of glyphs; and (c) sequentially assigning a pixel value to selected template pixel positions in selected template image regions;
the selected template pixel positions being selected on the basis of the pixel scores optimizing the function representing the ideal image such that, when all template pixel positions have been assigned pixel values, the pixel value assigned to each selected template pixel position optimizes a matching score measuring a match between the image glyph source and the ideal image. - View Dependent Claims (17, 18, 19, 20, 21)
- the machine including a processor and a memory device for storing data;
-
22. A method of operating a machine to train a set of character templates;
- the machine including a processor and a memory device for storing data;
the data stored in the memory device including instruction data the processor executes to operate the machine;
the processor being connected to the memory device for accessing the data stored therein;
the method comprising;operating the processor to receive and store, in the memory device of the machine, an image definition data structure including a plurality of image pixel positions defining an image;
the image definition data structure, hereafter referred to as an image glyph source, including a plurality of glyphs occurring therein;
each glyph being an image instance of a respective one of a plurality of characters in a character set;
the set of character templates being trained representing respective ones of the plurality of characters in the character set;operating the processor to receive and store, in the memory device of the machine, a plurality of labeled glyph position data items;
each labeled glyph position data item indicating one of the plurality of image pixel positions in the image glyph source as a glyph image origin position of a glyph occurring therein;
the plurality of labeled glyph position data items identifying positions of glyphs occurring in the image glyph source without requiring identification of minimal bounding boxes for the glyphs;
each labeled glyph position data item further indicating a glyph label, hereafter referred to as a respectively paired glyph label, paired with the image pixel position identifying the glyph indicated by the image pixel position as a respective one of the plurality of characters in the character set;operating the processor to produce, for each respective character template to be trained, a template image region including a plurality of template pixel positions for storing the respective character template;
one of the template pixel positions being designated as a template origin position;operating the processor to determine a sample image region included in the image glyph source for each labeled glyph position data item;
the sample image region including the image pixel position indicating the glyph image origin position of a glyph and being identified as a training data sample for the character template indicated by the respectively paired glyph label;
each sample image region including a plurality of image pixel positions in the image glyph source, hereafter referred to as sample pixel positions, each indicating a sample pixel value;
each sample image region having no minimal size restriction such that a sample image region is not required to include sample pixel positions belonging only to a single glyph; andoperating the processor to produce the set of character templates using the template image regions and the sample image regions;
each character template being based on a character template model defining character image positioning, referred to as the sidebearing template model of character image positioning, wherein each character template is defined relative to a template origin position;
each character template produced having a characteristic image positioning property such that, when a second character template is positioned in an image with the template origin position thereof displaced from the template origin position of a preceding first character template by a character set width thereof, a first bounding box entirely containing the first character template is permitted to overlap in the image with a second bounding box entirely containing the second character template as long as the first and second character templates have substantially nonoverlapping foreground pixel positions;the set of character templates being produced by sequentially assigning, in a template assignment order, a foreground pixel value to a selected template pixel position in a selected template image region until the set of character templates is complete;
the template assignment order being determined on the basis of template assignment selection criteria determined using the sample pixel values indicated by the sample pixel positions in the sample image regions;
the template assignment selection criteria determining which sample pixel positions in which sample image regions to use in selecting template pixel positions for foreground pixel value assignment such that a sample pixel position included in a first sample image region identified as a training data sample for a first character template that is identical to a sample pixel position included in a second sample image region identified as a training data sample for a second character template is used in a manner that produces character templates that substantially observe the characteristic imaging property of the sidebearing template model. - View Dependent Claims (23)
- the machine including a processor and a memory device for storing data;
-
24. A machine for training a set of character templates including
an image input device for providing image definition data defining images; -
image input circuitry connected for receiving the image definition data defining images from the image input device; input circuitry for receiving signal data;
the input circuitry being connected to a signal source for providing the signal data;a processor; and a memory device for storing data;
the data stored in the memory device including instruction data indicating instructions the processor executes to operate the machine;the processor being connected to the image input circuitry for receiving the image definition data defining an image;
the processor being further connected to the input circuitry for receiving the signal data;
the processor being further connected to the memory device for storing data therein and for accessing the data stored therein;the processor, in executing the instructions, receiving and storing, in the memory device of the machine, an image definition data structure including a plurality of image pixel positions defining an image;
the image definition data structure, hereafter referred to as an image glyph source, including a plurality of glyphs occurring therein;
each glyph being an image instance of a respective one of a plurality of characters in a character set;
the set of character templates being trained representing respective ones of the plurality of characters in the character set; andreceiving and storing, in the memory device of the machine, a plurality of labeled glyph position data items;
each labeled glyph position data item indicating one of the plurality of image pixel positions in the image glyph source as an image glyph source location of a glyph occurring therein;
each labeled glyph position data item further indicating a glyph label, hereafter referred to as a respectively paired glyph label, paired with the image pixel position identifying the glyph indicated by the image pixel position as a respective one of the plurality of characters in the character set;
the processor, further in executing the instructions,producing, for each respective character template to be trained, a template image region including a plurality of template pixel positions for storing the respective character template; and determining a sample image region included in the image glyph source for each labeled glyph position data item;
the sample image region including the image pixel position indicating the image glyph source location of a glyph and being identified as a training data sample for the character template indicated by the respectively paired glyph label;
each sample image region including a plurality of image pixel positions in the image glyph source, hereafter referred to as sample pixel positions, each indicating a sample pixel value;
the processor, further in executing the instructions, producing the set of character templates using the template image regions and the sample image regions;
wherein producing the set of character templates includes(a) producing an image definition data structure for defining and storing an ideal image;
the ideal image being represented as a function of the set of character templates being trained, and being a reconstruction of the image glyph source formed by positioning respective ones of the character templates in an image plane at image pixel positions identified as image glyph source locations of glyphs occurring in the image glyph source;
each respective one of the character templates positioned in the ideal image being identified by the glyph label paired with the image glyph source location;(b) computing pixel scores for template pixel positions in template image regions using selected ones of the sample pixel positions in selected ones of the sample image regions included in the image source of glyphs; and (c) sequentially assigning a pixel value to selected template pixel positions in selected template image regions;
the selected template pixel positions being selected on the basis of the pixel scores optimizing the function representing the ideal image such that, when all template pixel positions have been assigned pixel values, the pixel value assigned to each selected template pixel position optimizes a matching score measuring a match between the image glyph source and the ideal image.
-
Specification