public void WaveletTransformConstructorTest()
{
// Start with a grayscale image
Bitmap src = Accord.Imaging.Image.Clone(Properties.Resources.lena512);
// Create a wavelet filter
IWavelet wavelet = new Accord.Math.Wavelets.Haar(2);
WaveletTransform target = new WaveletTransform(wavelet);
// Apply the transformation
Bitmap dst = target.Apply(src);
// Revert the transformation
target.Backward = true;
Bitmap org = target.Apply(dst);
#pragma warning disable 0618
double[,] actual = org.ToDoubleMatrix(0);
double[,] expected = src.ToDoubleMatrix(0);
#pragma warning restore 0618
Assert.IsTrue(actual.IsEqual(expected, atol: 0.102));
}
}