Exemplo n.º 1
0
		public static void TestJWave() {

			double[][] mat = Get2DTestData();

			WaveletInterface wavelet = null;
			wavelet = new Haar02();
			TransformInterface bWave = null;
			//bWave = new FastWaveletTransform(wavelet);
			//bWave = new WaveletPacketTransform(wavelet);
			bWave = new DiscreteWaveletTransform(wavelet);
			Transform t = new Transform(bWave); // perform all steps
			
			Console.Write("\n\nThe 2D JWave Haar02 Dwt method: ");
			Console.Write("\n");
			double[][] dwtArray = t.forward(mat);
			
			Matrix dwtMatrix = new Matrix(dwtArray);
			dwtMatrix.Print();
			
			Console.Write("\n\nThe 2D JWave Haar02 Inverse Dwt method: ");
			Console.Write("\n");
			double[][] idwtArray = t.reverse(dwtArray);

			Matrix idwtMatrix = new Matrix(idwtArray);
			idwtMatrix.Print();
		}
Exemplo n.º 2
0
		public static void TestHaarWaveletTransform2D() {
			
			Console.Write("\n\nThe Haar Wavelet Transform 2D: ");
			Console.Write("\n");
			
			double[][] mat = Get2DTestData();
			Wavelets.Compress.HaarWaveletTransform.HaarTransform2D(mat, 4, 4);

			Matrix result = new Matrix(mat);
			result.Print();
			
			Wavelets.Compress.HaarWaveletTransform.InverseHaarTransform2D(mat, 4, 4);
			result.Print();
		}
Exemplo n.º 3
0
		public static void TestHaarWaveletDecomposition() {
			
			Console.Write("\n\nThe Standard 2D HaarWaveletDecomposition method: ");
			Console.Write("\n");
			
			StandardHaarWaveletDecomposition haar = new StandardHaarWaveletDecomposition();
			
			double[][] mat = Get2DTestData();
			
			haar.DecomposeImageInPlace(mat);

			Matrix result = new Matrix(mat);
			result.Print();

			Console.Write("\n\nThe New Standard 2D HaarWaveletDecomposition method: ");
			Console.Write("\n");
			
			StandardHaarWaveletDecomposition haarNew = new StandardHaarWaveletDecomposition(false);
			
			mat = Get2DTestData();
			haarNew.DecomposeImageInPlace(mat);

			Matrix resultNew = new Matrix(mat);
			resultNew.Print();

			Console.Write("\n\nThe Non Standard 2D HaarWaveletDecomposition method: ");
			Console.Write("\n");
			
			NonStandardHaarWaveletDecomposition haarNonStandard = new NonStandardHaarWaveletDecomposition();
			
			mat = Get2DTestData();
			haarNonStandard.DecomposeImageInPlace(mat);

			Matrix resultNonStandard = new Matrix(mat);
			resultNonStandard.Print();
		}
Exemplo n.º 4
0
		public static void TestHaar2d() {
			
			Console.Write("\n\nThe 2D Haar Transform: ");
			Console.Write("\n");
			
			double[][] mat = Get2DTestData();
			Haar.Haar2d(mat, 4, 4);

			Matrix result = new Matrix(mat);
			result.Print();
		}