integralBoxFilter3
3-D box filtering of 3-D integral images
Syntax
Description
filters integral image B
= integralBoxFilter3(A
,filterSize
)A
with a 3-D box filter
with size specified by filterSize
.
also specifies the normalization factor applied to the box
filter.B
= integralBoxFilter3(___,"NormalizationFactor",normFactor
)
Examples
Filter 3-D MRI Volume with Box Filter
Load 3-D MRI data.
volData = load('mri');
vol = squeeze(volData.D);
Pad the image volume by the radius of the filter neighborhood.
filterSize = [5 5 3]; padSize = (filterSize-1)/2; volPad = padarray(vol, padSize, 'replicate', 'both');
Calculate the 3-D integral image of the padded input.
intVol = integralImage3(volPad);
Filter the 3-D integral image with a [5 5 3] filter.
volFilt = integralBoxFilter3(intVol, filterSize);
Input Arguments
A
— Integral image to be filtered
3-D numeric array
Integral image to be filtered, specified as a 3-D numeric array.
integralBoxFilter3
expects the
input integral image, A
, to be
an upright integral image computed using integralImage3
.
integralBoxFilter3
does not
support rotated integral images. The first row,
column and plane of the integral image is assumed to
be padded, as returned by
integralImage3
.
Data Types: double
filterSize
— Size of box filter
3
(default) | positive, odd integer | 3-element vector of positive, odd integers
Size of box filter, specified as a positive odd integer or 3-element vector of positive, odd
integers. If filterSize
is
scalar, then integralBoxFilter3
uses a cube box filter.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
normFactor
— Normalization factor applied to box filter
numeric scalar
Normalization factor applied to the box filter, specified as a numeric scalar.
By default, the normalization factor has the value
1/filterSize.^3
when
filterSize
is a scalar, and
1/prod(filterSize)
when
filterSize
is a vector. The
default has the effect of a mean filter — the
pixels in the output image are the local means of
the image.
To get local area sums, set
normFactor
to
1
. To avoid overflow in such
circumstances, consider using double precision
images by converting the input image to data type
double
.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
Output Arguments
B
— Filtered image
3-D numeric array
Filtered image, returned as a 3-D numeric array. integralBoxFilter3
returns
only the parts of the filtering that are computed
without padding.
Data Types: double
Version History
Introduced in R2015b
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)