roifilt2
Filter region of interest (ROI) in grayscale image
Description
filters regions of interest (ROIs) in the 2-D grayscale image J = roifilt2(h,I,BW)I
using the 2-D linear filter h. The binary mask
BW defines the ROIs in I.
roifilt2 returns an image that consists of filtered values
for pixels in locations where BW contains
1s, and unfiltered values for pixels in locations where
BW contains 0s. This type of filtering
is called masked filtering.
Examples
Input Arguments
Output Arguments
Algorithms
If you specify a filter, h, then roifilt2
calls imfilter to implement the filter. The
roifilt2 function is best suited for operations that return
data in the same range as in the original image, because the output image takes some of
its data, which comes from the unmasked regions, directly from the input image. Certain
filtering operations can result in values outside the normal image data range (that is,
[0, 1] for images of class double, [0, 255] for images of class uint8, and [0, 65535]
for images of class uint16).

