实用的 Matlab
来源:互联网 发布:中国家庭收入数据 编辑:程序博客网 时间:2024/05/19 03:26
- activecontour:前景背景分离,Segment image into foreground and background using active contour
- 该函数返回的是一副 binary image,二值图像;
1. Texture Segmentation
- Texture Segmentation Using Gabor Filters
2. 删除图像中的网格(removing grids in an image)
Removing grids in an image - MATLAB Answers - MATLAB Central
- (1)通过阈值化的处理,识别亮的部分(也即网格的部分),
- (2)对图像进行中值滤波,
- (3)步骤 1 获得的网格的部分,由步骤(2)的结果所取代;
clear, clcI = imread('./grid.png');grid = I > 125;filtered = medfilt2(I, [80, 80]); % 当然也不一定非得是中值滤波,也可以采用其他插值形式I(grid) = filtered(grid);imshow(I)
3. 运动图像去模糊
基于matlab运动模糊图像处理的源代码
- 使用维纳滤波;
function deblurred(im, a, b, NSPR)i = imread(im);f = im2double(i);PSF = fspecial('motion', a, b); % point spread function (PSF)frest1 = deconvwnr(f, PSF, NSPR); % NSR is the noise-to-signal power ratio of the additive noise. % NSR can be a scalar or a spectral-domain array of the same size as I. subplot(221),imshow(f); title('原图像');subplot(222),imshow(frest1); title('维纳滤波处理后图像'); end
- PSF = fspecial(‘motion’,len,ang); %建立扩散子,其中len是模糊长度,ang是模糊角度;
- img2=deconvlucy(img,PSF,n); %用lucy-richardson方法复原图像,其中img是运动模糊图像,PSF是扩散子,n是迭代次数,img2是复原图像
一般模糊图像的模糊距离和模糊角度不好判断,但也可以通过查看图像的频谱图和实部二维图来大致估:
% 求角度img_fft=fftshift(fft2(img_gray));N=abs(img_fft);P=(N-min(min(N)))/(max(max(N))-min(min(N)))*225;figure;imshow(P);% 求长度h=fspecial('sobel');img_double=double(img_gray);J=conv2(img_double,h,'same');IP=abs(fft2(J));S=fftshift(real(ifft2(IP)));figure;plot(S);
0 0
- 实用的 Matlab
- 我的Matlab 实用函数
- Matlab中实用的命令
- matlab 神经网络工具箱的实用
- MatLab 图表达信息的实用函数
- vc与matlab连接的实用函数
- matlab 万能实用的非线性曲线拟合方法
- matlab 万能实用的线性曲线拟合方法
- Matlab 实用快捷键
- Matlab实用函数
- MATLAB实用源代码
- MATLAB实用源代码
- MATLAB实用源代码
- matlab 实用 api
- Matlab 实用 基础注意事项
- MATLAB实用绘图技巧
- MATLAB实用函数
- matlab实用源代码
- curl GET/PUT examples
- 英语中的介词
- ElasticSearch第一步-环境配置
- 腾讯2016研发工程师编程题——微信红包
- Freescale i.MX 6Q平台移植Android MNC
- 实用的 Matlab
- iOS入门编程之类扩展与分类的区别
- 23种经典设计模式之策略模式
- 鼠标滚轮事件封装
- 客户端存储——localStorage和sessionStorage
- 数据结构之逆波兰表达式
- Oracle、PL_SQL经典练习题
- 让DialogFragment全屏的方法
- mysql索引类型key,primary,unique,fulltext,spatial