Digital Image Processing7Word文档格式.docx
- 文档编号:18412297
- 上传时间:2022-12-16
- 格式:DOCX
- 页数:9
- 大小:861.41KB
Digital Image Processing7Word文档格式.docx
《Digital Image Processing7Word文档格式.docx》由会员分享,可在线阅读,更多相关《Digital Image Processing7Word文档格式.docx(9页珍藏版)》请在冰豆网上搜索。
A.Objectives
i.Understandingtheconceptoflosslessandlossycompression.
ii.StudyJPEGcompressionforimagesandtheeffectsoflossycompression
iii.ImplementiterativesceneandimageoperationsviaMATLABscripting
B.Methods
ThisexperimentwillinvolveJPEGencoding,andJPEGdecoding.Inthisexperiment,westudiedhowmultiplicativelyscalingthequantizationmatrixchangesthecompressionrationandimagequality.
Project7containsJPEGcompressionanalysis.
C.Results
ResultsdescribedinorderfollowingMethodssectionabove.
1.)Thediscretecosinetransfer(DCT)wasperformedontheimageforan8x8block.Thematrixwasthenquantizedusingthatquantifier.NextdequantizedtheimageandperformedtheinverseDCTtogetbackouroriginalimage.
CreateanMfileandenterthefollowing:
x=getpgm('
lena.pgm'
);
%Getagraymapimage
Tx=dct(x);
%Dothe8x8cosinetransform
QTx=quant(Tx);
%Quantize,usingstandard8x8quantizer
Ty=dequant(QTx);
%Dequantize
y=invdct(Ty);
%Recovertheimage
imgError=imabsdiff(x,y);
figure('
Name'
'
8x8DCT'
NumberTitle'
off'
MenuBar'
none'
subplot(2,2,2);
imagesc(y);
title('
QuantizedImage'
subplot(2,2,1);
imagesc(x);
OriginalImage'
subplot(2,2,3);
imagesc(imgError);
ErrorMatrix'
colormap('
gray'
TheresultsareshowninFigure1.
Figure1:
OriginalImage,CompressedImageandErrorMatrix.
ThedifferencesbetweentheoriginalimageandtheonethatcomputedviaDCTandquantizationmethodswerecompared.Therearedifferencesintheimagesasexpectedaslossycompressionremovessomeinformationfromtheimagewhenperformingcompression.
2.)Thencreatealoopfrom1to10andranthecompressionalgorithmdescribedaboveontheoriginalimage.Witheachiteration,wemultiplicativelyscaledthequantizationmatrixbytheloopindextoseeitseffectsoncompression.Youcanseethatastheiterationgethigher,thecompressionrationincreasesandimagequalityislost.ThefactorusedtoadjustthequantizationmatrixiscalledtheQ-Factor.
EnterthefollowingintheMfileabove.
r=[];
fori=1:
10,
setdefaults;
%Setthedefaultquantizer,etc.
x=getpgm('
stdQ=...
[1611101624405161;
1212141926586055;
1413162440576956;
1417222951878062;
182237566810910377;
243555648110411392;
49647887103121120101;
7292959811210010399];
QuatizationMatrix=stdQ.*i;
y=zeros(size(x));
[y,c]=jpeg(x,QuatizationMatrix);
r=[r,c];
sprintf('
Iteration:
%i'
i),'
subplot(1,1,1);
colormap(gray);
end
Theresultsareshowninthefollowing.
Figure2:
QualityoftheImagebyDifferentIteration
3.)Plotthecompressionrationversusiteration.
figure('
CompressionRatiovs.Interation'
plot(r);
xlabel('
Iteration'
ylabel('
CompressionRation(percentage)'
TheresultsareshowninFigure3.
Figure3:
Plotofthecompressionratiovs.iterationorquantizationmatrixscalingfactor.
4.)JPEGEncoderandDecoder
JPEGEncoderBlockDiagram
JPEGDecoderBlockDiagram
TheDCT-basedencodercanbethoughtofasessentiallycompressionofastreamof8x8blocksofimagesamples.Each8x8blockmakesitswaythrougheachprocessingstep,andyieldsoutputincompressedformintothedatastream.Becauseadjacentimagepixelsarehighlycorrelated,the`forward'
DCT(FDCT)processingsteplaysthefoundationforachievingdatacompressionbyconcentratingmostofthesignalinthelowerspatialfrequencies.Foratypical8x8sampleblockfromatypicalsourceimage,mostofthespatialfrequencieshavezeroornear-zeroamplitudeandneednotbeencoded.Inprinciple,theDCTintroducesnolosstothesourceimagesamples;
itmerelytransformsthemtoadomaininwhichtheycanbemoreefficientlyencoded.
AfteroutputfromtheFDCT,eachofthe64DCTcoefficientsisuniformlyquantizedinconjunctionwithacarefullydesigned64-elementQuantizationTable.Atthedecoder,thequantizedvaluesaremultipliedbythecorrespondingQTelementstorecovertheoriginalunquantizedvalues.Afterquantization,allofthequantizedcoefficientsareorderedintothe"
zig-zag"
sequence.Thisorderinghelpstofacilitateentropyencodingbyplacinglow-frequencynon-zerocoefficientsbeforehigh-frequencycoefficients.TheDCcoefficient,whichcontainsasignificantfractionofthetotalimageenergy,isdifferentiallyencoded.
D.Conclusions
Uncompressedmultimedia(graphics)datarequiresconsiderablestoragecapacityandtransmissionbandwidth.Despiterapidprogressinmass-storagedensity,processorspeeds,anddigitalcommunicationsystemperformance,demandfordatastoragecapacityanddata-transmissionbandwidthcontinuestooutstripthecapabilitiesofavailabletechnologies.Therecentgrowthofdataintensivemultimedia-basedwebapplicationshavenotonlysustainedtheneedformoreefficientwaystoencodesignalsandimagesbuthavemadecompressionofsuchsignalscentraltostorageandcommunicationtechnology.
Acommoncharacteristicofmostimagesisthattheneighboringpixelsarecorrelatedandthereforecontainredundantinformation.Theforemosttaskthenistofindlesscorrelatedrepresentationoftheimage.Twofundamentalcomponentsofcompressionareredundancyandirrelevancyreduction.Redundancyreductionaimsatremovingduplicationfromthesignalsource(image/video).Ingeneral,threetypesofredundancycanbeidentified:
✧SpatialRedundancyorcorrelationbetweenneighboringpixelvalues.
✧SpectralRedundancyorcorrelationbetweendifferentcolorplanesorspectralbands.
✧TemporalRedundancyorcorrelationbetweenadjacentframesinasequenceofimages(invideoapplications).
Imagecompressionaimsatreducingthenumberofbitsneededtorepresentanimagebyremovingthespatialandspectralredundanciesasmuchaspossible.
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Digital Image Processing7
![提示](https://static.bdocx.com/images/bang_tan.gif)