没有合适的资源?快使用搜索试试~ 我知道了~
首页利用Lloyd-Max,计算标准正态分布16层最佳量化.docx
利用Lloyd-Max,计算标准正态分布16层最佳量化.docx
3星 · 超过75%的资源 需积分: 50 26 下载量 179 浏览量
更新于2023-03-16
4
收藏 387KB DOCX 举报
利用Lloyd-Max,计算标准正态分布16层最佳量化,计算非均匀量化平均误差和非均匀量化最大误差,运用于图像压缩领域、信源编码领域
资源详情
资源推荐
题目一
题目要求
利用 ,计算标准正态分布 层最佳量化。
源代码
function main
clear all;
string1=input('Please input the pdf of the
signal: ');
string2=string1;
disp('Please input the max amplitude of the
signal:');
xmax=input(' ');
disp('Please input the min amplitude of the
signal:');
xmin=input(' ');
disp('Please input the number of the quantization
levels:');
qsteps=input(' ');
lloyedmax(string2,xmax,xmin,qsteps)
function d=lloyedmax(pdf,xmax,xmin,qsteps)
g=inline(pdf);
step=abs((xmax-xmin))/qsteps;
for i=1:qsteps
xvalue(i)=xmin+(i-0.5)*step;
end
dold=1;
dsum=0;
j=0;
while abs(dold-dsum)>0.01
j=j+1;
x(j)=dsum;
dold=dsum;
xdomin(1)=xmin;xdomin(qsteps+1)=xmax;
for i=2:qsteps
xdomin(i)=(xvalue(i-1)+xvalue(i))./2;
end
dsum=0;
for i=2:qsteps+1
xstemp=xdomin(i-1):abs(xdomin(i)-xdomin(i-1))/100:xdo
min(i);
y=((xvalue(i-1)-xstemp).^2).*g(xstemp);
d=trapz(xstemp,y);
dsum=dsum+d;
end
for i=2:qsteps+1
xstemp=xdomin(i-1):abs(xdomin(i)-xdomin(i-1))/100:xdo
min(i);
y1=xstemp.*g(xstemp);
y2=g(xstemp);
d1=trapz(xstemp,y1);
d2=trapz(xstemp,y2);
xvalue(i-1)=d1/d2;
figure(j);
plot(xvalue,1:1:qsteps,'*',xdomin,1:1:qsteps+1,'x')
ylabel('the compute numbers')
xlabel('regions (x) and outputlevels (*)')
end
outputlevel=xvalue;
regions=xdomin;
distortion=dsum;
end
j=j+1;
x(j)=dsum;
outputlevel=xvalue;
regions=xdomin;
figure(j);
ylabel('the compute numbers')
xlabel('regions (x) and outputlevels (*)')
plot(xvalue,1:1:qsteps,'*',xdomin,1:1:qsteps+1,'x')
figure(j+1)
clear c;
for i=2:j
c(i-1)=x(i);
end
plot(1:1:j-1,c,'*')
xlabel('the compute numbers')
ylabel('everyone distortion')
运行结果
! !"#$
%
%
&#"'(')
*
++,-.
剩余15页未读,继续阅读
Sheldmy
- 粉丝: 9
- 资源: 46
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 京瓷TASKalfa系列维修手册:安全与操作指南
- 小波变换在视频压缩中的应用
- Microsoft OfficeXP详解:WordXP、ExcelXP和PowerPointXP
- 雀巢在线媒介投放策划:门户网站与广告效果分析
- 用友NC-V56供应链功能升级详解(84页)
- 计算机病毒与防御策略探索
- 企业网NAT技术实践:2022年部署互联网出口策略
- 软件测试面试必备:概念、原则与常见问题解析
- 2022年Windows IIS服务器内外网配置详解与Serv-U FTP服务器安装
- 中国联通:企业级ICT转型与创新实践
- C#图形图像编程深入解析:GDI+与多媒体应用
- Xilinx AXI Interconnect v2.1用户指南
- DIY编程电缆全攻略:接口类型与自制指南
- 电脑维护与硬盘数据恢复指南
- 计算机网络技术专业剖析:人才培养与改革
- 量化多因子指数增强策略:微观视角的实证分析
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功