You are on page 1of 25

Cu 1: M ha m thanh (ngng nghe, mt n tn s, mt n thi gian, cc di bng tn ti hn, perceptual coding) 1.

Ngng nghe Tai ngi pht hin nhng m thanh bin i cc b trong p sut khng kh c o bng mc p sut m- SPL (Sound Pressure Level). Nu nh nhng bin i ca mc p sut m (SPL) l di mt ngng no v bin th tai ngi khng th pht hin c. Ngng nghe ny c minh ha trong hnh 1.3 di y. Ngng ny l mt hm ca tn s m thanh, c cc thnh phn tn s thp di mc ngng nn cc m thanh c tn s ny s khng nghe c. Tai ngi nhy nht trong phm vi tn s t 2- 4KHz.

2. Mt n tn s (frequency masking) Cho d mt thnh phn tn hiu cao hn mc ngng nghe, th n vn c th b che khut bi cc thnh phn ln hn m gn tn hiu trong min tn s. Hin tng ny gi l mt n tn s. Mi mt thnh phn trong mt tn hiu c th ly ra phn bng qua cc thnh phn bn cnh. Nu nh thnh phn tn s bn cnh b che ph bi phn bng ny th cc thnh phn tn hiu tn s ny s khng nghe c. Kt qu l c mt thnh phn thnh phn che khut lm dch ngng nghe.

3. Mt n thi gian Ch khi cc ting a ra vng cc bng ln nhng thnh phn bn cnh trong min tn s, th m lng tng t bin c th che khut m thanh nh hn, gn vi m thanh che khut v mt thi gian. y, nhng m thanh xut hin c trc ln sau khi tng m lng c th b che khut.

4. Cc di bng tn ti hn Di tn s nghe c ca con ngi c phn chia t nhin thnh cc di bng tn ti hn, vi c tnh l h thng thnh gic ca con ngi khng th phn bit c cc m trong cng mt bng v din ra ng thi. Bng thng ca mi bng tn ti hn l khong 100Hz trong di tn di 500Hz, v tng tuyn tnh trong di 500 n 5000Hz. Do d, tai hot ng ging nh cc b lc thng di, mi b lc cho php mt di tn s nht nh i qua v kha tt c cc tn s khc Trong thc t, cc c im ngng nghe, mt n tn s, mt n thi gian v cc di bng tn gii hn c trng cho m hnh tm sinh l nghe. Ngi ta li dng cc c im trn nn thng tin m thanh (Audio) m ng dng ph bin nht trong cc chun nn m thanh MPEG. Cu 2: M hnh chung ca ht m ha thoi Hnh 2.1 minh ha s khi mt h thng m ting ni. y, tn hiu thoi tng t v lin tc theo thi gian t mt ngun thoi cho (cha nn) c s ha thng qua b lc (loi b bng tn tha tn s cao), b ly mu (bin i thnh tn hiu ri rc theo thi gian) v b bin i tng t/s (lng t ha) v sau c m ho (nn): l qu trnh m ho ngun. Tn hiu m ho ngun sau c tip tc m ho thm kh nng chng li (m ho knh) v u tin truyn dn qua mt knh.

Ti u thu, mt b gii m knh s tch v sa nhng li trong qu trnh truyn dn v mt b gii m ngun s gii nn tn hiu. Tn hiu c gii nn c th ging ht nh tn hiu ban u (nn khng tn tht) hoc n cng c th b mo hoc suy bin theo mt vi cch no d (nn c tn tht).

Hnh 2.1: S khi h thng m ha thoi Thng thng, a s nhng h thng m ting ni c thit k h tr nhng ng dng vin thng, vi tn s gii hn trong khong 300 3400Hz. Theo nh l Nyquist, tn s ly mu phi ln hn t nht l hai ln bng thng ca tn hiu lin tc trnh mo, nn 8 kHz thng c chn l tn s mu tiu chun cho ting ni. Nu s dng t m 8 bt/ mu th tc u ra ca knh thoi s s l 64 Kbit/s. Nh ta bit, tn hiu s u dim hn hn so vi tn hiu tng t trong vic truyn dn v x l tn hiu nht l kh nng chng li ng truyn. PCM l k thut iu ch xung m c s dng rt ph bin trong mng thoi truyn thng bin i tn hiu tng t thnh tn hiu s. Bnh thng, mt knh thoi tng t c bin i thnh mt knh PCM c s c tc 64 Kbit/s. K thut PCM (chun G.711) s dng trong mng thoi truyn thng m bo cht lng m kh trung thc nhng bng tn s dng cn kh ln. Cho nn, nn thoi l cn thit cho cc ng dng nh in thoi di ng (tc ca mt cuc gi cng thp th cng cung cp c thm cc dch v khc - d liu; hnh nh; video) v v cc ng dng cho php truyn d liu tc thp (thng thp hn <16 Kbit/s). Ngoi ra, nn thoi cng cn thit cho cc ng dng nh truyn thoi qua IP (VoIP), thoi hi ngh gim bng thng s dng trn mng Internet. Cu 3: Cc phng php m ha thoi (m ha dng sng, m ha tham s, m ha lai). 1. M ha dng sng:

M ha dng sng (waveform coding) l k thut duy tr hnh dng ban u ca cc sng tn hiu, v do vy cc b m ha dng sng c th p dng cho bt k loi ngun tn hiu no. Nguyn l ca b m ha dng sng l m ha dng sng ca ting ni. Ti pha pht, b m ha s nhn cc tn hiu ting ni tng t lin tc v m ho thnh tn hiu s trc khi pht di. Ti pha thu, b gii m s lm nhim v ngc li khi phc tn hiu ting ni. Khi khng c li truyn dn th dng sng ca ting ni khi phc c s rt ging vi dng sng ca ting ni gc. Nhng b m ha dng sng kh ph hp vi k thut m ha tc cao v cht lng ca chng gim rt nhanh khi gim tc bit. Trong thc t, cc b m ha dng sng hot ng c hiu qu tc 32kbps hay cao hn. T s tn hiu trn nhiu SNR (Signal-to-noise ratio) thng c s dng nh gi cht lng ca cc b m ha dng m sng. Mt s v d lin quan l nhng b m ha PCM v ADPCM. M ha dng sng hot ng trong min thi gian hoc min tn s. C rt nhiu kiu m ha dng sng. Mt s phng php thc hin vic phn tch tn hiu thoi u vo trong min tn s trong khi cc phng php khc thc hin vic phn tch trong min thi gian. M ha dng sng l tng i n gin, phng php ny li dng c rt t d tha vn c trong ting ni ca con ngi do d n khng c nhiu hiu qu trong vic gim tc d liu trn knh truyn v tuyn. M ha dng sng khng phc tp lm v ni chung l s dng tc bit tng i cao (trn 16 Kbps). PCM tuyn tnh (64 Kbps) biu th loi m ha dng sng n gin nht, phng php ny ch n thun bao gm vic ly mu v lng t ho, m ha sng u vo. ADPCM (tc 32 Kbps, tiu chun CCITT/ITU G.721) c s dng trong mt s h thng truy nhp v tuyn (DECT v PHS) l mt thut ton m ha phc tp hn nhng vn cung cp tc bit tng i cao. Tc ca phng php ADPCM c th ty bin t 16, 24, 32 cho n 40 Kbps (CCITT/ITU G.726/727). a. M ha 64 Kbt PCM (ITU G. 711) Cc b m ha iu ch xung m PCM l b m ha dng sng n gin nht. Thoi bng hp c ly mu vi tn s 8000 Hz v mi mt mu thoi phi c lng t ho. Nu lng t ho tuyn tnh c s dng th cn thit phi dng 12 bit m ha cho mt mu v dn n tc bit l 96 Kbit/s. Tuy nhin, tc ny c th c gim xung mt cch d dng bng cch s dng lng t ho phi tuyn tnh.

Trong vic m thoi ngi ta thy rng vi vic lng t ho phi tuyn, 8 bit m ha cho mt xung mu l m bo cht lng thoi v gn nh kh m phn bit c so vi thoi gc ban u. iu ny dn n tc bit chun l 64 Kbit/s v hai loi b m ha phi tuyn PCM tr thnh tiu chun vo nhng nm 60 ca th k 20. Mt k thut c s dng ph bin trong vic m thoi l c gng d on gi tr ca mu tip theo t nhng mu trc . Nu d on c hiu qu, th tn hiu sai lch gia nhng mu d on v nhng mu thoi thc s c mt s khc bit thp hn so vi gia cc mu thoi nguyn gc. Bi vy, chng ta c th lng t ho nhng tn hiu sai lch ny vi mt s lng bit t hn so vi tn hiu mu thoi gc. y l c s ca nhng m hnh iu ch xung m vi sai DPCM (Differential Pulse Code Modulation)- chng lng t ho s khc biet gia nhng tn hiu gc v tn hiu d on. Kt qu t nhng b m ho nh vy c th c ci thin nu b d on v b lng t c s tng thch sao cho chng thay i ph hp vi cc c tnh ca thoi c m ho. iu ny dn ti k thut iu ch xung m vi sai thch ng ADPCM. Vo gia nhng nm 1980, CCITT chun ho b m ha ADPCM hot ng tc 32Kbps vi cht lng thoi tng ng vi phng php iu ch m xung 64Kbps. Sau , cc b m ha ADPCM hot ng cc tc 16, 24 v 40Kbps cng c chun ha. S b m ha v gii m ADPCM c minh ha hnh 3.1 di y.

Hnh 3.1: B m ha v gii m ADPCM b. M ha ADPCM (ITUG.721, G.726, G.727) B m ha iu ch xung m vi sai thch nghi (ADPCM) l b m ha dng sng thay v lng t ho trc tip tn hiu thoi, ging nh

phng php PCM, n lng t ha s khc nhau gia tn hiu thoi v tn hiu d don. Nu s d on l chnh xc th s khc nhau gia cc mu tht v mu d on s nh hn, t khc bit hn so vi gia cc mu thoi thc, v s khc bit ny nu c lng t ho chnh xc th s cn s bit t hn so vi vic phi lng t ho cc mu thoi gc. Ti b gii m, tn hiu khc bit m c lng t ha c cng vi tn hiu d on khi phc li tn hiu thoi ban u. Hiu nng ca b m ha c ci thin thng qua vic s dng b d on v lng t thch nghi sao cho b d on v b lng t phi thch ng vi nhng c tnh thay i ca thoi ang c m ho. 2. M ha tham s M ha ADPCM khng th cho cht lng tt nu tc bit gim di 16 Kbps. tip tc gim tc bit, cn phi khai thc m hnh to ting ni. T y, ngi ta c khi nim m ha tham s hoc cn gi l m ha da trn m hnh. y, cc b m ha tham s hot ng s dng m hnh ngun tn hiu c to ra nh th no v c gng trch chn ra t tn hiu ang c m ha cc tham s ca m hnh v truyn chng ti b gii m. Cc b m ha tham s cho tn hieu thoi cn c gi l Vocoder (Voice + Coder). u im ca loi m ha ny l n rt c hiu qu i vi m thanh thoi, trong khi n li c nhc im l phc tp hn nhiu so vi phng php m ha dng sng v n ch c th x l c ting ni ca con ngi. a. M hnh LPC M hnh ton hc ca m ha d on tuyn tnh c minh ha hnh v di y:

Hnh 3.2: M hnh ton hc ca LPC y tn hiu thoi s l u ra ca b lc s - b lc LPC c u vo l dy cc xung hoc chui nhiu trng. Thng tin phi c gi n b gii m l cc tham s c trng cho b lc; m v thanh/hu thanh; nhng thay i cn thit ca tn hiu kch thch, chu k m thanh.

Qu trnh ny c cp nht lin tc 1020 ms theo bn cht khng dng ca tn hiu thoi. Hm truyn t ca b lc c xc nh theo biu thc

iu ny tng ng vi vic quan h vo ra ca b lc tun theo phng trnh vi phn tuyn tnh:

M hnh LPC c th c biu din li di dng vector nh sau:

A thay i theo chu k 20 ms, ti tn s ly mu 8000 Hz, chu k 20 ms tng ng vi 160 mu. Do vy tn hiu thoi c phn chia thnh cc khung c kch c 20 ms hay c 50 khung/sec. M hnh A theo biu thc trn tng ng vi:

a. LPC Vocoder 2,4Kbps B m ha thoi ny hot ng vi tc khong 2,4 Kbps hoc thp hn v to ra thoi c m thanh d hiu nhng khng trung thc so vi bn cht t nhin ca thoi con ngi. LPC Vocoder ch yu c p dng trong lnh vc qun s, cc m thanh t nhin ca thoi khng quan trng bng tc bit chm cho php bo v v m ha in thoi an ton.

Hnh 3.3: SK cnng LPC Vocoder 2,4Kbps 3. M ha lai

M ha lai c gng lp khong cch ranh gii gia m ha dng sng v m ha ngun. Mc d c nhiu dng m ha lai, nhng thnh cng v thng c s dng nhiu nht l cc b m ha trong min thi gian thc hin cc php phn tch thng qua vic tng hp - AbS (Analysic - by - Synthesis). Nhng b m ha ny s dng m hnh b lc d on tuyn tnh cho c quan pht m nh trong cc b m thoi LPC. Tuy nhin, thay th cho vic ng dng m hnh trng thi n gin hu thanh/v thanh, m hnh ny c gng gim ti a sai lch gia dng sng tn hiu u vo v dng sng tn hiu c xy dng li bng vic tm kim tn hiu kch thch l tng. Cc b m ha AbS ln u tin c gii thiu bi Atal v Remde v m hnh y ca h thng m ha v gii m AbS c miu t trong hnh 3.4 di y:

Hnh 3.4: Cu trc b m ha v gii m laiAbS Trc tin, b m ha AbS phn tch tn hiu thoi u vo thnh cc khung ngn c di 20 ms. Cc tham s ca mt khung s xc nh mt b lc tng hp tng ng vi khung v tn hiu kch thch tng ng cho mi b lc ny s c xc nh thng qua mt vng lp. Tn hiu kch thch phi m bo rng sai lch gia tn hiu u vo v tn hiu c ti to li l nh nht. Cui cng b m ha s truyn i nhng thng tin lin quan n cc b lc bao gm cc tham s v tn hiu kch thch tng ng vi mi b lc gi cho b gii m. b gii m, tn hiu kch thch s c a qua b lc tng hp xy dng li tn hiu thoi ban u. B lc tng hp thng l mt b lc tuyn tnh, ngn hn nhng n cng c th bao gm mt b lc cao m thanh (pitch filter) lin quan n m hnh tun hon di hn ca tn hiu thoi. Phng php ny cung cp tn hiu thoi c cht lng cao ti tc bit thp. Tuy nhin phc tp ca phng php ny l kh ln bi v tt c cc tn hiu kch thch c th c u phi

c a qua b lc tng hp tm ra tn hiu kch thch thch hp nht. Cu 4: khi nim c bn v x l nh v nh ng trn gc cm nhn ca th gic, nh l mt s vt i din cho ngi, sinh vt hay 1 vt no . ng trn gc k thut th nh c bit thng qua h thng th gic hai chiu. nh ng nh ta thy trn truyn hnh, phim nh l tp hp ca nhiu nh lin tip. Khi mt nh c s ha th n tr thnh nh s v nh s ny li tp hp cc phn t nh nh c gi l im nh pixel. Mi im nh li c biu din di dng mt s hu hn cc bt. Ta c th chia lm 3 loi nh khc nhau : Anh en trng : mi im nh c biu din = 1 bit. nh gray-scale mi im nh c biu din bi cc mc chi khc nhau, thng biu din bng 256 mc chi hay 8 bit cho mi im nh nh mu mi im nh c chia ra gm 1 tn hiu chi v cc tin hiu mu 1.6 nh dng file nh ph bin nh dng GIF ban u truyn cc hnh nh ha trn ng dy in thoi thng qua modem. Cc tiu chuyn GIF s dng thut ton nn Lempel - ziv - welch v c gii hn cho 256 mu ( 8 bit). Trong thc t GIF c 2 chun GIF87a v GIF89a. nh dng JPEG tiu chun ny c to ra bi 1 nhm lm vic ca t chc tiu chun quc t (ISO). Cc file nh c to ra theo chun nn JPEG nn c tn nh dng l .jpeg. JPEG cho php ngi dng thit lp mt mc mong mun v cht lng, hoc t l nn nh dng PNG xut pht t s ph bin internet nhm h tr nhiu hn cho cc nh dng hnh nh h thng c lp. Tiu chun PNG c th thay th cc tiu chun GIF v h tr ln n 48 bit mu sc. nh dng TIFF l mt tp tin nh dng ph bin hnh nh . Pht trin bin bi cty aldus nm 1980 sau c h tr bi microsoft. TIFF c th lu tr nhiu loi khc nhau ca hnh nh : 1 bit ,mu xm, 8 bit, 24 bt rgb.

nh dng EXIF l mt nh dng hnh nh cho my k thut s. nn cc tp tin exif s dng chun nn JPEG. nh dng WMF l nh dng file gc cho mi trng h iu hnh windows. Tp tin WMF thc s bao gm 1 tp hp cc hm giao din thit b ha. Khi chi game mt tp tin WMF cc ha m t c tr li. nh Dng BMP l tiu chun h thng nh dng tp tin ha lp cho microsoft c s dng trong microsoft pain v cc chng trnh khc. N c th lu tr nh 24 bt bitmap kh hiu qu. 1.7 M hnh nh mu trong nh Cc l thuyt v mu sc ch ra rng bt k mt mu no u c th tng hp t 3 mu chnh c bn c cng tng thch l xanh l cay v xanh l. : bc sng 615x10 -9 , xanh l cy 532, xanh l 470.Ta c mt s nguyn tc cng mu nh sau : magenta = red + blue, cyan = blue + green , yellow = green + red , white = red + green + blue. M hnh mu hoi tr CMY : magenta = white - green, cyan = white red, yellow = white - blue , black = red + blue + green Chuyn i t RGB thnh CMY: mt s h ta mu quan trng c chuyn i sang nhay thng qua s dng 1 s php bin i n gin. VD RGB thnh CMY ta s dng [ CMY] = [1 1 1 ] - [ R G B ] v ngc li. 1.8 M hnh nh mu trong video Cc nh trc khi truyn i phi c qut vi 3 thit b quang m mi mt trong s chng u c b lc mu khc nhau t pha trc ca thit b. Ba knh R , G , B c hiu chnh sao cho nu 1 vng trc u c qut th c 3 u ra phi c in p cn bng nhau. Do mt sc mu c xc nh nu 2 trong s 3 mu c bn c bit cho nn ta ch cn truyn i thng tin ca 2 tin hiu mu. Mu c bn t3 s c tnh ton li ti pha thu. chi : Y = 0.299R + 0.587G + 0.114B M hnh mu YUV Ban um m hnh YUV c s dng cho tn hiu video tng t h PAL. Mt phin bn ca YUV hin ny c s dng trong tiu chun CCIR 601 cho video k thut s. u tin

n m ha tn hiu chi Y v tip cc tin hiu mu U , V c xc nh : U = B-Y, V = R - Y. Trong cc tn hiu PAL tng t bng thng 1.3 MHz c ginh cho cc tin hiu mu U v V. Trong khi bng tn 5.5 MHz c dnh ring cho cc tin hiu chi Y. Vi tn hiu video s th 8 bt c dnh cho Y 4 bt dnh cho u,v. M hnh mu YIQ c dng trong truyn hnh mu h NTSC. Mc d U v V c nh ngha kh n gin, nhng n ko nm bt c h thng phn cp bc thp nht v nhy hin th ca con ngi. NTSC s dng I v Q thay th, n cng Y nhng vi U v V c quay i gc 33o .NTSC cp pht bng rng 4.2 MHz cho tn hiu chi Y; 1,5Mhz cho I v 0.6 MHz cho Q. M hnh mu YCbCr l chun quc t chnh thc. Tiu chun ny dng mt khng gian mu YCbCr. Bin i YCbCr c s dng trong nn nh JPEG v nn video MPEG v c lin quan n bin i YUV: Cb = ((B-Y)/1.772)+0.5 , Cr = ((R-Y)/1.402)+0.5). 2.10 Trnh by v cc phn t ca h thng x l nh s.

Thit b thu nhn hnh nh : L thit b bin i quang - in, cho php bin i hnh nh quang hc thnh tn hiu in di dng analog hay trc tip di dng s. C nhiu dng cm bin cho php lm vic vi nh sng nhn thy hoc hng nghoi. Ch yu thng dng l n ghi hnh in t v CCD. B nh trong v ngoi: Cc h thng x l nh s thng c dung lng rt ln lu tr nh tnh v ng di dng s.B nh s trong h thng x l nh c th chia l 3 loi: B nh m trong my tnh lu nh trong qu trnh x l( b nh ny c kh nng c ghi rt nhanh). B nh ngoi c tc truy cp trng i nhanh dng lu thng tin thng dng. B nh dng lu tr d liu.

B x l nh chuyn dng: S dng chip x l nh chuyn dng c kh nng thc hin nhanh cc lnh chuyn dng trong x l nh. Cho php thc hin cc qu trnh x l nh nh lc, lm ni ng bao, nn Trong b x l nh thng tch hp b nh m c tc cao. Mn hnh hin th: H thng bin i in - quang hay n hnh c nhin v bin i tn hiu in c cha thng tin ca nh thnh hnh nh trn mn hnh. My tnh: c th l my tnh bn c chc nng iu khin tt c cc b phn chc nng trong h thng x l nh s. Cu 6: Cc bc x l nh s Cc bc x l nh s c m t hv di y.

Hnh 6.1: Cc bc x l nh s Cc giai an chnh trong x l nh: 1. Thu nhn hnh nh: y l giai an u tin v quan trng nht trong ton b qu trnh x l nh. nh nhn c ti y chnh l nh gc a vo x l ti cc giai an sau, trng hp nh gc c cht lng km hiu qu ca cc bc x l tip theo s b gim. Thit b thu nhn c th l cc ng ghi hnh chn khng (vidicon, plumbicon...) hoc CCD (Charge-Coupled Device). 2. Tin x l nh: Giai an x l tng i n gin nhm nng cao cht lng nh tr gip cho cc qu trnh x l nng cao tip theo, v d: tng tng phn, lm ni ng bin, kh nhiu 3. Phn an: l qu trnh tch hnh nh thnh cc phn hoc vt th ring bit. y l mt trong nhng vn kh gii quyt nht trong lnh

vc x l nh. Nu thc hin tch qu chi tit th bi ton nhn dng cc thnh phn c tch ra tr nn phc tp, cn ngc li nu qu trnh phn an c thc hin qu th hoc phn an sai th kt qu nhn c cui cng s khng chnh xc. 4. Biu din v m t: l qu trnh x l tip sau khu phn an hnh nh. Cc vt th sau khi phn an c th c m t di dng chui cc im nh to nn ranh gii mt vng, hoc tp hp tt c cc im nh nm trong vng . Phng php m t thng qua ranh gii vng thng c s dng khi cn tp trung s ch vo hnh dng bn ngoi ca chi tit nh nh cong, cc gc cnh Biu din vng thng c s dng khi chng ta quan tm ti c tnh bn trong ca vng nh nh ng vn (texture) hay hnh dng (skeletal). 5. Nn nh: bao gm cc bin php gim thiu dung lng b nh cn thit lu tr hnh nh, hay gim bng thng knh truyn, cn thit truyn tn hiu hnh nh s. 6. Nhn dng: l qu trnh phn lai vt th da trn c s cc chi tit m t vt th (v d cc phng tin giao thng c trong nh). Cu 11.1: Cc phng php m ha dng trong k thut nn nh khng tn tht Trong mt vi ng dng nn khng tn tht ngha l ch c th chp nhn c s gim bt d liu. Trong mt vi trng hp khc, nhu cu vic nn khng tn tht c thc y bi vic xem xt hon cnh s dng hoc tnh t nhin ca nh sau khi nn. Thng thng chng cung cp h s nn t 2-10. Hn na, chng cng thch hp vi c nh nh phn v mc xm. K thut nn error-free thng bao gm 2 thao tc tng i c lp: (1) vic sp xp mt biu din nh thay th nh c trong s d tha interpixel ca n c gim bt v (2) m ho li biu din nh loi tr ti a s d tha. Nhng bc ny tng ng vi vic nh x v m ho k t ca kiu m ho ngun. 1. M ho vi di t m thay i: t c tc bt thp hn, cc h s bin i v cc ta ca cc vc t chuyn ng c m vi di thay i (VLC). Trong VLC, cc t m ngn c gn tng ng cc gi tr xc sut cao v cc t m di ng vi cc gi tr xc sut thp. di ca cc m nn bin i nghch o vi xc sut xut hin ca cc k hiu trong VLC. Tc bt cn m ha cc k hiu ny l nghch o ca logarit ca xc sut, tc l log2p. Do d, entropy ca cc k hiu l s bt trung bnh ti thiu cn biu din cc k hiu:

C hai loi VLC c ng dng trong m ha nh chun, l m ha Huffman v m ha s hc. M ha Huffman c s dng trong tt c cc b m ha (CODEC) chun gii m cc h s bin i cosin ri rc (DCT) c lng t ha cng nh gii m cc vec t chuyn ng. 2. M ho d on khng tn hao: y l mt phng php nn m n khng yu cu vic phn tch mt nh thnh mt lot cc mt phng bit. Vi cch ny quy chung li l m ho d on khng tn hao, c da trn c s s rt gn a im d tha ca cc im trong khng gian gn nhau bng cch rt ra v m ho ch vi cc thng tin mi trong mi im nh. Thng tin mi ca mt im nh m t s khc nhau gia cc gi tr d on v thc t ca im nh . Hnh 1 ch ra cc thnh phn c bn ca mt h thng m ho d on khng tn hao. H thng ny bao gm mt b m ho v mt b gii m, mi khi cha mt b d on ng nht. Vi mi im nh ln lt ca nh u vo, biu th bng fn , c a vo trc tin trong b m ho, b d on t o ra mt gi tr d on tc ca im nh trn c s s cc u vo c. u ra ca b d on sau c lm trn thnh gi tr nguyn gn nht, biu th bi fn, v c s dng to ra s khc bit hoc li d on.

Hnh 1: M ho d on khng tn hao S khc bit c m ho s dng m ho lot di thay i (bng b m ho biu tng) to ra thnh phn tip theo ca dng d liu nn. B gii m trong hnh 1 (b) ti to t cc t m lot di thay i nhn c v thc hin qu trnh o:

Cu 11.2: Cc phng php m ho dng trong k thut nn c tn tht Nn tn tht c xy dng trn c s chnh xc ca vic khi phc li nh trong lc trao i nhm tng hiu qu nn. Nu kt qu khng chnh xc (c th c hin th r rng hoc khng) c th chp nhn c, s tng dn trong vic nn l ng k. 1. M ho d, on c tn tht Nh hnh 1 ch ra, b lng t, b thu ton b chc nng ca b m ho li t nhin, c chn vo gia b m ho biu tng v im m li d on c to ra. N nh x li d on ti khong gii hn u ra, biu th l en, iu thit lp s lin i gia nn v kt hp mo vi m ho d on tn hao.

Hnh 1: M hnh m ha d on c tn tht (a): b m ho, (b): b gii m M ha DPCM y l phng php m ha d on c tn tht da trn nguyn tc pht hin s ging nhau v khc nhau gia cc im nh (pixels) gn nhau tm cch loi b cc thng tin tha. Phng php DPCM cn s dng c im ca mt ngi (km nhy vi mc lng t c chnh lch v chi gia im nh gn nhau, so vi mc lng t ha chnh lch nh) v cho php dng c trng phi tuyn v lng t ha. Hnh v 2 m t s khi ca b m ha v gii m DPCM

(b) 2. M ho bin i Trong m ho bin i, mt dng o ngc chuyn i (nh bin i Fourier) c s dng nh x mt nh vo mt h s bin i, phn m sau s c lng t ho v m ho. Cho hu ht cc nh t nhin, mt s ln ng k cc h s cng nh v c lng t th (hoc loi b hon ton) vi nh mo nh. S a dng trong bin i, bao gm bin i ri rc Fourier (DFT) c th c s dng bin i d liu nh. Hnh 3 ch ra h thng m ho chuyn i c trng. B gii m thi hnh bc o chui (vi s loi b thut ton lng t) ca b gii m, b ny thc hin bn hot ng cn xng n gin: Phn tch nh nh, bin i, lng t ho v m ha. Mt nh u vo kch c NN u tin c chia nh ra thnh cc nh nh c n n, sau c chuyn i to ra mng chuyn i nh nh, mi phn c kch c n n. Mc ch ca qu trnh chuyn i l sp t mi tng quan ca cc im nh ca mi nh nh, hoc gi nhiu thng tin nht c th vo mt s nh nht h s chuyn i. Cui qu trnh m ho l vic m ho (thng s dng m ho lot di) cc h s lng t. Bt k hay ton b cc bc m ho chuyn i c th thch ng vi ni dung vng nh gi l m ho chuyn i thch ng hoc sa i ton b nh nh gi l m ho chuyn i khng thch ng.

Hnh 3: H thng m ha bin i 3.M ho Wavelet M ha Wavelet da trn tng ca m ha bin i, thay v nn trc tip cc im nh (pixel) th nn cc h s sau khi bin i. im khc nhau c bn l Wavelet khng chia ra cc nh con trc khi bin i. Wavelet l php bin i c s dng phn tch cc tn hiu khng n nh (non-stationary) l nhng tn hiu c p ng tn s thay i theo thi gian. khc phc nhng hn ch ca bin i Fourier (FT), php bin i Fourier thi gian ngn (STFT) c xut. Ch c mt khc bit nh gia STFT v FT l trong bin i STFT, tn hiu c chia thnh cc khong nh v trong khong tn hiu c gi nh l tn hiu n nh. thc hin k thut ny cn chn mt hm ca s w sao cho di ca ca s ng bng cc khong tn hiu phn chia. Vi php bin i STFT, chng ta c th thu c p ng tn s - thi gian ca tn hiu ng thi m vi php bin i FT ta khng thc hin c. Bin i STFT i vi tn hiu lin tc thc c nh ngha nh sau: X ( f , t ) = [x (t )w (t )] . e-2jf dt Trong d di thi gian ca ca s l (t-), chng ta c th dch chuyn v tr ca ca s bng cch thay i gi tr t v thu c cc p ng tn s khc nhau ca an tn hiu ta thay i gi tr . Trn c s cch tip cn bin i STFT, bin i Wavelet c pht trin gii quyt vn v phn gii tn hiu (min thi gian hoc tn s) m STFT vn cn hn ch. Bin i Wavelet c thc hin theo cch: tn hiu c nhn vi hm Wavelet (tng t nh nhn vi hm ca s trong bin i STFT), ri thc hin bin i ring r cho cc khong tn hiu khc nhau trong min thi gian ti cc tn s khc nhau. Cch tip cn nh vy cn c gi l: phn tch phn gii MRA (Multi Resolution Analysis): phn tch tn hiu cc tn s khc nhau v cho cc phn gii khc nhau. MRA khi phn tch tn hiu cho php:

phn gii thi gian tt v phn gii tn s km cc tn s cao; phn gii tn s tt v phn gii thi gian km cc tn s thp. Nh vy k thut ny rt thch hp vi nhng tn hiu: c cc thnh phn tn s cao xut hin trong khong thi gian ngn, cc thnh phn tn s thp xut hin trong khong thi gian di chng hn nh nh v khung nh video. Hnh 4 minh ho mt h thng m ho Wavelet

Cu 16: Cc chun nn video MPEG 1. MPEG-1 Chun u tin c a ra bi MPEG, c tn gi ph bin l MPEG-1, c thit k cung cp vic nn video v audio cho vic lu tr v pht li trn cc CD-ROM. Chun MPEG-1 bao gm 3 phn. Phn 1 cp ti cc vn h thng (bao gm c ghp knh video v audio m ha), phn 2 cp ti video nn v phn 3 l v audio nn. Cc c tnh ca MPEG-1 Tn hiu video u vo ti mt b m ha video MPEG-1 c khun dng l 4:2:0 (Y:Cr:Cb) vi phn gii khng gian thng thng l 352288 hoc 352240 pixels. Mi khung video c m ha to ra mt bc nh m ha. C 3 loi chnh: cc nh I, cc nh P v cc nh B. (Chun ny cn xc nh thmmt loi nh l nh D nhng loi ny him khi s dng trong cc ng dng thc t). nh loi I: khng c d on b chuyn ng. nh loi I c s dng lm tham kho cho nhng nh d on xa hn. nh loi P: s dng d on b chuyn ng t mt nh tham kho. Do mt nh loi P c d on s dng d on chuyn tip v bn thn mt nh P c th c s dng lm tham kho cho cc nh d on xa hn.

nh loi B: s dng d on b chuyn ng t 2 nh tham kho, nh P v/hoc nh I trc v sau nh B hin ti. Thng thng, mt b m ha s chn mt ch d on (chuyn tip, hi tip hay hai chiu) sao cho to ra c nng lng thp nht trong macroblock sai phn. Bn thn cc nh loi B khng c s dng nh cc tham kho d on cho bt k khung d on xa hn no. Chun MPEG-1 khng thc s nh ngha thit k ca mt b m ha: thay vo , chun ny m t c php m ha v mt b gii m tham kho gi thuyt. Trong thc t, c php v chc nng c m t bi chun c ngha rng mt b m ha phi chia nhng chc nng nht nh. 2. MPEG-2 MPEG-2 ra i nhm cung cp mt s la chn ci tin cho truyn hnh tng t, mt vi c tnh ch yu c yu cu i vi nguyn l m ha video. N phi h tr hiu qu cc kch thc khung ln hn v m ha video kt hp. Vi nhng phn gii cht lng truyn hnh, video kt hp to ra hnh nh video mn hn. MPEG-2 bao gm 3 phn chnh: Video, Audio (da trn m ha audio ca MPEG- 1) v Systems (nh ngha, nhng phn chi tit hn MPEG-1, ghknh v truyn lung audio/visual m ha). Nhng im nng cao c thm vo bi MPEG-2 bao gm: M ha hiu qu video vi cht lng truyn hnh: ng dng quan trng nht ca MPEG-2 l truyn hnh s qung b. Cc chc nng chnh ca MPEG-2 c nh gi l c hiu qu trong m ha nhng phn gii truyn hnh tc bit trong khong t 3-5 Mbps. H tr m ha video kt hp: MPEG-2 video c mt vi c tnh h tr m ha mt cch linh hot video kt hp. Kh nng phn cp : MPEG-2 h tr 4 ch phn cp: phn cp theo kg, phn cp theo thi gian, phn cp SNR, phn vng d liu. 3. MPEG-4 Chun MPEG-4 c pht trin vi mc ch m rng kh nng ca nhng chun trc theo mt s hng. H tr cc ng dng c tc bit thp: MPEG-1 v MPEG-2 c hiu qu chp nhn c trong m ha cc tc bit khong trn 1 Mbps. Tuy nhin, nhiu ng dng ni bt (c bit l cc ng dng da trn Internet) yu cu tc bit truyn rt thp hn nhiu v MPEG-1 v 2 khng h tr vic nn hiu qu cc tc bit thp. H tr m ha da trn i tng: mt cnh video c th c x l nh mt tp cc i tng nn v i tng cn cnh hn l ch nh mt chui cc khung hcn. Loi m ha ny m ra mt di rng cc kh nng, v d nh m ha c lp cc i tng khc nhau trong mt cnh, dng li cc thnh phn cnh, ghp li (cc vt th t mt s ngun c kt hp trong mt cnh) v tng tc cao. MPEG-4

cung cp cc cng c cho php mi VO c m ha mt cch c lp, m ra nhiu kh nng mi. M ha da trn b cng c: MPEG-1 c linh ng rt hn ch, MPEG-2 a ra khi nim v b cng c gm cc profile v level m c th kt hp theo nhiu cch cho cc ng dng khc nhau. MPEG-4 m rng c im ny thnh mt tp hp cc cng c m ha c linh hot cao cho php 1 di cc ng dng cng nh mt khung chun ha cho php cc cng c mi c thm vo b cng c. Chun MPEG-4 c thit lp nh cc cng c m ha v chc nng mi c th c tng thm khi cc phin bn mi ca chun c pht trin, v do danh sch cc cng c cng tip tc tng ln. 4. MPEG-7 Mc tiu chnh ca MPEG-7 l xc nh mt tp hp chun cc b m t dng m t nhiu loi thng tin a phng tin vi cc codec chun, cng nh nhng c s d liu khc v thm ch c thng tin nghe nhn tng t. Cc b m t cng vi cc c ch m t s c kt hp vi bn thn ni dung to ra mt phng php tm kim ti liu nhanh v c hiu qu ca ngi dng. Cng vi vic m t ni dung, c th cn thm mt s loi thng tin khc v d liu a phng tin, nh: dng, Nhng iu kin truy cp ti liu, s phn loi, Lin kt n d liu lin quan khc, bi cnh. Cc phn t m MPEG-7 chun ha s h tr mt di rng cc ng dng. Hin nay MPEG-7 cng to ra mng li c kh nng tm kim ni dung a phng tin nh kh nng tm kim vn bn. iu ny c th p dng cho vic thu c ni dung ln cng nh cho nhng loi a phng tin cho php con ngi nhn dng ni dung nhm mc ch mua sm. Thng tin s dng cho vic khi phc ni dung c th c s dng bi cc thc th, cho vic la chn v lc t liu c qung b hoc cho qung co c nhn. 5. MPEG-21 Vic pht trin mt khung a phng tin chung s lm cho s lin kt gia nhng b phn nh nhng ngi cung cp ni dung, ti chnh, truyn thng, my tnh v cc b phn in t ca ngi s dng v cc khch hng tr nn thun tin v h tr s hot ng v tch hp hiu qu hn cho nhng m hnh, nguyn tc, li nhun v cc khun dng ndung. y l nhim v ca d n v khung a phng tin di ci tn MPEG 21. MPEG-21 l mt chun c mong i vi mc tiu m t mt bc tranh ln cho vic lm th no cc phn t khc nhau c th xy dng mt c s h tng cho vic phn phi v s dng ni dung a

phng tin ang tn ti hoc ang c pht trin c th lm vic cng nhau. MPEG-21 bao gm 1 pht biu chung v ni dung a phng tin, mt ngn ng lm n gin ha s tng thch ng ca ni dung vo mng phn phi v cc thit b s dng, v nhiu cng c khc nhau lm cho s qun l cc quyn s c kh nng lin kt. Cu 15: Cc chun nn nh JPEG 1. Chun JPEG JPEG (Joint Photographic Experts Group) l tn mt t chc nghin cu v cc chun nnnh (trc y l ISO) c thnh lp vo nm 1982. Nm 1986, JPEG chnh thc c thit lp nh s kt hp gia nhm ISO/IEC v ITU. n nm 1994, JPEG c khng nh vi tiu chun ISO 10918-1. JPEG l nh dng nn nh c tn tht. H s nn cng cao th hnh nh sau khi gii nn s cng b sai lch nhiu hn, n ch gn ging nh ban u ch khng t hon ton nh hnh nh gc. Tiu chun JPEG c nh ra cho nn nh tnh n sc v mu. Tuy nhin n cng c s dng cho nhiu ng dng vi nh ng bi v n cho cht lng khi phc kh tt v t tnh ton hn so vi nn MPEG. Nn theo chun JPEG l mt tin trnh nhiu bc. Trc ht l bc qui tc ha lm cho nh c nhiu an ging nhau hn thc t. Bc tip theo l ly mu cho cc knh mu. y l 1 trong 2 cng an lm mt thng tin v ch thc hin khi bn chn xc lp t l nn cao/cht lng thp (high compression/low quality) ca JPEG. Ly mu (subsampling) ngha l loi b c h thng cc thng tin mu sc i vi cc hng hoc ct im t l cho trc. Bc tip theo, nh gc c chia thnh cc khi nh (block) nh kch thc 8x8 khng chng cho ln nhau. Tip theo, gi tr ca mi im nh mi khi nh s c tr i 128. Bc cui cng ca qu trnh nn l s dng m ho entropy chng hn m ho Huffman cho cc AC v DC (sau khi m ho DPCM) tng thm hiu qu nn cng nh gim thiu li. pha gii nn, lung bt m ho c gii m entropy, sau mng hai chiu cc h s DCT c lng t ho c gii sp xp Zigzag v gii lng t. Qu trnh nn v gii nn c m t theo cc hnh v di y:

Hnh 1: S qu trnh nn nh theo chun JPEG

Hnh 2: S qtrnh gii nn theo chun JPEG 2. Chun JPEG-2000 H thng nn JPEG-2000 c t l xuyn m thp hn hn cc chun cng ngh JPEG truyn thng, cho d JPEG-2000 khng phi l mt chun mi hon ton m c pht trin t cc tiu chun c. iu quan trng hn, n cho php tch cc phn gii khc nhau, cc im nh, cc min quan tm, cc thnh phn v hn na, tt c chng c a vo mt dng bit nn n. N cho php mt ng dng x l hoc truyn cc thng tin cn thit cho bt k mt thit b no, t mt nh ngun c m ha theo chun JPEG-2000. Tnh tng thch ny l mt trong nhng u im ni tri m cc k thut x l JPEG truyn thng gp rt nhiu kh khn. Khng ging nh tiu chun JPEG truyn thng, k thut m ha da trn bin i cosin ri rc dng m Huffman, JPEG-2000 s dng k thut m ha dng sng ri rc dng m s hc. S dng DWT

cho php nng cao phn gii tn s mang tnh khng gian trong th hin bin i hnh nh. S khi ca qu trnh nn v gii nn theo chun JPEG-2000 m t hnh 3 di y:

Hnh 3: S qu trnh nn v gii nn theo chun JPEG-2000 Bc 1: X l trc bin i Do s dng bin i Wavelet, JPEG2000 cn c d liu nh u vo dng i xng qua 0. X l trc bin i chnh l giai an m bo d liu a vo nn nh c dng trn. pha gii m, giai an x l sau bin i s tr li gi tr gc ban u cho d liu nh. Bc 2: Bin i lin thnh phn Giai an ny s loi b tnh tng quan gia cc thnh phn ca nh. JPEG-2000 s dng hai loi bin i lin thnh phn l bin i mu thun nghch (RCT) v bin i mu khng thun nghch (ICT) trong bin i thun nghch lm vic vi cc gi tr nguyn, cn bin i khng thun nghch lm vic vi cc gi tr thc. ICT v RCT chuyn d liu nh t khng gian mu RGB sang YCrCb. RCT c p dng trong c hai dng thc nn c tn tht v khng tn tht, cn ICT ch p dng cho nn c tn tht. Vic p dng cc bin i ny trc khi nn nh khng nm ngoi mc ch lm tng hiu qu nn. Cc thnh phn Cr, Cb c nh hng rt t ti s cm nhn hnh nh ca mt trong khi thnh phn chi Y c nh hng rt ln ti nh. Bc 3: Bin i ring thnh phn Bin i ring thnh phn c p dng trong JPEG-2000 chnh l bin i Wavelet. Bc 4: Lng t ho Gii lng t ho Cc h s ca php bin i s c tin hnh lng t ho. Qu trnh lng t ho cho php t t l nn cao hn bng cch th hin cc gi tr bin i vi chnh xc tng ng cn thit vi mc chi tit ca nh cn nn. Cc h s bin i s c lng t ho theo php lng t ho v hng. Bc 5: M ho

C th s dng nhiu phng php m ho khc nhau cng nh nhiu cch bin i Wavelet khc nhau c th thuc cht lng nh tng ng vi ng dng cn xl. JPEG-2000 l mt chun nn c th to ra kh nng nn nh tt hn ng k so vi JPEG. Vi cng cht lng hnh nh, thng thng JPEG-2000 c th nn nh gp t nht l 2 ln so vi JPEG. Vi tn s nn cao, cht lng ca hnh nh gim t hn. Tuy nhin iu ny cng ng ngha vi vic tng phc tp v cc yu cu lu tr trong qu trnh m ha v gii m. Mt tc ng khc ca iu ny l nhng hnh nh c the tn mt nhiu thi gian hn khi lu tr v hin th.