Character recognition method and device
First Claim
1. A character recognition method implemented on a processor and a memory, the memory including instructions to configure the processor to perform the method comprising:
- acquiring an image and locating a character region in the image by the processor, wherein the character region comprises a character and a local background;
calculating, by the processor, a first ratio comprising a ratio of number of pixels corresponding to a main color of the local background and a total number of pixels of the local background;
determining, by the processor, that the local background is a complex background in response to the first ratio being less than a first threshold;
calculating, by the processor, a second ratio comprising a ratio of number of pixels corresponding to a main color of a whole background of the image and a total number of pixels of the whole background in response to the first ratio not being less than the first threshold;
determining, by the processor, that the local background is a complex background in response to the second ratio being less than another threshold;
determining, by the processor, a color of the character in response to the local background being a complex background;
constructing, by the processor, a mask for the character by combining the color of the character and a color of the character region;
extracting, by the processor, the character from the character region by using the mask; and
recognizing the character and outputting the recognition result by the processor.
1 Assignment
0 Petitions
Accused Products
Abstract
A character recognition method may include at least the following steps. A location step may include acquiring an image and locating a character region of the image. The character region may include a character and a local background. The method may further include a background judgment step for determining whether the local background is a complex background; a determination step for determining a color of the character if the local background is a complex background; a construction step for constructing a mask for the character by combining the color of the character and a character region; and a first recognition step for extracting the character from the character region by using the mask, recognizing the character, and outputting the recognition result. A character recognition device is further provided.
-
Citations
20 Claims
-
1. A character recognition method implemented on a processor and a memory, the memory including instructions to configure the processor to perform the method comprising:
-
acquiring an image and locating a character region in the image by the processor, wherein the character region comprises a character and a local background; calculating, by the processor, a first ratio comprising a ratio of number of pixels corresponding to a main color of the local background and a total number of pixels of the local background; determining, by the processor, that the local background is a complex background in response to the first ratio being less than a first threshold; calculating, by the processor, a second ratio comprising a ratio of number of pixels corresponding to a main color of a whole background of the image and a total number of pixels of the whole background in response to the first ratio not being less than the first threshold; determining, by the processor, that the local background is a complex background in response to the second ratio being less than another threshold; determining, by the processor, a color of the character in response to the local background being a complex background; constructing, by the processor, a mask for the character by combining the color of the character and a color of the character region; extracting, by the processor, the character from the character region by using the mask; and recognizing the character and outputting the recognition result by the processor. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
-
-
18. A character recognition device, comprising a processor and a memory, the memory including instructions to configure the processor to comprise:
-
a location component configured to acquire an image, and locate a character region of the image, wherein the character region comprises a character and a local background; a background judgment component configured to; calculate a first ratio comprising a ratio of number of pixels corresponding to main color of the local background and a total number of pixels of the local background; determine the local background is a complex background in response to the first ratio being less than a first threshold; calculate a second ratio comprising a ratio of number of pixels corresponding to main color of a whole background of the image and a total number of pixels of the whole background in response to the first ratio not being less than the first threshold; and determine the local background is a complex background in response to the second ratio being less than another threshold; a determination component configured to determine a color of the character in response to the local background being identified as a complex background; a construction component configured to construct a mask for the character by combining the color of the character and a color of the character region; and a first recognition component configured to extract the character from the character region by using the mask, to recognize the character, and further to output the recognition result. - View Dependent Claims (19, 20)
-
Specification