我是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();
}
}
}