Background technology
In the epoch now that development in science and technology is maked rapid progress, scanner (scanner) has become part indispensable in modern's daily life.The user can utilize scanner scans contribution or the pattern that is connected with computer, and the image that scanner extracted is stored in the hard disk of computer, with the usefulness as backup.Even the user also can utilize in the computer institute's installed software to come process scanned images, and is to improve scanning quality, really convenient.
Before scanner dispatches from the factory, the tester must do the performance test of some to scanner, for example the tester will test each scanner in the redness (red that scans the scan image that is produced behind the complete white map, R), green (green, G) and blue (blue, B) whether chromatic value has consistency (uniformity).If when not having consistency, scanner must carry out correct operation, R, G and the B chromatic value of the scan image that is produced behind the feasible scanner scans that the was corrected one complete white map will have consistency.
When test, at first, the tester utilizes a computer software and graticule (grid chart) scan image to be divided into the image block of 9 five equilibriums.The size of supposing scan image is (9000 pixel) * (9000 pixel), and then the size of image block is (3000 pixel) * (3000 pixel).Then, tester's any frame in each image block selects a size to be the block inside casing of (5 pixel) * (5 pixel).Then, detect to obtain R, G and the B chromatic value of each block inside casing, and each block inside casing R, G and B chromatic value just to be used as be R, G and the B chromatic value of each image block.So, all have the data of 27 groups of chromatic values.Then, the tester writes down R, G and the B chromatic value of each image block.The data of pending these R, G and B chromatic value just can judge whether the chromatic value of scan image has consistency.
Yet above-mentioned method of testing has several shortcomings, and is as described below:
1. selection range need lean on the tester manually to come record.
2. the test process complexity is loaded down with trivial details.
3. the tester tests the position difference of sampling at every turn, and test result is also different.
Summary of the invention
In view of this, purpose of the present invention is exactly the conforming method of testing at the chromatic value that a kind of scan image is provided, behind automatic searching reference zone.Utilize at least one algorithm to handle the chromatic value of each reference zone again, to carry out the conforming judgement of scan image chromatic value.Like this, the tester does not need to go manually record and test as former the sort of test mode, and mode of operation is simple and easy many, also can avoid because of the different problem of the test result that difference caused of sampling point.
According to purpose of the present invention, a kind of conforming method of testing of chromatic value of scan image is proposed, be used for the scan image that is produced behind the one scan one complete white map.At first, input one is cut apart columns value and and is cut apart the line number value, and its value is respectively M and N, makes scan image be divided into M * N image block.Then, calculate the pairing block average chrominance value of each image block of acquisition.Then, utilize at least one algorithm to handle these block average chrominance values, with the conforming judgement of the chromatic value that carries out scan image.
According to purpose of the present invention, reintroduce a kind of conforming method of testing of chromatic value of scan image, be used for the scan image that produced behind the complete white map of one scan one, the size of this scan image is (A pixel) * (B) pixel.At first, input one is cut apart columns value and and is cut apart the line number value, and its value is respectively M and N, makes scan image be divided into M * N image block, and the size of each image block is (A/M pixel) * (a B/N pixel).Then, import a horizontal partition pixel value and and vertically cut apart pixel value, its value is respectively H and V, makes each image block be split into (A/M/H) * (B/N/V) individual block inside casing.Then, calculate and obtain the pairing R chromatic value of each block inside casing, a G chromatic value and a B chromatic value, and calculate to obtain these R, the G of each image block and the mean value of B chromatic value respectively, with respectively as the pairing Zone R piece average chrominance value of each image block, a G block average chrominance value and a B block average chrominance value.Then, utilize at least one algorithm to handle these R, G and B block average chrominance value, with the R, the G that carry out scan image and the conforming judgement of B chromatic value.
According to purpose of the present invention, a kind of conforming method of testing of chromatic value of scan image is also proposed, be used for the scan image that produced behind the complete white map of one scan one, the size of scan image is (A pixel) * (B) pixel.At first, input one is cut apart columns value and and is cut apart the line number value, and its value is respectively M and N, makes scan image be divided into M * N image block, and the size of each image block is (A/M pixel) * (a B/N pixel), and each image block has (A/M) * (B/N) individual parent map picture point.Then, calculate the pairing R chromatic value of each parent map picture point of acquisition, a G chromatic value and a B chromatic value.Then, take out these R, G and B chromatic value respectively greater than a default screening value, and calculate to obtain these R, the G that are removed in each image block and the mean value of B chromatic value respectively, with as the pairing Zone R piece average chrominance value of each image block, a G block average chrominance value and a B block average chrominance value.Then, utilize at least one algorithm to handle these R, G and B block average chrominance value, with the R, the G that carry out scan image and the conforming judgement of B chromatic value.
For above-mentioned purpose of the present invention, feature and advantage can be become apparent, a preferred embodiment cited below particularly, and conjunction with figs. are described in detail as follows.
Embodiment
The present invention designs the conforming method of testing of the chromatic value of one scan image especially, behind automatic searching reference zone, utilizes at least one algorithm to handle the chromatic value of each reference zone again, to carry out the conforming judgement of scan image chromatic value.Like this, the tester does not need to go manually record and test as former the sort of test mode, and mode of operation is simple and easy many, also can avoid because of the different problem of the test result that difference caused of sampling point.Practical ranges as for the conforming method of testing of the chromatic value of scan image of the present invention will be as follows with embodiment one and embodiment two description of drawings respectively.
Embodiment one
Please refer to Fig. 1, its expression is according to the conforming method of testing flow chart of the chromatic value of the scan image of embodiments of the invention one.In Fig. 1, at first, in step 102, scanning one complete white map.Then, carry out step 104, obtain the one scan image.Wherein, the size of scan image is (A pixel) * (a B pixel), and A and B are positive integers and can equate.Suppose A=B=2000, then the size of scan image is (2000 pixel) * (2000 pixel).
Then, enter in the step 106, the user utilizes computer software input one to cut apart columns value (columns) and to cut apart line number value (rows), and its value is respectively M and N.Make scan image be divided into M * N block of pixels, and the size of each image block is (A/M pixel) * (a B/N pixel).Wherein, M and N are positive integers and can are equal.Suppose M=N=4, then scan image is divided into 16 image block, and the size of each image block is (500 pixel) * (500 pixel).
Then, enter in the step 108, the user utilizes a computer software to import a horizontal partition pixel value and vertically to cut apart pixel value, and its value is respectively H and V, makes each image block be split into (A/M/H) * (B/N/V) individual block inside casing.Wherein, H and V are positive integers and can are equal.Suppose H=V=5, then each image block is split into 10000 block inside casings, and the size of each block inside casing is (5 pixel) * (5 pixel).
Then, enter in the step 110, calculate and obtain the pairing chromatic value of each block inside casing, at this moment, do not need personnel manually to write down the data of chromatic value, give computer software fully and go to handle.Wherein, chromatic value includes R chromatic value, G chromatic value, B chromatic value, and for example present embodiment can obtain the data of the data of 10000 groups of R chromatic values, 10000 groups of G chromatic values and the data of 10000 groups of B chromatic values.Then, enter in the step 112, calculate the mean value of these chromatic values that obtain each image block,, can avoid because of the different problem of the test result that difference caused of sampling point with as the pairing block average chrominance value of each image block.Wherein, block average chrominance value includes Zone R piece average chrominance value, G block average chrominance value, B block average chrominance value.For example present embodiment can obtain the data of the data of 16 groups of Zone R piece average chrominance values, 16 groups of G block average chrominance values and the data of 16 groups of B block average chrominance values.
Then, enter in the step 114, utilize at least one algorithm to handle these R, G and B block average chrominance value, with the R, the G that carry out scan image and the conforming judgement of B chromatic value.If meet consistency, this method comes to an end eventually.Kind as for algorithm is a lot, and all suitable any algorithms of the present invention connect and can be used.For instance, the present invention proposes four kinds of algorithms to explain at this, and its flow process is as described below respectively:
(1) at first, calculate respectively acquisition R, G and B block average chrominance and be worth a pairing R standard deviation, a G standard deviation and a B standard deviation.Then, whether judge R, G and B standard deviation respectively, if the R of scan image, G and B chromatic value have consistency less than the reference gauge scale value.
(2) at first, the size that compares these R, G and B block average chrominance value respectively is to take out a maximum Zone R piece average chrominance value and a minimum Zone R piece average chrominance value, a maximum G block average chrominance value and a minimum G block average chrominance value, a maximum B block average chrominance value and a minimum B block average chrominance value respectively.Then, whether the value of the value of the value of judgement [mean values of (maximum Zone R piece average chrominance value-minimum Zone R piece average chrominance value)/these Zone R piece average chrominance values], [mean values of (maximum G block average chrominance value-minimum G block average chrominance value)/these G block average chrominance values] and [mean values of (maximum B block average chrominance value-minimum B block average chrominance value)/these B block average chrominance values] is less than a reference gauge scale value respectively, if the R of this scan image, G and B chromatic value have consistency.
(3) at first, calculate the difference between the mean value of each R, G and B block average chrominance value and these R, G and B block average chrominance value respectively, to take out a maximum R colourity difference, a maximum G colourity difference and a maximum B colourity difference respectively.Then, whether the value of the value of the value of judgement [mean values of (mean value of these Zone R piece average chrominance values-maximum R colourity difference)/these Zone R piece average chrominance values], [mean values of (mean value of these G block average chrominance values-maximum G colourity difference)/these G block average chrominance values] and [mean values of (mean value of these B block average chrominance values-maximum B colourity difference)/these B block average chrominance values] is less than a reference gauge scale value respectively, if the R of this scan image, G and B chromatic value have consistency.
(4) at first, the size that compares these R, G and B block average chrominance value respectively is to take out a maximum Zone R piece average chrominance value and a minimum Zone R piece average chrominance value, a maximum G block average chrominance value and a minimum G block average chrominance value, a maximum B block average chrominance value and a minimum B block average chrominance value respectively.Then, whether the value of the value of the value of judgement (maximum Zone R piece average chrominance value-minimum Zone R piece average chrominance value), (maximum G block average chrominance value-minimum G block average chrominance value) and (maximum B block average chrominance value-minimum B block average chrominance value) is less than a reference gauge scale value respectively, if the R of scan image, G and B chromatic value have consistency.
Embodiment two
Please refer to Fig. 2, its expression is according to the conforming method of testing flow chart of the chromatic value of the scan image of embodiments of the invention two.In Fig. 2, at first, in step 202, scanning one complete white map.Then, enter in the step 204, obtain the one scan image.Wherein, the size of scan image is (A pixel) * (a B pixel), and A and B are positive integers and can equate.Suppose A=B=2000, then the size of scan image is (2000 pixel) * (2000 pixel).
Then, enter in the step 206, the user utilizes computer software input one to cut apart columns value (columns) and to cut apart line number value (rows), and its value is respectively M and N.Make scan image be divided into M * N block of pixels, and the size of each image block is (A/M pixel) * (a B/N pixel).Wherein, M and N are positive integers and can are equal.Suppose M=N=4, then scan image is divided into 16 image block, and the size of each image block is (500 pixel) * (500 pixel).The size of supposing a parent map picture point is (1 pixel) * (1 pixel), and then each image block has (A/M) * (B/N) individual parent map picture point, 500 * 500=250000 as shown in this embodiment parent map picture point.
Then, enter in the step 208, calculate and obtain the pairing chromatic value of each parent map picture point, at this moment, do not need personnel manually to write down the data of chromatic value, give computer software fully and go to handle.Wherein, chromatic value comprises R, G chromatic value and B chromatic value.Then, carry out step 210, take out these R, G and B chromatic value, can avoid because of the different problem of the test result that difference caused of sampling point like this greater than a default screening value (threshold value).With 8 (bit), general color has 256 chromatic values, and chromatic value is 0~127 color deflection black, and chromatic value is 128~255 color deflection white.Because this scan image is to obtain via scanning one complete white map, so present embodiment can be set 150 and be default screening value, just takes out the chromatic value greater than 150, its color is deflection white.And, filtering other substandard chromatic values, its color is partial to black.It is certainly, default that the screening value can elasticity be set according to the dispatching from the factory specification of scanner.
Then, enter in the step 212, calculate to obtain the mean value of these chromatic values that are removed in each image block, with as the pairing block average chrominance value of each image block.Wherein, block average chrominance value includes Zone R piece average chrominance value, G block average chrominance value, B block average chrominance value.Then, enter in the step 214, utilize at least one algorithm to handle these R, G and B block average chrominance value, with the R, the G that carry out scan image and the conforming judgement of B chromatic value.If meet consistency, this method comes to an end eventually.Wherein, the algorithm of present embodiment is identical with the algorithm of embodiment two, omits at this and introduces and repeat no more.
The conforming method of testing of the chromatic value of the disclosed scan image of the above embodiment of the present invention has following advantage:
1. do not need to rely on tester manually record and test.
2. operate simple and easy.
3. avoid because of the different problem of the test result that difference caused of sampling point.
In sum; though the present invention with a preferred embodiment openly as above; right its is not in order to limit the present invention; any those skilled in the art; under the situation that does not break away from the spirit and scope of the present invention; can carry out various changes and modification, so protection scope of the present invention is as the criterion with claims institute restricted portion that is proposed.