Therefore fundamental purpose of the present invention is to provide a kind of and can comes accurate motion scan assembly or file according to a stepping position control chart, and the image analyzer of the line scanning document image of going forward side by side is with the problem of the periodic error that solves above-mentioned gearing and produced.
The object of the present invention is achieved like this:
A kind of image analyzer, it includes one and is used for the scan components that scans a file and produce a corresponding picture signal, one is used for driving described scan components or the described file drive unit with scanning this document along moving direction, an and control device that is used for controlling this scan components and drive unit operation, it is characterized in that: described control device includes the stepping position control chart of the number of steps that stores corresponding scan line position, wherein, when the described file of scanning, this control device can be controlled described drive unit to scan the image of this document one by one according to the number of steps of each sweep trace in the described stepping position control chart.
A kind of method that is used for producing the stepping position control chart of above-mentioned image analyzer, this stepping position control chart include corresponding motion scan assembly or file to the number of steps of each sweep trace, it is characterized in that this method includes the following step:
Correction file is provided, and this correction file has at least one oblique line;
The scanning correction file is to utilize drive unit to drive described scan components or correction file with default number of steps, and utilizes this scan components to scan this correction file, to obtain the picture signal of this correction file of aforementioned scan components on each sweep trace;
Slope calculations tan θ, the picture signal of the described sweep trace of foundation is tried to achieve the slope of oblique line;
Calculate lateral displacement error value DX (n),, utilize the gray scale variation of corresponding aforementioned corrected file oblique line to calculate the value of lateral displacement and the error of each oblique line according to the picture signal of described each sweep trace;
Calculate the length travel error amount DY (n) of actual scan line, calculate the length travel error amount of actual scan line according to described lateral displacement error value and described oblique line slope; And
Set and revise number of steps S (n), set the number of steps of each sweep trace according to described site error value, and be stored in stepping position control chart.
According to said method, wherein the method for slope calculations tan θ system utilizes the mode of linear regression to calculate the slope of each oblique line, calculates its mean value again.
According to said method, the method for wherein calculating the lateral displacement error value comprises the following step:
Set the black and white boundary value of a GTG reference value as each oblique line;
Calculate the black and white boundary position Xi (1) of each oblique line of article one sweep trace;
Calculate the black and white boundary position Xi (n) of each oblique line of n bar sweep trace;
Calculate the value of lateral displacement error amount DXi (n) of each oblique line of n bar sweep trace
Dxi(n)=Xi(n)-Xi(1)+(n-1)+T/A
Wherein T revises step number for accumulation, and A is the default driving step number of every sweep trace, and i is the black and white number of boundary;
Calculate the average transverse shift value DX (n) of n bar sweep trace
Wherein m is the oblique line number.According to said method, the method for wherein calculating the black and white boundary position of each oblique line is an interpolation method.According to said method, the method for wherein calculating average transverse shift value DX (n) is
Wherein m is the oblique line number.
According to said method, the method for wherein calculating average transverse shift value DX (n) is
Wherein m is the oblique line number.
According to said method, the method for wherein calculating the length travel error amount DY (n) of actual scan line is
DY(n)=DX(n)*tanθ。
According to said method, wherein setting correction number of steps S (n) is
If DY (n)>1/2A is S (n)=A-1 then, and T=T-1,
If DY (n)<-1/2A S (n)=A+1 then, and T=T+1,
Otherwise S (n)=A, and T is constant.
Owing to adopt above technical scheme, can reach following beneficial effect:
1. with the lower element of requirement on machining accuracy, reach the desired transmission quality of higher scanning resolution, reduced accuracy requirement, can improve the throughput rate and the qualification rate of high resolution scanning device, make the high resolution scanning device more economical the actuated element of scanner.And positioning error can be controlled at below 1/2nd of gear train minimum stepper distances in theory.
2. need not increase sensing element, its correcting mode is non-instant correction, does not influence sweep velocity.
The present invention is further described in more detail below in conjunction with drawings and the specific embodiments.
See also Fig. 2, Fig. 2 is the function block schematic diagram of scanner 10 of the present invention.Scanner 10 of the present invention can be a platform-type scanner, it includes a transparent platform 12 and is used for placing a file to be scanned, one scan assembly 16 is used for scanning document and produce a corresponding picture signal, one drive unit 18 is used for along a moving direction driven sweep assembly 16 with scanning document, and a control device 20 is used for the operation of gated sweep assembly 16 and drive unit 18.Every sweep trace of picture signal is vertical mutually with the moving direction 26 of drive unit 18.Referring to shown in Figure 3.
The present invention also discloses a kind of method that is used for producing the stepping position control chart 22 of an image analyzer, stepping position control chart 22 includes the number of steps S (n) of corresponding motion scan assembly to each sweep trace, n is designated n bar sweep trace, 20 of control device can come accessory drive 18 according to the number of steps of each sweep trace in the stepping position control chart 22 when scanning document, to scan the image of each sweep trace one by one.
Below explanation the present invention produces the method for the stepping position control chart 22 of scanner 10:
(1) scanning one correction file 14:
See also shown in Figure 3ly, Fig. 3 one has the synoptic diagram of the correction file 14 of correction graph, and the length of this correction file 14 need cover the length of scanning platform 12 at least, promptly includes all strokes of scan components 16.Arrow 26 indications are the moving direction of scan components 16 when being driven.Correction graph includes at least one oblique line 28 (being preferably a plurality of parallel oblique lines), and oblique line 28 is all not parallel with sweep trace and step direction.Suppose that the oblique line 28 and the angle of each bar sweep trace are θ, and 18 average every driving A steps of drive unit, scan components 16 moves a sweep trace.Control device 20 continues the mode motion scan assembly 16 with every scanning line driving A step, and scans whole correction file 14.
(2) calculate the actual scanning module position:
The physical location of the picture signal of every sweep trace (being the shift position of scan components) can calculate according to the variation of picture signal in every picture signal for 28 images of the oblique line on the correction file 14.For example scan components 16 scans correction file 14 in regular turn and produces article one scanning yoke image signal 30 and n bar scanning yoke image signal 32 along moving direction 26.At first find out picture signal 30 and the position X (1) of oblique line 28 black and white boundary images on the sensing cell line, and picture signal 32 and the position X (n) of oblique line 28 black and white boundary images on the sensing cell line, gap DX more therebetween (n)=X (n)-X (1)+(n-1)+accumulation modified value utilizes the slope (tan θ) of oblique line 28 to try to achieve error distance DY (n)=DX (n) * tan θ between the actual scanning position of two picture signals 30,32 again.
(3) decision number of steps:
Can obtain the error data of each its actual scanning position of bar sweep trace by method recited above, revise the number of steps that each sweep trace should advance this moment, and be recorded in stepping position control chart 22.Because the number of steps of record is the number of steps of approaching predetermined scanning position in the stepping position control chart 22, obviously control device 20 is when actual scanning one file, as long as accessory drive 18 driven sweep assemblies 16, and according to the number of steps that is write down in the stepping position control chart 22 scan components 16 is scanned in regular turn, the error between actual scanning position and predetermined scanning position just can be controlled at minimum stepper distances 1/2nd in.
Stepping position control chart 22 is stored in the control device, later on during scanning document, control device 20 just can come accessory drive 18 with the image on scanning document each stepping position in stepping position control chart 22 one by one according to the number of steps of each sweep trace in the stepping position control chart 22, so can reduce the deviation distance of the predetermined scanning position scanning position actual of sweep trace, and obtain reliable scan image with it.
Please refer to Fig. 4, Fig. 4 produces the method flow diagram of stepping position control chart for the present invention.
Step 40: beginning;
Step 42: place correction file;
Step 44: with predetermined number of steps A driven sweep assembly 16, to scan whole correction file;
Step 46: the slope of calculation correction file oblique line, set accumulative total and revise step number T=0;
Step 48: calculate the black and white boundary position Xi (1) of the image of article one sweep trace corresponding to each oblique line 28;
Step 50: find out the black and white boundary position Xi (n) of the image of n bar sweep trace corresponding to each oblique line 28;
Step 52: calculate every error amount DXi (n) that sweep trace is horizontal, with and average error value DX (n);
Step 54: try to achieve the distance error between n bar picture line and predetermined scanning position by average error DX (n) and slope (tan θ)
DY(n)=DX(n)*tanθ;
Step 58: according to error DY (n) the decision number of steps S (n) of actual scanning position and predetermined scanning position, and accumulative total is revised step number T;
Step 60: S (n) is recorded in the stepping position control chart 22;
Step 62: be the last item sweep trace? be, to step 64, not, to step 50;
Step 64: form stepping position control chart to S (n) with number of steps S (1);
Step 66: finish.
When in step 46 or 50, finding out sweep trace, have to be illustrated at 2 corresponding to the sensing cell 17 position Xi (n) of oblique line 28.
First, in fact an oblique line 28 is that certain width is arranged for sensing cell, just an oblique line 28 can cause the image that has two sections black and white to have a common boundary in the picture signal, determine the position X (n) of the pairing sensing cell of image of oblique line 28 that several method is arranged.The one, find out respectively two sections black and white boundary images the position of corresponding sensing cell, ask its mid point as X (n) again; The 2nd, only look for and wherein ignore other one side on one side; The 3rd, having the both sides of the oblique line 28 of width to treat as this is to remake subsequent calculations after two oblique lines calculate its X (n) respectively, and the method for relevant many slope line calculations X (n) is with explanation in detail more in the back.
The second, generally speaking the output valve of sensing cell 17 is not necessarily represented complete black minimum value or complete white maximal value, and black and white boundary X (n) often do not drop on the centre of sensing cell yet, is illustrated the method for processing at the following example of this measure.For example, sensing cell 17 is output as the GTG value (0-255) of eight bits, and then can select one is the border of black and white with reference to the GTG value defined, and it is worth between the maximal value and minimum value of GTG, as selecting 128 as with reference to the GTG value.If the output GTG value of the 100th sensing cell is 0 in a certain picture signal, the output GTG value of the 101st sensing cell is 156, the position that then can infer oblique line 28 black and white boundary images is between between the 100th sensing cell and the 101st sensing cell, the position that utilizes interpolation method just can try to achieve with reference to GTG value 128 places is 100+ (128-0)/(156-0)=100.82, therefore for this picture signal, the position X (n) that causes the sensing cell of its bend 28 black and white boundary images then is 100.82, in like manner for other picture signals, also can use the same method and judge and cause the wherein position of the sensing cell of black and white boundary image.
More than be with in the picture signal, how to calculate image that a certain black and white of oblique line 28 have a common boundary the position X (n) of corresponding sensing cell; Promoted again, be total to the parallel oblique line that m bar slope is all tan θ if include one group on the correction file 14, then each bar picture signal can calculate image that a plurality of black and white have a common boundary the position Xi (n) of corresponding sensing cell, i=1,2,3,, 2m, utilize the parallel oblique line of this m bar in n bar picture signal corresponding picture position Xi (the n) (i=1 that goes out, 2,3 ..., 2m), can calculate the accumulative total positioning error DY (n) of n bar sweep trace, and decide the number of steps S (n) of n bar sweep trace with this.
Suppose that the oblique line on the correction file 14 is the θ angle, the output valve of each sensing cell 17 is between 0-255 in the scan components 16, judge that the reference GTG value that black and white is had a common boundary is decided to be 128, and make drive unit 18 every stepping A step scan components 16 just scan a picture signal with initial setting, calculating accumulative total positioning error step number T determines drive unit 18 next time to answer the number of stepping again, just the stepping position S (n) of the predetermined sweep trace of next bar forms stepping position control chart 22 according to this in proper order.If article one first black and white boundary image appears between the 100th and the 101st sensing cell in the sweep trace, its output valve is respectively 0 and 156, then can calculate X1 (1)=100+ (128-0)/(156-0)=100.82, and first black and white boundary image appears between the 101st and the 102nd sensing cell in the second sweep trace, its output valve is respectively 25 and 182, then can calculate X1 (2)=101+ (128-25)/(182-25)=101.66, then first black and white boundary image of second sweep trace error that the position occurs can utilize formula (1) to try to achieve:
DXi(n)=Xi(n)-Xi(1)+(n-1)+T/A (1)
DXi (n): the X-axis error that i black and white of n bar sweep trace had a common boundary
Xi (n): i black and white boundary value of n bar sweep trace
Xi (1): i black and white boundary value of the 1st sweep trace
N: the position of sweep trace
T: step number is revised in accumulation
A: the default step number that drives
DX1(2)=101.66-100.82+(2-1)+0/A=-0.16。
Wherein T/A is the corrected range of accumulation.Then for n bar sweep trace, the average error that the position appears in individual (i=1-2m) black and white boundary of all i image is:
And the positioning error DY (n) of DX (n) and n bar sweep trace has the following relationship formula:
DY(n)=DX(n)*tan?θ (3)
How to utilize the positioning error DY (n) of n bar sweep trace decide n bar sweep trace number of steps S (n) but simple table be shown in down:
If DY (n)>1/ (2A) then sets S (n)=A-1 and accumulative total is revised step number T=T-1;
If DY (n)<-1/ (2A) then sets S (n)=A+1 and accumulative total is revised step number T=T+1;
If not, then setting the value that S (n)=A and accumulative total revises step number T does not change.So can produce the stepping position S (n) of the sweep trace of every desire scanning in the stepping position control chart 22, thereby form a complete stepping position control chart 22.
In addition, in each step of making stepping position control chart 22, have some points for attention to be particularly pointed out:
(1) when scanning correction file 14, should make correction file 14 keep clean as far as possible, avoid dust or any dirty point to drop in any optical element of correction file 14 or scanner 10, reduce the excessive situation of scanning gained data variation to avoid producing erroneous judgement.
(2) can comprise manyly to chequered with black and white oblique line 28 on the correction file 14, and its line thickness should be much larger than the size of general dust, with reduce scan components 16 when the scanning oblique line 28 because the error that dust was caused.
(3) oblique line 28 quantity that comprised on scan-line direction of correction file 14 should be as much as possible, so that when The average calculation error DX (n) and positioning error DY (n), can get multiple averaging and eliminate interference.
(4) have placement error when placing correction file 14 for scanning, thus when analysis scan gained picture signal, need recomputate the slope of oblique line 28 on the correction file 14, slope be calculated as industry known, for example linear regression mode is not then given unnecessary details in addition at this.
(5) when calculating oblique line 28 slopes, should in correction file 14, choose a plurality of oblique lines, calculate its slope respectively and average again, wherein if having slope and the excessive then Ying Yu of mean value difference to give up, and calculating mean value again.
(6) in calculation correction file 14, during the width of B﹠W oblique line 28, also should filter the excessive data of difference calculating mean value again.
(7) because of the magnification of optical system and the error of optical characteristics, the width of black and white oblique line 28 and preset value have discrepancy in the gained picture signal, thereby also must recomputate the width of this black and white oblique line 28.
(8) for further eliminating the influence of disturbing and avoiding aforementioned erroneous judgement, before calculating required correction data, should be with the positioning error curve smoothingization, utilize the error amount in some steps before and after it average or obtain the error amount in this step with interpolation method; If wherein the error amount in a certain step has bigger variation suddenly, should give up this error amount and not list in the average computation.
Please refer to Fig. 5, Fig. 5 is the error curve diagram of image analyzer after proofreading and correct.Transverse axis X represents to scan the sweep trace of gained X bar, longitudinal axis Y represents this sweep trace actual scanning position answers scanning position to depart from it distance D Y (n), graph of errors 34 before graph of errors 36 after proofreading and correct is as can be seen proofreaied and correct with Fig. 1 has very big difference, the error of the error ratio curve 34 of curve 36 is much smaller, and therefore the stepping position control chart of making according to the inventive method 22 can reduce error to improve the degree of accuracy of transmission.
And the invention described above scanner 10 also can be a penetration scanner, include a transparent platform equally and be used for placing one and wait upon the transparent file of scanning, and be platform-type or the scanner of penetration all is suitable for this method equally no matter that is to say.And though the foregoing description scans in the mode that drive unit driven sweep assembly moves, the mode that can also drive unit drives file movement scans.And use stepping position control chart 22 to have following advantage according to the image analyzer that the inventive method produced:
1. with the lower element of requirement on machining accuracy, reach the desired transmission quality of higher scanning resolution, reduced accuracy requirement, can improve the throughput rate and the qualification rate of high resolution scanning device the actuated element of scanner.And positioning error can be controlled at below 1/2nd of gear train minimum stepper distances in theory.
2. need not increase sensing element, its correcting mode is non-instant correction, does not influence sweep velocity.
Therefore, the present invention is used for producing the method for the stepping position control chart of an image analyzer, can make the high resolution scanning device more economical.The above only is the present invention's preferred embodiment, and all equalizations of being done according to the present patent application claim change and modify, and all should belong to the covering scope of patent of the present invention.For example, though the foregoing description is only proofreaied and correct once, also can repeat to proofread and correct, to obtain better quality.