我是Emgu CV的新手,我遇到了嘗試保存圖像的錯誤(「訪問衝突異常未處理」)。這裏是我嘗試過的圖像路徑:訪問衝突異常未處理嘗試保存圖像
C:\\Users\crowds\Documents\Example\Sample.jpg
這裏是我的代碼。誰能幫忙?
//Form CameraCapture
private void button1_Click(object sender, EventArgs e)
{
if (_capture != null)
{
captured FF = new captured();
FF.Show();
this.Hide();
}
}
//Form captured
namespace CameraCapture
{
public partial class captured : Form
{
public captured()
{
InitializeComponent();
}
private void captured_Load(object sender, EventArgs e)
{
var capture = new Emgu.CV.Capture();
using (var ImageFrame = capture.QueryFrame())
{
if (ImageFrame != null)
{
pictureBox1.Image = ImageFrame.ToBitmap();
ImageFrame.Save(
@"C:\\Users\crowds\Documents\Example\Sample.jpg");
}
}
}
private void button1_Click(object sender, EventArgs e)
{
CameraCapture CC = new CameraCapture();
CC.Show();
this.Close();
}
}
}
訪問衝突異常是未處理 這裏的地方出錯彈出 圖片幀= _capture.RetrieveBgrFrame(); –
什麼是'Emgu.CV.Capture();'? 「Emgu」從哪裏來?此代碼中的訪問衝突是崩潰,很可能在此代碼中。 – Joe