public static void vertical ( BorderIndex1D border , WlCoef_I32 coefficients , GrayI input , GrayI output ) { UtilWavelet . checkShape ( input , output ) ; final int offsetA = coefficients . offsetScaling ; final int offsetB = coefficients . offsetWavelet ; final int [ ] alpha = coefficients . scaling ; final int [ ] beta = coefficients . wavelet ; border . setLength ( input . height + input . height % 2 ) ; boolean isLarger = output . height > input . height ; for ( int x = 0 ; x < input . width ; x ++ ) { for ( int y = 0 ; y < input . height ; y += 2 ) { int scale = 0 ; int wavelet = 0 ; for ( int i = 0 ; i < alpha . length ; i ++ ) { int yy = border . getIndex ( y + i + offsetA ) ; if ( isLarger && yy >= input . height ) continue ; scale += input . get ( x , yy ) * alpha [ i ] ; } for ( int i = 0 ; i < beta . length ; i ++ ) { int yy = border . getIndex ( y + i + offsetB ) ; if ( isLarger && yy >= input . height ) continue ; wavelet += input . get ( x , yy ) * beta [ i ] ; } int outY = y / 2 ; scale = 2 * scale / coefficients . denominatorScaling ; wavelet = 2 * wavelet / coefficients . denominatorWavelet ; output . set ( x , outY , scale ) ; output . set ( x , output . height / 2 + outY , wavelet ) ; } } }
Performs a single level wavelet transform along the vertical axis .