Cac Loai Anh JPEG-JPEG Luy Tien-JPEG Khong Ton Hao

Click here to load reader

download Cac Loai Anh JPEG-JPEG Luy Tien-JPEG Khong Ton Hao

of 43

  • date post

    31-Jul-2015
  • Category

    Documents

  • view

    986
  • download

    1

Embed Size (px)

Transcript of Cac Loai Anh JPEG-JPEG Luy Tien-JPEG Khong Ton Hao

V

V

UY

P LX L D L U TI 6:

P

m hiu cc loi nh JPEGio vin hng dn: Sinh vin thc hin: PGS.TS. Nguyn

Th Hong LanTTM-K53 TTM-K53 TTM-K53 TTM-K53 TTM-K53 TTM-K53 TTM-K53 SPKT-K53

Nguyn Vn Ha Nguyn Khnh Hng L B Huy Nguyn L Hoi Nam Thn Vn Quang Trn Vn Ton Nguyn Hong Vit Trn Minh Hi

20081020 20081279 20081131 20081819 20082082 20082715 20083139 20086357

4/2012

A. B. I.

M U ............................................................................................................ 4 DU ........................................................................................................ 5

ii thiu chung v chun JPE ................................................................ 5 1. Gii thiu chung ......................................................................................... 5 1.1. 1.2. 2. JPEG l g ?......................................................................................... 5 u nhc im ca phng php nn nh JPEG ............................... 6

Cc loi JPEG ............................................................................................. 7 2.1. 2.2. 2.3. 2.4. JPEG (1992) ........................................................................................ 7 LS-JPEG (Lossness JPEG) ................................................................. 8 JPEGSearch ...................................................................................... 10 JPEGXR ............................................................................................ 11

II. 1. 2.

thut nn nh JPE ............................................................................. 11 Gii thiu chung v k thut nn nh ....................................................... 11 Phng php nn nh JPEG ly tin(JPEG progressive) ......................... 15 2.1. 2.2. S khi ......................................................................................... 15 Phn tch s khi .......................................................................... 16

2.2.1. Bin i DCT ............................................................................... 16 2.2.2. Lng t ha ................................................................................ 18 2.2.3. Qut zig-zag ................................................................................. 19 2.2.4. M ha thnh phn DC ................................................................ 20 2.2.5. M ha thnh phn AC ................................................................ 22 2.2.6. Gii nn ........................................................................................ 23 2.3. Gii thch mc ch ........................................................................... 24

2

2.4. 3.

c im ca nn JPEG ly tin ...................................................... 25

Phng php nn nh JPEG khng tn hao(JPEG Lossless) ................... 26 3.1. 3.2. Khi nim .......................................................................................... 26 Cc phng php .............................................................................. 26

3.2.1. Phng php m ha di lot RLE ......................................... 26 3.2.2. Phng php m ha Huffman .................................................... 28 3.2.3. Phng php m ha Lemple Ziv ............................................. 32 3.2.4. Phng php m d on............................................................. 33 III. IV. 1. 2. C. ng dng ca cc loi JPE ................................................................. 35 h nghim nn nh JPE v so snh ................................................. 36

Mi trng cng c .................................................................................. 36 Th nghim kt qu v so snh ................................................................ 37 LU ..................................................................................................... 41

L U P

M

...................................................................................... 42 V ................................................................................... 43

3

A. M UCng vi s pht trin mnh m ca my tnh v s ra i ca Internet th vic tm mt phng php nn nh gim bt khng gian lu tr thng tin v truyn thng tin trn mng nhanh chng ang l mt yu cu cn thit. Trong nhng nm gn y, c rt nhiu cc phng php v ang c nghin cu rng ri thc hin vic nn nh. Tt c u vi mt mc ch chung l lm th no biu din mt nh vi dung lng t nht c th ti thiu ho dung lng knh truyn v khng gian lu tr trong khi vn gi c tnh trung thc ca nh. V JPEG l mt trong nhng phng php nn nh kh hiu qu.Trong ti ny chng ta nghin cu v : Cc loi nh JPE .

4

B.I. 1. ii thiu chung v chun JPE ii thiu chung 1.1. JPEG l g ?

DU

JPEG vit tt ca Joint Photographic Experts Group l tn ca mt nhm nghin cu pht minh ra chun ny, t nm 1986 nhm nghin cu a ra chun nn nh JPEG v n nm 1994 JPEG c khng nh vi tiu chun ISO 10918-1. JPEG l nh dng nn nh c tn tht, mc d c s thay i ca cc bin th nhng n vn gi c nguyn l ca chun nn c bn JPEG (cc nh dng m rng khc nh .jpg, .jpeg, .jpe, .jfif v .jif). JPEG c s dng lu tr nh v truyn qua mng Internet (World Wide Web). nh dng nn JPEG c s dng trong tt c my nh k thut s c kch thc rt nh nn thng chp c nhiu nh trn mt th nh, JPEG d hin th trn mn hnh, nh c th chuyn nhanh qua th in t (dung lng t 300KB n 700KB), nh JPEG cht lng cao c dung lng khong vi MB hay ln hn, khuyt im chnh ca nh JPEG l nh c cht lng thp, nh thng b suy gim nu so vi nh gc. Cng ngh nn nh JPEG l mt trong nhng cng ngh nn nh hiu qu, cho php lm vic vi cc nh c nhiu mu v kch c ln. T l nn nh t mc so snh ti vi chc ln. Tuy nhin c ci ny phi mt ci khc, l quy lut b tr t nhin. Thng thng cc nh mu hin nay dng 8 bit (1 byte) hay 256 mu thay cho tng mc cng ca cc mu , xanh l cy v xanh da tri. Nh th mi im ca nh cn 3 byte lu m mu, v lng byte mt nh mu ny chim gp 24 ln nh trng en cng c. Vi nhng nh ny cc phng php nn nh nh IFF (Image File Format) theo phng php RLE (Run Length Encoding) khng mang li hiu qu v h s nn ch t ti 2:1 hay 3:1 (tt nhin l kt qu nn theo phng php RLE ph thuc vo c th tng loi nh, v d nh kt qu rt tt vi5

cc loi nh t i mu). u im cao ca phng php ny l nh nn sau khi gii nn s trng khp vi nh ban u. Mt s phng php nn khc khng mt thng tin nh ca Lempel - Ziv - Welch (LZW) c th cho h s nn ti 6:1. Nhng nh th vn cha tht p ng yu cu i hi thc t. Phng php nn nh theo thun JPEG c th t h s nn ti 80:1 hay ln hn, nhng phi chu mt thng tin (nh sau khi gii nn khc vi nh ban u), lng thng tin mt mt tng dn theo h s nn. Tuy nhin s mt mt thng tin ny khng b lm mt cch cu th. JPEG tin hnh sa i thng tin nh khi nn sao cho nh mi gn ging nh nh c, khin phn ng mi ngi khng nhn thy s khc bit. V bn hon ton c th qun l s mt mt ny bng cch hn ch h s nn. Nh th ngi dng c th cn nhc gia ci li ca vic tit kim b nh v mc mt thng tin ca nh, chn phng n thch hp. 1.2. u nhc im ca phng php nn nh JPE u im JPEG cho php nn nh vi t s nn ln n 80:1 hoc cao hn, hin th cc hnh nh y mu hn (full-colour) cho nh dng di ng m kch thc file li nh hn.JPEG cng c s dng rt nhiu trn Web. Li ch chnh ca chng l chng c th hin th cc hnh nh vi mu chnh xc true-colour (chng c th ln n 16 triu mu), iu cho php chng c s dng tt nht cho cc hnh nh chp v hnh nh minh ha c s lng mu ln. hc im Nhc im chnh ca nh dng JPEG l chng c nn bng thut ton lossy (mt d liu). iu ny c ngha rng hnh nh ca bn s b mt mt s chi tit khi chuyn sang nh dng JPEG. ng bao gia cc khi mu c th xut hin nhiu im m, v cc vng s mt s r nt, t s nn cng cao th s mt mt thng tin trn nh JPEG cng ln. Ni mt cch khc, nh dng JPEG thc hin bo qun tt c thng tin mu trong hnh nh , tuy nhin vi cc hnh nh cht lng mu cao high-colour nh hnh nh chp th iu ny s khng h hn g.Cc nh JPEG khng th lm trong sut hoc chuyn ng - trong trng hp ny bn s s dng nh dng GIF (hoc nh dng PNG to trong sut).6

2.

c loi JPE y l loi JPEG tiu chun. Phng php nn nh da trn nguyn l sau:

2.1. JPEG (1992) nh mu trong khng gian ca 3 mu RGB (Red Green Blue) c bin i v h YUV (hay YCBCr) (iu ny khng phi l nht thit, nhng nu thc hin th cho kt qu nn cao hn). H YUV l kt qu nghin cu ca cc nh sn xut v tuyn truyn hnh h Pal, Secam v NTSC, nhn thy tn hiu video c th phn ra 3 thnh phn Y, U, V (cng nh phn theo mu chun , xanh l cy v xanh da tri). V mt iu th v l th gic ca con ngi rt nhy cm vi thnh phn Y v km nhy cm vi hai loi U v V. Phng php JPEG nm bt pht hin ny tch nhng thng tin tha ca nh. H thng nn thnh phn Y ca nh vi mc t hn so vi U, V, bi ngi ta t nhn thy s thay i ca U v V so vi Y. Giai on tip theo l bin i nhng vng th hin dng bin i cosin ri rc (thng thng l nhng vng 8x8 pixel). Khi thng tin v 64 pixel ban u s bin i thnh ma trn c 64 h s th hin "thc trng" cc pixel. iu quan trng l y h s u tin c kh nng th hin "thc trng" cao nht, kh nng gim rt nhanh vi cc h s khc. Ni cch khc th lng thng tin ca 64 pixel tp trung ch yu mt s h s ma trn theo bin i trn. Trong giai on ny c s mt mt thng tin, bi khng c bin i ngc chnh xc. Nhng lng thng tin b mt ny cha ng k so vi giai on tip theo. Ma trn nhn c sau bin i cosin ri rc c lc bt s khc nhau gia cc h s. y chnh l lc mt nhiu thng tin v ngi ta s vt b nhng thay i nh ca cc h s. Nh th khi gii nn nh nn bn s c c nhng tham s khc ca cc pixel. Cc bin i trn p dng cho thnh phn U v V ca nh vi mc cao hn so vi Y (mt nhiu thng tin ca U v V hn). Sau th p dng phng php m ha ca Huffman: Phn tch dy s, cc phn t lp li nhiu c m ha bng k hiu ngn (marker). Khi gii nn nh ngi ta ch vic lm li cc bc trn theo qu trnh ngc li cng vi cc bin i ngc.

7

V phng php ny thc hin vi cc vng nh (thng thng l 8 x 8 pixel) nn hay xut hin s mt mt thng tin trn vng bin ca cc vng (block) ny. Hin nay ngi ta gii quyt vn ny bng cch lm trn nh sau khi bung nn che lp s khc bit ca bin gii gia cc block. Mt h nn nh theo chun JPEG cng algorithm lm trn nh c cng ty ASDG a ra trong h Art Department Professional. 2.2. LS-JPEG (Lossness