System and method for low light document capture and binarization with multiple flash images
09807269 · 2017-10-31
Assignee
Inventors
- Jayant Kumar (Webster, NY, US)
- Raja Bala (Pittsford, NY)
- Martin S. Maltz (Rochester, NY)
- Phillip J Emmett (Rochester, NY, US)
Cpc classification
H04N1/00997
ELECTRICITY
International classification
H04N1/024
ELECTRICITY
H04N1/387
ELECTRICITY
H04N1/00
ELECTRICITY
Abstract
The embodiments include systems and methods for guiding a user to capture two flash images of a document page, and selectively fuse the images to produce a binary image of high quality and without loss of any content. Each individual image may have an FSR where the content is degraded/lost due to the flash light. The idea is to first guide the user to take two images such that there is no overlap of flash-spots in the document regions. The flash spots in both images are detected and assessed for quality and extent of degradation in both images. The image with lower degradation is chosen as the primary image and the other image as secondary, to minimize fusing artifacts. The region in secondary image corresponding to the FSR in the primary is aligned to the primary region using a multiscale alignment technique. The primary image and aligned FSR are binarized and fused in the vicinity of the flashspot in the primary using an intelligent technique that minimizes fusion boundary artifacts such as cutting of characters and words.
Claims
1. A method for low light image capture of a document image using a plurality of flash images from a single supplemental light source, the method comprising: first capturing a first image of a document with the supplemental light source wherein the first image has a first flash spot in a first flash spot region; second capturing a second image of the document with the supplemental light source wherein the second image has a second flash spot spaced from a position in the document of the first flash spot by a movement of the supplemental light source from a first position to a second position; and fusing the first and second images for an alignment of the first and second images to form a fused image, wherein the first flash spot region is replaced in the fused image with a corresponding portion of the second image wherein a boundary of the corresponding portion of the second image is selectively expanded to avoid splitting of characters and words by the fusing.
2. The method of claim 1 wherein the first and second capturing includes guiding the capturing to suggest a sufficient spacing of the first flash spot from the second flash spot.
3. The method of claim 2 wherein the guiding includes translating, rotating or augmented reality spacing of the first and second capturings, respectively.
4. The method of claim 3 wherein the guiding further includes previewing a preview display disposed to suggest the sufficient spacing.
5. The method of claim 1 further including detecting a first flash spot region and a second flash spot regions corresponding to the first and second flash spots, respectively, and assessing image degradation in the first flash spot region and a second flash spot region.
6. The method of claim 5 wherein the assessing includes determining the first image as a one of the first and second images having a lower image degradation; and the second image as having a higher image degradation.
7. The method of claim 6 wherein the fusing includes aligning a portion of the second image, corresponding to the flash spot region of the first image, with the first image.
8. The method of claim 7 wherein the aligning includes using a multi-scale alignment.
9. The method of claim 8 further including binarizing and fusing the first image and the aligned portion of the second image in an image area of the flash spot region of the first image.
10. A low light image capture system for capturing a document image using a plurality of flash images, the system comprising: a capture device including a single supplemental light source for first capturing a first image of a document wherein the first image has a first flash spot in a first flash spot region, and for second capturing a second image of the document with the supplemental light source upon a movement of the supplemental light source from a first position to a second position wherein the second image has a second flash spot spaced from a position in the document of the first flash spot; and a processor for fusing the first and second images for an alignment of the first and second images to form a fused image, wherein the first flash spot region is replaced in the fused image with a corresponding portion of the second image and wherein a boundary of the second image is selectively expanded to avoid splitting of characters and words by the fusing.
11. The system of claim 10 wherein the capture device includes a guide to suggest a sufficient spacing of the first flash spot from the second flash spot.
12. The system of claim 11 wherein the guide includes a user assist for translating, rotating or augmented reality spacing of the first and second capturings, respectively.
13. The system of claim 12 wherein the guide comprises a preview display disposed to suggest the sufficient spacing.
14. The system of claim 10 wherein the processor detects a first flash spot region and a second flash spot region corresponding to the first and second flash spots, respectively, and assesses image degradation in the first flash spot region and a second flash spot region.
15. The system of claim 14 wherein the processor assessing includes determining the first image as a one of the first and second images having a lower image degradation, and the second image as having a higher image degradation.
16. The system of claim 15 wherein the processor fusing includes aligning a portion of the second image, corresponding to the flash spot region of the first image, with the first image.
17. The system of claim 16 wherein the processor aligning includes using a multi-scale alignment.
18. The system of claim 17 wherein the processor aligning further includes binarizing for fusing the first image and the aligned portion of the second image in an image area of the flash spot region of the first image.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
DETAILED DESCRIPTION
(8) The subject embodiments include methods and systems for selectively fusing two flashed images of the same document page. Each individual image may have a flash spot where the content is degraded/lost due to the flash light. The embodiments comprise guiding a user to take two images such that there is no overlap of flash-spots in any document region. The flash spots are then accurately detected in both images and the quality and extent of degradation in both images is assessed. The image with lower degradation is chosen as a primary or first image and the other image as a second or secondary image, to minimize fusing artifacts. The region in the secondary image corresponding to the FSR in the primary is aligned to the primary region using a multiscale alignment technique. The primary image and aligned FSR are binarized and fused in the vicinity of the flash-spot in the primary using an intelligent technique that minimizes fusion boundary artifacts such as cutting of characters and words. The result is a binary image that does not have flash artifacts, since the FSR content from the other image is selectively incorporated. Since both images are captured under similar flash conditions, the quality and characteristics of content are very similar (even after binarization). This produces an image with smooth transition between original content and fused portion, undetectable to the human eye.
(9) More particularly, with reference to
(10) Another alternative method for guidance capture is one that prompts the user to rotate or orient the smartphone at different angles from one capture to the next so that the FSRs are at different locations. With reference to
(11) Yet another guided capture method comprises an augmented reality (AR) based approach (not shown) which involves the following steps: (1) capture the first image to do an estimation of the FSR; and (2) compute an alternative geometry that avoids the same FSR. The alternative geometry is suggested to the user via an AR guidance in a number of ways, for example (a) overlay a semi-transparent version of the first image on the screen distorted for the desired geometry; or (b) real time border detection where document borders are overlayed in one color (e.g., red) and switched to another color (e.g., green) when the desired geometry is achieved.
(12) In yet another guided capture approach a slow scan can be employed from the top to the bottom of the document wherein the app on the capture device will prompt the user twice to stop for respective captures.
(13) After the multiple images have been captured, a border detection and geometric correction method is implemented so that the captured images are analogous and the FSRs can be compared in contrast.
(14) The respective FSRs in the captured images are then localized, and checked for content and quality 34 (
(15) Additional logic is employed within the FSR to insure that two criteria are met, that (1) there is significant loss in content in each of the two FSRs, and (2) there is sufficient content in one image that can be transferred to the other. This takes care of cases where the FSR happens to be in a blank part of the image, where the capture is such that the flash does not noticeably degrade document content. In such cases, multi-flash fusion is not performed and the image with lower degradation is found, binarized and presented 36 to the user. When degradation occurs, a gradient-based image content measure is computed for each window within the FSR of both I.sub.f1 and I.sub.f2. Horizontal and vertical gradients G.sub.x and G.sub.y are computed and accumulated into an N×2 matrix M, where N is the number of pixels in the window. Next the Singular Value Decomposition (SVD) of M is computed. If s.sub.1 and s.sub.2 are singular values (s1≧s2) of M, a measure of image content is computed using the Eqn. 1:
(16)
The q scores are summed within the FSR to produce a final measure q.sub.fsr. In order to perform the fusion, it is required that q.sub.fsr within I.sub.f1 and I.sub.f2 is less than a threshold. The threshold is determined empirically.
(17) Once it is determined that there is no overlap in the FSR of two images, the first and second images are established as a primary (master) and a secondary image 38. The image with smaller FSR (area wise) is considered primary since we want to minimize the artifacts introduced during the fusion process. The FSR in the secondary image (i.e. with a larger FSR) need not be fused since the primary image contains that content already. If the larger region is to be aligned and fused then there is a higher chance of boundary artifacts.
(18) For effective fusion of the information in two images, it is critical that the images are aligned to a fraction of line width.
(19) A multi-resolution alignment technique is used to do this accurately only within the primary FSR (
(20) In
(21) The aligned flash spot region of I.sub.s 62 and I.sub.p 60 is binarized 42 in the next step. In principle any binarization technique can be used. See Sauvola, J., and Matti P. “Adaptive document image binarization.” Pattern Recognition 33.2 (2000): 225-236. In this approach the binarization threshold T is determined in a local adaptive fashion for each pixel, given by following equation:
(22)
where k is a user defined parameter, m and s are respectively the pixel mean and the standard deviation within a window of size w×w centered on the current pixel and R is the dynamic range of standard deviation. Parameters k and w are tuned heuristically for optimal subjective image quality, and separately for flash and no-flash images.
(23)
(24) In the final step, the contents in FSR.sub.s 60 are fused 46 with the FSR.sub.p 64. In order to further improve the quality of fused image, a novel FSR refinement step 44 is implemented before the fusion. The boundary of FSR.sub.s is first refined to avoid any splitting of characters and words in the image. Abrupt changes in the structural characteristics of words may be perceived as degradation of text, and may lead to a poor reading experience by user. A morphological operation (opening) is performed to connect characters to form words, and obtain connected-components (CCs) in the FSR.sub.s. The CCs are then found which are only partially included in the FSR.sub.s and extended to the FSR.sub.s to include all such components entirely. In order to extend the FSR the secondary FSR obtained is expanded to a larger region before alignment and binarization.
(25) It will be appreciated that variants of the above-disclosed and other features and functions, or alternatives thereof, may be combined into many other different systems or applications. Various presently unforeseen or unanticipated alternatives, modifications, variations or improvements therein may be subsequently made by those skilled in the art which are also intended to be encompassed by the following claims.