The Development of Color Constancy and Calibration System
The Development of Color Constancy and Calibration System
LabVIEW CCD BMP ii
Abstract The modern technologies develop more and more faster, and the medical devices and skills become more and more better. The computerized tongue examination system is one of the examples. It can diagnose the health conditions of a patient by analyzing the color and certain properties of his tongue. However, there are some problems need to be solved. How to measure the color correctly becomes very important due to the color is a basis for the diagnostic. If the error of color is over the range, the system will give us a wrong answer. In other words, as if the system can measure the color correctly that decides how good the system is. The main purpose of this project is to solve the problem of color calibration. LabVIEW was chosen as the developing programming language to build the workspace. The task includes to find the transfer matrix and to revise the color information of the image. At first, we use CCD and a card, which can acquire the picture to get the image of the standard color plate in the computer. Then, let the image process through the program of LabVIEW, we can obtain a transfer matrix. In the same way, once the image of tongue is acquired, we let the image correct with the transfer matrix. Therefore, the color information of the tongue image is calibrated. At last, we can get a new image, which is very closer to the real one. The color calibration system is useful in many fields, especially some experiments or tasks that need to calibrate the color such as the remote-distance medical treatment or shopping through the Internet. iii
i ii iii iv vi viii ix 1 1-1 1 1-2 1 3 2-1 3 2-1-1 3 2-1-2 4 2-1-3 5 2-2 6 2-3 7 2-4 8 2-4-1 9 2-4-2 9 2-4-3 9 2-5 10 2-5-1 CIE RGB 10 iv
2-5-2 CIE XYZ 12 2-5-3 CIE L*a*b* 13 16 3-1 16 3-2 19 3-3 LabVIEW 26 27 4-1 27 4-2 28 29 5-1 29 5-2 29 30 31 v
1.1 2 2.1 3 2.2 4 2.3 4 2.4 5 2.5 5 2.6 6 2.7 6 2.8 7 2.9 8 2.10 9 2.11 10 2.12 CIE RGB 11 2.13 CIE rg 12 2.14 13 2.15 CIE xy 13 2.16 CIE L*a*b* 15 3.1 16 3.2 17 3.3 18 3.4 18 3.5 Color Meter 19 vi
3.6 20 3.7 21 3.8 22 3.9 23 3.10 24 3.11 25 3.12 26 vii
3.1 20 3.2 22 3.3 24 3.4 25 viii
( R) ( G) ( B) ( W ) r ( λ) g b C ( λ) ( λ) ( λ) CIE CIE CIE L * a * b * X Y Z X 0 Y 0 Z 0 CIE ix
1.1 1.2 CCD LabVIEW 1.1 S T 1
CIE XYZ CIE XYZ CIE 1.1 Color Meter XYZ RGB CIE L*a*b* Color Meter 2
2.1 [1] 1. 2. 3. 2.1 2.1 2.1.1 3
2.2 2.2 390 nm~780 nm [1] 2.3 2.3 2.1.2 4
[1] 2.1.3 Retina Rod (Cone) 2.4 Rod 1 2.4 [2] 400 nm~600 nm (Cone) 5 400 nm~700 nm 6 2.5 [3] (Cone)
ρ γ β 2.5 1802 Young 1896 HelmholtZ ρ γ β [2] 2.2 K (Kelvin) [4] 2.6 2.6 2.7 7OOOK 8500K 2900K 45O0K 6
2800K 4500K 5000K 2.7 [4] 2.3 R G B C M Y 2.8 2.8 C M Y B R G 2.9 CMYK 7
2.9 2.4 [1] 1. Hue 2. Saturation 3. Lightness 2.10 HSV Hue Saturation Value HVC Hue Value Chroma 8
2.10 A. B. C. D. 2.4.1 [1] 2.4.2 [1] 2.10A 2.4.3 [1] 2.11 9
2.11 2.5 2.5.1 CIE RGB (RGB) RGB RGB CIE 700 nm 546.1 nm 435.8 nm 1.0000 4.5907 0.0601 CIE ( R) ( G) ( B ) =1 1 1 10
CIE ( R ) ( G) + ( B) = ( W ) + 2-1 CIE RGB CIE 380nm 780nm r( λ) ( g λ) ( b λ) CIE l C λ ( ) C ( λ ) r( λ)( R) + g( λ)( G) + b( λ)( B) ( R) ( G) ( ) 2.2 B 1.0000 4.5907 0.0601 ( C λ) [5] r( λ) ( g λ) ( b λ) 2.12 2.12 CIE RGB 11
r( λ) ( g λ) ( b λ) r CIE rg 2.13 CIE rg [5] 2.13 CIE rg RGB 1 2 RGB 2.5.2 CIE XYZ CIE XYZ RGB CIE RGB r λ ( ) 12
g( λ) ( b λ) 2.14 r g b X Y Z X,Y,Z, [5] 2.14 2.13 XYZ 2.15 x y CIE1931xy 2.15 [5] 2.15 CIE xy 2.5.3 CIE L*a*b* 13
1976 CIE CIE L a b CIE L a b CIE XYZ L* = 116 a* = 500 b* = 200 1/ 3 ( Y / Y0 ) 16 3 ( X / X ) 1/ 0 ( Y / Y0 ) 3 ( Y / Y ) 1/ ( Z / Z ) 1/ [ ] 1/ 3 3 [ ] 0 0, Y / Y 0 > 0.01 2.3 X Y Z X 0 Y 0 Z 0 CIE L * a * * b X Y Z L * * a * b 2.16 + a * - a * + b * - b * L * [5] 14
2.16 CIE L*a*b* CIE RGB CIE XYZ CIE L*a*b* CIE L*a*b* 15
LabVIEW 3.1 3.1 3.2 3.1 16
3.2 3.3 CCD 3.4 3.5 Color Meter 17
3.3 3.4 18
3.5 Color Meter 3.2 3.6 Color Meter 3.1 Color Meter 19
3.1 CIE XYZ 1 15.60 7.24 0.48 2 15.76 7.31 0.47 3 15.62 7.24 0.47 4 15.74 7.30 0.47 5 15.69 7.27 0.47 6 15.70 7.28 0.47 7 15.69 7.27 0.47 8 15.69 7.27 0.47 CIE XYZ CIE XYZ CIE E 1 E 2 2 E1 [ S I ] M? E 2 [ S T ]? 2 M 3.6 3.7 20
3.8 Color Meter Color Meter 3.8 3.7 21
3.8 CCD *.BMP Color Meter 3.2 3.2 CIE XYZ 1 13.05 7.53 2.73 2 13.59 7.84 2.85 3 14.60 8.42 3.02 4 14.05 8.10 3.04 22
5 14.57 8.39 3.00 6 14.86 8.56 3.33 7 13.42 7.73 2.86 8 13.26 7.63 2.83 3.9 3.8 3.3 3.9 3.4 23
3.3 CIE XYZ 1 11.90 6.81 2.22 2 11.87 6.79 2.22 3 11.93 6.84 2.23 4 11.76 6.73 2.16 5 13.73 7.85 2.69 6 11.90 6.81 2.22 7 11.83 6.76 2.13 8 12.41 7.10 2.24 3.10 24
3.4 1 4.20089 2 4.21297 3 4.11079 4 4.22914 5 2.97869 6 4.12302 7 3.64660 8 3.11 25
3.12 3.10 3.11 3.3 LabVIEW LabVIEW 26
4.1 27
4.2 28
5.1 5.2 29
[1] 1999 [2] http://www.digital.idv.tw/ Classroom/manage-2/index-man2.htm [3] http://www.brainnew.com.tw/ Article/raymond2001/ra_071001.asp [4] http://www.cgan.com/ science/print/preprint/cmlight.htm#top [5] http://www.cgan.com/book/books/print/packcolor/link/1-0.htm 30
31
1 2 32
33