mfilter2.m
来自「有关matlab的电子书籍有一定的帮助希望有用」· M 代码 · 共 35 行
M
35 行
function J = mfilter2(varargin)
%MFILTER2 Masked filter.
% Note: This function has been grandfathered; use roifilt2
% instead.
%
% J = MFILTER2(H,I,BW) filters the data in I with the 2-D
% filter H. The result J will contain the filtered values of I
% where the values of the binary mask BW are non-zero and will
% contain the unfiltered values of I everywhere else. The mask
% BW must be the same size as I and contain only 1's and 0's.
% FILTER2(H,I) is used to perform the filtering.
%
% J = MFILTER2(I,BW,FUN) filters the data in I by calling
% FUN. FUN may be a string containing the name of a function, a
% string containing an expression, or an inline function
% object. FUN is called using the syntax FUN(X), and it should
% return a matrix of the same size as its input. Additional
% parameters can be passed to FUN using the syntax J =
% MFILTER2(I,BW,'fun',P1,P2,P3,...), in which case FUN is
% called using FUN(X,P1,P2,P3,...).
%
% The class of I may be double or uint8. With the syntax
% J = MFILTER2(H,I,BW), the class of J is double. With the
% syntax J = MFILTER2(I,BW,FUN) the class of J is uint8 if I is
% uint8 and FUN returns uint8; otherwise the class of J is
% double.
%
% See also FILTER2, ROIPOLY.
% Clay M. Thompson 2-10-93
% Copyright 1993-1998 The MathWorks, Inc. All Rights Reserved.
% $Revision: 5.10 $ $Date: 1997/11/24 15:35:57 $
J = roifilt2(varargin{:});
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?