In a color to grayscale image conversion particularly method suitable for processing color document images such as forms, the color image is analyzed to determined which of the red, green and blue channels are the most dominant, second most dominant, and least dominant channels, based on the amount of information contained in each channel. Then, coefficients are assigned to the three channels, where the coefficient for the most dominant channel is smaller than the coefficient for the second most dominant color channel, which is in turn smaller than the coefficient for the least dominant color channel. The grayscale pixel value is then calculated using a linear combination of the red, green and blue pixel values weighted by their assigned coefficients. In one example, the ratio of the coefficients for the least dominant, the second most dominant and the most dominant channels is 10:3:1.
Legal claims defining the scope of protection, as filed with the USPTO.
2. The method of claim 1 , wherein the amount of information contained in each of the red, green and blue color channels is determined by calculating an entropy of the respective color channel.
3. The method of claim 1 , wherein a ratio of the coefficient assigned to the second most dominant color channel to the coefficient assigned to the most dominant color channel is in a range of 2:1 to 4:1.
4. The method of claim 3 , wherein a ratio of the coefficient assigned to the second most dominant color channel to the coefficient assigned to the most dominant color channel is 3:1.
5. The method of claim 1 , wherein a ratio of the coefficient assigned to the least dominant color channel to the coefficient assigned to the second most dominant color channel is in a range of 2:1 to 5:1.
6. The method of claim 5 , wherein a ratio of the coefficient assigned to the least dominant color channel to the coefficient assigned to the second most dominant color channel is 10:3.
7. The method of claim 1 , wherein a ratio of the coefficient assigned to the second most dominant color channel to the coefficient assigned to the most dominant color channel is in a range of 2:1 to 4:1, and a ratio of the coefficient assigned to the least dominant color channel to the coefficient assigned to the second most dominant color channel is in a range of 2:1 to 5:1.
8. The method of claim 1 , further comprising: generating a binary image based on the grayscale image, the binary image separating foreground portions from background portions of the grayscale image; and applying the binary image as a binary foreground mask to the grayscale image to extract foreground portions of the grayscale image while setting background portions of the grayscale image to a uniform background intensity value, to generate a foreground-only grayscale image.
9. The method of claim 8 , further comprising recognizing text in the foreground-only grayscale image.
10. The method of claim 9 , wherein when the blue color channels is the most dominant color channel and, the red color channel is the second most dominant color channel, and the green color channel is the least dominant color channel, the coefficients assigned to the red, green and blue color channels satisfy k R :k G :k B =10:3:1.
12. The method of claim 11 , wherein the blue color channel of the color document contains the most amount of information, the green color channel of the color document contains the second most amount of information, and the red color channel of the color document contains the least amount of information.
13. The method of claim 11 , wherein k R , k G , and k B satisfy k R :k G :k B =10:3:1.
15. The computer program product of claim 14 , wherein the amount of information contained in each of the red, green and blue color channels is determined by calculating an entropy of the respective color channel.
16. The computer program product of claim 14 , wherein a ratio of the coefficient assigned to the second most dominant color channel to the coefficient assigned to the most dominant color channel is in a range of 2:1 to 4:1, and a ratio of the coefficient assigned to the least dominant color channel to the coefficient assigned to the second most dominant color channel is in a range of 2:1 to 5:1.
17. The computer program product of claim 14 , wherein the process further comprises: generating a binary image based on the grayscale image, the binary image separating foreground portions from background portions of the grayscale image; and applying the binary image as a binary foreground mask to the grayscale image to extract foreground portions of the grayscale image while setting background portions of the grayscale image to a uniform background intensity value, to generate a foreground-only grayscale image.
18. The computer program product of claim 17 , wherein the process further comprises recognizing text in the foreground-only grayscale image.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
September 27, 2019
September 1, 2020
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.