私はプロジェクトに取り組んでおり、その一部は Emgu.cv を使用して画像をステッチしています。ユーザーに画像のインポートを求める。ユーザーが「スティッチング」ボタンを押すと、pictureBox を使用して画像をスティッチして 1 つの画像として表示する必要がありますが、代わりにエラーが発生しました。
このチュートリアルに従って、C# の代わりに Vb を試してみます: http://www.youtube.com/watch?v=Lk37LR50viw しかし、プロジェクトはビルドされません。
ボタンの c# コード:
Stitcher x = new Stitcher(false);
Image<Bgr, Byte> result = x.Stitch(images);
imageBox.Image = result.ToBitmap();
画像は次のとおりです。
Image<Bgr, Byte>[] images = new Image<Bgr, Byte>[9];
インポートされたすべての画像が保存されていること:
private void importbuofd_FileOk(object sender, CancelEventArgs e)
{
switch (x)
{
case 1: pictureBox1.ImageLocation = importbuofd.FileName; x = x + 1; images[0] = new Image<Bgr, Byte>(new Bitmap(pictureBox1.Image)); count++; break;
case 2: pictureBox2.ImageLocation = importbuofd.FileName; x = x + 1; images[1] = new Image<Bgr, Byte>(new Bitmap(pictureBox2.Image)); count++; break;
case 3: pictureBox3.ImageLocation = importbuofd.FileName; x = x + 1; images[2] = new Image<Bgr, Byte>(new Bitmap(pictureBox3.Image)); count++; break;
case 4: pictureBox4.ImageLocation = importbuofd.FileName; x = x + 1; images[3] = new Image<Bgr, Byte>(new Bitmap(pictureBox4.Image)); count++; break;
case 5: pictureBox5.ImageLocation = importbuofd.FileName; x = x + 1; images[4] = new Image<Bgr, Byte>(new Bitmap(pictureBox5.Image)); count++; break;
case 6: pictureBox6.ImageLocation = importbuofd.FileName; x = x + 1; images[5] = new Image<Bgr, Byte>(new Bitmap(pictureBox6.Image)); count++; break;
case 7: pictureBox7.ImageLocation = importbuofd.FileName; x = x + 1; images[6] = new Image<Bgr, Byte>(new Bitmap(pictureBox7.Image)); count++; break;
case 8:pictureBox8.ImageLocation = importbuofd.FileName; x = x + 1; images[7] = new Image<Bgr, Byte>(new Bitmap(pictureBox8.Image)); count++; break;
case 9: pictureBox9.ImageLocation = importbuofd.FileName; x = x + 1; images[8] = new Image<Bgr, Byte>(new Bitmap(pictureBox9.Image)); count++; break;
default: MessageBox.Show("Sorry, This is the maximum number You can import"); break;
}
}
何をすればよいでしょうか?!