freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

數(shù)字圖像處理實(shí)驗(yàn)指導(dǎo)書(shū)-資料下載頁(yè)

2025-04-29 08:22本頁(yè)面
  

【正文】 1:n,:)=inImage(1:mTx,1:nTy,1:l)。 else outImage(Tx+1:m,1:nabs(Ty),:)=inImage(1:mTx,abs(Ty)+1:n,:)。 end subplot(1,2,1)。 imshow(inImage)。 title(39。原始圖像 39。)。 subplot(1,2,2)。 imshow(uint8(outImage))。 title(39。平移圖像 39。)。 74 2022年 5月 27日星期五 實(shí)驗(yàn)方法、步驟 ,對(duì)其進(jìn)行水平平移、垂直平移 50像素 (圖像擴(kuò)大 ); 方法二: 用 translate、 imdilate函數(shù) %圖像平移 clear。 I = imread(39。39。)。 se = translate(strel(1), [50 50])。 J = imdilate(I,se)。 subplot(1,2,1) imshow(I), title(39。原始圖像 39。) subplot(1,2,2) imshow(J)。 title(39。平移圖像 39。)。 75 2022年 5月 27日星期五 實(shí)驗(yàn)方法、步驟 ,對(duì)其進(jìn)行水平、垂直、對(duì)角轉(zhuǎn)置; %圖像鏡像變換 clear。 I=double(imread(39。39。))。 SIZE=size(I)。 %水平鏡像 I_flip_LR(1:SIZE(1),1:SIZE(2),:)=I(1:SIZE(1),SIZE(2):1:1,:)。 %垂直鏡像 I_flip_UD(1:SIZE(1),1:SIZE(2),:)=I(SIZE(1):1:1,1:SIZE(2),:)。 %對(duì)角鏡像 I_flip_LR_UD(1:SIZE(1),1:SIZE(2),:)=I(SIZE(1):1:1,SIZE(2):1:1,:)。 subplot(2,2,1) imshow(uint8(I))。 title(39。原始圖像 39。)。 subplot(2,2,2) imshow(uint8(I_flip_LR))。 title(39。水平鏡像 39。)。 subplot(2,2,3) imshow(uint8(I_flip_UD))。 title(39。垂直鏡像 39。)。 subplot(2,2,4) imshow(uint8(I_flip_LR_UD))。 title(39。對(duì)角鏡像 39。)。 76 2022年 5月 27日星期五 實(shí)驗(yàn)方法、步驟 ,對(duì)其旋轉(zhuǎn)操作; 方法一 %Matlab圖像旋轉(zhuǎn)旋轉(zhuǎn) function im_rotate(Image,Angle) %Image為位圖數(shù)據(jù) [X,Y,n]=size(Image)。 %X,Y為其行列數(shù) %計(jì)算四個(gè)角點(diǎn)的新坐標(biāo),確定旋轉(zhuǎn)后的顯示區(qū)域 LeftTop(1,1)=(Y1)*sin(Angle)。 LeftTop(1,2)=(Y1)*cos(Angle)。 LeftBottom(1,1)=0。 LeftBottom(1,2)=0。 RightTop(1,1)=(X1)*cos(Angle)(Y1)*sin(Angle)。 RightTop(1,2)=(X1)*sin(Angle)+(Y1)*cos(Angle)。 RightBottom(1,1)=(X1)*cos(Angle)。 RightBottom(1,2)=(X1)*sin(Angle)。 %計(jì)算顯示區(qū)域的行列數(shù) Xnew=max([LeftTop(1,1),LeftBottom(1,1),RightTop(1,1),RightBottom(1,1)])min([LeftTop(1,1),LeftBottom(1,1),RightTop(1,1),RightBottom(1,1)])。 Ynew=max([LeftTop(1,2),LeftBottom(1,2),RightTop(1,2),RightBottom(1,2)])min([LeftTop(1,2),LeftBottom(1,2),RightTop(1,2),RightBottom(1,2)])。 % 分配新顯示區(qū)域矩陣 ImageNew=zeros(round(Xnew),round(Ynew),n)+127。 77 2022年 5月 27日星期五 %計(jì)算原圖像各像素的新坐標(biāo) for indexX=0:(X1) for indexY=0:(Y1) for i=1:n ImageNew(round(indexX*cos(Angle)indexY*sin(Angle))+round(abs(min([LeftTop(1,1),LeftBottom(1,1),RightTop(1,1),RightBottom(1,1)])))+1,1+round(indexX*sin(Angle)+indexY*cos(Angle))+round(abs(min([LeftTop(1,2),LeftBottom(1,2),RightTop(1,2),RightBottom(1,2)]))),i)=Image(indexX+1,indexY+1,i)。 end end end subplot(1,2,1)。 imshow(Image)。 title(39。原始圖像 39。)。 subplot(1,2,2)。 imshow((ImageNew/255))。 title(39。旋轉(zhuǎn)圖像 39。)。 78 2022年 5月 27日星期五 實(shí)驗(yàn)方法、步驟 ,對(duì)其旋轉(zhuǎn)操作; 方法二 %Matlab圖像旋轉(zhuǎn)旋轉(zhuǎn) clear。 I=imread(39。39。)。 I_rot30=imrotate(I,30,39。nearest39。)。 %旋轉(zhuǎn) 30176。 I_rot45=imrotate(I,45,39。nearest39。)。 %旋轉(zhuǎn) 45176。 I_rot60=imrotate(I,60,39。nearest39。)。 %旋轉(zhuǎn) 60176。 subplot(2,2,1)。 imshow(I)。 title(39。原始圖像 39。)。 subplot(2,2,2)。 imshow(I_rot30)。 title(39。旋轉(zhuǎn) 30176。 39。)。 subplot(2,2,3)。 imshow(I_rot45)。 title(39。旋轉(zhuǎn) 45176。 39。)。 subplot(2,2,4)。 imshow(I_rot60)。 title(39。旋轉(zhuǎn) 60176。 39。)。 79 2022年 5月 27日星期五 實(shí)驗(yàn)方法、步驟 ,對(duì)其進(jìn)行等比例、不等比例縮放; 方法一 %Matlab采用等間隔采樣對(duì)圖像縮小 function im_shrink=imshrink_eq(I,k) Type_I=uint8(isrgb(I))。 Size=size(I)。 %計(jì)算輸入圖像大小 im_shrink_W=round(Size(1)*k) %計(jì)算縮放后圖像寬度 im_shrink_H=round(Size(2)*k) %計(jì)算縮放后圖像高度 if Type_I==1 im_shrink=zeros(im_shrink_W,im_shrink_H,Size(3))。 for i=1:im_shrink_W for j=1:im_shrink_H im_shrink(i,j,:)=I(round(i/k),round(j/k),:)。 end end 80 2022年 5月 27日星期五 else im_shrink=zeros(im_shrink_W,im_shrink_H)。 for i=1:im_shrink_W for j=1:im_shrink_H im_shrink(i,j)=I(round(i/k),round(j/k))。 end end end im_shrink=uint8(im_shrink)。 subplot(1,2,1) imshow(I)。 title(39。原始圖像 39。)。 subplot(1,2,2) imshow(im_shrink)。 title(?等間隔采樣縮 放 圖像 39。)。 imwrite(im_shrink,39。39。)。 81 2022年 5月 27日星期五 實(shí)驗(yàn)方法、步驟 ,對(duì)其進(jìn)行等比例、不等比例縮放; 方法一 B = imresize(A,m,method)。 B = imresize(A,[rows cols],method)。 method: 39。nearest39。 39。bilinear? 39。bicubic39。 [...] = imresize(...,method,N) 82 2022年 5月 27日星期五 實(shí)驗(yàn)方法、步驟 ,對(duì)其進(jìn)行水平錯(cuò)切、垂直錯(cuò)切; %Matlab 實(shí)現(xiàn) RGB圖像的錯(cuò)切 function Im_shear=imshear(I,angle,type)。 subplot(1,2,1) imshow(I)。 title(39。原始圖像 39。)。 I=double(I)。 Size=size(I)。 if type==1 %水平 錯(cuò)切 Im_shear=zeros(Size(1),round(Size(2)*tan(pi/180*abs(angle))),Size(3))。 for i=1:Size(1) for j=1:Size(2) Im_shear(i+round(j*tan(pi/180*angle)),j,:)=I(i,j,:)。 end end Else %垂直 錯(cuò)切 Im_shear=zeros(round(Size(1)*tan(pi/180*abs(angle))),Size(2),Size(3))。 for i=1:Size(1) for j=1:Size(2) Im_shear(i,j+round(i*tan(pi/180*angle)),:)=I(i,j,:)。 end end end subplot(1,2,2) imshow(uint8(Im_shear))。 title(39。錯(cuò)切圖像 39。)。 83 2022年 5月 27日星期五 實(shí)驗(yàn)結(jié)果分析 ; 么效果; ; ,如何通過(guò)錯(cuò)切實(shí)現(xiàn)圖像的旋轉(zhuǎn)效果; ,再進(jìn)行放大,能與原圖像相同嗎?
點(diǎn)擊復(fù)制文檔內(nèi)容
醫(yī)療健康相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1