guided_filter | R Documentation |
This function applies a guided filter to a volumetric image (3D brain MRI data) to perform edge-preserving smoothing. The guided filter is an edge-preserving filter that smooths the image while preserving the edges, providing a balance between noise reduction and edge preservation.
guided_filter(vol, radius = 4, epsilon = 0.7^2)
vol |
A |
radius |
An integer specifying the spatial radius of the filter (default is 4). |
epsilon |
A numeric value specifying the variance constant, which controls the degree of smoothing (default is .7^2). |
A filtered image of class NeuroVol
.
Guided Image Filtering: Kaiming He, Jian Sun, and Xiaoou Tang, "Guided Image Filtering," IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 35, No. 6, pp. 1397-1409, June, 2013. https://en.wikipedia.org/wiki/Guided_filter
# Load an example brain volume
brain_vol <- read_vol(system.file("extdata", "global_mask.nii", package="neuroim2"))
# Apply guided filtering to the brain volume
## Not run:
filtered_vol <- guided_filter(brain_vol, radius = 4, epsilon = .7^2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.