Summary of the invention
In view of above content, be necessary to provide a kind of control method and system of falt bed scanner, stepping rate that can closed-loop control light sensation device.
A kind of control method of falt bed scanner, said falt bed scanner comprise light-sensitive device, are used to control the transparent holder window that is used to place target to be scanned on the stepper motor of light-sensitive device stepping rate, placing platform and the placing platform, and said method comprises:
Image acquisition step through scanning a calibration scale, obtains calibration image, is painted with the calibrating pattern of being made up of the boost line of many each intervals on the said calibration scale, and said many boost lines are to have the straight line that becomes a same tilt angle with horizontal direction;
The lateral separation calculation procedure, calculate two adjacent scan lines in the said calibration image along the lateral separation between first pixel of belonging to of horizontal direction of same boost line part;
The stepping rate set-up procedure, according to said lateral separation, the stepping rate of adjustment light-sensitive device.
A kind of control system of falt bed scanner, said falt bed scanner comprise light-sensitive device, are used to control the transparent holder window that is used to place target to be scanned on the stepper motor of light-sensitive device stepping rate, placing platform and the placing platform, and said system comprises:
Image collection module is used for obtaining calibration image through scanning a calibration scale, is painted with the calibrating pattern of being made up of the boost line of many each intervals on the said calibration scale, and said many boost lines are to have the straight line that becomes a same tilt angle with horizontal direction;
The lateral separation computing module, be used for calculating said calibration image two adjacent scan lines along the lateral separation between first pixel of belonging to of horizontal direction of same boost line part; And
The stepping rate adjusting module is used for according to said lateral separation, the stepping rate of adjustment light-sensitive device.
Compared with prior art; The control method of above-mentioned falt bed scanner; Scanning by to a calibration scale obtains calibration image, according to the parsing of calibration image being obtained the too fast or slow excessively foundation of light-sensitive device stepping rate, further adjusts the stepping rate of light-sensitive device more in view of the above.
Embodiment
See also Fig. 1, schematically show the falt bed scanner according to one embodiment of the present invention among the figure, said falt bed scanner comprises a light-sensitive device 102, a placing platform 104 and a transparent holder window 106.Said transparent holder window 106 is used to place target to be scanned, for example document sheet etc.Usually, the scanning plane of target to be scanned need be placed over against said transparent holder window 106.Said light-sensitive device 102 is lined by line scan and IMAQ along the target to be scanned that 110 pairs in one scan direction is positioned on the said transparent holder window 106.Said light-sensitive device 102 is moved along said scanning direction 110 by step motor driven, and delegation is accomplished in said light-sensitive device 102 every scannings, moves to next line by step motor driven and scans.The resolution of said light-sensitive device 102 has been represented in a lateral direction can the images recorded fineness, generally uses PPI (Pixels Per Inch) expression, promptly representes with the number of the pixel that scan image contained on the per inch length.Said falt bed scanner is placed a calibration scale 108 in the side of said transparent holder window 106 along said scanning direction 110; Said calibration scale 108 is near said transparent holder window 106; But not overlapping, so can not comprise the pattern on the said calibration scale 108 to being positioned over the scan image that obtains when target to be scanned on the said transparent holder window 106 scans with said transparent holder window 106.The scanning width of said light-sensitive device 102 is greater than the width summation of said calibration scale 108 and said transparent holder window 106; Could make said light-sensitive device 102 when obtaining scan image, obtain calibration image like this; And, dynamically adjust the stepping rate of said light-sensitive device 102 according to the closed feedback of calibration image being resolved acquisition.Be painted with the calibrating pattern of being made up of the boost line of many each intervals 112 on the said calibration scale 108, said many boost lines are to have the straight line that becomes a same tilt angle with horizontal direction.
See also Fig. 2, in one embodiment, said many boost lines that said calibrating pattern 112 comprises are black, are white between the per two adjacent boost lines.Boost line in the said calibrating pattern 112 all becomes a same tilt angle [alpha] with horizontal direction.When said inclined angle alpha greater than 0 ° and less than 26.6 ° scope in the time, preferable through scanning the calibration image effect that said calibrating pattern 112 obtains.In one embodiment, said inclined angle alpha value is 5.71 °, and this moment, the cotangent value of said inclined angle alpha was an integer 10, convenient calculating.
See also Fig. 3, schematically show flow chart among the figure, said method comprising the steps of according to the control method of the falt bed scanner of one embodiment of the present invention:
Step S202; Said light-sensitive device 102 is positioned at the target to be scanned on the said transparent holder window 106 through scanning, obtains scan image, meanwhile; Said light-sensitive device 102 also scans the calibration scale 108 that is positioned over said transparent holder window 106 sides, obtains calibration image.
Step S204, calculate two adjacent scan lines in the said calibration image along the lateral separation between first pixel of belonging to of horizontal direction of same boost line part.
Step S206, the magnitude relationship of a more said lateral separation and a threshold values is when said lateral separation equals said threshold values; Get into step S208,, get into step S210 when said lateral separation during greater than said threshold values; When said lateral separation during, get into step S212 less than said threshold values.The size of said threshold values is relevant with boost line tilt angle alpha in the said calibrating pattern 112.The scanning resolution of supposing said light-sensitive device 102 is x PPI, so the width of each pixel and highly all should be the 1/x inch.When the time of the stepping rate of said light-sensitive device 102 and its scanning delegation image just in time matees; The step distance of said light-sensitive device 102 should be the 1/x inch in the time of said light-sensitive device 102 scanning delegation images; It also is the distance of a pixel; Because the boost line angle of inclination in the said calibrating pattern 112 is α, the ratio of the step distance of said light-sensitive device 102 should be cot α in the time of so said lateral separation and said light-sensitive device 102 scanning delegation images, when said lateral separation is represented with number of pixels; The ratio of said lateral separation and said step distance just equals the number of pixels of said lateral separation just; Therefore, when the time of the stepping rate of said light-sensitive device 102 and its scanning delegation image just in time mated, the number of pixels of said lateral separation should equal cot α.When said lateral separation during greater than cot α; Represent that the step distance of said light-sensitive device 102 in the time of its scanning delegation image is greater than the 1/x inch; Also be that stepping rate is very fast; When said lateral separation during, represent that the step distance of said light-sensitive device 102 in the time of its scanning delegation image less than the 1/x inch, also is that stepping rate is slower less than cot α.Therefore, said threshold values can be set at the cotangent value of the tilt angle alpha of said boost line.
Step S208 keeps the stepping rate of said light-sensitive device 102 constant.The time of the stepping rate of said light-sensitive device 102 and its scanning delegation image just in time matees, and stepping rate does not need adjustment.
Step S210 reduces the stepping rate of said light-sensitive device 102.By transmitting control signal to stepper motor, reduce the stepping rate of said light-sensitive device 102, also promptly reduce the step distance of said light-sensitive device 102 in the time of its scanning delegation image.
Step S212, the stepping rate of increase light-sensitive device.By transmitting control signal to stepper motor, increase the stepping rate of said light-sensitive device 102, also promptly increase the step distance of said light-sensitive device 102 in the time of its scanning delegation image.
See also Fig. 4 to Fig. 6; Schematically show pixel analysis diagram respectively according to the calibration image that when said light-sensitive device 102 stepping rates are normal, very fast and slow, obtains of one embodiment of the present invention; The resolution of obtaining the light-sensitive device 102 of said calibration image is 300PPI, and the boost line tilt angle alpha in the said calibrating pattern 112 is 5.71 °, and the Y direction is the scanning direction; It also is the step direction of said light-sensitive device 102; Directions X is the capable image of said light-sensitive device 102 scannings on directions X perpendicular to the Y direction, and each lattice is represented a pixel.Because the scanning resolution of said light-sensitive device 102 is 300PPI, so the width of each pixel and highly all should be 1/300 inch, the step distance of said light-sensitive device 102 in the time of its scanning delegation image should be 1/300 inch.The contrast threshold values of said lateral separation is set at the cotangent value of the boost line tilt angle alpha in the said calibrating pattern 112, also is cot5.71 °=10.In the pixel analysis diagram of said calibration image; Get two adjacent scan lines images: first scan line and second scan line; First color in first scan line is that the pixel of black is designated as first pixel, and first color in second scan line is that the pixel of black is designated as second pixel.
In Fig. 4; The lateral separation that can calculate between the apex coordinate of apex coordinate and said second pixel of said first pixel is 10 pixels; Just equal said threshold values 10; Further can calculate the lateral separation of using the inch expression and be 10* (1/300) inch; According to the definition of trigonometric function, lateral separation and the said light-sensitive device 102 step distance ratio in the time of its scanning delegation image is cot5.71 °=10, can calculate the step distance of said light-sensitive device 102 in the time of its scanning delegation image and be 1/300 inch just.Reach a conclusion, when said lateral separation equaled said threshold values, the time of the stepping rate of said light-sensitive device 102 and its scanning delegation image just in time mated.
In Fig. 5; The lateral separation that can calculate between the apex coordinate of apex coordinate and said second pixel of said first pixel is 12 pixels; Greater than said threshold values 10; Further can calculate the lateral separation of using the inch expression and be 12* (1/300) inch; According to the definition of trigonometric function, lateral separation and the said light-sensitive device 102 step distance ratio in the time of its scanning delegation image is cot5.71 °=10, and can calculate the step distance of said light-sensitive device 102 in the time of its scanning delegation image is 1/250 inch; It is thus clear that the step distance of said light-sensitive device 102 in the time of its scanning delegation image is greater than 1/300 inch, the stepping rate of said light-sensitive device 102 is very fast.Reach a conclusion, when said lateral separation during greater than said threshold values, the stepping rate of said light-sensitive device 102 is very fast.
In Fig. 6; The lateral separation that can calculate between the apex coordinate of apex coordinate and said second pixel of said first pixel is 8 pixels; Less than said threshold values 10; Further can calculate the lateral separation of using the inch expression and be 8* (1/300) inch; According to the definition of trigonometric function, lateral separation and the said light-sensitive device 102 step distance ratio in the time of its scanning delegation image is cot5.71 °=10, and can calculate the step distance of said light-sensitive device 102 in the time of its scanning delegation image is 1/375 inch; It is thus clear that the step distance of said light-sensitive device 102 in the time of its scanning delegation image is less than 1/300 inch, the stepping rate of said light-sensitive device 102 is slower.Reach a conclusion, when said lateral separation during less than said threshold values, the stepping rate of said light-sensitive device 102 is slower.
See also Fig. 7, schematically show the functional block diagram according to the control system of the falt bed scanner of one embodiment of the present invention among the figure, said system comprises image collection module 702, lateral separation computing module 704 and stepping rate adjusting module 706.
Said image collection module 702 is used for through scanning said calibration scale 108, obtains calibration image, is painted with the calibrating pattern of being made up of many boost lines with same tilt angle and each interval 112 on the said calibration scale 108.Said calibration scale 108 is positioned on the placing platform near said transparent holder window 106 along the scanning direction; The scanning width of light-sensitive device 102 is greater than the width summation of said calibration scale 108 and said transparent holder window 106; Said image collection module 702 also is used for when obtaining calibration image; Through scanning the target to be scanned that is positioned on the said transparent holder window 106, obtain scan image.
Said lateral separation computing module 704, be used for calculating said calibration image two adjacent scan lines along the lateral separation between first pixel of belonging to of horizontal direction of same boost line part.Said lateral separation computing module 704 comprises that first pixel is obtained submodule, second pixel is obtained submodule and calculating sub module.Said first pixel is obtained submodule, and being used for obtaining said calibration image one boost line is said first color pixel point in first color along horizontal direction of one first scan line, is designated as first pixel.Said second pixel is obtained submodule, and being used to obtain boost line described in the said calibration image is said first color pixel point in first color along horizontal direction adjacent to one second scan line of said first scan line, is designated as second pixel.Said calculating sub module is used to calculate the lateral separation between said first pixel and said second pixel.
Said stepping rate adjusting module 706 is used for according to said lateral separation, the stepping rate of adjustment light-sensitive device 102.When said lateral separation during greater than a threshold values; Said stepping rate adjusting module 706 reduces the stepping rate of light-sensitive device 102; When said lateral separation during less than said threshold values; Said stepping rate adjusting module 706 increases the stepping rate of light-sensitive device 102, and said threshold values equals the cotangent value at the angle of inclination of said boost line.Said stepping rate adjusting module 706 is adjusted the stepping rate of light-sensitive device 102 through transmitting control signal to stepper motor.
To one skilled in the art, can combine the actual needs of production to make other corresponding changes or adjustment according to invention scheme of the present invention and inventive concept, and these changes and adjustment all should belong to the protection range of claim of the present invention.