haar: Compute Haar multiscale wavelet transform.

View source: R/RcppExports.R

haarR Documentation

Compute Haar multiscale wavelet transform.

Description

Compute Haar multiscale wavelet transform.

Usage

haar(im, inverse = FALSE, nb_scales = 1L)

Arguments

im

an image

inverse

Compute inverse transform (default FALSE)

nb_scales

Number of scales used for the transform.

Examples


#Image compression: set small Haar coefficients to 0
hr <- haar(boats,nb=3) 
mask.low <- threshold(abs(hr),"75%")
mask.high <- threshold(abs(hr),"95%")
haar(hr*mask.low,inverse=TRUE,nb=3) %>% plot(main="75% compression")
haar(hr*mask.high,inverse=TRUE,nb=3) %>% plot(main="95% compression")

imager documentation built on May 29, 2024, 1:38 a.m.