Beispiel #1
0
        /// <summary>
        /// Perform an inverse decompressed haar wavelet transform. E.g. perform an ihaar2d and return logSpectrogram
        /// </summary>
        /// <param name="wavelet">wavelet matrix</param>
        /// <returns>matrix inverse wavelet'ed (e.g. logSpectrogram)</returns>
        public Matrix InverseWaveletCompression(ref Matrix wavelet, int firstHeight, int firstWidth, int rows, int columns)
        {
            Mirage.DbgTimer t = new Mirage.DbgTimer();
            t.Start();

            // Resize, e.g. Uncompress
            wavelet = wavelet.Resize(rows, columns);

            // 6. Perform the Inverse Wavelet Transform
            Matrix m = wavelet.Copy();
            Wavelets.Compress.WaveletDecompress.Decompress2D(m.MatrixData, numberWaveletTransforms, firstHeight, firstWidth);

            Mirage.Dbg.WriteLine("Inverse Wavelet Compression Execution Time: " + t.Stop().TotalMilliseconds + " ms");
            return m;
        }