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); }
public void Upsample_test() { Assert.That(dirichletSampler.Upsample(array, array.Length * 2), Is.EqualTo(digitalSampler.Upsample(array, array.Length * 2)).Within(1E-15)); }
public void Upsample_preserves_constant_array() { Assert.That(linear2.Upsample(shortConstant, shortConstant.Length * 2), Is.EqualTo(constant)); }