roifilt2 在MATLAB中的用法
来源:互联网 发布:细说php第几版较好 编辑:程序博客网 时间:2024/05/20 07:59
roifilt2
Filter region of interest (ROI) in image
collapse all in page
Syntax
J = roifilt2(h, I, BW)
J = roifilt2(I, BW, fun) processesthe data in I using the function fun.The result J contains computed values for pixelsin locations where BW contains 1's, and the actualvalues in I for pixels in locations where BW contains0's. fun must be a functionhandle. Parameterizing Functions,in the MATLAB Mathematics documentation, explains how to provide additionalparameters to the function fun.
Class Support
For the syntax that includes a filter h,the input image can be logical or numeric, and the output array J hasthe same class as the input image. For the syntax that includes afunction, I can be of any class supported by fun,and the class of J depends on the class of theoutput from fun.
Examples
c = [222 272 300 270 221 194];
r = [21 21 75 121 121 75];
BW = roipoly(I,c,r);
H = fspecial('unsharp');
J = roifilt2(H,I,BW);
Filter region of interest (ROI) in image
collapse all in page
Syntax
J = roifilt2(h, I, BW)
J = roifilt2(I, BW, fun)
Description
J = roifilt2(h, I, BW) filtersthe data in I with the two-dimensional linear filter h. BW isa binary image the same size as I that definesan ROI used as a mask for filtering. roifilt2 returnsan image that consists of filtered values for pixels in locationswhere BW contains 1's, and unfiltered values forpixels in locations where BW contains 0's. Forthis syntax, roifilt2 calls filter2 toimplement the filter.J = roifilt2(I, BW, fun) processesthe data in I using the function fun.The result J contains computed values for pixelsin locations where BW contains 1's, and the actualvalues in I for pixels in locations where BW contains0's. fun must be a functionhandle. Parameterizing Functions,in the MATLAB Mathematics documentation, explains how to provide additionalparameters to the function fun.
Class Support
For the syntax that includes a filter h,the input image can be logical or numeric, and the output array J hasthe same class as the input image. For the syntax that includes afunction, I can be of any class supported by fun,and the class of J depends on the class of theoutput from fun.
Examples
This example continues the roipoly example,filtering the region of the image I specified bythe mask BW. The roifilt2 functionreturns the filtered image J, shown in the followingfigure.
I = imread('eight.tif');c = [222 272 300 270 221 194];
r = [21 21 75 121 121 75];
BW = roipoly(I,c,r);
H = fspecial('unsharp');
J = roifilt2(H,I,BW);
figure, imshow(I), figure, imshow(J)
阅读全文
0 0
- roifilt2 在MATLAB中的用法
- sum在matlab中的用法
- eval 在matlab中的用法
- MATLAB中的sort用法
- matlab中的矩阵用法
- Matlab中的class用法
- Matlab中的矩阵用法2
- matlab中的函数用法笔记
- Matlab中的set函数用法
- 在matlab中的随机数函数
- MATLAB在PBS中的使用方法
- LibSVM 在matlab中的使用
- Matlab在微积分中的应用
- LibSVM 在matlab中的使用
- LibSVM 在matlab中的使用
- LibSVM 在matlab中的使用
- matlab在聚类分析中的应用
- matlab在高等数学中的应用
- JavaWeb学习之Servlet(三)----Servlet的映射匹配问题、线程安全问题
- springAop实现日志请求参数和返回结果打印
- springmvc实现简单CRUD
- 查找法的疑惑
- Android Studio 升级到3.0,gradle升级到4.1后报错
- roifilt2 在MATLAB中的用法
- 基于C++的录入带空格字符串方法总结
- 微信小程序从本地相册选择图片或使用相机拍照之我的理解
- Deepo:几乎包含所有主流深度学习框架的Docker镜像
- 华夏电通副总裁谢泳江:智慧法院建设思路和应用
- [tensorflow]学习笔记
- 大咖互动:构建智慧法院,促进司法职能
- 老年消费维权大数据:投资理财和医疗保健问题占七成
- Pandas之drop_duplicates:去除重复项