CN101815155B - Scanning method and scanning control device - Google Patents

Scanning method and scanning control device Download PDF

Info

Publication number
CN101815155B
CN101815155B CN2009101183013A CN200910118301A CN101815155B CN 101815155 B CN101815155 B CN 101815155B CN 2009101183013 A CN2009101183013 A CN 2009101183013A CN 200910118301 A CN200910118301 A CN 200910118301A CN 101815155 B CN101815155 B CN 101815155B
Authority
CN
China
Prior art keywords
data
scan
buffering area
precalculated position
address
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.)
Active
Application number
CN2009101183013A
Other languages
Chinese (zh)
Other versions
CN101815155A (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.)
Shandong New Beiyang Information Technology Co Ltd
Original Assignee
Shandong New Beiyang Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong New Beiyang Information Technology Co Ltd filed Critical Shandong New Beiyang Information Technology Co Ltd
Priority to CN2009101183013A priority Critical patent/CN101815155B/en
Publication of CN101815155A publication Critical patent/CN101815155A/en
Application granted granted Critical
Publication of CN101815155B publication Critical patent/CN101815155B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention provides a scanning method and a scanning control device. The method comprises that: a scanning device scans a medium and writes the formed scan data into a cache region sequentially; and when the front end of the medium reaches a preset position, an initial address of effective data in the cache region is determined, wherein the preset position is positioned on the downstream of the scanning device in the medium advancing direction. The scanning control device comprises a control unit, a data processing unit and a detection unit, wherein the control unit is used for controlling the scanning device to scan the medium and record the current write address of the scan data when the front end of the medium reaches the preset position, wherein the preset position is positioned on the downstream of the scanning device in the medium advancing direction; the data processing unit is used for determining the initial address of the effective data in the cache region; and the detection unit is used for detecting that whether the front end of the medium reaches the preset position. The scanning method and the scanning control device can quickly position the effective data, so the effective data can be directly accessed when the data is read in the cache region.

Description

A kind of scan method and scan controller
Technical field
The present invention relates to the scanning technique field, relate in particular to a kind of scan method and scan controller.
Background technology
The scanner of current miniaturization has saved the automatic paper assembly of going up of universal scan appearance based on compact conformation and the little requirement of volume, needs operator's sub-scanning.Specifically please refer to the sketch map of the scanning process shown in Fig. 1 a; Among Fig. 1 a, go into paper rubber roll P103 rotating band moving medium and move forward when being positioned near going into after paper sensor the detected medium paper rubber roll P103, starting; And start simultaneously scanning device P101 to over against the zone scan; The data that scanning is formed deposit buffering area in, move in the time period of scanning device P101 from the scanning device P101 medium P102 that starts working, and scanning device P101 does not scan the zone on the medium P102; But data that scanning during this period of time forms have deposited in one section initial in buffering area zone; Can these data be called invalid data, corresponding with it is that scanning device P101 scans the data that the zone on the medium P102 forms, and can be called valid data.If the startup of scanning device P101 and medium P102 to begin to advance be synchronous; Under the perfect condition; Can go out the data volume of the invalid data in the buffering area to going into distance calculation between the paper rubber roll P103 through scanning device P101; The data volume that is to say invalid data this moment is foreseeable, calculates the initial address of valid data then through simple calculations, thereby confirms valid data.But; The situation that operator's release medium P102 hesitates takes place through regular meeting; Can produce more invalid data in the buffering area this moment; And because medium P102 is again uncertain from the time of going into paper rubber roll P101 and beginning to advance, so the data volume of the invalid data in the buffering area also is uncertain, this has come difficulty for definite effective data tape.Even if the time of operator's release medium P102 and the start-up time of scanning device P101 are synchronous; In the process before medium P102 moves to scanning device P101; Also may be because of the wearing and tearing of scanner medium passage, reason such as aging; Medium taking place get into not smooth situation, so also can cause forming more invalid data in the buffering area, and the data volume of these invalid datas also is uncertain.These invalid datas have taken memory spaces a large amount of in the scanner, cause the waste on the memory space, thereby how to abandon invalid data obtain valid data and become the technical problem that people are concerned about very much.
The patent No. is that the United States Patent (USP) of US6046828 discloses a kind of method that realizes detecting automatically document edges; The document here is exactly a medium mentioned above; Utilize this method can confirm the edge of scanned document; In the scan-data here, for the data invalid data corresponding mentioned above of the formation of the part beyond the scanned document edge, and the corresponding valid data mentioned above of the data that the part in the scanned document forms.Therefore thereby this method can be abandoned corresponding invalid data through the identification document edges; Thereby but utilize this method to need statistical information in the analysis scan data to confirm document edges location invalid data and it is abandoned; Obtain valid data, owing to need analyze whole scan-data, the data volume of handling is big; Processing time is longer; Location valid data speed is slow, and owing to this processing procedure that need expend the long period is carried out at the end of scan, thereby be unfavorable for the needs of real time scan and real-time Data Transmission.
Summary of the invention
The embodiment of the invention provides a kind of scan method and scanning means, can locate valid data fast, helps the needs of real time scan and real-time Data Transmission.
A kind of scan method; Comprise: scanning device scans medium, and the scan-data that forms is write buffer area in proper order, when the medium front end arrives the precalculated position; Confirm the initial address of valid data in the buffering area, said precalculated position is positioned at the downstream of the said scanning device of medium direction of advance.
A kind of scan controller comprises:
Control unit is used for the gated sweep device medium is scanned, and the current address that writes of recording medium front end scan-data when arriving the precalculated position, and said precalculated position is positioned at the downstream of the said scanning device of medium direction of advance;
Data processing unit is used for confirming the initial address of buffering area valid data;
Detecting unit is used to detect the medium front end and whether arrives said precalculated position.
Method that the embodiment of the invention provides and scan controller calculate the initial address of valid data in the buffering area apace in scanning process or behind the end of scan; Thereby in follow-up reading of data process; Can be directly from the initial address reading of data of valid data; Such processing procedure elapsed time is short, and to the accurate positioning of valid data, helps satisfying the requirement of real time scan and real-time Data Transmission.
Description of drawings
Fig. 1 a is the sketch map of scanning process in the prior art;
Fig. 1 is the flow chart of a kind of scan method of providing of the embodiment of the invention one;
Fig. 2 is the sketch map of a kind of scanned medium passage in the embodiment of the invention;
Fig. 3 utilizes transducer to judge whether the medium front end arrives the method flow diagram into the paper end in the embodiment of the invention;
Fig. 4 a utilizes transducer to judge whether the medium front end arrives the method flow diagram in precalculated position in the embodiment of the invention;
Fig. 4 b utilizes transducer to judge whether the medium front end arrives the method flow diagram of paper delivery end in the embodiment of the invention;
The sketch map of a kind of state data memory when Fig. 5 is embodiment of the invention medium front end arrival precalculated position in the buffering area;
Fig. 6 is the flow chart of a kind of scan method of providing of the embodiment of the invention two;
Fig. 7 is the flow chart of a kind of scan method of providing of the embodiment of the invention three;
The sketch map of the another kind of state data memory when Fig. 8 is embodiment of the invention medium front end arrival precalculated position in the buffering area;
Fig. 9 is the flow chart that calculates a kind of method of valid data initial address in the embodiment of the invention three;
Figure 10 is the flow chart that calculates the another kind of method of valid data initial address in the embodiment of the invention three;
Figure 11 is the flow chart that calculates another method of valid data initial address in the embodiment of the invention three;
Figure 12 is the sketch map of a kind of scan controller of providing in the embodiment of the invention four.
Embodiment
The embodiment of the invention provides a kind of scan method and scan controller; This method and scan controller calculate the initial address of valid data in the buffering area apace in scanning process or behind the end of scan; Thereby in follow-up reading of data process, can be directly from the initial address reading of data of valid data, such processing procedure elapsed time is short; And, help satisfying the requirement of real time scan and real-time Data Transmission to the accurate positioning of valid data.
Below in conjunction with accompanying drawing the embodiment of the invention is described in detail.
Embodiment one
Fig. 1 shows the flow chart that embodiment one provides a kind of scan method, for convenience, please combine the sketch map of the scanned medium passage shown in Fig. 2; Among Fig. 2; Core component is a scanning device 201, and this scanning device 201 is used to accomplish the actual scanning work to medium 206, and scanning device 201 can be CIS (Contact Image Sensor; The contact-sensing device), CCD (Charge Coupled Device; Charge coupled device) wait other scanning devices, go into paper rubber roll 202 and paper delivery rubber roll 203 lay respectively near the paper end with the paper delivery end near, go into paper rubber roll 202 and paper delivery rubber roll 203 and be used for moving along direction of advance through self rotating band moving medium 206; Below for convenience; One end of the direction of advance of medium 206 is called medium front end 2061, go into paper rubber roll 202 and paper delivery rubber roll 203 near respectively place a transducer, be respectively into paper sensor 204 with go out paper sensor 205; The front and back position of each transducer and corresponding rubber roll relation can change according to actual needs, goes into paper sensor 204 and goes out paper sensor 205 and be used for judging respectively that whether medium front end 2061 go into paper end and paper delivery end to scanning means.
In the time period that begins from scanning device 201 to scan between the actual scanning area that arrives scanning devices 201 of medium 206; The scan-data that scanning device 201 scannings form should be invalid data; Possibly comprise 2 points in the reason that this invalid data produces; One of which hesitate because of the operator lets go or medium before the pause in the process of advancing of the medium front end that causes of stand in channel injustice; It is two owing to go between paper sensor 204 and the scanning device 201 to have certain distance; And scanning device 201 begins to scan that to arrive into paper sensor 204 places with the medium front end be starting point, so even if in medium 206 advances process, do not pause, arrive the scan-data that forms between scanning devices 201 places and also be invalid data from going into paper sensor 204 at medium 206.In a word, these invalid datas all are in the scanning process of medium front end one side, to form.In buffering area, the termination address at invalid data place is exactly the initial address of valid data, and the method that provides in the present embodiment can calculate the initial address of these valid data, thereby confirms valid data.
Please combine Fig. 1 and Fig. 2 simultaneously, the scan method that present embodiment provides comprises the steps:
Step S101: detect medium front end 2061 and whether arrive, if then execution in step S102 if deny, then returns execution in step S101 once more into the paper end;
Can detect through the state variation of going into paper sensor 204 for judging whether medium front end 2061 arrives into the paper end; For example; Fig. 3 shows a kind of concrete realization of step S101 when utilizing paper sensor 204 detection medium front ends 2061 whether to arrive into the paper end, comprising:
Step S1011: judge paper sensor 204 last detections and whether detected medium, if not, execution in step S1012 then is if then output medium front end 2061 arrives the judged result of paper end;
Step S1012: judge whether go into paper sensor 204 these detections has detected medium, if not, then output medium front end 2061 does not arrive the judged result of paper inlet, if then output medium front end 2061 arrives the judged result of paper end.
Through the method among Fig. 3, can learn, if go into result that paper sensor 204 detects by no paper to paper is arranged, just can draw the conclusion of medium front end 2061 arrival paper inlets; If the result who goes into paper sensor 204 detections, explains then that medium 206 through paper inlet, can begin scanning by paper being arranged to paper is arranged.
Step S102: medium 206 forward direction are advanced, and scanning device 201 begins scanning;
Step S103: a unit distance on the scanned medium 206 writes buffering area with the scan-data that forms;
The delegation that unit distance can be used always for those skilled in the art, i.e. " some row " in the line sweep of scanning resolution decision.
Step S104: judge whether medium front end 2061 arrives precalculated position A, if, execution in step S105 then; If deny, then execution in step S106.
Judge whether medium front end 2061 arrives precalculated position A and can accomplish by a transducer 207 that is placed on A place, precalculated position.In the present embodiment; Precalculated position A is positioned at the downstream of medium direction of advance scanning device 201; For example, precalculated position A can go out between paper sensor 205 positions and the scanning device 201, also can be positioned at the position of paper sensor 205 beyond the paper delivery direction; Can certainly be positioned on paper sensor 205 positions; At this moment, no longer need increase separately to be used for detecting the transducer 207 whether medium front end 2061 arrives A place, precalculated position, directly utilize out paper sensor 205 just can realize above-mentioned functions.
Shown in Fig. 4 a, judge whether medium front end 2061 arrives precalculated position A and specifically can be implemented as:
Step S1041: judge whether the last time has detected medium to transducer 207, if not, execution in step S1042 then, if, output judged result not then;
Step S1042: judge whether this has detected medium to transducer 207, if, then export the judged result that is, if not, then export judged result not.
Step S105: the current address P that writes of writing scan data.
As shown in Figure 2; In the embodiment of the invention, in the path that medium 206 advances, preestablish a position A, in scanning process; The scan-data that current scanning position when needing recording medium front end 2061 arrival precalculated position A forms writes the address in buffering area, be designated as P.
, also wants step S105 execution in step S106 after executing.
Step S106: judge whether the end of scan, if, then finish scanning and execution in step S108, if not, execution in step S107 then.
Wherein, judge whether that the end of scan can utilize out paper sensor 205 whether to detect medium 206 from having to nothing, for example, shown in Fig. 4 b, S106 specifically can comprise:
Step S1061: whether the last time has detected medium to judge paper sensor 205, if, execution in step S1062 then, if not, the unclosed judged result of output scanning then;
Step S1062: whether this has detected medium to judge paper sensor 205, if, the unclosed judged result of output scanning then, if not, the judged result that finishes of output scanning then.
Step S107: the medium scan unit distance that moves forward, and return execution in step S103.
Step S108: according to the distance L between precalculated position A and scanning device 201 positions; And the data volume y of the scan-data of the formation of the unit distance on the scanned medium 206, the data volume of valid data in buffering area during calculation medium front end 2061 arrival precalculated position A.
Current scanning position on the medium when medium front end 2061 arrival precalculated position A is designated as B.
Be not difficult to draw with reference to Fig. 2, the distance L between precalculated position A and scanning device 201 positions equals the distance between medium front end 2061 and the scanning position B.And in fact; The distance that the valid data amount of buffering area equals between medium front end 2061 and the scanning position B during medium front end 2061 arrival precalculated position A multiply by the scan data volume y that the unit distance on the scanned medium 206 forms; So the distance L that also equals between precalculated position A and scanning device 201 positions multiply by the scan data volume y that the unit distance on the scanned medium 206 forms, the data volume of valid data in the buffering area in the time of promptly can passing through L*y calculation medium front end 2061 arrival precalculated position A.Because the distance between precalculated position A and scanning device 201 positions is relatively easily measured, so when calculating the data volume of valid data, preferably utilize the distance between precalculated position A and scanning device 201 positions to calculate in the present embodiment.
In reality, when the memory location was represented with the address, data volume also can specifically adopt the length of storage or the relativity shift length of address pointer to represent usually.Data volume y is relevant with the resolution that scanning is set, because resolution has directly determined the data point of gathering on the unit distance also just to have determined the data volume that forms.
Step S109: the scan-data of this moment that obtains among the data volume of valid data and the step S105 during according to the medium front end that obtains among the step S108 2061 arrival precalculated position A write address P, calculate the initial address of valid data.
Because in the process of scanning, the initial address of valid data does not change in the buffering area, thus the initial address of valid data can be in whole scanning process any time calculate.In the method that present embodiment provides, utilize this buffer stores state constantly of medium front end 2061 arrival precalculated position A, calculate the initial address Pv of valid data.
The sketch map of a kind of state data memory when Fig. 5 shows medium front end 2061 arrival precalculated position A in the buffering area; In Fig. 5, the one section area stores in front is invalid data as indicated above in the buffering area, and the next-door neighbour's is valid data; The initial address of buffering area is designated as A0; Termination address is designated as A1, the delivery position of invalid data and valid data, and promptly the initial address of valid data is designated as Pv; Be not difficult to draw, the initial address Pv that calculates valid data can obtain by formula Pv=P-L*y.
In addition, the method that present embodiment provides can also comprise step S110 behind step S109, initial address extracted valid data from buffering area of the valid data that calculate according to step S109.
Like this, according to present embodiment, behind the end of scan; Can calculate the initial address of valid data in the buffering area fast, thereby when reading of data from buffering area, can directly valid data be taken out; Invalid data is abandoned; This method can be provided convenience for apace invalid data being disposed and read valid data, thereby with respect to prior art, the method that present embodiment provides can be confirmed valid data more quickly; Saved processing time, for real time scan and real-time Data Transmission provide precondition to invalid data.
Embodiment two
Present embodiment also provides a kind of scan method; Be with the difference of embodiment one; The process that to calculate the valid data initial position in the present embodiment is placed in the medium scanning process carries out; Can, medium carry out the step of calculating the valid data initial position when being scanned like this, thereby with respect to embodiment one; Time after the no longer independent busy scan of the process of calculating valid data initial address finishes in the scan method that present embodiment provides, real time scan when more helping multimedium continuous sweep and real-time Data Transmission.
Please combine Fig. 2 and Fig. 6, the scan method that present embodiment provides comprises:
Step S601: detect medium front end 2061 and whether arrive into the paper end, if, execution in step S602 then, if not, execution in step S601 once more then;
Similar with embodiment one, whether arrive also can utilize and accomplish for detecting medium front end 2061 in the present embodiment into paper sensor 204 into the paper end, detection method also can adopt like the step among Fig. 3 particularly, repeats no more here.
Step S602: medium 206 forward direction are advanced, and scanning device 201 begins scanning;
Step S603: a unit distance on the scanned medium 206 writes buffering area with the scan-data that forms;
The delegation that unit distance can be used always for those skilled in the art, i.e. " some row " in the line sweep of scanning resolution decision.
Step S604: judge whether medium front end 2061 arrives precalculated position A, if, execution in step S605 then; If deny, then execution in step S608.
Similar with embodiment one, judge whether medium front end 2061 arrives precalculated position A and also can accomplish by a transducer 207 that is placed on A place, precalculated position.
Precalculated position A can go out between paper sensor 205 positions and the scanning device 201; Also can be positioned at the position of paper sensor 205 beyond the paper delivery direction; Can certainly be positioned on paper sensor 205 positions; At this moment, no longer need increase separately to be used for detecting the transducer 207 whether medium front end 2061 arrives A place, precalculated position, directly utilize out paper sensor 205 just can realize above-mentioned functions.
Step S605: the current address P that writes of writing scan data;
Step S606: according to the distance L between precalculated position A and scanning device 201 positions; And the data volume y of the scan-data of the formation of the unit distance on the scanned medium 206, the data volume of valid data in buffering area during calculation medium front end 2061 arrival precalculated position A.
Step S607:, calculate the initial address of valid data according to the valid data amount that obtains among address P and the step S606 that writes that obtains among the step S605.
Wherein, the initial address Pv that calculates valid data can adopt formula Pv=P-L*y to obtain.
Step S608: judge whether the end of scan, if, then finish scanning, if not, execution in step S609 then: the medium scan unit distance that moves forward, and return execution in step S603.
Certainly, judge whether that the end of scan also can utilize out paper sensor 205 to carry out.
Finishing to comprise step S610 after the scanning: the initial address of the valid data that calculate according to step S607, extracted valid data from buffering area.
Need to prove that the sequencing of step S605 shown in Fig. 6 and step S606 can exchange, the execution sequence between the two does not constitute the restriction to embodiment of the invention flesh and blood.
In addition; In the technical scheme of foregoing description; Step S605, S606 and step S607 carry out when medium front end 2061 arrival precalculated position A; And in fact only obtain to write to carry out when address P need be limited to medium front end 2061 arrival precalculated position A among the S605 in steps, step S606 and step S607 are intermediate computations, the arbitrary scan after step S605 is carried out constantly according to actual needs.
The scan method that present embodiment provides has just realized the calculating of valid data initial positions in the process of scanning; Thereby can not take the over head time after this part medium scanning finishes with respect to prior art one; Thereby can directly begin to scan down a medium, more help real time scan and real-time Data Transmission.
Embodiment three
Specify present embodiment below in conjunction with Fig. 2 and Fig. 7.
Because invalid data has taken the space in the buffering area, has increased the data volume of scan-data, the dead time if medium advances in the process is long; Cause the data volume of scan-data also corresponding elongated; The data volume that then might appear at scan-data in the scanning process surpasses the capacity (size that perhaps is called buffering area) of buffering area, from the angle of data writing process, is exactly in scanning process; Scan-data write the tail end that the address has reached buffering area; Write pointer has arrived the last address of buffering area in other words, if write in proper order according to original rule continuation, will not have to be used between unnecessary buffer empty to store.And in fact; What store near one section space the initiating terminal of buffering area is the invalid data useless to the user; Therefore in order rationally to utilize buffering area; When scan-data is written to the tail end of buffering area, the initiating terminal of follow-up scan-data from buffering area begun to write, cover and be stored in the invalid data here originally.
Based on above-mentioned consideration, present embodiment provides a kind of scan method, and is as shown in Figure 7, and this method comprises:
Step S701: detect medium front end 2061 and whether arrive into the paper end, if, execution in step S702 then, if not, execution in step S701 once more then;
Similar with the embodiment of front, detect medium front end 2061 and whether arrive into the paper end and can accomplish through going into paper sensor 204, repeat no more here.
Step S702: medium 206 forward direction are advanced, and scanning device 201 begins scanning;
Step S703: a unit distance on the scanned medium 206 writes buffering area with the scan-data that forms;
Similar with the embodiment of front, the length of unit distance can be determined that for example this unit distance can be delegation by scanning resolution.
Step S704: that judges scan-data currently writes the tail end whether address arrives buffering area, if, execution in step S705 then; If deny, then execution in step S706;
Step S705: with the initiating terminal that the address moves on to buffering area that writes of scan-data;
Through the judgement among the step S704, can draw the tail end whether address has arrived buffering area that writes of scan-data, in reality, can detect the tail address whether write pointer arrives buffering area.Be not difficult to draw, for just arriving or also situation about not arriving also can state as: the memory capacity that surpasses buffering area from the data total amount that begins to scan the scan-data (comprising valid data and invalid data) that the current time forms.And follow-up scan-data is being continued to write later situation from the initiating terminal of buffering area; Be not difficult to draw; This situation also can be stated as: the memory capacity that has surpassed buffering area from the data total amount that begins to scan the scan-data that the current time forms; Here scan-data is except comprising the total amount of stored valid data and invalid data in the current whole buffering area, also is included in the data volume that was written to the invalid data that the valid data here cover afterwards of one section of the initiating terminal of buffering area.
Step S706: judge whether medium front end 2061 arrives precalculated position A, if, execution in step S707 then, if not, execution in step S710 then.
Similar with embodiment two; Judge whether medium front end 2061 arrives precalculated position A and can accomplish through near the transducer 207 that is placed in advance the A of position; Precalculated position A can go out between paper sensor 205 positions and the scanning device 201; Also can be positioned at the position of paper sensor 205 beyond the paper delivery direction, can certainly be positioned on paper sensor 205 positions, at this moment; No longer need increase separately to be used for detecting the transducer 207 whether medium front end 2061 arrives A place, precalculated position, directly utilize out paper sensor 205 just can realize above-mentioned functions.
Step S707: current the write address P of writing scan data in buffering area.
Wherein, Step S707 carries out when A place, medium front end 2061 arrival precalculated position; And shown in the position P among Fig. 5; This moment, the current scanning position on the medium was exactly like the position B on the medium among Fig. 3 206, and this moment current writes the address that writes that the address also is the scan-data that forms of the position B on the medium.
Step S708: according to the distance L between precalculated position A and scanning device 201 positions; And the data volume y of the scan-data of the formation of the unit distance on the scanned medium 206, the data volume of valid data in buffering area during calculation medium front end 2061 arrival precalculated position A.
Be not difficult to draw with reference to Fig. 3, the distance L between precalculated position A and scanning device 201 positions equals the distance between medium front end 2061 and the scanning position B.And in fact; The distance that the valid data amount of buffering area equals between medium front end 2061 and the scanning position B during medium front end 2061 arrival precalculated position A multiply by the scan data volume y that the unit distance on the scanned medium 206 forms, so the distance L that also equals between precalculated position A and scanning device 201 positions multiply by the scan data volume y that the unit distance on the scanned medium 206 forms.Because the distance between precalculated position A and scanning device 201 positions is relatively easily measured, so when calculating the data volume of valid data, preferably utilize the distance between precalculated position A and scanning device 201 positions to calculate in the present embodiment.
Step S709:, calculate the initial address of valid data according to the data volume that writes the valid data that obtain among address P and the step S708 that obtains among the step S707.
Because in the process of scanning, the initial address of valid data does not change in the buffering area, thus the initial address of valid data can whole scanning process in any time calculate.In the method that present embodiment provides, utilize this buffer stores state constantly of medium front end 2061 arrival precalculated position A, calculate the initial address Pv of valid data.
Because in the present embodiment; When the writing the address and arrive the tail end of buffering area of scan-data, the initiating terminal of follow-up scan-data from buffering area begun to write, so correspondingly; When calculation medium front end 2061 arrival precalculated position A; Also there are two kinds of situation in storage situation in the buffering area, and for both of these case, the concrete grammar that calculates the valid data initial address is also different.Two kinds of situation of above-mentioned buffer state are respectively: one of which, and the address that writes of scan-data never arrives the tail end A1 of buffering area and the situation that just arrives buffering area tail end A1, the buffer state shown in the corresponding diagram 5; Its two, scan-data write the address had moved to the initiating terminal A0 of buffering area from the tail end A1 of buffering area situation, the buffer state shown in the corresponding diagram 8.
As shown in Figure 5; In the moment of medium front end 2061 arrival precalculated position A; Scan-data write the tail end A1 that address P did not still arrive buffering area; So to buffering area tail end A1 between also have no scan-data write writing address P this moment, and for this moment scan-data write the situation that address P just arrives buffering area tail end A1, the P among Fig. 5 will overlap with A1 at this moment.Write address P not arrive buffering area tail end A1 no matter be; Still just arrive A1; Can obtain in conjunction with Fig. 5; The initial address Pv that calculates valid data can adopt formula Pv=P-L*y, and wherein P is the current address that writes of scan-data when medium front end 2061 arrival precalculated position A, and L*y equals the data volume of the valid data of this moment that step S708 calculates.
And scan-data write the address had moved to the initiating terminal of buffering area from the tail end of buffering area situation; As shown in Figure 8; The data volume of the valid data in the buffering area still is L*y at this moment; Only be respectively stored near the two ends of buffering area, the initial address Pv that calculate valid data this moment can adopt formula: Pv=P+ (A1-A0)-L*y, is not difficult to find out; (A1-A0)-and the data volume of existing invalid data in the corresponding current time buffering area of L*y, also be appreciated that data volume so calculate the formula of Pv into the existing invalid data of P+ buffering area.
Consideration based on two kinds of above-mentioned situation; In the present embodiment in the process of the initial address of calculating valid data; When needing at first to confirm medium front end 2061 arrival precalculated position A, the address that writes of scan-data is the tail end A1 that also do not arrive or just arrived buffering area (perhaps also can state as from beginning to scan the scan-data total amount that forms the medium front end 2061 arrival precalculated position A processes and surpass the capacity of buffering area); Still scan-data write the address had moved to buffering area from the tail end A1 of buffering area initial A0 (perhaps can state as: surpassed the capacity of buffering area) from beginning to scan the scan-data total amount that forms the medium front end 2061 arrival precalculated position A processes, adopt the corresponding calculated formula to calculate the initial address of valid data according to condition of different then.
If to write whether the address had moved to buffering area from the tail end of buffering area the initial storage condition of judging buffering area of bringing in, as shown in Figure 9, step S709 can comprise the steps: in detail
Step S70911: judge the address had moved to buffering area from the tail end of buffering area the initiating terminal that writes of scan-data in the medium front end 2061 arrival precalculated position A processes, if, execution in step S70912 then, if not, execution in step S70913 then.
Wherein, For judge scan-data write the address moved to the concrete realization of the initiating terminal of buffering area from the tail end of buffering area can be through a flag bit be set in advance; When the judged result among the step S704 when being; Then will change the content of this flag bit, and like this when execution in step S70911, whether change according to the content of this flag bit and just can learn writing the address and whether moving to initiating terminal of scan-data from the buffering area tail end.
Step S70912: utilize formula Pv=P+ (A1-A0)-L*y to calculate the initial address of valid data, the current address that writes of scan-data when wherein P is medium front end 2061 arrival precalculated position A.
Step S70913: utilize formula Pv=P-L*y to calculate the initial address of valid data.
If to arrive whether the scan-data total amount that forms the process of precalculated position has distinguished buffering area above the capacity of buffering area state from beginning to scan the medium front end, then shown in figure 10, step S709 can comprise the steps: in detail
Step S70921: judge from beginning to scan the medium front end to arrive the capacity whether the scan-data total amount that forms the A process of precalculated position has surpassed buffering area; If, execution in step S70922 then, if not, execution in step S70923 then.
Wherein, Judgement arrives the capacity whether the scan-data total amount that forms the A process of precalculated position surpassed buffering area and can specifically be embodied as from beginning to scan the medium front end: set one and be used for variable that the scan data volume that forms in the scanning process is counted; In scanning process; Total amount according to scan-data changes, and upgrades the numerical value of this variable, and the capacity of the numerical value of general's this variable this moment and buffering area compares and can realize above-mentioned purpose when execution in step S70291.
Step S70922: utilize formula Pv=P+ (A1-A0)-L*y to calculate the initial address of valid data.
Step S70923: utilize formula Pv=P-L*y to calculate the initial address of valid data.
In addition; Known physical quantity in the time of can also utilizing medium front end 2061 arrival precalculated position A about buffer state; Distinguish the state of buffering area, for example, can distinguish the state of buffering area according to the relation between the current initiating terminal A0 that writes valid data amount and buffering area in address P, this moment buffering area; Shown in figure 11, step S709 can specifically comprise the steps:
Step S70931: whether judge P-L*y less than A0, if, execution in step S70932 then, if not, execution in step S70933 then.
Be not difficult to draw, P-L*y is less than the address had moved to the initiating terminal of buffering area from the tail end of buffering area the situation that writes of scan-data in the corresponding medium front end of the A0 2061 arrival precalculated position A processes, and P-L*y is more than or equal to the situation of A0 respective opposite.
Step S70932: utilize formula Pv=P+ (A1-A0)-L*y to calculate the initial address of valid data.
Step S70933: utilize formula Pv=P-L*y to calculate the initial address of valid data.
Step S710: judge whether the end of scan, if, then finish scanning, if not, execution in step S711 then;
Step S711: the medium scan unit distance that moves forward, and return execution in step S703.
Wherein, judge whether that the end of scan can utilize out paper sensor 205 whether to detect medium from having to nothing.
After finishing scanning, can also execution in step S712: initial address extracted valid data from buffering area of the valid data that calculate according to step S709.
Need to prove that the sequencing of step S708 shown in Fig. 7 and step S709 can exchange, the execution sequence between the two does not constitute the restriction to embodiment of the invention flesh and blood.
In addition; In the present embodiment; Step S707, S708 and S709 carry out when medium front end 2061 arrival precalculated position A; Need when being limited to medium front end 2061 arrival precalculated position A, carry out and in fact only obtain to write address P among the S707 in steps, step S708 and step S709 are intermediate computations, thus step S708 and step S709 can be behind step S707, any time execution before the end of scan.Also can behind the end of scan, carry out.
To sum up, the scan method that present embodiment provides not only can be located valid data fast, and with respect to preceding several embodiment, can improve the utilance of buffering area.
Embodiment four
Present embodiment provides a kind of scan controller, and is shown in figure 12, and this scan controller 1200 comprises:
Control unit 1201 is used for the gated sweep device medium is scanned, and the current address that writes of recording medium front end scan-data when arriving the precalculated position, and above-mentioned precalculated position is positioned at the downstream of the said scanning device of medium direction of advance;
Data processing unit 1202; Be used for the current address that writes, confirm the initial address of valid data in the buffering area according to said precalculated position scan-data when the distance of scanning device, scan unit arrive the precalculated position apart from the data volume that produces and said medium front end.
Wherein, Data processing unit 1202 can comprise: valid data amount computing unit 12021; Be used for scan unit multiply by the distance of said precalculated position to scanning device apart from the data volume that produces the data volume of the valid data when obtaining the medium front end and arriving said precalculated position in the buffering area;
Valid data initial address computing unit 12022, when being used for arriving the precalculated position according to said medium front end scan-data current write the address and said this moment valid data data volume, calculate the initial address of valid data in the buffering area.
In addition, this device 1200 can also comprise detecting unit 1203, is used to detect the medium front end and whether arrives said precalculated position.
The above only is a preferred implementation of the present invention; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; Can also make some improvement and retouching, these improvement and retouching also should be regarded as protection scope of the present invention.

Claims (11)

1. scan method; It is characterized in that; Comprise: scanning device scans medium, and the scan-data that forms is write buffer area in proper order, when arriving the precalculated position by the sensor that is placed on the pre-position to the medium front end; Confirm the initial address of valid data in the buffering area, said precalculated position is positioned at the downstream of the said scanning device of medium direction of advance;
Specifically being embodied as of the initial address of said definite buffering area valid data:
A: the current address that writes of scan-data when the recording medium front end arrives the precalculated position;
B: the data volume of the valid data when the calculation medium front end arrives said precalculated position in the buffering area;
C: the initial address of calculating valid data in the buffering area.
2. method according to claim 1 also comprises: scan-data is being write in the process of buffering area, judging the tail end whether address arrives buffering area that writes of scan-data, if the initiating terminal of follow-up scan-data from buffering area begun to write.
3. method according to claim 1 is characterized in that, said step C specifically comprises:
When arriving the precalculated position by said medium front end scan-data current write the address and said this moment valid data data volume, calculate the initial address of valid data in the buffering area.
4. method according to claim 1 is characterized in that, calculates specifically being embodied as of data volume of valid data among the said step B:
Scan unit multiply by the distance of said precalculated position to scanning device apart from the data volume that produces, the data volume of the valid data when obtaining the medium front end and arriving said precalculated position in the buffering area.
5. method according to claim 3 is characterized in that, said step C comprises:
Judgement arrives in the time in precalculated position from beginning to scan the medium front end, scan-data write whether the address had moved on to buffering area from the tail end of buffering area initiating terminal, if, execution in step C1 then, if not, execution in step C2 then;
C1: scan-data current write the capacity that the address adds buffering area when said medium front end was arrived the precalculated position, deducted the data volume of valid data this moment again, obtained the initial address of valid data in the buffering area;
C2: scan-data current write the data volume that the address deducts said this moment of valid data when said medium front end was arrived the precalculated position, obtained the initial address of valid data in the buffering area.
6. method according to claim 2 is characterized in that, saidly judges writing the address and whether arriving specifically being embodied as of buffering area tail end of scan-data:
Judge that scan-data writes the address whether greater than the address of buffering area tail end.
7. method according to claim 5 is characterized in that, said judgement arrives in the time in precalculated position from beginning to scan the medium front end, and the initiating terminal whether address moved on to buffering area from the tail end of buffering area that writes of scan-data specifically is embodied as:
Judgement arrives the capacity whether the scan-data total amount that forms the process of precalculated position has surpassed buffering area from beginning to scan the medium front end.
8. method according to claim 5 is characterized in that, said judgement arrives in the time in precalculated position from beginning to scan the medium front end, and the initiating terminal whether address moved on to buffering area from the tail end of buffering area that writes of scan-data specifically is embodied as:
That judges scan-data when the medium front end arrives the precalculated position currently writes data volume that the address deducts valid data this moment whether less than the initiating terminal of buffering area.
9. according to any described method in the claim 1 to 8, it is characterized in that said method also comprises: the initial address according to the valid data in the said definite buffering area, read valid data from buffering area.
10. a scan controller is characterized in that, comprising:
Control unit is used for the gated sweep device medium is scanned, and the current address that writes of recording medium front end scan-data when arriving the precalculated position, and said precalculated position is positioned at the downstream of the said scanning device of medium direction of advance;
Data processing unit is used for confirming the initial address of buffering area valid data;
Specifically being embodied as of the initial address of said definite buffering area valid data:
A: the current address that writes of scan-data when the recording medium front end arrives the precalculated position;
B: the data volume of the valid data when the calculation medium front end arrives said precalculated position in the buffering area;
C: the initial address of calculating valid data in the buffering area;
Detecting unit is used for whether arriving said precalculated position by the sensor medium front end that is placed on the pre-position.
11. scan controller according to claim 10 is characterized in that, said data processing unit comprises:
Valid data amount computing unit is used for scan unit multiply by the distance of said precalculated position to scanning device apart from the data volume that produces, the data volume of the valid data when obtaining the medium front end and arriving said precalculated position in the buffering area;
Valid data initial address computing unit, when being used for arriving the precalculated position according to said medium front end scan-data current write the address and said this moment valid data data volume, calculate the initial address of valid data in the buffering area.
CN2009101183013A 2009-02-25 2009-02-25 Scanning method and scanning control device Active CN101815155B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101183013A CN101815155B (en) 2009-02-25 2009-02-25 Scanning method and scanning control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101183013A CN101815155B (en) 2009-02-25 2009-02-25 Scanning method and scanning control device

Publications (2)

Publication Number Publication Date
CN101815155A CN101815155A (en) 2010-08-25
CN101815155B true CN101815155B (en) 2012-03-28

Family

ID=42622268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101183013A Active CN101815155B (en) 2009-02-25 2009-02-25 Scanning method and scanning control device

Country Status (1)

Country Link
CN (1) CN101815155B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102768237B (en) * 2011-04-30 2016-04-06 深圳光启高等理工研究院 A kind of scan method of three-dimensional near-field vector and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6046828A (en) * 1997-03-06 2000-04-04 Xerox Corporation Method and system for automatically detecting an edge and width of a document utilizing a scanning system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6046828A (en) * 1997-03-06 2000-04-04 Xerox Corporation Method and system for automatically detecting an edge and width of a document utilizing a scanning system

Also Published As

Publication number Publication date
CN101815155A (en) 2010-08-25

Similar Documents

Publication Publication Date Title
US20120251288A1 (en) Feeder, feeding method, and image forming apparatus
CN101402290B (en) Image forming apparatus and image forming method
CN103297644A (en) Operation display device
CN103896089A (en) Medium overlapping detection method and medium treatment device
CN101815155B (en) Scanning method and scanning control device
KR100623946B1 (en) Paper discriminator
EP0705021B1 (en) Copying machine
CN102405637B (en) Device and method for scanning large-format documents
JP4577407B2 (en) Image forming apparatus and image forming system
JP2006323352A (en) Image forming apparatus and program for controlling image forming apparatus
JP4858696B2 (en) Image forming apparatus
US7102766B2 (en) Image forming apparatus which controls image forming conditions for a recording material that is wider than standard-size recording material based on input size information
US20070122057A1 (en) Method of scanning an image using surface coordinate values and device using thereof
CN113256876B (en) Method and device for controlling sheet medium transmission, self-service equipment and storage medium
JP3475693B2 (en) Conveyance sheet width measuring device and width measuring method
JPH06176147A (en) Method and device for detecting end point of object
KR101123689B1 (en) Apparatus for calculating margin of printing paper and method of the same
EP0969652A2 (en) Image reading apparatus, information processing method, and storage medium
JP4689757B2 (en) Printing device
JP2608943B2 (en) Optical mark reading method
JPS62234461A (en) Portable picture reader
JP3576610B2 (en) Electronic file device
JP3040420B2 (en) Recording device
JPH0581466A (en) Small-sized visiting card controller and image reading method
Laflin Input and analysis of profiles using a microcomputer

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