A method for eliminating chromatic aberration caused by an imaging environment, wherein the method can eliminate errors resulting from environmental factors or human factors and comprises the steps of:
- (1) setting an image capture range, wherein a distance between an image capture device and a chromatic aberration calibration device and an angle of the image capture device with respect to the chromatic aberration calibration device are calibrated according to a plurality of positioning points provided on the chromatic aberration calibration device;
- (2) capturing images, wherein the image capture device repeatedly captures images of the image capture range of the chromatic aberration calibration device so as to obtain pixel RGB values of a plurality of same positions in the images;
- (3) converting color spaces, wherein the pixel RGB values of the plurality of same positions in the images are converted by a set of color conversion equations into values of a Lab color space;
- (4) calculating an average chromatic length, wherein a chromatic length ΔE of each said position is determined by the following equation:
- ΔE=√{square root over ((L−L0)2+(a−a0)2+(b−b0)2)}{square root over ((L−L0)2+(a−a0)2+(b−b0)2)}{square root over ((L−L0)2+(a−a0)2+(b−b0)2)},
- where (L0,a0,b0) is a set of reference values, and (L,a,b) represents the values of the Lab color space obtained from the step (3), the chromatic lengths ΔE of the plurality of same positions being summed and averaged to produce the average chromatic length ΔE of the images, in which the average chromatic length ΔE must be smaller than or equal to four to be acceptable;
- (5) calculating an evaluation value X by the following equation:
- X
- =
- A
-
-
- σ
- 4
- ×
- 100
-
- %
- ,
- where σ2=σ12+σ22, σ2 is a total variance, σ12 is a variance caused by the environmental factors, σ22 is a variance caused by the human factors, and A is a yield control constant ranging from 1 to 7, in which the higher the evaluation value X is, the greater the impacts of the environmental factors and the human factors are;
- and
- (6) determining influence of the variances, wherein if the evaluation value X is smaller than or equal to 10%, the errors resulting from the environmental factors or the human factors have been eliminated, and if the evaluation value X is greater than 10%, the image capture range must be reset.