Method and apparatus for calculating the background color of an image
Abstract
A method, device and computer readable storage media for enhancing an image for optical character recognition by detecting the edges of the image to create an edge detected image, binarizing the edge detected image to create a binary edge image for processing, dilating the binary edge image to create a dilated binary edge image, taking the XOR difference between the binary edge image and the dilated binary edge image to obtain a text boundary, superimposing the text boundary on the image and determining the pixels of the image that are covered by the text boundary, calculating the average grayscale value of the pixels of the image that are covered by the text boundary, and setting background pixels of the image to the calculated average grayscale value of the pixels of the image that are covered by the text boundary. The method optionally includes the steps of performing edge filling and hole filling on the binary edge image to create an updated binary edge image and filling holes in the dilated binary edge image to create an updated dilated binary edge image, whereby the XOR difference is taken between the updated binary edge image and the updated dilated binary edge image. The im
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 17 · Forward citations: 11.
Claims (2 — 1 Independent, 1 Dependent)
- Claim 1Independent Claim
A method of enhancing an image for optical character recognition, comprising: detecting the edges of the image to create an edge detected image; binarizing the edge detected image to create a binary edge image for processing; dilating the binary edge image to create a dilated binary edge image; taking the XOR difference between the binary edge image and the dilated binary edge image to obtain a text boundary; superimposing the text boundary on the image and determining the pixels of the image that are covered by the text boundary; calculating the average grayscale value of the pixels of the im
- Claim 2Depends on #1
A method as in claim 1 , further comprising performing edge fill
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (11 of 11 total)
References Cited — Backward Prior Art (17)
Non-Patent Literature (1)
- Pratt, W., 'Digital Image Processing', Third Edition, pp. 253-262., 2001.