CN1941838A - File and picture binary coding method - Google Patents

File and picture binary coding method Download PDF

Info

Publication number
CN1941838A
CN1941838A CN 200510107630 CN200510107630A CN1941838A CN 1941838 A CN1941838 A CN 1941838A CN 200510107630 CN200510107630 CN 200510107630 CN 200510107630 A CN200510107630 A CN 200510107630A CN 1941838 A CN1941838 A CN 1941838A
Authority
CN
China
Prior art keywords
pixel
threshold
image
undetermined
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200510107630
Other languages
Chinese (zh)
Other versions
CN100479484C (en
Inventor
郝瑛
欧文武
王刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Science of the company
Ricoh Software Research Center Beijing Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to CNB200510107630XA priority Critical patent/CN100479484C/en
Publication of CN1941838A publication Critical patent/CN1941838A/en
Application granted granted Critical
Publication of CN100479484C publication Critical patent/CN100479484C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)

Abstract

The method comprises: a) in the global thresholding process, the global threshold used for making binarization for the image is defined; according to the global threshold the pixels in file image are classified into three groups, black, white and undetermined pixels; b) defining an adaptive binarilized threshold for each undetermined pixel; according said adaptive binarilized threshold, the undetermined pixels are binarilized.

Description

File and picture binary coding method
Technical field
The present invention relates to image processing field, the digital picture that provides a kind of handle to obtain from scanner, facsimile machine or digital camera specifically is converted into the technology of bianry image.Application of the present invention is file and picture processing, document management and document recognition.
Background technology
In the contemporary society, document is primary information carrier.Therefore the present invention is directed to image, particularly the binaryzation of the file and picture that is made of text, form, lines and picture is improved.Because on the Essence of Information of file and picture is two value informations, under the ideal conditions, it can be represented with single prospect and background that such as representing background with white, black table is shown with the information of using, i.e. prospect.Yet in the practical application, because the variation and the various abundant artistic effects of print procedure, uneven reflective, the content of document own, prospect and the background in the image all changes usually.The purpose of document image binaryzation is separated useful information from garbage exactly, and the result is expressed as a width of cloth bianry image.
Image binaryzation is a necessary step in a lot of the application, and such as United States Patent (USP) 5,452,107 have proposed a kind of density according to the original image regional area, comprise the mean value of object pixel and surrounding pixel, determine the method for binary-state threshold.The defective of this method is that the part can only provide finite information.
Summary of the invention
The object of the present invention is to provide a kind of file and picture binary coding method that can solve the above-mentioned problems in the prior art.
To achieve these goals, the invention provides a kind of image processing method that file and picture is carried out binary conversion treatment, comprise following steps: a) in the global threshold processing, be identified for the global threshold that image carries out binaryzation, be divided three classes according to the pixel of described global threshold described file and picture: black, pixel white and undetermined; B) determine an adaptive binary-state threshold for each pixel undetermined, according to described self-adaption binaryzation threshold value, with pixel binaryzation undetermined.
File and picture binary coding method of the present invention combines the overall situation and local message, has effectively utilized the local message and the historical information of image simultaneously, therefore, can provide higher-quality binaryzation file and picture.
Description of drawings
By the description of carrying out below in conjunction with accompanying drawing, above-mentioned and other purposes of the present invention and characteristics will become apparent, wherein:
Fig. 1 has summarized the flow chart of image binaryzation method proposed by the invention.
Fig. 2 shows the detail flowchart of the pretreatment module of the inventive method among Fig. 1.
Fig. 3 shows the detail flowchart of the global threshold module of the inventive method among Fig. 1.
Fig. 4 shows a histogrammic example of file and picture after the global thresholdization, and has correspondingly marked three global threshold T1, T2 and the T3 that obtains with the global threshold method.
Fig. 5 shows the detail flowchart of the local threshold module of the inventive method among Fig. 1.
Fig. 6 shows the detail flowchart of the post-processing module of the inventive method among Fig. 1.
Fig. 7 represents to use the inventive method is carried out the process of binaryzation to image example.
Embodiment
Below, describe embodiments of the invention in detail with reference to accompanying drawing.
If the pixel value or the color-values of background in the image and useful information (or being called prospect) are consistent in full figure, adopt single threshold value just can obtain high-quality binary image so.This method is called global thresholdization.
But the most of file and pictures that use contain abundant chart and artistic effect at present, and single threshold value tends to introduce noise or can't keep Useful Information.Pixel to different pixels or zones of different adopts different threshold values to carry out the method for binaryzation, is commonly referred to local thresholdization.
Fig. 1 has summarized the flow chart of image binaryzation method proposed by the invention.Image binaryzation method of the present invention carries out in conjunction with the overall situation and local message.
With reference to figure 1, in file and picture binary coding method of the present invention, it is input as a papery or electronic document 10, through being converted into the electronics binary image after pretreatment module 11, global threshold module 12, local threshold module 13 and the post-processing module 14.
Input document 10 is if paper document needs to adopt optical scanning device such as scanner, facsimile machine or digital camera to be converted into the digital picture that computer can be handled.The form of digital picture can be BMP, JPEG, TIF etc.
11 pairs of images of pretreatment module carry out a series of processing described hereinafter, and its result is that follow-up thresholding module is used.
After this global threshold module 12 is determined two threshold values, and image pixel is divided into white, black and pixel undetermined.Pixel undetermined refers to can't determine according to histogram information in the global threshold stage set of pixels of its classification, and these pixels may be artistic effect, chart, photo, form or even Word message.Because global thresholdization can be handled most of image pixels, therefore can significantly improve the speed of binaryzation.Therefore the another one benefit is can keep the inverse information in the document because the global threshold stage is not distinguished prospect and background, and promptly the color of textual character and background color are than dark situation.
In the present invention, local threshold module 13 is determined a binary-state threshold according to image local feature and historical threshold information for each pixel undetermined.The local feature here comprises image local mean value of areas and variance.Historical threshold information then comes from the neighborhood pixels of binaryzation.Among the present invention, the use of historical threshold information is extremely important, and it can significantly improve the quality of output binaryzation file and picture.
At last, the image after post-processing module 14 pairs of processes global threshold module 12 and local thresholdization 13 binaryzations is handled, so that remove the noise on this image.In general, such noise has three classes: the disconnection and the isolated noise point of the adhesion of text stroke, text stroke.Post-processing approach of the present invention can be removed the most of noises in the image under the situation of not introducing new noise.
Through above-mentioned processing, the effective information of input document 10 is represented as a binaryzation file and picture 15.This image can be used to a lot of fields, as the printed page analysis of the color detection of further graphical analysis, text word, file and picture compression, document and optical character identification etc.
Describe in detail below by each module among Fig. 2-6 couple Fig. 1.
Fig. 2 has represented the flow process of pretreatment module 11 in detail.The function of pretreatment module 11 is that image is carried out smoothly providing data necessary for follow-up global threshold module 12 simultaneously to remove noise.If input is a paper document, at first it is carried out digitlization and produce digital picture by module 101.If coloured image, be translated into gray level image or each passage is handled respectively by module 102.According to the content and the quality of image, can adopt the histogram equalization module that gray scale is handled.Low pass filter 104 subsequently can be selected the linear filter as Gaussian filter, perhaps as the nonlinear filter of mean filter.
After this image is divided into image block, if the difference of pixel maximum and minimum value is less than pre-set threshold in the image block, think that then this image block is uniform, to determining that global threshold can't provide significant information, therefore this uniform image piece conductively-closed is fallen not consider in image masking-out estimation module 105.Only account for the very situation of fraction of image for effective information, this masking-out also can be brought into play good effect.At last, according to the histogram distribution of image masking-out computed image, this will be as the input of global threshold module 12.For the consideration of speed, also can carry out image down-sampled, and with the threshold application that obtains in original image.
Fig. 3 has represented the flow chart of global threshold algorithm in detail.This module is analyzed the histogram that obtains from pretreatment module 11, at first module 111 is chosen an optimal threshold T1 between pixel grey scale maximum and minimum value, and module 112 and 113 is respectively at selected threshold T2 and T3 between minimum value and the T1 and between T1 and the maximum subsequently.Of the present invention one may embodiment in, (this is an algorithm very commonly used, source N.Otsu based on the Otsu algorithm of linear decision rule, " A thresholdselection method from grey-level histograms; " IEEE Trans.Syst., Man, Cybern., vol.SMC-1, pp.62-66 Jan.1979.) is used to determine T1, T2 and T3, promptly, calculate T1, T2 and T3 according to the Otsu algorithm on histogram, these three threshold values satisfy T2≤T1≤T3.In module 114, if the grey scale pixel value in the image less than T2, is then differentiated for black picture element, be expressed as 1, if greater than T3, then differentiated for white pixel, be expressed as 0.Remaining pixel is then differentiated for undetermined.What deserves to be mentioned is, because, occurred containing in a large number and enriched background along with the raising of printing technology, and the document that efficient character information is represented by single light tone.Therefore in order to keep inverse information, module 114 is not distinguished prospect and background.
Fig. 4 has provided an example of global thresholdization, and wherein, abscissa is a grey scale pixel value, the ordinate number of times that to be each grey scale pixel value occur at full figure, i.e. histogram, T1, T2 and T3 are three global thresholds determining according to said method, and wherein T2 and T3 are used to global thresholdization.
Only whether comprise useful information, therefore need analyze by more information by the pixel (being pixel undetermined) that can't determine to fall into T2 and T3 interval to histogrammic analysis.
Fig. 5 has provided the flow chart of local auto-adaptive thresholding module, and whether the pixel (being pixel undetermined) that is used to determine to fall into T2 and T3 interval comprises useful information.This module is the pixel in the check image one by one, if current pixel is black or white, then checks next pixel; If the value of current pixel between black and white between, promptly belong to the pixel of class undetermined, then determine a threshold value, and, this pixel undetermined carried out binaryzation according to this threshold value for this pixel.
If current pixel is first pixel undetermined of being expert at, then module 121 adopts the local feature of current pixel to refer to local mean value and local variance, the method that adopts is that the Sauvola algorithm is (referring to source: J.Sauvola, M.Pietk  inen, " Adaptive document image binarization ", PatternRecognition, Vol.33, pp.225-236,2000.).
If current pixel is not first pixel undetermined of being expert at, then on the basis of local feature, increase historical threshold information, that is, and the threshold value that a last pixel undetermined is determined.122 pairs of local messages of module and historical threshold information adopt specific mode to come to determine threshold value for current pixel, and concrete coefficient can be determined according to the characteristics of application and document.For example, concerning OCR uses, the word recovery rate can be come coefficient is optimized as standard.After the selected threshold value, if grey scale pixel value less than threshold value, then this pixel undetermined is turned to blackly by two-value, otherwise that two-value turns to is white.
In a possible embodiment of the present invention, local message and historical threshold information are combined in together by following formula:
T=m*(1-k 1*(k 2*VAR+k 3*T history)/R)
Wherein, T is the threshold value of pixel undetermined, and m is to be the average of a neighborhood at center with pixel undetermined, and VAR is the contrast of described neighborhood, T HistoryBe historical threshold information, k 1, k 2, k 3With R all are linear coefficients.
File and picture all is made of character, line, form, photo and chart etc. usually, and these different compositions respectively have characteristics usually.But from binary image, most important information is the structure and the inner character of character, line, form.As mentioned above, the noise in the binary image can be divided three classes: the adhesion between the stroke, the fracture of stroke and isolated noise point/piece.The purpose of reprocessing is that the ratio with adhesion demarcates, and the stroke that connects fracture is also removed isolated noise point, and does not introduce new noise in processing procedure.
Fig. 6 has provided the flow chart of post-processing module in detail, and its basic ideas are with the mode of iteration image to be analyzed, and whether continue to depend on the result of each iteration.At first, the input of reprocessing is the binary image through the overall situation and local thresholding, in each iteration, check the number of pixels identical in each neighborhood of pixels with its color, if number is less than certain threshold value T4,, otherwise keep its color then with the center pixel inverse.The threshold value and the size of neighborhood depended in the success or not of this method.A relatively large neighborhood is chosen in reprocessing among the present invention, and adjacent region threshold carries out the appropriateness increase according to the result of previous iteration simultaneously.If in certain iteration, color is less than certain threshold value T5 by the number of pixels of inverse, the noise of key diagram picture within the specific limits, so iteration stopping.This mode has effectively reduced the noise of introducing.
Through the described processing of Fig. 2-6, an input document is converted into a bianry image.
Fig. 7 has provided the object lesson of a binaryzation.Wherein, A is an original image, and B is the result after the global thresholdization, and C is the result after the local thresholdization.
The invention is not restricted to above-mentioned specific embodiment.To those skilled in the art, in the protection range that does not exceed the appended claims qualification, obviously can carry out various combinations, change and modification.
For example, the module 103,104 and 105 of Fig. 2 can be removed or change to a kind of possible being modified at pretreatment module of the present invention.If the pixel distribution of prospect and background is talked about more uniformly, need not to carry out low-pass filtering.
A kind of possible being modified at the global threshold module of the present invention can change the global threshold method in the module 111,112 and 113 of Fig. 3, for example based on the method for comentropy or square, and is used for determining T1 that the method for T2 and T3 also need not be identical.
A kind of possible being modified at the local threshold module of the present invention can change the threshold value determination method of first pixel undetermined of the relevant current line of Fig. 5.And the historical threshold information among Fig. 5 can be chosen from being positioned at the threshold value of the previous pixel undetermined of same row with current pixel.In addition, the linear coefficient that is used to make up local feature and historical threshold information can be adjusted according to concrete application.

Claims (9)

1. one kind is carried out the image processing method of binary conversion treatment to file and picture, comprises following steps:
A) in the global threshold processing, be identified for image is carried out the global threshold of binaryzation, be divided three classes according to the pixel of described global threshold described file and picture: black, pixel white and undetermined;
B) determine an adaptive binary-state threshold for each pixel undetermined, according to described self-adaption binaryzation threshold value, with pixel binaryzation undetermined.
2. according to the image processing method of claim 1, step a) further comprises the steps:
By histogram analysis, between pixel minimum and maximum, determine first global threshold (T1);
By histogram analysis, between pixel minimum and first global threshold (T1), determine second global threshold (T2);
By histogram analysis, between second global threshold (T2) and pixel maximum, determine the 3rd global threshold (T3);
According to second global threshold (T2) and the 3rd global threshold (T3), image pixel is divided into 3 classes: pixel value is less than the black pixel that is of second global threshold (T2), pixel value is a white pixel greater than the 3rd global threshold (T3), and pixel value is a pixel undetermined between second global threshold (T2) and the 3rd global threshold (T3).
3. according to the image processing method of claim 1, it is characterized in that step b) further comprises the steps:
The employing local feature is that first pixel undetermined of every row or every row is determined described adaptive threshold;
Adopt specific mode in conjunction with local feature and historical threshold information, for each follow-up pixel undetermined is determined described adaptive threshold;
Behind the selected described adaptive threshold, if grey scale pixel value undetermined less than described adaptive threshold, then this pixel undetermined is turned to blackly by two-value, otherwise that two-value turns to is white.
4. according to the image processing method of claim 3, it is characterized in that:
Described local feature comprises image local mean value of areas and variance;
Described historical threshold information is the threshold value of current line or the previous pixel undetermined that lists.
5. according to the image processing method of claim 1, wherein, before carrying out binary conversion treatment, also comprise step:
Image is carried out preliminary treatment think that the global threshold processing provides data.
6. according to the image processing method of claim 5, wherein said pre-treatment step further comprises the steps:
File and picture is carried out low-pass filtering to remove high-frequency noise;
Determine the image masking-out according to the pixel value amplitude of variation in the image block;
If desired, can carry out down-sampled to image according to the image masking-out;
Calculate original image or down-sampled image histogram according to the image masking-out.
7. according to the image processing method of claim 6, it is characterized in that using Gaussian filter or mean filter that file and picture is carried out low-pass filtering.
8. according to the image processing method of claim 1, it is characterized in that further comprising following steps:
D) on the image of binaryzation, remove the reprocessing of noise.
9. image processing method according to Claim 8 is characterized in that step d) can further comprise following steps:
Calculate the number of pixels identical in the current pixel neighborhood with the current pixel color;
If the number of pixels that obtains is less than the 4th threshold value (T4), then with the current pixel inverse;
If reached maximum times by the pixel of inverse less than the 5th threshold value (T5) or iteration in the current iteration, iteration stopping then, otherwise recomputate the 4th threshold value (T4) and the 5th threshold value (T5), and continue iteration.
CNB200510107630XA 2005-09-29 2005-09-29 File and picture binary coding method Expired - Fee Related CN100479484C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB200510107630XA CN100479484C (en) 2005-09-29 2005-09-29 File and picture binary coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200510107630XA CN100479484C (en) 2005-09-29 2005-09-29 File and picture binary coding method

Publications (2)

Publication Number Publication Date
CN1941838A true CN1941838A (en) 2007-04-04
CN100479484C CN100479484C (en) 2009-04-15

Family

ID=37959585

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200510107630XA Expired - Fee Related CN100479484C (en) 2005-09-29 2005-09-29 File and picture binary coding method

Country Status (1)

Country Link
CN (1) CN100479484C (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289668A (en) * 2011-09-07 2011-12-21 谭洪舟 Binaryzation processing method of self-adaption word image based on pixel neighborhood feature
CN102496021A (en) * 2011-11-23 2012-06-13 南开大学 Wavelet transform-based thresholding method of image
CN106203251A (en) * 2015-05-29 2016-12-07 柯尼卡美能达美国研究所有限公司 File and picture binary coding method
CN106446896A (en) * 2015-08-04 2017-02-22 阿里巴巴集团控股有限公司 Character segmentation method and device and electronic equipment
CN106778761A (en) * 2016-12-23 2017-05-31 潘敏 A kind of processing method of vehicle transaction invoice
CN107609558A (en) * 2017-09-13 2018-01-19 北京元心科技有限公司 Character image processing method and processing device
CN107610132A (en) * 2017-08-28 2018-01-19 西北民族大学 A kind of ancient books file and picture greasiness removal method
CN109635823A (en) * 2018-12-07 2019-04-16 湖南中联重科智能技术有限公司 The method and apparatus and engineering machinery of elevator disorder cable for identification

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289668A (en) * 2011-09-07 2011-12-21 谭洪舟 Binaryzation processing method of self-adaption word image based on pixel neighborhood feature
CN102496021A (en) * 2011-11-23 2012-06-13 南开大学 Wavelet transform-based thresholding method of image
CN106203251A (en) * 2015-05-29 2016-12-07 柯尼卡美能达美国研究所有限公司 File and picture binary coding method
CN106203251B (en) * 2015-05-29 2019-04-23 柯尼卡美能达美国研究所有限公司 File and picture binary coding method
CN106446896A (en) * 2015-08-04 2017-02-22 阿里巴巴集团控股有限公司 Character segmentation method and device and electronic equipment
US10552705B2 (en) 2015-08-04 2020-02-04 Alibaba Group Holding Limited Character segmentation method, apparatus and electronic device
CN106446896B (en) * 2015-08-04 2020-02-18 阿里巴巴集团控股有限公司 Character segmentation method and device and electronic equipment
CN106778761A (en) * 2016-12-23 2017-05-31 潘敏 A kind of processing method of vehicle transaction invoice
CN107610132A (en) * 2017-08-28 2018-01-19 西北民族大学 A kind of ancient books file and picture greasiness removal method
CN107609558A (en) * 2017-09-13 2018-01-19 北京元心科技有限公司 Character image processing method and processing device
CN109635823A (en) * 2018-12-07 2019-04-16 湖南中联重科智能技术有限公司 The method and apparatus and engineering machinery of elevator disorder cable for identification

Also Published As

Publication number Publication date
CN100479484C (en) 2009-04-15

Similar Documents

Publication Publication Date Title
CN100479484C (en) File and picture binary coding method
US6137907A (en) Method and apparatus for pixel-level override of halftone detection within classification blocks to reduce rectangular artifacts
CN101042735A (en) Image binarization method and device
KR20080021832A (en) Binarization of an image
CN101102398A (en) Fully automatic real-time digital image processing enhancement system
CN1292576C (en) Signal processing equipment and method, recording medium and program
JP2010081604A (en) Method and system for locating text in digital image
CN1694119A (en) Method for picture binaryzation
Amin et al. A binarization algorithm for historical arabic manuscript images using a neutrosophic approach
Zhao et al. An effective binarization method for disturbed camera-captured document images
CN101329733A (en) Image binaryzation method
Boiangiu et al. The image binarization problem revisited: perspectives and approaches
CN1296865C (en) Single color words reinforcing method
Boiangiu et al. Methods of bitonal image conversion for modern and classic documents
Wagdy et al. Border noise removal and clean up based on retinex theory
Dixit et al. Preprocessing framework for document image analysis
Boiangiu et al. Bitonal image creation for automatic content conversion
KR100537827B1 (en) Method for the Separation of text and Image in Scanned Documents using the Distribution of Edges
CN1581926A (en) Half-tone processing method for automatic detecting image-text
CN111583150B (en) Two-dimensional code image processing method and system
Das et al. Adaptive method for multi colored text binarization
Chandra et al. Improved adaptive binarization technique for document image analysis.
Kasar et al. Specialized Text Binarization Technique for Camera based Document images
Yoshida et al. A new binarization method for a sign board image with the blanket method
Chiddarwar et al. Contrast Based Enhancement of Palm-leaf Manuscript Images

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20090724

Address after: Tokyo, Japan

Co-patentee after: RICOH SOFTWARE RESEARCH CENTER (BEIJING) CO., LTD.

Patentee after: Science of the company

Address before: Tokyo, Japan, Japan

Patentee before: Ricoh Co., Ltd.

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090415

Termination date: 20190929

CF01 Termination of patent right due to non-payment of annual fee