Guest User

Untitled

a guest
Dec 12th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. for (int i = 0; i < 2; i++)
  2. {
  3. string path = @"D:\photos\";
  4. string fileN = path + i.ToString() + ".bmp";
  5. ImageList.Add(new Image<Bgr, Byte>(fileN));
  6. }
  7.  
  8. try
  9. {
  10. using (Stitcher stitcher = new Stitcher(false))
  11. {
  12. using (VectorOfMat vm = new VectorOfMat())
  13. {
  14. Mat result = new Mat();
  15. vm.Push(ImageList);
  16. stitcher.Stitch(vm, result);
  17. pictureBox1.Image = result.ToImage<Bgr, byte>().Bitmap;
  18. }
  19. }
  20. }
  21.  
  22. catch (Exception ex)
  23. {
  24. MessageBox.Show(ex.ToString());
  25. }
  26. }
Add Comment
Please, Sign In to add comment