clc;
clear;
close all;
warning off;
addpath(genpath(pwd));
I=imread('peppers_gray.bmp');
I=uint8(I)
subplot(131)
imshow(I)
title('Original Image')
dim=size(I)
N=dim(1)
n=log2(N)
%Compute the Slant Transform Matrix
S=1/sqrt(2)*[1 1; 1 -1];
a=1
for i=2:n
b=1/sqrt(1+4*a^2)
a=2*b*a
if i==2
S=(1/sqrt(2))*[[1 0; a b] [1 0;-a b];
[0 1;-b a] [0 -1;b,a]]*[S zeros(size(S));zeros(size(S)),S]
else
S=(1/sqrt(2))*[[1 0;a b] [zeros(2,(2^i-4)/2)] [1 0;-a b] [zeros(2,(2^i-4)/2)];
[zeros((2^i-4)/2,2)] [eye((2^i-4)/2)] [zeros((2^i-4)/2,2)] [eye((2^i-4)/2)];
[0 1;-b a] [zeros(2,(2^i-4)/2)] [0 -1;b,a] [zeros(2,(2^i-4)/2)];
[zeros((2^i-4)/2,2)] [eye((2^i-4)/2)] [zeros((2^i-4)/2,2)] [-eye((2^i-4)/2)] ]*[S zeros(size(S));zeros(size(S)),S]
end
end
%Compute Slant transform
S_t=S*double(I)*S';
subplot(132)
imshow(uint8(S_t),[])
title('Slant Transform ')
%Image Reconstruction
r_i=S'*S_t*S
subplot(133)
imshow(r_i,[])
title('Reconstructed Image')
![avatar](https://profile-avatar.csdnimg.cn/6534a49295004b5796c3956cb3f87481_ccsss22.jpg!1)
![avatar-vip](https://csdnimg.cn/release/downloadcmsfe/public/img/user-vip.1c89f3c5.png)
fpga和matlab
- 粉丝: 16w+
- 资源: 2596
最新资源
- AI绘画工具介绍(文档)
- pandas-2.2.2-cp311-cp311-musllinux-1-1-aarch64.whl
- 小程序开发基础与简单示例.pdf
- matlab:读取图像+显示图像+显示图像的直方图+直方图均衡
- pandas-2.2.2-cp311-cp311-manylinux-2-17-x86-64.manylinux2014.whl
- 如何充分运用ansys的HELP
- pandas-2.2.2-cp311-cp311-musllinux-1-1-x86-64.whl
- C语言可变长数组(VLA)详解与应用
- android-studio-2024.1.1.12-windows-zip.zip.001
- 辰光PHP客服系统多商户全开源V3.1版+安装教程
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)