C# Класс CSJ2K.j2k.wavelet.analysis.SubbandAn

This class represents a subband in a bidirectional tree structure that describes the subband decomposition for a wavelet transform, specifically for the analysis side.

The element can be either a node or a leaf of the tree. If it is a node then ther are 4 descendants (LL, HL, LH and HH). If it is a leaf there are no descendants.

The tree is bidirectional. Each element in the tree structure has a "parent", which is the subband from which the element was obtained by decomposition. The only exception is the root element which has no parent (i.e.it's null), for obvious reasons.

Наследование: CSJ2K.j2k.wavelet.Subband
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
hFilter CSJ2K.j2k.wavelet.analysis.AnWTFilter
l2Norm float
parentband SubbandAn
stepWMSE float
subb_HH SubbandAn
subb_HL SubbandAn
subb_LH SubbandAn
subb_LL SubbandAn
vFilter CSJ2K.j2k.wavelet.analysis.AnWTFilter

Открытые методы

Метод Описание
SubbandAn ( ) : System

Creates a SubbandAn element with all the default values. The dimensions are (0,0) and the upper left corner is (0,0).

SubbandAn ( int w, int h, int ulcx, int ulcy, int lvls, WaveletFilter hfilters, WaveletFilter vfilters ) : System

Creates the top-level node and the entire subband tree, with the top-level dimensions, the number of decompositions, and the decomposition tree as specified.

This constructor just calls the same constructor of the super class, and then calculates the L2-norm (or energy weight) of each leaf.

This constructor does not initialize the value of the magBits or stepWMSE member variables. This variables are normally initialized by the quantizer (see Quantizer).

Защищенные методы

Метод Описание
split ( WaveletFilter hfilter, WaveletFilter vfilter ) : Subband

Splits the current subband in its four subbands. It changes the status of this element (from a leaf to a node, and sets the filters), creates the childs and initializes them. An IllegalArgumentException is thrown if this subband is not a leaf.

It uses the initChilds() method to initialize the childs.

Приватные методы

Метод Описание
assignL2Norm ( float l2n ) : void

Assigns the given L2-norm to the first leaf that does not have an L2-norm value yet (i.e. l2norm is negative). The search is done recursively and in the same order as that of the calcBasisWaveForms() method, so that this method is used to assigne the l2norm of the previously computed waveforms.

This method can not be called on an element that ahs a non-negative value in l2Norm, since that means that we are done.

calcBasisWaveForms ( float wfs ) : void

Calculates the basis waveform of the first leaf for which the L2-norm has not been calculated yet. This method searches recursively for the first leaf for which the value has not been calculated yet, and then calculates the L2-norm on the return path.

The wfs argument should be a size 2 array of float arrays (i.e. 2D array) and it must be of length 2 (or more). When returning, wfs[0] will contain the line waveform, and wfs[1] will contain the column waveform.

This method can not be called on an element that ahs a non-negative value in l2Norm, since that means that we are done.

calcL2Norms ( ) : void

Calculates the L2-norm of the sythesis waveforms of every leaf in the tree. This method should only be called on the root element.

Описание методов

SubbandAn() публичный Метод

Creates a SubbandAn element with all the default values. The dimensions are (0,0) and the upper left corner is (0,0).
public SubbandAn ( ) : System
Результат System

SubbandAn() публичный Метод

Creates the top-level node and the entire subband tree, with the top-level dimensions, the number of decompositions, and the decomposition tree as specified.

This constructor just calls the same constructor of the super class, and then calculates the L2-norm (or energy weight) of each leaf.

This constructor does not initialize the value of the magBits or stepWMSE member variables. This variables are normally initialized by the quantizer (see Quantizer).

public SubbandAn ( int w, int h, int ulcx, int ulcy, int lvls, WaveletFilter hfilters, WaveletFilter vfilters ) : System
w int The top-level width /// ///
h int The top-level height /// ///
ulcx int The horizontal coordinate of the upper-left corner with /// respect to the canvas origin, in the component grid. /// ///
ulcy int The vertical coordinate of the upper-left corner with /// respect to the canvas origin, in the component grid. /// ///
lvls int The number of levels (or LL decompositions) in the tree. /// ///
hfilters WaveletFilter The horizontal wavelet analysis filters for each /// resolution level, starting at resolution level 0. /// ///
vfilters WaveletFilter The vertical wavelet analysis filters for each /// resolution level, starting at resolution level 0. /// ///
Результат System

split() защищенный Метод

Splits the current subband in its four subbands. It changes the status of this element (from a leaf to a node, and sets the filters), creates the childs and initializes them. An IllegalArgumentException is thrown if this subband is not a leaf.

It uses the initChilds() method to initialize the childs.

protected split ( WaveletFilter hfilter, WaveletFilter vfilter ) : Subband
hfilter WaveletFilter The horizontal wavelet filter used to decompose this /// subband. It has to be a AnWTFilter object. /// ///
vfilter WaveletFilter The vertical wavelet filter used to decompose this /// subband. It has to be a AnWTFilter object. /// ///
Результат CSJ2K.j2k.wavelet.Subband

Описание свойств

hFilter публичное свойство

The horizontal analysis filter used to decompose this subband. This is applicable to "node" elements only. The default value is null.
public AnWTFilter,CSJ2K.j2k.wavelet.analysis hFilter
Результат CSJ2K.j2k.wavelet.analysis.AnWTFilter

l2Norm публичное свойство

The L2-norm of the synthesis basis waveform of this subband, applicable to "leafs" only. By default it is -1 (i.e. not calculated yet).
public float l2Norm
Результат float

parentband публичное свойство

The reference to the parent of this subband. It is null for the root element. It is null by default.
public SubbandAn,CSJ2K.j2k.wavelet.analysis parentband
Результат SubbandAn

stepWMSE публичное свойство

The contribution to the MSE or WMSE error that would result in the image if there was an error of exactly one quantization step size in the sample of the subband. This value is expressed relative to a nominal dynamic range in the image domain of exactly 1.0. This field contains valid data only after quantization 9See Quantizer).
public float stepWMSE
Результат float

subb_HH публичное свойство

The reference to the HH subband resulting from the decomposition of this subband. It is null by default.
public SubbandAn,CSJ2K.j2k.wavelet.analysis subb_HH
Результат SubbandAn

subb_HL публичное свойство

The reference to the HL subband (horizontal high-pass) resulting from the decomposition of this subband. It is null by default.
public SubbandAn,CSJ2K.j2k.wavelet.analysis subb_HL
Результат SubbandAn

subb_LH публичное свойство

The reference to the LH subband (vertical high-pass) resulting from the decomposition of this subband. It is null by default.
public SubbandAn,CSJ2K.j2k.wavelet.analysis subb_LH
Результат SubbandAn

subb_LL публичное свойство

The reference to the LL subband resulting from the decomposition of this subband. It is null by default.
public SubbandAn,CSJ2K.j2k.wavelet.analysis subb_LL
Результат SubbandAn

vFilter публичное свойство

The vertical analysis filter used to decompose this subband. This is applicable to "node" elements only. The default value is null.
public AnWTFilter,CSJ2K.j2k.wavelet.analysis vFilter
Результат CSJ2K.j2k.wavelet.analysis.AnWTFilter