示例#1
0
        public Image <T> Upsample(Image <T> quarter, int xs, int ys)
        {
            Image <T> half = new Image <T>(quarter.Xs, ys);

            for (int x = 0; x < half.Xs; x++)
            {
                half.Columns[x] = sampler.Upsample(quarter.Columns[x], ys);
            }
            Image <T> full = new Image <T>(xs, ys);

            for (int y = 0; y < full.Ys; y++)
            {
                full.Rows[y] = sampler.Upsample(half.Rows[y], xs);
            }
            return(full);
        }
示例#2
0
 public void Upsample_test()
 {
     Assert.That(dirichletSampler.Upsample(array, array.Length * 2),
                 Is.EqualTo(digitalSampler.Upsample(array, array.Length * 2)).Within(1E-15));
 }
示例#3
0
 public void Upsample_preserves_constant_array()
 {
     Assert.That(linear2.Upsample(shortConstant, shortConstant.Length * 2), Is.EqualTo(constant));
 }