# dt2cen: centre of the DT-spectrum In dualtrees: Decimated and Undecimated 2D Complex Dual-Tree Wavelet Transform

## Description

calculate the centre of mass of the local spectra in hexagonal geometry

## Usage

 `1` ```dt2cen(dt, mask = NULL) ```

## Arguments

 `dt` a `J x nx x ny x 6` array of spectral energies, the output of `fld2dt` `mask` a ` nx x ny ` array of logical values

## Details

Each of the `J x 6` spectral values is assigned a coordinate in 3D space with `x(d,j)=cos(60*(d-1))`, `y(d,j)=sin(60*(d-1))`, `z(d,j)=j`, where `j` denotes the scale and `d` the direction. Then the centre of mass in this space is calculated, the spectral values being the masses at each vertex. The x- and y-cooridnate are then transformed into a radius `rho=sqrt(x^2+y^2)` and an angle `phi=15+0.5*atan2(y,x)`. `rho` measures the degree of anisotropy at each pixel, `phi` the orientation of edges in the image, and the third coordinate, `z`, the central scale. If a `mask` is provided, values where `mask==TRUE` are set to `NA`.

## Value

a `nx x ny x 3` array where the third dimension denotes degree of anisotropy, angle and central scale, respectively.

## Note

Since the centre of mass is not defined for negative mass, any values below zero are removed at this point.

## Examples

 ```1 2 3``` ```dt <- fld2dt(blossom) ce <- dt2cen(dt) image( ce[,,3], col=gray.colors(32, 0, 1) ) ```

dualtrees documentation built on March 13, 2020, 1:42 a.m.