digital image processing projects 数字图像处理 冈萨雷斯 第六章所有程序和报告要点.docx
- 文档编号:6227822
- 上传时间:2023-01-04
- 格式:DOCX
- 页数:10
- 大小:626.63KB
digital image processing projects 数字图像处理 冈萨雷斯 第六章所有程序和报告要点.docx
《digital image processing projects 数字图像处理 冈萨雷斯 第六章所有程序和报告要点.docx》由会员分享,可在线阅读,更多相关《digital image processing projects 数字图像处理 冈萨雷斯 第六章所有程序和报告要点.docx(10页珍藏版)》请在冰豆网上搜索。
digitalimageprocessingprojects数字图像处理冈萨雷斯第六章所有程序和报告要点
DigitalImageProcessing
Projectchapter:
Chapter6
Projectnumber:
Proj06-01~Proj06-04
Student'sname:
Student'snumber:
Class:
Contents
Web-SafeColors
Exp.20,PROJECT06-01
Objective
ToknowwhatareWeb-safecolors,howtogeneratetheRGBcomponentsforagivenjpegcolorimage,orconvertanimagetoRGBmanually?
Requirements
(a)WriteacomputerprogramthatconvertsanarbitraryRGBcolorimagetoaweb-safeRGBimage(seeFig.6.10foradefinitionofweb-safecolors).
(b)DownloadtheimageinFig.6.8andconvertittoaweb-safeRGBcolorimage.Figure6.8isgiveninjpgformat,soconvertyourresultbacktojpg(seecommentsatthebeginningofthisproject).
Figure1Fig6.08.jpg
Technicaldiscussion
【1】B=fix(A)
roundstheelementsofAtowardzero,resultinginanarrayofintegers.ForcomplexA,theimaginaryandrealpartsareroundedindependently.
【2】imwrite(A,filename,fmt)
writestheimageAtothefilespecifiedbyfilenameintheformatspecifiedbyfmt.
Programlistings
I=imread('Fig6.08.jpg');
subplot(131);
imshow(I);
title('original');
I1=fix((I/51)*51);
subplot(132);
imshow(I1);
title('web-safecolors(jpg)');
imwrite(I1,'web-safecolors.jpeg','jpeg');
subplot(133);
I=imread('web-safecolors.jpeg');
imshow(I);
title('web-safecolors(jpeg)');
Discussionofresults
Figure2resultsofproject06-01
Pseudo-ColorImageProcessing
Exp.21,PROJECT06-02
Objective
ToknowwhenthehighpassfilteringHhp(u,v)canbeobtainedbyusingtherelation1-Hlp(u,v).
Requirements
(a)ImplementFig.6.23,withthecharacteristicthatyoucanspecifytworangesofgray-levelvaluesfortheinputimageandyourprogramwilloutputanRGBimagewhosepixelshaveaspecifiedcolorcorrespondingtoonerangeofgraylevelsintheinputimage,andtheremainingpixelsintheRGBimagehavethesameshadeofgrayastheyhadintheinputimage.
(b)DownloadtheimageinFig.6.22(a)andprocessitwithyourprogramsothattheriverappearsyellowandtherestofthepixelsarethesameshadesofgrayasintheinputimage.
Figure3Fig6.22(a).jpg
Technicaldiscussion
【1】RGBcomponents
rgb_R=I(:
:
1);
rgb_G=I(:
:
2);
rgb_B=I(:
:
3);
Programlistings
I=imread('Fig6.22(a).jpg');
subplot(121);
imshow(I);
title('original');
I=double(I);
[m,n]=size(I);
L=256;
fori=1:
m
forj=1:
n
ifI(i,j) R(i,j)=0; G(i,j)=4*I(i,j); B(i,j)=L; elseifI(i,j)<=L/2 R(i,j)=0; G(i,j)=L; B(i,j)=-4*I(i,j)+2*L; elseifI(i,j)<=3*L/4 R(i,j)=4*I(i,j)-2*L; G(i,j)=L; B(i,j)=0; else R(i,j)=L; G(i,j)=-4*I(i,j)+4*L; B(i,j)=0; end end end end end fori=1: m forj=1: n G2C(i,j,1)=R(i,j); G2C(i,j,2)=G(i,j); G2C(i,j,3)=B(i,j); end end G2C=G2C/256; subplot(122); imshow(G2C); title('Pseudo-Color'); Discussionofresults Figure4resultsofproject06-02 ColorImageEnhancementbyHistogramProcessing Exp.22,PROJECT06-03 Objective Toknowhowtoimplementimageenhancementforcolorimagesbyhistogramprocessing.Notethatthedefinitionofhistogramforcolorimagesdiffersfromthatofhistogramforgrayimages. Requirements Downloadthedark-streamcolorpictureinFig.6.35.Histogram-equalizetheR,G,andBimagesseparatelyusingthehistogram-equalizationprogramandconverttheimagebacktojpgformat. Figure5Fig6.35(5).jpg Technicaldiscussion 【1】C=cat(dim,A1,A2,A3,A4,...) concatenatesalltheinputarrays(A1,A2,A3,A4,andsoon)alongarraydimensiondim. Programlistings I=imread('Fig6.35(5).jpg'); subplot(121); imshow(I); title('original'); a=I(: : 1); b=I(: : 2); c=I(: : 3); A=histeq(a); B=histeq(b); C=histeq(c); I3=cat(3,A,B,C); subplot(122); imshow(I3); title('histogramprocessing'); Discussionofresults Figure6resultsofproject06-03 ColorImageSegmentation Exp.23,PROJECT06-04 Objective Colorimagesegmentationisabigissueinimageprocessing.Thisstudentsneedtoknowthebasicsofthistopic. Requirements DownloadFig.6.28(b)andduplicateExample6.15,butsegmentinsteadthedarkestregionsintheimage. Figure7Fig6.30(01).jpg Technicaldiscussion 【1】RGB2=im2double(RGB) convertsthetruecolorimageRGBtodoubleprecision,rescalingthedataifnecessary Programlistings rgb=imread('Fig6.30(01).jpg'); subplot(221); imshow(rgb); title('original'); rgb1=im2double(rgb); r=rgb1(: : 1); g=rgb1(: : 2); b=rgb1(: : 3); r1=r(129: 256,86: 170); r1_u=mean(mean(r1(: ))); [m,n]=size(r1); sd1=0.0; fori=1: m forj=1: n sd1=sd1+(r1(i,j)-r1_u)*(r1(i,j)-r1_u); end end r1_d=sqrt(sd1/(m*n)); r2=zeros(size(rgb1,1),size(rgb1,2)); ind=find((r>r1_u-1.25*r1_d)&(r r2(ind)=1; subplot(222); imshow(r2); title('segmentation'); subplot(234); imshow(r); title('Rcomponent'); subplot(235); imshow(g); title('Gcomponent'); subplot(236); imshow(b); title('Bcomponent'); Discussionofresults Figure8resultsofproject06-04
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- digital image processing projects 数字图像处理 冈萨雷斯 第六章所有程序和报告要点 数字图像 处理 第六 所有 程序 报告 要点
![提示](https://static.bdocx.com/images/bang_tan.gif)
链接地址:https://www.bdocx.com/doc/6227822.html