Class BiorthogonalWavelets

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener

    public class BiorthogonalWavelets
    extends AlgorithmBase
    Copyright (c) 2012, Brian Moore Copyright (c) 2004, Ben Barrowes All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\
    • Field Detail

      • epsilon

        private double epsilon
        D1MACH(4).
      • h

        private double[] h
      • ht

        private double[] ht
      • inds_h

        private int[] inds_h
      • inds_ht

        private int[] inds_ht
      • g

        private double[] g
      • gt

        private double[] gt
      • inds_g

        private int[] inds_g
      • inds_gt

        private int[] inds_gt
      • transformImage

        private ModelImage transformImage
      • compressedTransformImage

        private ModelImage compressedTransformImage
      • reconstructedImage

        private ModelImage reconstructedImage
      • iterations

        private int iterations
      • compressionFactor

        private double compressionFactor
      • type

        private int type
      • l

        private int l
      • lt

        private int lt
      • N

        private int N
      • Nt

        private int Nt
      • display

        private boolean display
      • method

        private int method
      • hRealRoots

        private double[] hRealRoots
      • hComplexRoots

        private double[][] hComplexRoots
      • htRealRoots

        private double[] htRealRoots
      • htComplexRoots

        private double[][] htComplexRoots
      • P

        private double[] P
      • h1

        private double[] h1
      • ht1

        private double[] ht1
      • str

        private java.lang.String str
      • HwReal

        private double[] HwReal
      • HwImag

        private double[] HwImag
      • absHw

        private float[] absHw
      • HtwReal

        private double[] HtwReal
      • HtwImag

        private double[] HtwImag
      • absHtw

        private float[] absHtw
      • GwReal

        private double[] GwReal
      • GwImag

        private double[] GwImag
      • absGw

        private float[] absGw
      • GtwReal

        private double[] GtwReal
      • GtwImag

        private double[] GtwImag
      • absGtw

        private float[] absGtw
    • Constructor Detail

      • BiorthogonalWavelets

        public BiorthogonalWavelets​(ModelImage transformImage,
                                    ModelImage compressedTransformImage,
                                    ModelImage reconstructedImage,
                                    ModelImage srcImg,
                                    int iterations,
                                    double compressionFactor,
                                    boolean display,
                                    int method,
                                    int type,
                                    int len,
                                    int lent)
    • Method Detail

      • runAlgorithm

        public void runAlgorithm()
        Description copied from class: AlgorithmBase
        Actually runs the algorithm. Implemented by inheriting algorithms.
        Specified by:
        runAlgorithm in class AlgorithmBase
      • computeEpsilon

        private void computeEpsilon()
      • CDFWavelets

        public void CDFWavelets()
      • SplineWavelets

        public void SplineWavelets()
      • diffBinomial

        private double[] diffBinomial​(int n)
      • FastConvWaveletMult

        private double[][] FastConvWaveletMult​(double[][] mat,
                                               double[] h,
                                               double[] g,
                                               int[] inds_h,
                                               int[] inds_g)
      • WaveletMatrix

        private double[][] WaveletMatrix​(int M,
                                         double[] h,
                                         double[] g,
                                         int[] inds_h,
                                         int[] inds_g)
      • circshift

        private double[] circshift​(double[] vec,
                                   int shift)
      • conv

        private double[] conv​(double[] u,
                              double[] v)
      • roots

        private double[][] roots​(double[] p)
      • cplxpair

        private double[][] cplxpair​(double[][] p)
      • zabs

        private double zabs​(double zr,
                            double zi)
        zabs computes the absolute value or magnitude of a double precision complex variable zr + j*zi.
        Parameters:
        zr - double
        zi - double
        Returns:
        double
      • nchoosek

        private long nchoosek​(int n,
                              int k)
      • factorial

        public long factorial​(int number)
        Returns the factorial of a nonnegative integer.
        Parameters:
        number - integer whose factorial is being returned
        Returns:
        number!
      • ComputeFilters

        private void ComputeFilters()
      • ComputeFrequencyResponse

        private void ComputeFrequencyResponse()
      • computeRoots

        private void computeRoots()