数字图像变换
来源:互联网 发布:防晒面料 知乎 编辑:程序博客网 时间:2024/06/13 23:26
>> I=imread('hanabi.jpg');
I=rgb2gray(I);
D1=I;
D2=dct2(D1);
s=size(D1);
P=zeros(s);
>> P1=P;
>> P2=P;
>> P3=P;
>> P1(1:40,1:40)=D2(1:40,1:40);
>> P2(1:60,1:60)=D2(1:60,1:60);
>> P3(1:80,1:80)=D2(1:80,1:80);
>> D3=idct2(D2);
E1=idct2(P1);
E2=idct2(P2);
E3=idct2(P3);
subplot(2,3,1),imshow(D1);subplot(2,3,2),imshow(D2);subplot(2,3,3),image(D3);
subplot(2,3,4),image(E1);subplot(2,3,5),image(E2);subplot(2,3,6),image(E3);
2.4-2
>> I=imread('hayakawa.png');
I=rgb2gray(I);
>> [M,N]=size(I);
>> P=dctmtx(M);
>> Q=dctmtx(N);
>> I1=double(I);
>> Idct=P*I1*Q';
>> subplot(121),imshow(I),title('原始图像');
>> subplot(122),imshow(Idct),title('离散余弦变换后的图像');
2.4-1
>> RGB=imread('hazhipeng-shihou.jpg');
I= rgb2gray(RGB);
subplot(1,3,1),imshow(I),title('输入图像');
J=dct2(I);
subplot(1,3,2),imshow(log(abs(J)),[]),colormap(jet(64)),colorbar,title('余弦变换结果');
J(abs(J)<10)=0;
K=idct2(J);
subplot(1,3,3),imshow(K,[0,255]),title('压缩后的结果');
2.1-3
>> I=imread('layanjing.jpg');
I=rgb2gray(I);
subplot(141),imshow(I),title('原始图像');
X1=imrotate(I,30,'nearest');
subplot(142),imshow(uint8(X1));title('旋转30度');
X2=imrotate(I,-45,'nearest');
subplot(143),imshow(uint8(X2));title('旋转-45度');
X3=imrotate(I,60,'nearest');
subplot(144),imshow(uint8(X3));title('旋转60度');
2.1-1
>> I=imread('shiki.jpg');
I=rgb2gray(I);
X1=imresize(I,0.3);
X2=imresize(I,0.5);
figure,imshow(X1);
figure,imshow(X2);
图像的hough变换
2.2-1
>> RGB=imread('tomoyo.jpg');
figure
imshow(RGB);
Warning: Image is too big to fit on screen; displaying at 25%
> In imuitools\private\initSize at 72
In imshow at 259
>> I=rgb2gray(RGB);
BW=edge(I,'canny');
[H,T,R]=hough(BW,'RhoResolution',0.75,'ThetaResolution',0.75);
imshow(imadjust(mat2gray(H)),'XData',T,'YData',R,...
'InitialMagnification','fit');
xlabel('\theta'),ylabel('\rho');
>> axis on,axis normal,hold on;
>> colormap(hot);
>> P=houghpeaks(H,4);
>> x=T(P(:,2));y=R(P(:,1));
>> plot(x,y,'s','color','white');
- 数字图像变换
- 数字图像变换
- 数字图像处理-几何变换
- 数字图像处理--空间变换
- 数字图像处理--空间变换
- 数字图像处理--空间变换
- matlab数字图像变换
- MATLAB数字图像变换
- 2-数字图像变换
- matlab数字图像变换
- Matlab数字图像 亮度变换
- 数字图像处理中的傅立叶变换
- 数字图像处理之几何变换
- 数字图像处理中的傅立叶变换
- 数字图像处理-图像灰度变换
- 数字图像基础之图像变换
- Matlab数字图像处理:DCT变换
- 数字图像处理之一傅立叶变换
- 关于Qt中继承了QObject类的信号与槽问题:
- 关于Android setTextSize() 以及 px dip/dp sp的说明
- linuxIPC之信号量(集)
- 如何修改eclipse中某个工程的JDK编译环境
- 个人博客搭建完成了,欢迎访问:http://wintersmilesb101.online
- 数字图像变换
- nefu 600 判断组合数的奇偶性
- 两个双口ram之间数据的传递
- 【BZOJ 2882】工艺 最小表示法
- 文章标题
- bzoj 2226: [Spoj 5971] LCMSum 数学+欧拉函数
- 3Sum Closest
- Android Studio使用mp4parser进行视频的分割
- 处理机调度