| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Image Processing Toolbox |
| Contents | Index |
| Learn more about Image Processing Toolbox |
J = stdfilt(I)
J = stdfilt(I, NHOOD)
J = stdfilt(I) returns the array J, where each output pixel contains the standard deviation of the 3-by-3 neighborhood around the corresponding pixel in the input image I. I can have any dimension. The output image J is the same size as the input image I.
For pixels on the borders of I, stdfilt uses symmetric padding. In symmetric padding, the values of padding pixels are a mirror reflection of the border pixels in I.
J = stdfilt(I, NHOOD) calculates the local standard deviation of the input image I, where you specify the neighborhood in NHOOD. NHOOD is a multidimensional array of zeros and ones where the nonzero elements specify the neighbors. NHOOD's size must be odd in each dimension.
By default, stdfilt uses the neighborhood ones(3). stdfilt determines the center element of the neighborhood by floor((size(NHOOD) + 1)/2).
I can be logical or numeric and must be real and nonsparse. NHOOD can be logical or numeric and must contain zeros and/or ones. J is of class double.
To specify neighborhoods of various shapes, such as a disk, use the strel function to create a structuring element object and then use the getnhood function to extract the neighborhood from the structuring element object.
I = imread('circuit.tif');
J = stdfilt(I);
imshow(I);
figure, imshow(J,[]); entropyfilt, getnhood, rangefilt, std2, strel
![]() | std2 | strel | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |