BUUHWE_2D: Two-dimensional Bottom-Up Unbalanced Haar Wavelet Expansion...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/BUUHWT_2D.r

Description

This function computes the two-dimensional Bottom-Up Unbalanced Haar Wavelet Expansion (2D-BUUHWE) of an image (encoded as a matrix). See Timmermans (2012) for details. The 2D-BUUHWE is termed SHaped-Adaptive Haar (SHAH) expansion in Timmermans and Fryzlewicz (2012).

Usage

1
2
3
BUUHWE_2D(im)
SHAH(im)
Signature_2D(out.BUUHWE_2D)

Arguments

im

im: a numeric matrix encoding an image. Missing values are not allowed.

out.BUUHWE_2D

out.BUUHWE_2D: the output of BUUHWE_2D or SHAH.

Details

More details can be found in Timmermans (2012), Chapter 4, or Timmermans and Fryzlewicz (2012). The function implements the 2D-BUUHWE (= SHAH) for images observed on a regular quadratic grid. The image is encoded as a matrix, of which the entries are labeled by column.

Value

The output of BUUHWE_2D or SHAH is a list with

d

a vector of two elements giving the dimension of the encoded image.

decomp.hist

The decomposition history of the image, which provides its BUUHWE expansion (=SHAH transform). For each i in d[1]*d[2]-1, matrix decomp.hist[,,i] is a matrix with the following entries: decomp.hist[1,1,i] is the label of the input node at step d[1]*d[2]-i, decomp.hist[1,2,i] is the label of the output node at step d[1]*d[2]-i, decomp.hist[2,1,i] is the weight of the input node at step d[1]*d[2]-i, decomp.hist[2,2,i] is the weight of the output node at step d[1]*d[2]-i , decomp.hist[3,1,i] is the detail d[1]*d[2]-i, decomp.hist[3,2,i] is always zero.

The output of Signature_2D is a matrix containing the signature of the image. This is a matrix of which row i is made of the components x1,y1,x2,y2, detail and abs(detail) related to rank i in the 2D-BUUHWE (SHAH) of an image.

Note

A graphical representation of the tranform is provided by BUUHWE_2D.plot ( or equivalently SHAH.plot). The 2D-BUUHWE (SHAH) is related to a basis expansion. The basis can be obtained and represented using BUUHWE_2D_Stepwise ( or equivalently SHAH_Stepwise). An efficient way to store the information defing the 2D-BUUHWE (SHAH) is through the signature of the image, obtained using Signature_2D.

BUUHWE provides with the Bottom-Up Unbalanced Haar Wavelet Expansion of a curve. Pairs of images can be compared through their 2D-BUUHWE, using the BAGIDIS semi-distance computed with semimetric.BAGIDIS_2D. See Timmermans (2012) for details.

Author(s)

Piotr Fryzlewicz, Department of Statistics, London School of Economics.

Catherine Timmermans, Institut de Statistique, Biostatistique et Sciences Actuarielles, Universite catholique de Louvain. <catherine.timmermans@uclouvain.be>

References

The main references are

Other references include

The function BUUHWE_2D in this package is similar to the function uh.bu.2d (copyrighted Fryzlewicz 2014) in the package "shah_code", available on the webpage of Piotr Fryzlewicz: http://stats.lse.ac.uk/fryzlewicz/shah/shah_code.R , which accompanies the paper Fryzlewicz and Timmermans (2015).

See Also

BUUHWE_2D.plot,SHAH.plot ,BUUHWE_2D_Stepwise, SHAH_Stepwise, BUUHWE.

Examples

1
2
3
4
5
6
7
im = rbind(c(1,2,3),c(2,7,8),c(1,0,0))
BUUHWE_2D(im)
SHAH(im)
Signature_2D(SHAH(im))

SHAH_Stepwise(im)$details
Signature_2D(SHAH(im))

Bagidis documentation built on May 29, 2017, noon