没有合适的资源?快使用搜索试试~ 我知道了~
图像处理高斯法直方图平滑
5星 · 超过95%的资源 需积分: 41 72 下载量 151 浏览量
2009-12-02
19:40:52
上传
评论 2
收藏 1KB TXT 举报
温馨提示
试读
2页
%This function implements the gaussian smooth for an histogram an then it %can be used to find the thershold. It uses the COUNTS variable that is %returned by the imhist funcion an w is the size of the window that you %want to use. It has to be a odd number. if not, the funcion will not run %properly.
资源推荐
资源详情
资源评论
function [COUNTSn] = suavgausiano(COUNTS,w);
%This function implements the gaussian smooth for an histogram an then it
%can be used to find the thershold. It uses the COUNTS variable that is
%returned by the imhist funcion an w is the size of the window that you
%want to use. It has to be a odd number. if not, the funcion will not run
%properly.
%Typical application:
% I=imread('blood1','tiff');
% [COUNTS,x]=imhist(I);
% COUNTSn=suavgausiano(COUNTS,3);
%Where COUNTSn is the new COUNTS variable that is smoothed using the
%suavgausiano function with a window of size 3.
%To run this function you wont need the Image Processing Toolbox, but
%you'll need it when you want to read the image and try to get its
%histogram.
%I hope this code can help you.
ng=[0.2261 0.5478 0.2261];
tamw=(w-1)/2;
if (w>3)
for i=1:tamw-1
ng=conv(ng,ng);
end
end
end
lng=length(ng);
limite=(lng+1)/2;
lc=length(COUNTS);
for i=limite:lc-limite
COUNTSint=0;
for k=1:length(ng)-1
%This function implements the gaussian smooth for an histogram an then it
%can be used to find the thershold. It uses the COUNTS variable that is
%returned by the imhist funcion an w is the size of the window that you
%want to use. It has to be a odd number. if not, the funcion will not run
%properly.
%Typical application:
% I=imread('blood1','tiff');
% [COUNTS,x]=imhist(I);
% COUNTSn=suavgausiano(COUNTS,3);
%Where COUNTSn is the new COUNTS variable that is smoothed using the
%suavgausiano function with a window of size 3.
%To run this function you wont need the Image Processing Toolbox, but
%you'll need it when you want to read the image and try to get its
%histogram.
%I hope this code can help you.
ng=[0.2261 0.5478 0.2261];
tamw=(w-1)/2;
if (w>3)
for i=1:tamw-1
ng=conv(ng,ng);
end
end
end
lng=length(ng);
limite=(lng+1)/2;
lc=length(COUNTS);
for i=limite:lc-limite
COUNTSint=0;
for k=1:length(ng)-1
bubble88jiewei
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- AIS2024 valid
- 最入门的爬虫代码 python.docx
- 爬虫零基础入门-爬取天气预报.pdf
- 最通俗易懂的 MongoDB 非结构化文档存储数据库教程.zip
- 以mongodb为数据库的订单物流小项目.zip
- 腾讯云-mongodb数据库, 项目部署.zip
- 腾讯 APIJSON 的 MongoDB 数据库插件.zip
- 理解非关系型数据库和关系型数据库的区别.zip
- 操作简单的Mongodb网页web管理工具,基于Spring Boot2.0支持mongodb集群.zip
- tms-mongodb-web,提供访问mongodb数据的REST API和可灵活扩展的mongodb web 客户端.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页