?? applylut.m
字號:
function B = applylut(A,LUT)
%APPLYLUT Perform neighborhood operations using lookup tables.
% A = APPLYLUT(BW,LUT) performs a 2-by-2 or 3-by-3
% neighborhood operation on binary image BW by using a lookup
% table (LUT). LUT is either a 16-element or 512-element
% vector returned by MAKELUT. The vector consists of the
% output values for all possible 2-by-2 or 3-by-3
% neighborhoods.
%
% The values returned in A depend on the values in LUT. For
% example, if LUT consists of all 1's and 0's, A is a binary
% image.
%
% Class Support
% -------------
% BW and LUT can be of class uint8 or double. If the class of
% LUT is uint8, or if the elements of LUT are all integer
% values between 0 and 255, then the class of A is uint8;
% otherwise, the class of A is double.
%
% Example
% -------
% In this example, you perform erosion using a 2-by-2
% neighborhood. An output pixel is "on" only if all four of the
% input pixel's neighborhood pixels are "on."
%
% lut = makelut('sum(x(:)) == 4', 2);
% BW1 = imread('text.tif');
% BW2 = applylut(BW1,lut);
% imshow(BW1)
% figure, imshow(BW2)
%
% See also MAKELUT.
% Steve Eddins, March 1996
% Copyright 1993-1998 The MathWorks, Inc. All Rights Reserved.
% $Revision: 1.7 $ $Date: 1997/11/24 15:33:54 $
error('Missing MEX-file APPLYLUT');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -