This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


3-D box filtering of 3-D integral images


B = integralBoxFilter3(intA)
B = integralBoxFilter3(intA,filterSize)
B = integralBoxFilter3(___,Name,Value)


B = integralBoxFilter3(intA) filters integral image intA with a 3-by-3-by-3 box filter. B is a 3-D image of class double containing the filtered output.


B = integralBoxFilter3(intA,filterSize) filters integral image intA with a 3-D box filter with size specified by filterSize.

B = integralBoxFilter3(___,Name,Value) filters integral image intA with a 3-D box filter with Name-Value pairs to control various aspects of the filtering.


collapse all

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

collapse all

Integral image to be filtered, specified as a real, non-sparse 3-D array of class double.

integralBoxFilter3 expects the input integral image, intA, to be an upright integral image computed using integralImage3. integralBoxFilter3 does not support rotated integral images. The first row, column and page of the integral image is assumed to be padded, as returned by integralImage3.

Example: B = integralBoxFilter3(A);

Data Types: double

Size of box filter, specified as a scalar or 3-element vector of positive, odd integers. If filterSize is scalar, integralBoxFilter3 uses a cube box filter.

Example: B = integralBoxFilter3(A,5);

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: B = integralBoxFilter3(A,5,'NormalizationFactor',1);

Normalization factor applied to box filter, specified as a numeric scalar.

The default 'NormalizationFactor' 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 'NormalizationFactor' to 1. To avoid overflow in such circumstances, consider using double precision images by converting the input image to class double.

Example: B = integralBoxFilter3(A,5,'NormalizationFactor',1);

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Output Arguments

collapse all

Filtered image, returned as a real, nonsparse 3-D array of class double. integralBoxFilter3 returns only the parts of the filtering that are computed without padding.

Introduced in R2015b