1. sai sˆo ´ gi˜u . aa ˙’ nh v`ao v`a a ˙’ nh ra; v`a 2. u . ´o . clu . o . . ng sai sˆo ´ gi˜u . aa ˙’ nh ra v`a nhiˆe ˜ u. X´et a ˙’ nh f(x, y),x =0, 1, ,M − 1,y =0, 1, ,N − 1. D - ˆe ˙’ lu . ua ˙’ nh f ta cˆa ` n M × N × m bit v´o . i m l`a sˆo ´ bit biˆe ˙’ udiˆe ˜ n gi´a tri . x´am hay mˆo . tt`u . m˜a. Viˆe . c n´en l`am gia ˙’ msˆo ´ bit lu . utr˜u . (nho ˙’ ho . n M ×N ×m bit). Ngu . `o . i gia ˙’ i m˜a xu . ˙’ l´y nh˜u . ng bit n`ay v`a xˆay du . . ng la . ia ˙’ nh ra g(x, y) c´o k´ıch thu . ´o . c M ×N trong d¯´o mˆo ˜ i pixel tu . o . ng ´u . ng t `u . m˜a c´o d¯ˆo . d`ai m bit. Khi d¯´o lˆo ˜ ixa ˙’ y ra gi˜u . a c´ac pixel cu ˙’ aa ˙’ nh v`ao v`a a ˙’ nh ra l`a e(x, y):=g(x, y) − f(x, y) v`a sai sˆo ´ to`an bˆo . e rms := 1 MN M−1 x=0 N−1 y=0 e 2 (x, y) 1/2 = 1 MN M−1 x=0 N−1 y=0 [g(x, y) −f(x, y)] 2 1/2 . U . ´o . clu . o . . ng sai sˆo ´ cu ˙’ aa ˙’ nh ra v`a nhiˆe ˜ u x´ac d¯i . nh bo . ˙’ i (SNR) rms := M−1 x=0 N−1 y=0 g 2 (x, y) M−1 x=0 N−1 y=0 e 2 (x, y) 1/2 . Tiˆeu chuˆa ˙’ n chu ˙’ quan Tiˆeu chuˆa ˙’ n d¯´anh gi´a kh´ach quan cung cˆa ´ pmˆo . tco . chˆe ´ thuˆa . ntiˆe . nv`ad¯o . n gia ˙’ nd¯ˆe ˙’ x´ac d¯ i . nh thˆong tin mˆa ´ t. Tuy nhiˆen, hˆa ` uhˆe ´ t c´ac a ˙’ nh gia ˙’ in´end¯ˆe ` ud¯u . o . . c quan s´at bo . ˙’ i con ngu . `o . i. Do d¯´o, s˜e thuˆa . ntiˆe . nho . nnˆe ´ u d¯´anh gi´a chˆa ´ tlu . o . . ng h`ınh a ˙’ nh du . . a v`ao ngu . `o . i quan s´at. T`uy thuˆo . c v`ao c´ach nh`ın cu ˙’ a con ngu . `o . i, c´o thˆe ˙’ hai a ˙’ nh c´o c`ung lˆo ˜ i ph´at sinh nhu . ng quan s´at ta thˆa ´ ychˆa ´ tlu . o . . ng hai a ˙’ nh ho`an to`an kh´ac nhau: d¯´o l`a do t´ınh chu ˙’ quan cu ˙’ a con ngu . `o . i. A ˙’ nh c´o lˆo ˜ i xuˆa ´ thiˆe . no . ˙’ biˆen th`ı c´o chˆa ´ tlu . o . . ng tˆo ´ tho . nlˆo ˜ i xuˆa ´ t hiˆe . no . ˙’ v`ung trung tˆam a ˙’ nh. Chˆa ´ tlu . o . . ng cu ˙’ amˆo . ta ˙’ nh c´o thˆe ˙’ d¯ u . o . . c d¯´anh gi´a chu ˙’ quan qua quan s´at cu ˙’ a nhiˆe ` u ngu . `o . i. C´ac d¯´anh gi´a du . . a trˆen ba ˙’ ng phˆan loa . i hoˇa . cbˇa ` ng c´ach d¯ ˆo ´ i s´anh hai a ˙’ nh f(x, y)v`a ˆ f(x, y). Sau d¯ˆay l`a c´ach phˆan loa . icu ˙’ atˆo ˙’ ch´u . c TASO (viˆe ´ t tˇa ´ tt`u . Television Allocation Study Organization): 147 1. Tuyˆe . tv`o . i:a ˙’ nh c´o chˆa ´ tlu . o . . ng rˆa ´ t cao. 2. Tˆo ´ t:a ˙’ nh c´o chˆa ´ tlu . o . . ng cao. Nhiˆe ˜ u khˆong d¯´ang kˆe ˙’ . 3. Kh´a:a ˙’ nh c´o chˆa ´ tlu . o . . ng chˆa ´ p nhˆa . nd¯u . o . . c. Nhiˆe ˜ u khˆong d¯´ang kˆe ˙’ . 4. Trung b`ınh:a ˙’ nh c´o chˆa ´ tlu . o . . ng thˆa ´ p; cˆa ` nca ˙’ i thiˆe . n. Nhiˆe ˜ uc´othˆe ˙’ gˆay kh´o chi . u. 5. K´em:a ˙’ nh c´o chˆa ´ tlu . o . . ng rˆa ´ t thˆa ´ p. Nhiˆe ˜ u xuˆa ´ thiˆe . n nhiˆe ` u. 6. Rˆa ´ tk´em:a ˙’ nh khˆong thˆe ˙’ xem d¯u . o . . c. Viˆe . c so s´anh chˆa ´ tlu . o . . ng gi˜u . a c´ac a ˙’ nh f(x, y)v`a ˆ f(x, y) c´o thˆe ˙’ ´ap du . ng thang d¯ˆo . {−3, −2, −1, 0, 1, 2, 3} d¯ ˆe ˙’ biˆe ˙’ udiˆe ˜ n c´ac d¯´anh gi´a chu ˙’ quan {rˆa ´ txˆa ´ u, xˆa ´ u, tu . o . ng d¯ˆo ´ ixˆa ´ u, trung b`ınh, tu . o . ng d¯ ˆo ´ i kh´a, kh´a, tˆo ´ t}. 6.2 C´ac mˆo h`ınh n´en a ˙’ nh Trong Phˆa ` n 6.1 ch´ung ta d¯˜a d¯ˆe ` cˆa . p riˆeng r˜e ba phu . o . ng ph´ap d¯ˆe ˙’ gia ˙’ md¯ˆo . du . th `u . ad˜u . liˆe . uhayn´end˜u . liˆe . ua ˙’ nh. Tuy nhiˆen, c´ac phu . o . ng ph´ap n`ay thu . `o . ng d¯u . o . . ctˆo ˙’ ho . . pla . i d¯ ˆe ˙’ ta . o th`anh mˆo . thˆe . thˆo ´ ng n´en d˜u . liˆe . ua ˙’ nh. Trong phˆa ` n n`ay ch´ung ta nghiˆen c´u . u c´ac d¯ ˇa . c tru . ng chung cu ˙’ anh˜u . ng hˆe . thˆo ´ ng n`ay v`a tr`ınh b`ay mˆo . t mˆo h`ınh tˆo ˙’ ng qu´at d¯ˆe ˙’ biˆe ˙’ u diˆe ˜ nch´ung. Nhu . trong H`ınh 6.2, mˆo . thˆe . thˆo ´ ng n´en a ˙’ nh bao gˆo ` m hai khˆo ´ icˆa ´ utr´uc: khˆo ´ im˜a ho´a v`a khˆo ´ i gia ˙’ i m˜a. 2 A ˙’ nh f(x, y)d¯u . o . . cd¯u . a v`ao bˆo . m˜a ho´a. Bˆo . n`ay s˜e ta . o ra mˆo . t tˆa . p c´ac k´yhiˆe . ut`u . d˜u . liˆe . u nhˆa . p. Sau d¯´o tˆa . p n`ay d¯u . o . . c chuyˆe ˙’ n qua mˆo . t kˆenh truyˆe ` n dˆa ˜ nd¯ˆe ´ nbˆo . gia ˙’ i m˜a. Bˆo . gia ˙’ i m˜a thu . . chiˆe . ntiˆe ´ n tr`ınh gia ˙’ i m˜a v`a ta d¯u . o . . ca ˙’ nh ˆ f(x, y). N´oi chung, a ˙’ nh ˆ f(x, y) c´o thˆe ˙’ tr `ung hoˇa . c khˆong v´o . ia ˙’ nh f(x, y) ban d¯ˆa ` u. Nˆe ´ u hai a ˙’ nh tr `ung nhau, hˆe . thˆo ´ ng truyˆe ` n khˆong c´o lˆo ˜ i hoˇa . c thˆong tin d¯u . o . . cba ˙’ o to`an; ngu . o . . cla . i, a ˙’ nh d¯u . o . . c xˆay du . . ng la . ibi . suy biˆe ´ n. Ca ˙’ hai khˆo ´ i m˜a ho´a v`a gia ˙’ i m˜a trong H`ınh 6.2 gˆo ` m hai bˆo . phˆa . ntu . o . ng d¯ˆo ´ id¯ˆo . c lˆa . p. Bˆo . m˜a ho´a gˆo ` m m˜a ho´a nguˆo ` n nhˇa ` m loa . ibo ˙’ du . th `u . a trong d˜u . liˆe . u v`ao, v`a m˜a 2 C´ac khˆo ´ i n`ay c`on go . il`akhˆo ´ in´env`a khˆo ´ i gia ˙’ i n´en. Thuˆa . tng˜u . khˆo ´ i m˜a ho´a v`a khˆo ´ i gia ˙’ im˜apha ˙’ n ´anh a ˙’ nh hu . o . ˙’ ng cu ˙’ a l´y thuyˆe ´ t thˆong tin d¯ˆo ´ iv´o . i l˜anh vu . . cn´ena ˙’ nh. 148 ho´a kˆenh thu . . chiˆe . n gia ˙’ m sai (nˆe ´ u c´o) khi truyˆe ` nd˜u . liˆe . u qua kˆenh. Tu . o . ng tu . . ,bˆo . gia ˙’ i m˜a gˆo ` m gia ˙’ i m˜a kˆenh v`a sau d¯´o l`a bˆo . gia ˙’ i m˜a nguˆo ` n. Nˆe ´ u kˆenh truyˆe ` ngi˜u . a c´ac bˆo . m˜a ho´a v`a gia ˙’ i m˜a khˆong c´o nhiˆe ˜ u th`ı m˜a ho´a kˆenh v`a gia ˙’ i m˜a kˆenh d¯u . o . . cbo ˙’ qua. f(x, y) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ˆ f(x, y) M˜a ho´a Gia ˙’ im˜a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M˜a ho´a nguˆo ` n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M˜a ho´a kˆenh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Kˆenh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Gia ˙’ im˜a kˆenh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Gia ˙’ im˜a nguˆo ` n H`ınh 6.2: Mˆo h`ınh mˆo . thˆe . thˆo ´ ng n´en d˜u . liˆe . utˆo ˙’ ng qu´at. 6.2.1 M˜a ho´a v`a gia ˙’ i m˜a nguˆo ` n M˜a ho´a nguˆo ` nc´och´u . c nˇang gia ˙’ m hoˇa . ckhu . ˙’ bo ˙’ du . th `u . a trong m˜a ho´a, trong quan hˆe . gi˜u . a c´ac pixel hay du . th `u . a trong tˆam sinh l´yt`u . a ˙’ nh d¯ˆa ` u v`ao. Nhiˆe ` u´u . ng du . ng d¯ˇa . c biˆe . t v`a c´ac l˜anh vu . . c liˆen quan d¯`oi ho ˙’ icˆa ` n c´o nh˜u . ng c´ach m˜a ho´a tˆo ´ t nhˆa ´ t. Thˆong thu . `o . ng, c´ach tiˆe ´ pcˆa . n n`ay c´o thˆe ˙’ mˆo h`ınh ho´a bo . ˙’ i ba thao t´ac d¯ˆo . clˆa . p liˆen tiˆe ´ p nhau. Nhu . trong H`ınh 6.3(a), mˆo ˜ i thao t´ac d¯u . o . . c thiˆe ´ tkˆe ´ d¯ ˆe ˙’ thu . . chiˆe . n gia ˙’ md¯ˆo . du . th `u . ad˜u . liˆe . ud¯u . o . . cmˆota ˙’ trong Phˆa ` n 6.1. H`ınh 6.3(b) l`a so . d¯ ˆo ` tu . o . ng ´u . ng khˆo ´ i gia ˙’ i m˜a nguˆo ` n. f(x, y) . . . . . . . . . . . . . . . . . . . . M˜a ho´a nguˆo ` n (a) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Biˆe ´ nd¯ˆo ˙’ i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lu . o . . ng tu . ˙’ ho´a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M˜a ho´a k´yhiˆe . u Kˆenh Kˆenh . . . . . . . . . . . . . . . Gia ˙’ i m˜a nguˆo ` n (b) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Gia ˙’ im˜a k´yhiˆe . u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Biˆe ´ nd¯ˆo ˙’ i ngu . o . . c ˆ f(x, y) H`ınh 6.3: Mˆo h`ınh m˜a ho´a nguˆo ` n (a) v`a gia ˙’ i m˜a nguˆo ` n (b). X´et a ˙’ nh f d¯ u . o . . cbiˆe ˙’ udiˆe ˜ nbo . ˙’ i d˜ay c´ac gi´a tri . x´am z 0 ,z 1 , ,z n−1 . M˜a ho´a a ˙’ nh f d¯ u . o . . c thu . . chiˆe . n thˆong qua ba bu . ´o . c: 149 1. Biˆe ´ nd¯ˆo ˙’ i c´ac phˆa ` ntu . ˙’ a ˙’ nh z 0 ,z 1 , ,z n−1 th`anh c´ac hˆe . sˆo ´ y 0 ,y 1 , ,y n−1 ; 2. Lu . o . . ng tu . ˙’ ho´a c´ac hˆe . sˆo ´ y 0 ,y 1 , ,y n−1 v`a l`am tr`on th`anh ν 0 ,ν 1 , ,ν n−1 ; 3. G´an m´u . clu . o . . ng tu . ˙’ ho´a ν i ,i=0, 1, ,n− 1, v´o . imˆo . tt`u . m˜a c i . Biˆe ´ nd¯ˆo ˙’ i Giai d¯oa . nd¯ˆa ` utiˆen cu ˙’ a qu´a tr`ınh m˜a ho´a nguˆo ` n, bˆo . phˆa . n biˆe ´ nd¯ˆo ˙’ i c´o thˆe ˙’ xem nhu . mˆo . t ´anh xa . t`u . tˆa . p c´ac sˆo ´ (c´ac pixel) th`anh tˆa . p c´ac sˆo ´ kh´ac nhˇa ` m gia ˙’ msu . . du . th `u . a trong quan hˆe . gi˜u . a c´ac pixel cu ˙’ aa ˙’ nh ban d¯ˆa ` u. Ph´ep to´an n`ay n´oi chung l`a kha ˙’ nghi . ch v`a c´o thˆe ˙’ hoˇa . c khˆong gia ˙’ m tru . . ctiˆe ´ psˆo ´ lu . o . . ng d˜u . liˆe . u d¯`oi ho ˙’ ibiˆe ˙’ udiˆe ˜ na ˙’ nh. Trong m˜a ho´a run length, d˜ay c´ac phˆa ` ntu . ˙’ a ˙’ nh do . c theo mˆo . t d`ong qu´et z 0 ,z 1 , ,z m−1 d¯ u . o . . cbiˆe ´ nd¯ˆo ˙’ i th`anh d˜ay c´ac cˇa . p S := {(l 0 ,g 0 ), (l 1 ,g 1 ), ,(l k−1 ,g k−1 )}, trong d¯´o l i l`a sˆo ´ lˆa ` nlˇa . pcu ˙’ a gi´a tri . x´am g i . Ph´ep biˆe ´ nd¯ˆo ˙’ i n`ay kha ˙’ nghi . ch v`ı d˜ay c´ac phˆa ` ntu . ˙’ a ˙’ nh c´o thˆe ˙’ xˆay du . . ng la . it`u . d˜ay S. Mˆo . tph´ep biˆe ´ nd¯ˆo ˙’ i kh´ac l`a y = Az, (6.1) trong d¯´o A l`a ma trˆa . n vuˆong cˆa ´ p n. Ph´ep biˆe ´ nd¯ˆo ˙’ i n`ay c´o thˆe ˙’ kha ˙’ nghi . ch hoˇa . c khˆong t`uy theo ma trˆa . n A. V´o . itˆa . p c´ac vector z v`a ma trˆa . n A n`ao d¯´o, ta c´o thˆe ˙’ lu . utr˜u . vector y v´o . isˆo ´ bit ´ıt ho . nlu . utr˜u . z. Chˇa ˙’ ng ha . n, ph´ep biˆe ´ nd¯ˆo ˙’ i sai phˆan x´ac d¯i . nh bo . ˙’ i ma trˆa . n A := 100000 1 −10000 01−10 0 0 00 1−10 0 0001−10 00001−1 . Ta c´o y 0 = z 0 , y i = z i−1 −z i ,i=1, 2, ,n− 1. (6.2) 150 Nˆe ´ u c´ac pixel kˆe ` nhau c´o m´u . c x´am tu . o . ng tu . . th`ı hiˆe . u y i = z i−1 − z i , vˆe ` trung b`ınh, nho ˙’ ho . nc´acm´u . c x´am v`a do d¯´o d¯`oi ho ˙’ i ´ıt bit ho . nd¯ˆe ˙’ lu . utr˜u . . Ph´ep biˆe ´ nd¯ˆo ˙’ i n`ay l`a kha ˙’ nghi . ch. Lu . o . . ng tu . ˙’ ho´a X´et ph´ep biˆe ´ nd¯ˆo ˙’ i (6.1), nˆe ´ umˆo ˜ i phˆa ` ntu . ˙’ z i c´o thˆe ˙’ lˆa ´ y2 m gi´a tri . kh´ac nhau th`ı y j c´o thˆe ˙’ lˆa ´ y(2 m ) n =2 mn gi´a tri . kh´ac nhau. N´oi c´ach kh´ac, cˆa ` n c´ac t`u . m˜a c´o d¯ˆo . d`ai mn−bit d¯ˆe ˙’ g´an mˆo . tt`u . m˜a cho mˆo . t gi´a tri . y j . Nhu . ng mˆo ˜ i gi´a tri . z i d¯ u . o . . c g´an t`u . m˜a c´o d¯ˆo . d`ai m v`a mu . c tiˆeu cu ˙’ ach´ung ta l`a su . ˙’ du . ng ´ıt bit ho . nd¯ˆe ˙’ m˜a ho´a y i v`ıvˆa . yta cˆa ` nlu . o . . ng tu . ˙’ ho´a c´ac gi´a tri . n`ay. Lu . o . . ng tu . ˙’ ho´a l`a ´anh xa . biˆe ´ nmˆo . ttˆa . p Y gˆo ` m nhiˆe ` u phˆa ` ntu . ˙’ (c´o thˆe ˙’ vˆo ha . n) th`anh tˆa . p V c´o ´ıt phˆa ` ntu . ˙’ ho . n: ta phˆan hoa . ch da ˙’ id¯ˆo . ng cu ˙’ atˆa . p Y bo . ˙’ i c´ac m´u . c l 0 ,l 1 , ,l t−1 . Nˆe ´ u gi´a tri . nˇa ` m trong khoa ˙’ ng (l i ,l i+1 ] th`ı ta s˜e g´an n´o c´o gi´a tri . ν i (c´o thˆe ˙’ cho . n l`a tˆam cu ˙’ a khoa ˙’ ng n`ay). Lu . o . . ng tu . ˙’ ho´a d¯ˆe ` u l`a ph´ep phˆan hoa . ch d¯ˆe ` u; ngu . o . . c la . il`akhˆong d¯ˆe ` u. Qu´a tr`ınh lu . o . . ng tu . ˙’ ho´a nhˇa ` m gia ˙’ msu . . du . th `u . a trong tˆam sinh l´y. Nhu . d¯˜a n´oi tru . ´o . c, thao t´ac n`ay khˆong kha ˙’ nghi . ch. Do d¯´o, lu . o . . ng tu . ˙’ ho´a khˆong d¯u . o . . c su . ˙’ du . ng trong nh˜u . ng ´u . ng du . ng d¯`oi ho ˙’ i n´en ba ˙’ o to´an thˆong tin. Gia ˙’ su . ˙’ p(y) l`a h`am mˆa . td¯ˆo . x´ac suˆa ´ tcu ˙’ a y v`a ν l`a m ´u . clu . o . . ng tu . ˙’ ho´a cu ˙’ a y. Khi d¯´o sai sˆo ´ cu ˙’ a ph´ep lu . o . . ng tu . ˙’ ho´a l`a e 2 q := +∞ −∞ (ν − y) 2 p(y)dy, v`a u . ´o . clu . o . . ng sai sˆo ´ t`u . t´ın hiˆe . u sang lu . o . . ng tu . ˙’ ho´a d¯i . nh ngh˜ıa b o . ˙’ i Q SN R := +∞ −∞ y 2 p(y)dy/e 2 q . M˜a ho´a X´et vector v := (ν 0 ,ν 1 , ,ν n−1 ) trong d¯´o mˆo ˜ i gi´a tri . ν i c´o thˆe ˙’ lˆa ´ ymˆo . t trong L gi´a tri . a i ,i =0, 1, ,L − 1. Tiˆe ´ n tr`ınh m˜a ho´a nhˇa ` m xˆay du . . ng c´ac t`u . m˜a nhi . phˆan c i ,i=0, 1, ,L− 1, tu . o . ng ´u . ng mˆo . t-mˆo . tv´o . imˆo ˜ i gi´a tri . a i . Mu . cd¯´ıch cu ˙’ a m˜a ho´a l`a thiˆe ´ tkˆe ´ bˆo . m˜a sao cho su . ˙’ du . ng sˆo ´ bit ´ıt nhˆa ´ t c´o thˆe ˙’ .V´o . im˜ac´od¯ˆo . d`ai khˆong d¯ˆo ˙’ i, ta d`ung b = log 2 L bit d¯ˆe ˙’ biˆe ˙’ udiˆe ˜ ntˆa ´ tca ˙’ L kha ˙’ nˇang. M˜a n`ay tˆo ´ iu . u trong tru . `o . ng ho . . p x´ac suˆa ´ t xuˆa ´ thiˆe . ncu ˙’ a c´ac m´u . c a 0 ,a 1 , ,a L−1 bˇa ` ng nhau. 151 Trong tru . `o . ng ho . . ptˆo ˙’ ng qu´at, ta thu . `o . ng d`ung m˜a c´o d¯ˆo . d`ai thay d¯ˆo ˙’ id¯ˆe ˙’ g´an c´ac t`u . m˜a c´o d¯ˆo . d`ai ngˇa ´ ntu . o . ng ´u . ng gi´a tri . thu . `o . ng xuyˆen xuˆa ´ thiˆe . n v`a ngu . o . . cla . i. Ta c´o b`ai to´an: cho c´ac gi´a tri . a 0 ,a 1 , ,a L−1 v´o . i c´ac x´ac suˆa ´ t xuˆa ´ thiˆe . n p 0 ,p 1 , ,p L−1 tu . o . ng ´u . ng. X´ac d¯i . nh sˆo ´ bit tˆo ´ i thiˆe ˙’ ud¯ˆe ˙’ m˜a ho´a c´ac gi´a tri . n`ay v`a thiˆe ´ tkˆe ´ bˆo . m˜a tu . o . ng ´u . ng. H`ınh 6.3(a) chı ˙’ ra tiˆe ´ n tr`ınh m˜a ho´a nguˆo ` ngˆo ` m ba thao t´ac liˆen tiˆe ´ p, nhu . ng tˆa ´ t ca ˙’ c´ac thao t´ac n`ay khˆong nhˆa ´ t thiˆe ´ td¯u . o . . csu . ˙’ du . ng trong tˆa ´ tca ˙’ c´ac hˆe . thˆo ´ ng n´en d˜u . liˆe . u. Nhˇa ´ cla . i, chˇa ˙’ ng ha . n, lu . o . . ng tu . ˙’ ho´a c´o thˆe ˙’ bo ˙’ qua khi n´en ´ap du . ng trong hˆe . thˆo ´ ng ba ˙’ o to`an thˆong tin. Ngo`ai ra, mˆo . tsˆo ´ k˜y thuˆa . tn´en thu . `o . ng d¯u . o . . c mˆo h`ınh ho´a bˇa ` ng c´ach ho . . p nhˆa ´ t c´ac khˆo ´ id¯u . o . . c phˆan t´ach vˆa . tl´y trong H`ınh 6.3(a). Chˇa ˙’ ng ha . n, trong c´ac hˆe . thˆo ´ ng n´en d˜u . liˆe . u theo phu . o . ng ph´ap du . . b´ao, c´ac khˆo ´ ibiˆe ´ nd¯ˆo ˙’ iv`alu . o . . ng tu . ˙’ ho´a thu . `o . ng d¯u . o . . cbiˆe ˙’ udiˆe ˜ nbo . ˙’ imˆo . t khˆo ´ i m`a thu . . chiˆe . nd¯ˆo ` ng th`o . i hai tiˆe ´ n tr`ınh n`ay. Bˆo . gia ˙’ i m˜a nguˆo ` nd¯u . o . . cchı ˙’ ra trong H`ınh 6.3(b) chı ˙’ gˆo ` m hai th`anh phˆa ` n: gia ˙’ i m˜a k ´yhiˆe . u v`a biˆe ´ nd¯ˆo ˙’ i ngu . o . . c. C´ac khˆo ´ i n`ay thu . . chiˆe . n, theo th´u . tu . . ngu . o . . cla . iv´o . itiˆe ´ n tr`ınh m˜a ho´a nguˆo ` n: tru . ´o . chˆe ´ t gia ˙’ i m˜a c´ac k´yhiˆe . ud¯u . o . . c m˜a ho´a v`a sau d¯´o biˆe ´ nd¯ˆo ˙’ i ngu . o . . c. Do d˜u . liˆe . u sau khi lu . o . . ng tu . ˙’ ho´a s˜e l`am mˆa ´ t thˆong tin nˆen khˆo ´ ilu . o . . ng tu . ˙’ ho´a ngu . o . . c khˆong d¯u . o . . csu . ˙’ du . ng trong mˆo h`ınh gia ˙’ im˜anhu . chı ˙’ ra trong H`ınh 6.3(b). 6.2.2 M˜a ho´a v`a gia ˙’ i m˜a kˆenh M˜a h´oa kˆenh v`a gia ˙’ im˜akˆenh d¯´ong vai tr`o quan tro . ng trong to`an bˆo . qu´a tr`ınh m˜a h´oa-gia ˙’ i m˜a khi kˆenh truyˆe ` n c´o nhiˆe ˜ u hoˇa . cc´olˆo ˜ i. Ch´ung d¯u . o . . c thiˆe ´ tkˆe ´ d¯ ˆe ˙’ gia ˙’ m thiˆe ˙’ u nhiˆe ˜ ucu ˙’ ad¯u . `o . ng truyˆe ` nbˇa ` ng c´ach ch`en mˆo . tbˆo . d¯ i ˆe ` u khiˆe ˙’ n. Phu . o . ng ph´ap m˜a h´oa kˆenh truyˆe ` nhiˆe . u qua ˙’ nhˆa ´ td¯u . arabo . ˙’ i Hamming [11] nˇam 1950. Phu . o . ng ph´ap n`ay du . . a trˆen viˆe . c thˆem c´ac bit v`ao d˜u . liˆe . ud¯u . o . . c m˜a h´oa d¯ˆe ˙’ ba ˙’ od¯a ˙’ mnˆe ´ usˆo ´ lˆo ˜ i trong d¯u . `o . ng truyˆe ` n xuˆa ´ thiˆe . nd¯u ˙’ ´ıt th`ı c´o thˆe ˙’ phu . chˆo ` id¯u . o . . cd˜u . liˆe . u ban d¯ˆa ` u. D - ˆe ˙’ gia ˙’ im˜ad˜u . liˆe . ud¯u . o . . c m˜a h´oa bˇa ` ng phu . o . ng ph´ap Hamming, bˆo . gia ˙’ i m˜a kˆenh kiˆe ˙’ m tra t´ınh ho . . plˆe . (v`a su . ˙’ asainˆe ´ u c´o) cu ˙’ ad˜u . liˆe . ud¯u . o . . cgu . ˙’ i. Sau d¯´o, loa . ibo ˙’ nh˜u . ng bit thˆem v`ao trong d˜u . liˆe . u ban d¯ˆa ` u. 152 . y) v`a sai sˆo ´ to`an bˆo . e rms := 1 MN M−1 x=0 N−1 y=0 e 2 (x, y) 1 /2 = 1 MN M−1 x=0 N−1 y=0 [g(x, y) −f(x, y)] 2 1 /2 . U . ´o . clu . o . . ng sai sˆo ´ cu ˙’ aa ˙’ nh ra v`a nhiˆe ˜ u. l`a e 2 q := +∞ −∞ (ν − y) 2 p(y)dy, v`a u . ´o . clu . o . . ng sai sˆo ´ t`u . t´ın hiˆe . u sang lu . o . . ng tu . ˙’ ho´a d¯i . nh ngh˜ıa b o . ˙’ i Q SN R := +∞ −∞ y 2 p(y)dy/e 2 q . M˜a. 2, −1, 0, 1, 2, 3} d¯ ˆe ˙’ biˆe ˙’ udiˆe ˜ n c´ac d¯´anh gi´a chu ˙’ quan {rˆa ´ txˆa ´ u, xˆa ´ u, tu . o . ng d¯ˆo ´ ixˆa ´ u, trung b`ınh, tu . o . ng d¯ ˆo ´ i kh´a, kh´a, tˆo ´ t}. 6.2