0
嗨在我的项目中,我想给这些图像中的一些静止图像,我应该把洗牌图像作为输入,但输出会cme像连续图像,它可以通过使用插值方法比较最近的邻居我怎么能实施那些PLZ告诉我。我有一些代码告诉我它是如何wrks。图像插值
public InterpolationMethod method = InterpolationMethod.Bilinear;
public int newWidth = 0;
public int newHeight = 0;
try {
this.newWidth = Math.Max(1, Math.Min(5000, int.Parse(widthBox.Text)));
this.newHeight = Math.Max(1, Math.Min(5000, int.Parse(heightBox.Text)));
this.method = (methodCombo.SelectedIndex == 0)
? InterpolationMethod.NearestNeighbor
: (methodCombo.SelectedIndex == 1)
? InterpolationMethod.Bilinear
: InterpolationMethod.Bicubic;
this.DialogResult = DialogResult.OK;
this.Close();
}
catch (Exception)
{
MessageBox.Show(this, "Incorrect values are entered", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}