CN100555323C - The method and apparatus that is used for smoothed binary image - Google Patents

The method and apparatus that is used for smoothed binary image Download PDF

Info

Publication number
CN100555323C
CN100555323C CNB2005100651817A CN200510065181A CN100555323C CN 100555323 C CN100555323 C CN 100555323C CN B2005100651817 A CNB2005100651817 A CN B2005100651817A CN 200510065181 A CN200510065181 A CN 200510065181A CN 100555323 C CN100555323 C CN 100555323C
Authority
CN
China
Prior art keywords
pixel
breach
byte
condition
template
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.)
Expired - Fee Related
Application number
CNB2005100651817A
Other languages
Chinese (zh)
Other versions
CN1848178A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to CNB2005100651817A priority Critical patent/CN100555323C/en
Publication of CN1848178A publication Critical patent/CN1848178A/en
Application granted granted Critical
Publication of CN100555323C publication Critical patent/CN100555323C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The application relates to bianry image is carried out level and smooth method, equipment and storage medium.This method comprises the steps: to detect the pixel that constitutes possible breach; Breach that each is possible and pixel on every side thereof and a plurality of template compare, to determine that this possible breach is true breach or independent noise; The value of the pixel by changing true breach and independent noise is eliminated described true breach and independent noise.In a preferred embodiment, realize described a plurality of template, make and to improve smooth effect and processing speed greatly with the template of logical algorithm rather than single fixed size.

Description

The method and apparatus that is used for smoothed binary image
Technical field
The application relates generally to Flame Image Process, relates in particular to the method, equipment and the storage medium that are used for smoothed binary image.
Background technology
The technology that has many smoothed binary images.These technology can be divided into three types usually: template matches, linear interpolation and vectorization (vectorization).
For template matches, studies show that the template that it needs a large amount of fixed sizes.This means the template that needs a large amount of fixed size of storage, and to all templates in each pixel search array.This expensive time of search meeting.
For linear interpolation, generally speaking, it need be added up along detected all values of being about to.This means that according to detecting distance, it need carry out some additions, and need carry out some multiplication and division.Certainly, also to consider the detection side to problem.Even this method can satisfy the requirement of efficient aspect, this method has but been ignored the influence from adjacent element.Because these reasons, this method are not a kind of good methods.
As for the vectorization method, the direction of vector will be calculated and store to this method.Therefore, it must be more more complicated than linear interpolation.Therefore this method is also outside limit of consideration.
Therefore, wishing has a kind of new smoothing technique, and it can improve smooth effect, improves processing speed.
Summary of the invention
One object of the present invention just provides a kind of like this technology.
In the present invention, gordian technique is the use of logic template.The present invention is converted to a series of logical descriptions with the template of fixed size.This method is the mixing of template matches and linear interpolation.The present invention has considered the influence (just as template matching method) from adjacent element, and has detection distance flexibly (this is the advantage of linear interpolation method).
In one aspect of the invention, the method that is used for smoothed binary image comprises the steps: to detect the pixel that constitutes possible breach; Breach that each is possible and pixel on every side thereof and a plurality of template compare, to determine that this possible breach is true breach or independent noise; The value of the pixel by changing true breach and independent noise is eliminated described true breach and independent noise.
In a preferred embodiment, described comparison step realizes that with a kind of logical algorithm it comprises: described a plurality of templates are represented with a set of simplifying most of the condition of different priorities; According to the described priority of described condition, relatively each condition and described possible breach respective pixel on every side if there is the condition that is not satisfied, are then skipped current possible breach; If the condition of described simplification set is met, then should be judged to be real breach by breach.
In another aspect of this invention, provide a kind of equipment that is used for smoothed binary image, having comprised: the pick-up unit that is used to detect the pixel that formation may breach; Be used for each may breach and pixel on every side compare with a plurality of template, with judge described may breach the device of breach or independent noise whether really; And the value of the pixel by changing real breach and independent noise is eliminated the cancellation element of real breach and independent noise.
In a preferred embodiment, described recognition device comprises: memory storage, be used to store representative described a plurality of templates, and have the simplification set of the condition of different priorities; And comparison means, be used for described priority according to described condition, relatively each condition and described possible breach respective pixel on every side if there is the condition that is not satisfied, are then skipped current possible breach; If the condition of described simplification set is met, then should be judged to be real breach by breach.
The present invention also provides also provides a kind of storage medium, it is characterized in that, has stored the program code that is used to realize said method therein.
Description of drawings
Other purpose of the present invention, feature and advantage will become more clear after the detailed description of preferred embodiments reading hereinafter.The accompanying drawing part of book as an illustration is used for the diagram embodiments of the invention, and is used from explanation principle of the present invention with instructions one.In the accompanying drawings:
Fig. 1 is a template pixel array, illustrates the number order of all pixels in 7 * 7 zone, and the most typical L shaped pixel groups that is used for judging whether to handle a pixel;
Fig. 2 is a template pixel array, illustrates the number order of all pixels in 7 * 7 zone, and the most typical T shape pixel groups that is used for judging whether to handle a pixel;
Fig. 3 to 25 is the templates that are used in the first embodiment of the present invention;
The flowchart illustrations of Figure 26 to 31 detailed process of detection step of first embodiment of the invention;
The flowchart illustrations of Figure 32 to 40 comparison step of first embodiment of the invention and the detailed process of removal process;
Figure 41 is the synoptic diagram of diagram storage space conversion process;
Figure 42 is the block diagram that can be used for realizing an example of computer system of the present invention;
Figure 43 is a template pixel array, and it illustrates the numbering of pixel in 8 * 8 arrays;
Figure 44 to 51 illustrates in the second embodiment of the present invention, is used to fill 8 templates of breach;
Figure 52 to 54 illustrates in the second embodiment of the present invention, is used to eliminate 3 templates of projection;
Figure 55 illustrates the logical algorithm corresponding to Figure 44 to 51;
Figure 56 illustrates the logical algorithm corresponding to Figure 52 to 54.
Embodiment
Computer system for example
Method and apparatus of the present invention can be realized in any messaging device.Described messaging device for example is the single-chip microcomputer (SCM) of personal computer (PC), notebook computer, embedding scanner, duplicating machine, facsimile recorder etc., or the like.For those of ordinary skills, be easy to realize method and apparatus of the present invention by software, hardware and/or firmware.Especially it should be noted that, it is evident that for those of ordinary skills, for any step of carrying out this method or the combination of step, the perhaps any parts of equipment of the present invention or the combination of parts may need to use input-output device, memory device and microprocessor such as CPU etc.May not be certain to mention these equipment in the explanation to method and apparatus of the present invention below, but in fact used these equipment.
As above-mentioned messaging device, the block diagram of Figure 42 shows giving an example of a computer system, can realize method and apparatus of the present invention therein.It should be noted that the computer system that is shown in Figure 42 just is used for explanation, does not really want to limit the scope of the invention.
From the angle of hardware, computing machine 1 comprises a CPU 6,5, RAM of hard disk (HD) 7, a ROM 8 and an input-output device 12.Input-output device can comprise input media such as keyboard, Trackpad, tracking ball and mouse etc., and output unit is such as printer and monitor, and input-output unit is such as floppy disk, CD drive and communication port.
From the angle of software, described computing machine mainly comprises operating system (OS) 9, input/output driver 11 and various application program 10.As operating system, can use any operating system that to buy on the market, such as Windows series and based on the operating system of Linux.Input/output driver is respectively applied for and drives described input-output device.Described application program can be an Any Application, such as text processor, image processing program etc., comprising can be used in this invention and aim at the present invention's application program establishment, that can call described existing program.
Like this, in the present invention, can in the hardware of described computing machine, realize method and apparatus of the present invention by operating system, application program and input/output driver.
In addition, computing machine 1 can be connected to digital device 3 and application apparatus 2.Digital device can be used as image source, can be camera, video camera, scanner or the digitizer that is used for analog image is converted to digital picture.The result that equipment of the present invention and method obtain is output to application apparatus 2, and the latter carries out suitable operation according to described result.This application apparatus also can be implemented as the Another application (combining with hardware) that realizes in computing machine 1, be used for further handling described image.
The method and apparatus that is used for smoothed binary image
In brief, the invention provides a kind of computer implemented method and apparatus that is used for smoothed binary image.
Equipment of the present invention comprises: the pick-up unit that is used to detect the pixel that formation may breach; Be used for each may breach and pixel on every side compare with a plurality of template, with judge described may breach the device of breach or independent noise whether really; And the value of the pixel by changing real breach and independent noise is eliminated the cancellation element of real breach and independent noise.
Depend on picture quality and the smooth effect that will reach, judge what is that the standard of noise can change.For example, for high-quality image, the single foreground pixel on only having powerful connections, perhaps the breach of single pixel size or projection just are regarded as eliminating or level and smooth noise.If image is of poor quality, then the size of noise (comprising breach or projection) can be adjusted to 2 pixels, and so on.If the size of noise is two or more pixels, then the connectedness of pixel can be taken into account.
In this manual, the meaning of " independent noise " is the pixel of its value island different with surrounding pixel, and the meaning of " breach " and " projection " is the different pixel of pixel in its both sides on borderline, its value of background and prospect and direction on this border.Obviously, " breach " and " projection " is two opposite notions.If with background and prospect counter-rotating, then breach can become projection, projection can become breach.For example, in Fig. 2, if prospect is a black, then No. 1 pixel is projection; But if prospect is white, then No. 1 pixel is a breach.Therefore, in the following description, unless offer some clarification on separately, " breach " speech is meant " independent noise ", " breach " or " projection ".
(first embodiment)
In first embodiment, the size of breach is a pixel.
In this embodiment, described pick-up unit is configured to detect the single pixel that is clipped in the middle by the different pixel of value in each pixel column.For example, the template with such configuration can be moved along each pixel column, to filter out possible single pixel breach/projection.Equally, the size of template depends on the quality of image and the smooth effect that will reach.
A kind of modification as described pick-up unit, it can comprise scanister, the pixel groups that is used for pre-sizing is a unit, the pixel of each row of scan image, and described judgment means is configured to: if pixel is not same value in group, the pixel in then will organizing be considered as may breach pixel; If the pixel in group is same value, and this group is adjacent with one or more pixel with different value, then described one or more pixel be regarded as may breach pixel.
Because above-mentioned modification is by the group processed pixels, processing speed can improve a lot.Described group can be any amount of pixel, but one or more byte preferably is beneficial to the processing of the CPU of equipment.
Figure 26 to 31 illustrates a concrete example of the detection processing of being carried out by described pick-up unit.Wherein, with the byte unit scanning element row (the step S1 among Figure 26, S2, S8 by scanister, S22 and S24, the step S606 among Figure 27, the step S1006 among Figure 28, step S1020 among Figure 29, the step S1208 among Figure 30, and the step S18 among Figure 31).For each byte, whether complete described judgment means judge described byte white (step S2) or complete black (S12), if, then generally speaking, described byte does not need to handle (step S8 and S18), but except step S4, S6, S10 and S14, S16 is outside some special case shown in the S20.Just, if end adjacent pixels (step S4, S6 and step S14, S16) with this byte, and/or with the stem adjacent pixels (the "Yes" branch of step S10 and step S20) of this byte, different with the value of this byte, then described pixel is possible breach (seeing Figure 27,28 and 29).If a byte is not neither deceive entirely in vain entirely, then all pixels wherein all be should be processed possible breach (the "No" branch of step S12, and see Figure 30).
Next procedure is from discerning real breach (perhaps projection) the breach with recognition device.For convenience of description, protruding 1 and 2 numberings that illustrate the pixel in one 7 * 7 array.The table 1-1 of this instructions to 1-4 and Figure 32 in Figure 40, equation left-hand digit wherein is a pixel number illustrated in figures 1 and 2, the numeral on equation the right is the value (1 or 0) of respective pixel.In addition, in below the instructions and Fig. 1 to 25, the pixel of possible breach is positioned at the center of each figure (No. 1 pixel).
See that intuitively if a pixel and relevant surrounding pixel constitute a specific template, such as that shown in Figure 3, then this pixel can be regarded as a possibility breach.Traditionally, use the template of fixed size to eliminate breach, and the template of fixed size have aforesaid shortcoming.Just, if template is too little, such as 3 * 3, then smooth effect can be too strong.If but template is too big, such as 7 * 7, smooth effect again too a little less than because template has covered too many pixel, and smooth operation only should be carried out the border between prospect and the background.Therefore, proposed to use a plurality of templates, these a plurality of templates and object pixel district compare one by one.Such method can consume a large amount of computational resources.
Therefore, in preferred implementation of the present invention, proposed to carry out a kind of logic template coupling.
At first, design a plurality of templates.For example, in the present embodiment, in order to eliminate single pixel breach/projection, the condition of filling breach (prospect is a black) is as follows:
1. may pixel be worth four different pixels and be clipped in the middle in edge direction, and this possibility pixel with at least other 3 be worth as shown in Figure 1 L shaped of identical pixel formation or T shape as shown in Figure 2.Obviously, L shaped among Fig. 1 has a mirror image, and L shaped and mirror image all can rotate to four direction (upper and lower, left and right), therefore has 8 kinds of situations.For the T shape among Fig. 2,, therefore four kinds of situations are arranged because T shape can rotate to four kinds of directions.In object lesson shown in Figure 23, only relate to three kinds of situations at Fig. 3: situation shown in Figure 2, situation shown in Figure 1, and the mirror image of situation shown in Figure 1.
2. shown in Fig. 3 to 5,10 to 12 and 17 to 19, if possible the pixel that pixel and three values are opposite constitutes inverted T-shapeds, and then this possibility pixel is real breach.In addition, shown in Fig. 6 to 9,14 to 17 and 20 to 23, if an end points pixel of the horizontal stroke of described inverted T-shaped is identical with the value of this possibility pixel, the horizontal stroke of then only working as this T shape is expanded under the situation of at least one pixel, and this possibility breach just can be regarded as a real breach.Similarly, can make up template and delete projection.If prospect is a black, then,, can use the template shown in Figure 24 and 25 as an example.Again for example, if prospect and background in image are balances, in other words, be that any color of background is a prospect if be difficult to differentiate any color, then can use the resulting template of template shown in counter-rotating Fig. 3 to 23.
Notice that although Fig. 3 illustrates the array of 7 * 7 pixels respectively to Figure 25, the template of reality use is not 7 * 7.In Fig. 3 to 25, the pixel of dash area is irrelevant pixel.That is to say that template only is made of white pixel among Fig. 3 to 25 and black pixel.
If according to traditional template matches technology, then each may pixel will compare with above-mentioned each template, and this expends time in and computing power very much
In preferred implementation of the present invention, gather with the simplification of a logical condition and to represent described template.
Specifically, above-mentioned template can be represented respectively with following condition:
Table 1-1
Figure number 3 4 5 6 7 8 9
The template condition 1=1 2,4,6=0,1,0 8=0 28|11=0 9,7=0,0 3&5=1 1=1 2,4,6=0,1,0 8=0 28|11=0 9,7=0,0 12&3=1 1=1 2,4,6=0,1,0 8=0 28|11=0 9,7=0,0 5&18=1 1=1 2,4,6=0,1,0 8=0 28|11=0 9,7=0,1 3&5=1 3&12=1 1=1 2,4,6=0,1,0 8=0 28|11=0 9,7=0,1 3&5=1 5&18=1 1=1 2,4,6=0,1,0 8=0 28|11=0 9,7=1,0 3&5=1 3&12=1 1=1 2,4,6=0,1,0 8=0 28|11=0 9,7=1,0 3&5=1 5&18=1
Table 1-2
Figure number 10 11 12 13 14 15 16
The template condition 1=1 2,4,6=0,1,0 8=0 11|19=0 9,7=0,0 3&5=1 1=1 2,4,6=0,1,0 8=0 11|19=0 9,7=0,0 12&3=1 1=1 2,4,6=0,1,0 8=0 11|19=0 9,7=0,0 5&18=1 1=1 2,4,6=0,1,0 8=0 11|19=0 9,7=0,1 3&5=1 3&12=1 1=1 2,4,6=0,1,0 8=0 11|19=0 9,7=0,1 3&5=1 5&18=1 1=1 2,4,6=0,1,0 8=0 11|19=0 9,7=1,0 3&5=1 3&12=1 1=1 2,4,6=0,1,0 8=0 11|19=0 9,7=1,0 3&5=1 5&18=1
Table 1-3
Figure number 17 18 19 20 21 22 23
The template condition 1=1 2,4,6=0,1,0 8=0 19|40=0 9,7=0,0 3&5=1 1=1 2,4,6=0,1,0 8=0 19|40=0 9,7=0,0 12&3=1 1=1 2,4,6=0,1,0 8=0 19|40=0 9,7=0,0 5&18=1 1=1 2,4,6=0,1,0 8=0 19|40=0 9,7=0,1 3&5=1 3&12=1 1=1 2,4,6=0,1,0 8=0 19|40=0 9,7=0,1 3&5=1 5&18=1 1=1 2,4,6=0,1,0 8=0 19|40=0 9,7=1,0 3&5=1 3&12=1 1=1 2,4,6=0,1,0 8=0 19|40=0 9,7=1,0 3&5=1 5&18=1
Table 1-4
Figure number 24 25
The template condition 1=0 2,8,6=1,0,1 4=1 3,5=1,1 10|9=0 1=0 2,8,6=1,0,1 4=1 3,5=1,1 7|20=0
The condition of Fig. 3 to 23 can be by abbreviation:
The 1st grade: 1=1
The 2nd grade: 2,4,6=0,1,0
3rd level: 8=0
The 4th grade: 28|11=0OR 11|19=0OR 19|40=0
The 5th grade: (9,7=0,0and (3﹠amp; 5=1or 12﹠amp; 3=1 or 5﹠amp; 18=1)) OR ((9,7=0,1 or 1,0) and 3﹠amp; 5=1and (12﹠amp; 3=1 or 5﹠amp; 18=1))
In the simplest above-mentioned set of circumstances, top condition has precedence over following conditions, has five priority.Accordingly, the significance level of the pixel around the possible pixel is different.According to the priority of this simplest set and condition, can design as Figure 32 and add logical algorithm shown in Figure 33.Therefore, described recognition device can comprise: memory storage, be used to store representative described a plurality of templates, and have the simplification set of the condition of different priorities; And comparison means, be used for described priority according to described condition, relatively each condition and described possible breach respective pixel on every side if there is the condition that is not satisfied, are then skipped current possible breach; If the condition of described simplification set is met, then should be judged to be real breach by breach.
Similarly, Figure 32 adds that Figure 37 illustrates the logical algorithm corresponding to Figure 24 and 25.
Similarly, Figure 34 to 36 and Figure 38 to 40 illustrate by the template shown in Fig. 3 to 25 being rotated to other three situations that direction obtained.
In the last step of Figure 33 to 40, change the value of breach, thereby breach is filled (perhaps projection being eliminated).
(second embodiment)
In a second embodiment, the size of breach/projection is two pixels.
We know from first embodiment, and key of the present invention is to gather with the simplification of the condition of different priorities to summarize various templates, and the pixel around just may pixel have different importance.
Obviously, size is that breach and the size of two pixels do not have essential different for the breach of single pixel.Difference is that because the size of breach is bigger, module may need correspondingly to enlarge.For example, for the breach (after this being called horizontal breach) along two pixels of the boundary direction between prospect and the background, T shape or L shaped shorter stroke need be widened a pixel, and longer stroke needs corresponding lengthening.Therefore, for example, first embodiment the 1st and the 2nd in the parameter mentioned need corresponding increase.
In this case, when search possibility breach, be similar to first embodiment, use typical run length method, the monochrome pixels that just detects in the pixel column is right.In this example, at first detect W-B-B-W (white black white), judge whether really breach of possibility breach then.
For the those of ordinary skills that read this instructions, be easy to design various templates, represent these templates with logical condition, and further to described logical condition abbreviation.
Be similar to first embodiment, come the related pixel of detection ring around the possibility breach according to the priority of the condition in the simplest condition set, be not satisfied in case have ready conditions in the set, then algorithm is jumped out, and forwards next possibility breach to.Like this, can improve processing speed greatly.
In first embodiment, certain criteria is followed in the design of template.In practice, the selection of template can be based on the statistics of wanting smoothed image type.That is to say that according to wanting processed attributes of images, some pixel distribution may mean the breach that existence need be filled or the projection of needs elimination.
Figure 43 to 56 illustrates and is used to eliminate the breach of two pixel sizes and the example of the template of projection, and corresponding process flow diagram.
For convenience of description, Figure 43 illustrates the numbering of the pixel in 8 * 8 arrays.The table 2-1 of this instructions to 2-3 and Figure 55 in Figure 56, equation left-hand digit wherein is a pixel number shown in Figure 43, the numeral on equation the right is the value (1 or 0) of respective pixel.In addition, in below the instructions and Figure 44 to 54, the pixel of possible breach is positioned at No. 1 and No. 6 pixel.
Figure 44 to 51 illustrates 8 templates that are used to fill breach, and Figure 52 to 54 illustrates three templates that are used to eliminate projection.Notice that although Figure 44 illustrates the array of 8 * 8 pixels respectively to Figure 54, the template of reality use is not 8 * 8.In Figure 44 to 54, the pixel of dash area is irrelevant pixel.That is to say that template only is made of white pixel among Figure 44 to 54 and black pixel.
Particularly, above-mentioned template can be represented with following condition respectively:
Table 2-1
Figure number 44 45 46 47
The condition of template 1,6=1,1&&2,19=0,0 9,8,7,20=0,0,0,0 4,5=1,1 3,18=1,1 12,39=1,1 11,40=0,0 29=1 1,6=1,1&&2,19=0,0 9,8,7,20=0,0,0,0 4,5=1,1 3,18=1,1 12,39=1,1 11,40=0,0 R2=1 1,6=1,1&& 2,19=0,0 9,8,7,20=0,0,0,0 4,5=1,1 3,18=1,1 12,39=1,1 11,40=0,1 1,6=1,1&& 2,19=0,0 9,8,7,20=0,0,0,0 4,5=1,1 3,18=1,1 12,39=1,1 11,40=1,0
Table 2-2
Figure number 48 49 50 51
The condition of template 1,6=1,1&&2,19=0,0 9,8,7,20=0,0,0,0 4,5=1,1 3,18=1,1 12=0 39,R2=1,1&&40,R3=0,0 1,6=1,1&&2,19=0,0 9,8,7,20=0,0,0,0 4,5=1,1 3,18=1,1 39=0 12,29=1,1&& 11,28=0,0 1,6=1,1&& 2,19=0,0 9,8,7,20=0,0,0,0 4,5=1,1 3,18=1,0&& 11,28=0,0 &&12,29=1,1 1,6=1,1&& 2,19=0,0 9,8,7,20=0,0,0,0 4,5=1,1 3,18=0,1&& 40,R3=0,0&& 39,R2=1,1
Table 2-3
Figure number 52 53 54
The condition of template 1,6=0,0 2,19=1,1 9,8,7,20=0,0,0,0 3,4,5,18=1,1,1.1 10,41=0,0 1,6=0,0 2,19=1,1 9,8,7,20=0,0,0,0 3,4,5,18=1,1,1.1 10,11,27=0,1,0 1,6=0,0 2,19=1,1 9,8,7,20=0,0,0,0 3,4,5,18=1,1,1.1 41,40,R4=0,1,0
The condition of Figure 44 to 51 can be by abbreviation:
The 1st grade: 1,6=1,1﹠amp; ﹠amp; 2,19=0,0
The 2nd grade: 9,8,7,20=0,0,0,0
3rd level: 4,5=1,1
The 4th grade: (3,18=1,0﹠amp; ﹠amp; 11,28=0,0﹠amp; ﹠amp; 12,29=1,1) OR (3,18=0,1﹠amp; ﹠amp; 40, R3=0,0﹠amp; ﹠amp; 39, R2=1,1);
OR:3,18=1,1 and 12,39=1, 1and 11,40=0,0 and(29=1 or R2=1);
OR:3,18=1,1 and 12,39=1,1and(11,40=1,0 OR 11,40=0,1);
OR:3,18=1,1 and((39,R2=1,1&&40,R3=0,0)OR(12,29=1,1&&11,28=0,0))
In the simplest above-mentioned set of circumstances, top condition has precedence over following conditions, has four priority.Accordingly, the significance level of the pixel around the possible pixel is different.According to the priority of this simplest set and condition, can design the logical algorithm shown in Figure 55.Therefore, described recognition device can comprise: memory storage, be used to store representative described a plurality of templates, and have the simplification set of the condition of different priorities; And comparison means, be used for described priority according to described condition, relatively each condition and described possible breach respective pixel on every side if there is the condition that is not satisfied, are then skipped current possible breach; If the condition of described simplification set is met, then should be judged to be real breach by breach.
Similarly, Figure 56 illustrates the logical algorithm corresponding to Figure 52 to 54.
In the final step of Figure 55 and Figure 56, change the value of breach, thereby fill this breach (perhaps eliminating projection).
(the 3rd embodiment)
In order to improve the speed of this method and equipment, reduce memory consumption, the present invention further provides a kind of method and apparatus that carries out pretreated novelty.Particularly, the invention provides first conversion equipment, be used for the row that will survey was carried out pre-service before above-mentioned detection steps.
Particularly, in a bianry image, a pixel is corresponding to a bit in the internal memory.The black pixel of value " 0 " representative, value " 1 " is represented white pixel.Described in first and second embodiment, when surveying the possibility breach, the present invention need detect each pixel, just needs bit is operated.Yet known to us, in present any information equipment, information all is to use byte representation.This problem can greatly reduce processing speed, increases memory consumption.
In order to address this problem, as shown in figure 41, it is a byte with each bit expanded that the inventor puts forward with conversion equipment.As shown in figure 41, if a row comprises N pixel, just N bit then expands to this row N byte.The individual bit of n pixel (n=1,2,3......N) (just, for n the bit that is " 1 "), ((n-1) mod 8)+1 of n byte) for white is set to 1, and other bit of these N byte all is set to 0.Then, can carry out described detecting operation and compare operation, because only there are two kinds of bytes: zero byte and non-zero byte to this N byte.The benefit that adopts this conversion equipment is to have simplified detecting operation and compare operation, because operation is directly carried out on byte, rather than bit is operated.When recovering pixel column, the invention provides second conversion equipment, per 8 conversion bytes are carried out the OR operation, just can recover a respective byte of pixel column.
(other embodiment)
Can see that first embodiment relates to the breach of level and smooth single pixel size, second embodiment relates to the breach of level and smooth two pixel sizes, and two pixels are horizontally disposed (being parallel to the edge between prospect and the background or the direction on border).Those of ordinary skill in the art can expect that described two pixels can be at vertical direction, perhaps at vergence direction.
If two pixels are so apparent at vertical direction, in Fig. 1 and Fig. 2, T shape and L shaped vertical stroke will extend a pixel, and should correspondingly adjust relevant surrounding pixel.Equally, those of ordinary skill in the art can easily design and/or select template after having read this instructions, and the abbreviation condition set.
Mean that in two pixels of vergence direction these two pixels are eight to be communicated with but not to be four to be communicated with.For this situation, under the inspiration of this instructions, those of ordinary skill in the art also can design the template that makes new advances, and the abbreviation condition set.
If necessary, the size of the breach that fill can be amplified to 3 or more a plurality of pixel, is the same in its ultimate principle and this instructions, and within protection scope of the present invention.
In addition, although among the embodiment here, the situation of single pixel and the situation of two pixels have been described respectively, but in practice, can detect and fill two kinds of breach (and breach of other kind) simultaneously, only each abbreviation condition set need be merged, and further the resulting union of abbreviation gets final product.
Storage medium
Described purpose of the present invention can also be by realizing with program of operation or batch processing on any messaging device that described image source is communicated by letter with subsequent processing device aforesaid.Described messaging device, image source and subsequent processing device are known common apparatus.Therefore, described purpose of the present invention also can be only by providing the program code of realizing described method or equipment to realize.That is to say that the storage medium that stores the program code of realizing described method or equipment constitutes the present invention.
To those skilled in the art, can realize described method with any program language programming easily.Therefore, omitted detailed description at this to described program code.
Obviously, described storage medium can be well known by persons skilled in the art, and perhaps therefore the storage medium of any kind that is developed in the future also there is no need at this various storage mediums to be enumerated one by one.
Although in conjunction with concrete steps and structrual description the present invention, the present invention is not limited to details as described herein.The application should cover all variation, modification and modification without departing from the spirit and scope of the present invention.

Claims (8)

1. a method that is used for smoothed binary image comprises the steps:
Detect the pixel that constitutes possible breach;
Breach that each is possible and pixel on every side thereof and a plurality of template compare, to determine that this possible breach is true breach or independent noise;
The value of the pixel by changing true breach and independent noise is eliminated described true breach and independent noise,
Wherein, described comparison step realizes that with a kind of logical algorithm it comprises:
Described a plurality of templates are simplified set most with of the condition of different priorities to be represented;
According to the described priority of described condition, compare each condition and described possible breach respective pixel on every side,
If have the condition that is not satisfied, then skip current possible breach;
If the described condition of simplifying set most is met, then should be judged to be real breach by breach.
2. the method for claim 1, wherein, described detection step comprise detect in each pixel column one or more and have identical value, by the connected pixel that the pixel of different value is clipped in the middle, the quantity of wherein said connected pixel depends on the smooth effect and/or the picture quality that will reach.
3. the method for claim 1, wherein described detection step comprises:
Pixel groups with pre-sizing is the pixel of each row of unit scan image, if wherein the pixel in group is not same value, then the pixel in this group is regarded as the pixel of possibility breach, perhaps, if it is adjacent with one or more pixel with different value to have one group of pixel of identical value, then described one or more pixel is regarded as the pixel of possibility breach.
4. as the described method of one of claim 1 to 3, also comprise:
First switch process before described detection step, the pending row that is used for comprising N pixel is converted to N byte, wherein for n pixel of white, n=1 wherein, 2 ... N, with ((n-1) mod 8)+1 of n byte) individual bit is made as " 1 ", other bit of a described N byte is made as " 0 ", and described detection step and comparison step are carried out at described N byte;
Second switch process after described removal process is by carrying out OR operation to N byte after handling, with N the pixel column that byte conversion is a N pixel after handling.
5. equipment that is used for smoothed binary image comprises:
Be used to detect the pick-up unit of the pixel that formation may breach;
Be used for each may breach and pixel on every side compare with a plurality of template, with judge described may breach the recognition device of breach or independent noise whether truly; And,
The value of the pixel by changing true breach and independent noise is eliminated the cancellation element of true breach and independent noise,
Wherein, described recognition device comprises:
Memory storage is used to store the simplification set of representative condition described a plurality of templates, that have different priorities; And
Comparison means is used for the described priority according to described condition, and relatively each condition and described possible breach respective pixel on every side if there is the condition that is not satisfied, are then skipped current possible breach; If the described condition of simplifying set most is met, then should be judged to be real breach by breach.
6. equipment as claimed in claim 5, wherein, described pick-up unit is configured to detect in each pixel column one or more and has identical value, by the connected pixel that the pixel of different value is clipped in the middle, the quantity of wherein said connected pixel depends on the smooth effect and/or the picture quality that will reach.
7. equipment as claimed in claim 5, wherein, described pick-up unit comprises:
Scanister, the pixel groups that is used for pre-sizing is the pixel of each row of unit scan image; And
Judgment means, be configured to: if the pixel in group is not same value, then the pixel in this group is regarded as the pixel of possibility breach, perhaps, if it is adjacent with one or more pixel with different value to have one group of pixel of identical value, then described one or more pixel is regarded as the pixel of possibility breach.
8. as the described equipment of one of claim 5 to 7, also comprise:
First conversion equipment, the pending row that is used for comprising N pixel is converted to N byte, wherein for n pixel of white, n=1 wherein, 2 ... N, with ((n-1) mod 8)+1 of n byte) individual bit is made as " 1 ", other bit of a described N byte is made as " 0 ", and described pick-up unit and recognition device are operated at a described N byte;
Second conversion equipment is used for by N byte after handling carried out OR operation, with N the pixel column that byte conversion is a N pixel after handling.
CNB2005100651817A 2005-04-13 2005-04-13 The method and apparatus that is used for smoothed binary image Expired - Fee Related CN100555323C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100651817A CN100555323C (en) 2005-04-13 2005-04-13 The method and apparatus that is used for smoothed binary image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100651817A CN100555323C (en) 2005-04-13 2005-04-13 The method and apparatus that is used for smoothed binary image

Publications (2)

Publication Number Publication Date
CN1848178A CN1848178A (en) 2006-10-18
CN100555323C true CN100555323C (en) 2009-10-28

Family

ID=37077730

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100651817A Expired - Fee Related CN100555323C (en) 2005-04-13 2005-04-13 The method and apparatus that is used for smoothed binary image

Country Status (1)

Country Link
CN (1) CN100555323C (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6577774B1 (en) * 1998-09-08 2003-06-10 Ricoh Company, Ltd. Image forming apparatus and image forming method
US6825825B2 (en) * 2001-07-13 2004-11-30 Fuji Xerox Co., Ltd. Smoothing method, smoothing circuit, image forming apparatus and display unit
CN1588431A (en) * 2004-07-02 2005-03-02 清华大学 Character extracting method from complecate background color image based on run-length adjacent map

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6577774B1 (en) * 1998-09-08 2003-06-10 Ricoh Company, Ltd. Image forming apparatus and image forming method
US6825825B2 (en) * 2001-07-13 2004-11-30 Fuji Xerox Co., Ltd. Smoothing method, smoothing circuit, image forming apparatus and display unit
CN1588431A (en) * 2004-07-02 2005-03-02 清华大学 Character extracting method from complecate background color image based on run-length adjacent map

Also Published As

Publication number Publication date
CN1848178A (en) 2006-10-18

Similar Documents

Publication Publication Date Title
JP5455038B2 (en) Image processing apparatus, image processing method, and program
Savakis Adaptive document image thresholding using foreground and background clustering
US6771836B2 (en) Zero-crossing region filtering for processing scanned documents
US20070292028A1 (en) Activity detector
WO2006019165A1 (en) Method for generating label image and image processing system
US20180232888A1 (en) Removal of background information from digital images
JP4772819B2 (en) Image search apparatus and image search method
JP2000200350A (en) Method and device for processing information
US6701008B1 (en) Method, computer readable medium and apparatus for extracting characters from color image data
JP5294798B2 (en) Image processing apparatus and image processing method
US6044179A (en) Document image thresholding using foreground and background clustering
JP4565396B2 (en) Image processing apparatus and image processing program
JP4687900B2 (en) Image processing apparatus and program.
JP5319637B2 (en) Two-dimensional code, encoding device, encoding program, and two-dimensional code reader
CN100555323C (en) The method and apparatus that is used for smoothed binary image
CN100416597C (en) Method and device for self-adaptive binary state of text, and storage medium
JP3172498B2 (en) Image recognition feature value extraction method and apparatus, storage medium for storing image analysis program
JP7301529B2 (en) Image processing device, image processing method, and program
JP2001127999A (en) Device and method for processing image
US8422789B2 (en) Image discrimination device and image attribute discrimination method
JPH0362177A (en) Picture processor
JPH10162102A (en) Character recognition device
US11682189B2 (en) Spiral feature search
JP3587586B2 (en) Image processing device
JP2003189090A (en) Image processing apparatus and method, image processing program and storage medium

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20091028

Termination date: 20170413

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