Accord.Imaging.ObjectiveFidelity.Compute C# (CSharp) Method

Compute() public method

Compute objective fidelity metrics.
public Compute ( Bitmap a, Bitmap b ) : void
a System.Drawing.Bitmap The first image to be compared.
b System.Drawing.Bitmap The second image that will be compared.
return void
        public void Compute(Bitmap a, Bitmap b)
        {
            // lock source image
            BitmapData dataOriginal = a.LockBits(
                new Rectangle(0, 0, a.Width, a.Height),
                ImageLockMode.ReadOnly, a.PixelFormat);

            BitmapData dataReconstructed = b.LockBits(
                new Rectangle(0, 0, b.Width, b.Height),
                ImageLockMode.ReadOnly, b.PixelFormat);

            Compute(new UnmanagedImage(dataOriginal), new UnmanagedImage(dataReconstructed));

            a.UnlockBits(dataOriginal);
            a.UnlockBits(dataReconstructed);
        }

Same methods

ObjectiveFidelity::Compute ( BitmapData a, BitmapData b ) : void
ObjectiveFidelity::Compute ( UnmanagedImage a, UnmanagedImage b ) : void