# Patent

## Title
Repeatedly sampling method for image scanning

## Abstract

The present disclosure provides a repeated sampling method for image scanning. In one or more embodiments, the sampling method may comprise a sample treatment procedure for the data of an image scanning device during the scanning of an image. The method may comprise sampling, sorting, eliminating one or more group-departing values, and getting a mean value, etc. The sampling procedure may involve scanning a single point of the image several times to produce several sets of sampling values. The sorting procedure may involve sorting the several sets of sampling values after being sampled according to their magnitude. The eliminating group-departing values procedure may involve obtaining the relatively larger values and relatively smaller values from the several sets of sampling values after being sorted. The getting mean value procedure may involve obtaining a mean value from the several sets of sampling values. By applying the repeated sampling method the error of data pick-up during the procedure of scanning may be reduced.

## Background
FIELD OF THE INVENTION
The present invention is a repeatedly sampling method for image scanning, especially to a data sampling method proceeded for the data sampling procedure of image scanning in an image scanning device through the procedures of sampling, sorting, eliminating group-departing value, and getting mean value, etc.
BACKGROUND OF THE INVENTION
Accordingly, the method of image pick-up by a scanner in the traditional manner has already been well known to the general business widely. The typically picked up image is stored in the memory by the manner of a digital formation of image element data array. The common types of scanner include: the roller scanner, the flatbed scanner, the two-dimensional scanner, and the palm scanner, etc. For any kind of above-mentioned scanners, it always proceeds a picking-up motion of scanned data on the image.
During the common procedure of scanning by a scanner on a specific image to be scanned, every single point constituting the image that may be constituted by extremely many single points, may be scanned by the scanner, but usually the response of the darker part of an image is smaller, so it may easily be interfered with by noises. The originally unnecessary noises may be generated during the scanning procedure. The scanning quality of the entire image may therefore be influenced.
Since the noise is unpredictable and its occurrence is out of expectation, so it usually depends on the software design of a scanner to improve the performance and overcome the problems created by the poor quality of the manuscript. In general, it is impossible to require the manuscript image to maintain an extremely high quality. Further, the design quality of the scanner itself is also a main factor of influencing the scanning quality. Therefore, it often occurs the situations that the obtained data has too large difference from the reasonable data or the data after being scanned has great deviation from the original image. Thus, how to solve this kind of problem has become the most important topics nowadays.
SUMMARY OF THE INVENTION
The present invention is a further improvement to solve the above-mentioned shortcomings generated by the prior arts. The invention expects to eliminate too much noise interference to further promote the quality of the scanned image to reach the optimal level that the scanned image is almost close to the original image. Thus, the main object of the invention is to proceed a repeated sampling on a specific point in the image and further to sort, eliminate group-departing value, and also get mean value of the sampling data in expectation to get the optimal quality of scanned image that is most close to the original image.
In an embodiment the scanning procedure may comprise sampling, sorting, eliminating one or more group-departing values, and getting a mean value, etc. The sampling procedure may involve scanning a single point of the image several times to produce several sets of sampling values. The sorting procedure may involve sorting the several sets of sampling values after being sampled according to their relative magnitudes. The eliminating group-departing values procedure may involve obtaining the relatively larger values and relatively smaller values from the several sets of sampling values after being sorted. The getting mean value procedure gets a mean value from the several sets of sampling values and the mean value may be obtained as the following up treatment of the image scanning on the single point.
A characteristic of an embodiment is to store the result in a buffer or a memory or relative storing devices after the mean value is obtained.
Another characteristic of the invention is, when applying scanning on a single point, to take the procedures of sampling, sorting, eliminating group-departing value, and getting a mean value on every four points as a cycle and execute them repeatedly and finally a last mean value is again gotten from each mean value for being provided for the treatment of the following up action.



BRIEF DESCRIPTION OF DRAWINGS
FIG. 1 is a flowchart diagram of an embodiment.
FIG. 2 is a flowchart diagram of an embodiment, wherein a single point of an image may be sampled four times.
FIG. 3 is a flowchart diagram of an embodiment, wherein a single point of an image may be sampled eight times.
FIG. 4 is a flowchart diagram of an embodiment, wherein a single point of an image may be sampled sixteen times.



DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
The present invention discloses a repeatedly sampling method for image scanning. It may be applied in a data sampling procedure proceeded by an image-scanning device during a scanning of image. For example, in the scanning procedure of a scanner applied on a manuscript to be scanned, after the scanner has scanned every point constituted the image, the procedures of repeated sampling and relative treatments are also made.
Please refer to FIG. 1, which is a flowchart diagram of an embodiment.
The operations shown in FIG. 1 are as follows:

    
    
        a. repeatedly sample 20;
        b. sort 21;
        c. eliminate group-departing value 22;
        d. get mean value 23.
    
    


Wherein, the repeated sample 20 as described in “a” is to repeatedly scann a specific single point of an image to be scanned. After the scanning, several sets of sampling values may be obtained from a single point. This is repeatedly sampling 20 in FIG. 1. After the several sets of sampling values are obtained, sort 21 may be accomplished on the several sets of sampling values.
The sort 21 as described in “b” is to relatively sort the several sets of sampling values obtained from the repeated sampling according to the magnitude of their values, and wherein the sorting sequence may be arranged from a relatively small value to a relatively large value, or from a relatively large value to a relatively small value.
The eliminate group-departing value 22 as described in “c” is to proceed the motion of eliminating several sets of sampling values for the several sets of sampling values after being sorted; namely, the relatively larger values and relatively smaller values are eliminated from the several sets of sampling values after being sorted.
The get mean value 23 as described in “d” is to pick up a mean value from the several sets of sampling values after the eliminate group-departing value 22, and the mean value is then the data of treatment in the follow up procedure of treatment after the single point pick-up completed by the scanner, and wherein the obtained mean value is temporarily stored in a buffer for the follow up treatment.
When eliminating one or more group-departing values, a middle value may be found from the several sets of sampling values and a deviation of specific range is set up on the basis of the middle value, and any value exceeding this deviation range may then be given up, and other values within the range of this deviation may be retained, and getting mean value is again accomplished afterwards.
Or, when eliminating the group-departing value, by relatively comparing the several sets of sampling value, the largest and smallest values are given up constantly, or the relatively larger value and relatively smaller value are given up from the several sets.
In the repeated sampling, the single point is proceeded by the repeated scanning and sampling for collecting more data from the single point to avoid the errors generated from getting data from the single point due to the influence of noises or random noises. Furthermore, after getting the several sets of sampling values, a set of data that is closer to the original image may be selected, so in this embodiment, a last mean value that is gotten out from the several sets of sampling values is the data closer to the original image.
Further, the method described in FIG. 1 is not restricted to only one time. It may also be executed many times; namely the method described in this preferable embodiment may be proceeded one time or further more times on a single point.
The device for storing the mean value is not restricted to the buffer. Any device capable of storing data may be available to the design. For example, the mean value may also be stored in a memory or a register. When storing in the memory, each mean value may be stored in different positions.
Please refer to FIG. 2, which is an embodiment, wherein a single point of an image is being sampled four times. As shown in FIG. 2, a single point of an image is sampled four times at 40. For example, the obtained four sets of sampling values are 36, 35, 39, 31 respectively; further through sorting 41, the four sets of sampling values are sorted according to their magnitudes, and the result after sorting is (31, 35, 36, 39); again through the motion of eliminating one or more group-departing values the first set of sampling value 31 and the fourth set of sampling value 39 are given up; namely, at 42 second set and third set of sampling values are retained, and the second set of sampling value is 35, and the third set of sampling value is 36; further at 43, a mean value is taken from the second set of sampling value 35 and the third set of sampling value 36, and therefore the mean value is (35+36)/2=35.5.
Please refer to FIG. 3, which is an embodiment, wherein a single point of an image is being sampled eight times. If 40a through 43a shown in FIG. 3 are same as 40 through 43 exemplified in FIG. 2, then storing the first mean value is further added and the obtained mean value 37.5 is stored in a buffer (not shown in the figures).
Further, 40b through 43b are accomplished. For example, the second term for sampling the single point is still four times. Through the 40b sampling on the single point is applied four times, the obtained four sets of sampling values are 34, 36, 32, 38 respectively; further through sorting, at 41b, the four sets of sampling values are sorted according to their magnitudes, and the result after sorting is (32, 34, 36, 38); again through the motion of eliminating one or more group-departing values the first set of sampling value 32 and the fourth set of sampling value 38 are given up; namely, at 42b, second set and third set of sampling values are retained, and the second set of sampling value is 34, and the third set of sampling value is 36; further at 43b, a mean value is taken from the second set of sampling value 34 and the third set of sampling value 36, and therefore a mean value (35+36)/2=35.5 is obtained.
Storing the second mean value is accomplished. The mean value 35 is stored in a buffer (not shown in the figure). At this time, 46 a mean value from the two mean values is obtained. Therefore, the obtained mean value is (35+35.5)/2=35.24.
Please refer to FIG. 4, which is an embodiment wherein a single point of an image is being sampled sixteen times. If 40a through 43a, 40b through 43b shown in FIG. 4 are same as those in FIG. 3 and the third mean value gotten from 40c through 43c is 36, and the fourth mean value obtained from 40d through 43d is 34.5, then the four mean values (35, 35.5, 36, 34.5) are stored in the buffer respectively at 44 45 47, here storing mean value. At this time, at 49, a mean value from the first through fourth mean values is obtained, and the final mean value is (35+35.5+36+34.5)/4=35.25.
Or, a mean value is first taken from (35, 35.5), i.e., (35+35.5)/2=35.25; a mean value is further taken from (36, 34.5), i.e., (36+34.5)=35.24; next, a mean value further taken from (35.25, 35.25) is still 35.25. This result is still same as that of the previous method. The difference is that the previous method takes more buffering memory and the requirement of buffering memory in this method is less.
Through the description of above-mentioned embodiments, the method provided may effectively promote the quality of image scanning, and through the design of scanning times, for example, the method of sampling, sorting, further getting mean values may reduce the usage of space in buffering memory. In the described embodiments, the sampling times on a specific single point or the implemented times according to the method disclosed are not restricted because of the description in the embodiments. Actually, the user may make appropriate design and application according to the actual situation.

## Claims

1. A repeated sampling method for image scanning, which is a sample treatment procedure proceeded for data of an image scanning device during scanning of an image, said method comprising:
sampling, several times a single point of the image to produce several sets of sampling values;
sorting, the several sets of sampling values after being sampled according to their magnitudes;
eliminating one or more group-departing values, to obtain a relatively larger value and a relatively smaller value from the several sets of sampling values after being sorted; and
obtaining a mean value from the several sets of sampling values.

2. A repeated sampling method for image scanning according to claim 1, wherein said eliminating one or more group-departing value is executed as follows: a middle value is found out from the several sets of sampling values and a deviation of a specific range is set up on the baseis of the middle value, the one or more sampling values exceeding the deviation range eliminated, and the one or more sampling values within the deyiation range are retained.

3. A repeated sampling method for image scanning according to claim 1, wherein the result is stored in a buffer after obtaining a mean value.

4. A repeated sampling method for image scanning according to claim 3, wherein said buffer replaced is with a memory.

5. A repeated sampling method for image scanning according to claim 1, wherein the method is executed many times, and the results are stored in a buffer respectively after each time of obtaining a mean value, and a mean value is again taken from the values that are stored in the buffer.

6. A repeated sampling method for image scanning according to claim 1, wherein the method is executed multiple times, and the results may be stored in a memory respectively after each time of a mean value is obtained, and a mean value is again taken from the values that are stored in the memory.

7. A repeated sampling method for image scanning according to claim 1, wherein the number of times the single point is scanned comprises four times.

8. A repeated sampling method for image scanning according to claim 1, wherein the number of times the single point is scanned comprises eight times, and wherein a first mean value is taken from the first time through fourth time, a second mean value is taken from the fifth time through eighth time, a third mean value is taken from the first mean value and second mean value, and the third mean value is obtained as a following up treatment of the single point by the image scanning device.

9. A repeated sampling method for image scanmng according to claim 1, wherein the number of times the single point is scanned comprises sixteen times, and wherein a first mean value is taken from the first time through fourth time, a second mean value is taken from the fifth time through eighth time, a third mean value is taken from the ninth time through twelfth time, a fourth mean value is taken from the thirteenth time through sixteenth time, a fifth mean value is taken from the first mean value, second mean value, third mean value, and fourth mean value, and the fifth mean value is obtained as a following up treatment of the single point by the image scanning device.

10. A repeated sampling method for image scanmng according to claim 1, wherein the number of times of sampling on the single point is scanned comprises sixteen times, and wherein a first mean value is taken from the first time through fourth time, a second mean value is taken from the fifth time through eighth time, a third mean value is taken from the first mean value and second mean value; a fourth mean value is taken from the ninth time through twelfth time, a fifth mean value is taken from the thirteenth time through sixteenth time, a sixth mean value is taken from the fourth mean value and fifth mean value; a seventh mean value is further taken from the third mean value and sixth mean value, and the seventh mean value is obtained as a following up treatment of the single point by the image scanning device.