人类社会生存三大要素.ppt
2023/11/11,1,compression chap01.ppt,Introduction to Data Compression,2023/11/11,compression chap01.ppt,2,序,人類社會生存三大要素物質、能量與信息訊息非獨立存在,以相互聯繫為前提要依附於載體才能處理、傳輸、操作控制理論的創立:N.Wiener訊息理論的定義:C.Shannon信息的定量測試與分析,2023/11/11,compression chap01.ppt,3,資料壓縮,資料壓縮的定義用來減少表示一個信息(資訊)所需之訊號空間量的程序。例:長話短說、縮寫資料壓縮的目的 降低儲存資料的空間減少資料傳輸速度,2023/11/11,compression chap01.ppt,4,Why Data Compression?,786488 bytes,23116 bytes,Cr=34.0,2023/11/11,compression chap01.ppt,5,Why Data Compression?,786488 bytes,33079 bytes,Cr=23.78,2023/11/11,compression chap01.ppt,6,Why Data Compression?,786488 bytes,49746 bytes,Cr=15.80,2023/11/11,compression chap01.ppt,7,Why Data Compression?,786488 bytes,26614 bytes,Cr=29.55,2023/11/11,compression chap01.ppt,8,Why Data Compression?,786488 bytes,25485 bytes,Cr=30.86,2023/11/11,compression chap01.ppt,9,壓縮資料,文書語音(speech)、音訊(audio)與心電圖(electrocardiogram,ECG)影像資料視訊會議及高品質電視,2023/11/11,compression chap01.ppt,10,傳輸影像資料 1024*1024-4Mbits 傳輸媒體 傳輸速率 傳輸時間 電信局電話線 2400 bps 1740秒(29分)對絞線或專線 9600 bps 437秒(7.3分)T1專線 1.544 Mbps 2.7 秒 同軸電覽 3-10 Mbps 1.4 秒 0.42 秒 光纖纜線 100 Mbps 0.042秒醫療影像資料CT(電腦斷層攝影):512512(像素)12(位元像素)30(每一次檢查所需之影像張數)=16MB次,MRI(核磁共振):256 256(像素)12(位元像素)50(每一次檢查所需之影像張數)=6.5MB次,US(超音波):512 512(像素)6(位元像素)36(每一次檢查所需之影像張數)=9.5MB次,X光片:2048 2048(像素)12(位元像素)4(每一次檢查所需之影像張數)=32MB次,2023/11/11,compression chap01.ppt,11,ECG,2023/11/11,compression chap01.ppt,12,HDTV and TV,Image SizeNTSC:512 480PAL:512 512CCIR 601(Studio):720 480/576HDTV:1440 960 Super HDTV:4000 2000(Japan)CIF(low bitrate):360 240/288(Video conference)QCIF:180 120/144,2023/11/11,compression chap01.ppt,13,HDTV and TV,A 512512 8 3=6 M bits TV image should be transmitted in about 1/30 sec by any transmission line!,2023/11/11,compression chap01.ppt,14,為何資料可以被壓縮?,資料累贅(data redundancy)資料中所含重複或不必要的資料編碼累贅(coding redundancy)符號間之累贅(inter-symbol redundancy)畫面間累贅(inter-frame redundancy),2023/11/11,compression chap01.ppt,15,編碼累贅(coding redundancy),沒有充分的使用代表資訊的位元資料。s1,s2,sq:所有可能出現的符號 p(si):符號出現的si機率平均一個符號需用Lavg個位元:Lavg=(l(si)p(si),for i=1 to q固定長度編碼(fixed length coding):Lavg=3 變動長度編碼(variable length coding):Lavg=2.7(表1.1,p1-10),2023/11/11,compression chap01.ppt,16,Example:VLC,rK pr(rK)Code1 l1(rK)Code2 l2(rK)r0=0 0.19 000 3 11 2 r1=1 0.25 001 3 01 2 r2=2 0.21 010 3 10 2 r3=3 0.16 011 3 001 3 r4=4 0.08 100 3 0001 4 r5=5 0.06 101 3 00001 5 r6=6 0.03 110 3 000001 6 r7=7 0.02 111 3 000000 6,2023/11/11,compression chap01.ppt,17,Coding Redundancy,Cr=3/2.7=1.11,Lavg(Code2)=l2(rK)Pr(rK)=2(0.19)+2(0.25)+2(0.21)+3(0.16)+4(0.08)+5(0.06)+6(0.03)+6(0.02)=2.7 bits,2023/11/11,compression chap01.ppt,18,符號間之累贅(inter-symbol redundancy),沒有考慮符號間前後的關聯性10,12,13,15,16,17,20,2110,2,1,2,1,1,3,1利用前後取樣點的關聯性來進行資料壓縮,如可以從目前的取樣值來預測下一個取樣值的範圍。(如影像,聲音資料),2023/11/11,compression chap01.ppt,19,Inter-sample Redundancy,2023/11/11,compression chap01.ppt,20,Inter-pixel Redundancy,2023/11/11,compression chap01.ppt,21,畫面間累贅(inter-frame redundancy),video資料之前後frames間的資料大多很相似,2023/11/11,compression chap01.ppt,22,Psycho-visual Redundancy,Certain information has less relative importance than other information in normal visual processing.This information is said to be psycho-visual redundant.Psycho-acoustic redundancy in MPEG audio coding.,2023/11/11,compression chap01.ppt,23,IGS(improved gray scale)quantization recognizes the eyes inherent sensitivity to edges and breaks them up by adding to each pixel a pseudo-random number.Pixel Gray Level Sum IGS Codei-1 0000 0000 i 0110 1100 0110 1100 0110 i+1 1000 1011 1001 0111 1001i+2 1000 0111 1000 1110 1000i+3 1111 0100 1111 0100 1111If MSBi(14)of Gray Leveli=1111 then Sumi=Gray Leveli else Sumi=Gray Leveli+LSBi-1(58)of Sumi-1,2023/11/11,compression chap01.ppt,24,Psycho-visual Redundancy,2023/11/11,compression chap01.ppt,25,Temporal Redundancy,2023/11/11,compression chap01.ppt,26,Classes of Data Compression,Lossless LossyReversal IrreversalNoiseless coding Fidelity-reduction coding Redundancy reduction Entropy reduction,2023/11/11,compression chap01.ppt,27,Classes of Data Compression,2023/11/11,compression chap01.ppt,28,Fidelity Criteria,objective fidelity criteriaRoot mean square error Rmssignal-to-noise ratio SNR,2023/11/11,compression chap01.ppt,29,Fidelity Criteria,Peak signal-to-noise ratio PSNR,2023/11/11,compression chap01.ppt,30,Fidelity Criteria,Subjective fidelity criteria Value Rating Description 1 Excellent extreme high quality,as good as you could desired.2 Fine high quality,providing enjoyable view 3 Passable acceptable quality4 Margined poor quality 5 Inferior very poor image6 Unusable so bad that you could not watch it,2023/11/11,compression chap01.ppt,31,Standards,JBIG(binary images)Better performance than G3+G4 by CCITTProgressive transmissionAdaptive(e.g.,half-toned images,.)G4 cause 50%data expansion for this sort of images,2023/11/11,compression chap01.ppt,32,Standards,JPEG(still image)DCT based baseline system(ch.10)extended system features(progressive build-up)lossless compressorHuffman coding and Arithmetic codingJPEG2000wavelet-basedStandard appeared in 2001,2023/11/11,compression chap01.ppt,33,Standards,MPEG,H.261(full motion video,video conference)MPEG1,MPEG2(1.5 M bits/sec,310Mbits/sec)30 frames of 352*240 pel/sec,or25 frames of 352*288 pel/sec.1/6 for audio,5/6 for videoMPEG3(particular for HDTV,not so popular as MPEG1,MPEG2)MPEG4telephone line(64 k bits/s)low bit rate coding,