O'Reilly logo

Emgu CV Essentials by Shin Shi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Code

Let's create a new project and remember to add the new using the Emgu.CV.Stitching. Use the dataGridView control to show the input images, and add a button to select the image files. The code of how to store and stitch images is shown as follows:

private void button1_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Multiselect = true; ofd.CheckFileExists = true; if (ofd.ShowDialog() == DialogResult.OK) { //Clear data dataGridView1.Rows.Clear(); //Store input images Image<Bgr, Byte>[] images = new Image<Bgr, Byte>[ofd.FileNames.Length]; for (int i = 0; i < images.Length; i++) { images[i] = new Image<Bgr, Byte>(ofd.FileNames[i]); using (Image<Bgr, Byte> thumbnail = images[i].Resize(150, 150, Emgu.CV.CvEnum.INTER.CV_INTER_CUBIC, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required