第一范文网 - 专业文章范例文档资料分享平台

2014-7自编数字图像处理实验-参考答案

来源:用户分享 时间:2025/5/16 11:04:37 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

新疆大学信息科学与工程学院

H(i,j) = 3; end

if h(i,j)<=80&&h(i,j)>55 H(i,j) = 4; end

if h(i,j)<=108&&h(i,j)>80 H(i,j) = 5; end

if h(i,j)<=140&&h(i,j)>108 H(i,j) = 6; end

if h(i,j)<=165&&h(i,j)>140 H(i,j) = 7; end

if h(i,j)<=190&&h(i,j)>165 H(i,j) = 8; end

if h(i,j)<=220&&h(i,j)>190 H(i,j) = 9; end

if h(i,j)<=255&&h(i,j)>220 H(i,j) = 10; end

if h(i,j)<=275&&h(i,j)>255 H(i,j) = 11; end

if h(i,j)<=290&&h(i,j)>275 H(i,j) = 12; end

if h(i,j)<=316&&h(i,j)>290 H(i,j) = 13; end

if h(i,j)<=330&&h(i,j)>316 H(i,j) = 14; end

if h(i,j)<=345&&h(i,j)>330 H(i,j) = 15; end end end

for i = 1:M for j = 1:N

if s(i,j)<=0.15&&s(i,j)>0 S(i,j) = 0;

49

新疆大学信息科学与工程学院

end

if s(i,j)<=0.4&&s(i,j)>0.15 S(i,j) = 1; end

if s(i,j)<=0.75&&s(i,j)>0.4 S(i,j) = 2; end

if s(i,j)<=1&&s(i,j)>0.75 S(i,j) = 3; end end end

for i = 1:M for j = 1:N

if v(i,j)<=0.15&&v(i,j)>0 V(i,j) = 0; end

if v(i,j)<=0.4&&v(i,j)>0.15 V(i,j) = 1; end

if v(i,j)<=0.75&&v(i,j)>0.4 V(i,j) = 2; end

if v(i,j)<=1&&v(i,j)>0.75 V(i,j) = 3; end end end

%将三个颜色分量合成为一维特征向量:L = H*Qs*Qv+S*Qv+v;Qs,Qv分别是S和V的量化级数, L取值范围[0,255] %取Qs = 4; Qv = 4 for i = 1:M for j = 1:N

L(i,j) = H(i,j)*16+S(i,j)*4+V(i,j); end end

%计算L的直方图 for i = 0:255

Hist(i+1) = size(find(L==i),1); end

% Hist = Hist/sum(Hist); T=Hist;

stem(hist(:));

50

2014-7自编数字图像处理实验-参考答案.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c60l5n1h2oj4n25q6n2e0_13.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top