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);
}
}