Automatically detect the halftoning method of picture and text
Technical field
The method that the present invention relates to a kind of automatic detection picture and text and handle respectively in addition particularly relates to and file xeroxed or when faxing, improves the fine and closely woven degree that is converted to black and white document draft or color file original text.
Background technology
The photomechanical printing of handling at present the color file file of gray-level characteristic (or have) is duplicated or when faxing, be generally the fine and closely woven degree of duplicating original text of asking, reduce the distortion level that duplicates original text, but because word segment is different with the characteristic of picture part, and must be with literal contained in the file and figure separate processes.
For example, file with gray-level characteristic is when fax, often be converted to black and white manuscript pattern, when conversion, because the data in the file comprises literal and picture two large divisions usually, if do not carry out halftone process (Halftone in the conversion, halftone process comprises at pixel is shake Dithering or diffusion Diffusion), then picture part can't original image sophistication reach that gradually layer segment is distortionless presents, if but whole part of file all used halftone process, then the part of literal can present broken shape, therefore all takes the practice with picture and literal separate processes traditionally.
But on the separation method of known picture and literal, usually in order to take the high degree of verisimilitude and the quality of duplicating or faxing into account, and ignore the slow excessively problem of speed of separating when handling with picture character, according to existing picture and text detection method, mainly be to realize by hardware circuit, after it carries out image processing (as smearing and obfuscation) earlier with original picture, implement picture and literal identification detached job again; Using hardware unit to reach on the practice of image processing, expend cost, and because the program of processing, increased the processing time that whole picture and text detect virtually, and existing halftoning method, its sampling reference point is more, sample area is also bigger, need expend long change-over time.
Summary of the invention
In above-mentioned background of invention, deficiency because of present known technology so the objective of the invention is to, proposes a kind of mode of cutting literal and picture block, can be according to the distribution character of image tonescale and separate text and picture fast, the zone of so need being done halftone process dwindles.
Another object of the present invention is to cooperate less halftone process sampling point, to reduce the processing time.
According to above-described purpose, the invention provides a kind of halftoning method of automatic detection picture and text, its step comprise the background color of choosing an original image, with this original image with this background color be benchmark carry out picture and text separate, with the picture that separates partly with halftone process, the word segment that separates handled with the two-value method and this picture part and the merging of this word segment that will finish dealing with are exported.
In the above-mentioned Optical devices of the present invention, this halftone process is a shake, and the sampling point pattern (label 50) that the sampling formula of this shake shows for Fig. 5 multiply by 1/68th.
In the above-mentioned Optical devices of the present invention, the step of one preferred embodiment has: one first background color of choosing an original image, is that benchmark carries out the picture and text separation with this original image with this first background color, contract in this original image carried out with this first background color, interior this original image that contracts is carried out crosscut with this first background color, this original image of crosscut is carried out rip cutting with this first background color, to form a plurality of independent image blocks, this independent image block is chosen one second background color again, with this second background color, carry out the identification of figure and literal, if this independent image block is a figure, then write down this picture part, if this independent image block is a literal, then write down this literal partly, in the time can't being identified as literal or figure, contracing in this second background color this independent blocks being carried out replaces first background color with second background color, and the part that then contracts in aforementioned begins to repeat for it, this picture that separates is partly used halftone process, this word segment that separates is handled with the two-value method, and this picture part that will finish dealing with merges output with this word segment.
Description of drawings
Fig. 1 shows the overall schematic of the inventive method;
Fig. 2 shows automatic detection picture and text method of the present invention and thin portion step;
Fig. 3 is that of Fig. 1 of the present invention implements schematic diagram
Fig. 4 is the enforcement schematic diagram of Fig. 2 of the present invention; And
Fig. 5 is the shake sampling point pattern and the computing formula thereof of image halftoning of the present invention.
The conventional letter of the major part in the accompanying drawing is explained as follows:
Label 11: original copy background color
Label 12: picture and text separate
Label 13: halftone process
Label 14: the two-value method is handled
Label 15: picture and text merge
Step 21: choose background color
Step 22: in contract
Step 23: crosscut
Step 24: rip cutting
Step 25: form individual block
Step 26: choose background color
Step 27: differentiate literal or figure
Step 28: shorthand block
Step 29: recording geometry block
Label 50: shake sampling point pattern
Embodiment
Embodiments of the invention will be described in detail as follows.Yet except describing in detail, the present invention can also be widely implements at other embodiment, and scope of the present invention do not limited, and it is as the criterion with appended claim.
Moreover for clearer description being provided and being more readily understood the present invention, each several part is not drawn according to its relative size in the accompanying drawing, and some size is compared with other scale dependents and exaggerated; Incoherent detail section is not drawn fully yet, succinct in the hope of accompanying drawing.
Schematic diagram of the present invention as shown in Figure 1, at first, detect literal and the picture block that is comprised in the original image 11 earlier, implement picture and text then and separate 12 operations (the picture and text separating step will illustrate) in Fig. 2, then, isolated picture is halftone process 13 (Halftone Processing, the embodiment of the invention is done explanation with the shake Dithering Processing in the halftoning), picture GTG performance in the hope of the best, and being done the two-value method, isolated literal block handles 15 (Line Art Processing), the picture and the word segment of finishing dealing with are finished picture and text merging 14, reach the demand of duplicating or faxing, and the GTG of display text and picture clearly.
Yet, the processing method of halftoning has the different practices, such as shake (Dithering), order shake (Ordered Dithering) and error diffusion (Error Diffusion) or the like, halftoning method among the present invention is to be dithered as embodiment, in the shake of picture, as shown in Figure 3, to have after the mixed manuscript of picture and text detects picture and word segment, respectively the picture of different blocks is broken up processing as image, so, (generally can present the gray scale of 0 (the most black)) when in the picture block, having GTG to 255 (the whitest), the GTG degree that can effectively represent picture, certainly, also can 1024 GTG degree represent picture, the setting of these GTG degree is to depend on the requirement of designer to picture; Follow, the processing of two-value method done in literal, so the literal block only has two kinds of values of 0 (the most black) or 255 (the whitest), therefore can present word segment the most clearly; At last, picture and literal merge in the back of finishing dealing with, and makes the manuscript of finishing have the picture of literal and the high goodness of fit clearly.
And the sampling point in the aforesaid flating, the practice proposed by the invention as shown in Figure 5, be with neighborhood pixels by Fig. 5 explicit sampling point pattern (label 50) multiply by 60 eighth formula for it.
The practice of automatic detection picture and text that the present invention proposes and separation as schematically shown in Figure 2, in the block of desire detection picture and text, obtain background color and set (step 21), be as the criterion with this background color, contract in the not care about one's appearance with this block (step 22), and the block that contracts in is attempted crosscut (step 23) with this background color, afterwards, implement rip cutting (step 24), at this moment, block originally can present several individual block (step 25), so background color (step 26) of getting at individual block, whether differentiate with this background color is literal or figure (step 27), if can not differentiate, then may this individual block still comprise more among a small circle picture and literal, so be benchmark or in this individual block, choose another background color again according to the background color of being got, get back to step 22, implement once to detect automatically the picture and text program once again, if and can differentiate when being picture, promptly write down this figure block (step 29),, promptly write down this literal field piece (step 28) if when the block discriminating processing is the literal block.
Certainly, in step 23,, then also enter and implement rip cutting in the step 24 if when this block can't carry out crosscut; If relative in step 24, in the time that rip cutting can't being carried out, then still enter step 26; Special the time,, in the time of in step 27, can't differentiating literal or figure again, then be recorded as figure block (this step is not shown) in Fig. 2 if in step 23, can't implement crosscut and in step 24, can't implement rip cutting.
About the described automatic detection picture and text method of Fig. 2, also can be with reference to the signal of figure 4, preferably understand and get one, among this figure, a manuscript block contracts with in the background color of choosing earlier, to remove the zone that does not comprise any literal or picture, so can reduce the time that follow-up halftoning or two-value method are handled, because will increase the disposed of in its entirety time to the image processing of background color; Finish the phase I in contract after, the block that contracts in this is implemented crosscut and rip cutting, so will go into many indivedual independent blocks, each independent blocks can utilize whether software or hardware device are the judgement of literal or picture, if can not differentiate is literal or picture, then can at individually independently block repeat to contract in aforementioned, crosscut, rip cutting and interpretation program.
According to the halftoning method of automatic detection picture and text of the present invention, overcome the slow excessively problem of separation method medium velocity of known picture and literal, and reduced cost.In addition, the halftoning method of automatic detection picture and text of the present invention sampling reference point is less, and sample area is also little, thereby change-over time is shorter.
The above is the preferred embodiments of the present invention only, is not to be used for limiting claim of the present invention; All other change for the equivalence of being finished under the disclosed spirit of disengaging or modify, and all should comprise in the appended claims.