C# :Emgu CV creating image problem
- by Meko
Hi all. When I am trying to create image like
Image<Gray, Byte> testImage = new Image<Gray, Byte>("david.jpg");
When compiling it gaves An unhandled exception of type 'System.ArgumentException' occurred in System.Drawing.dllexception.
But if I use
DialogResult result = openFileDialog1.ShowDialog();
if (result == DialogResult.OK || result == DialogResult.Yes)
{
textBox1.Text = openFileDialog1.FileName;
}
Image<Gray, Byte> testImage = new Image<Gray, Byte>( textBox1.Text);
It works.Problem is that it cant find path? I am adding all .jpg files in project folder.