How to merge multiple images?

Hi i need some help with the of stitching images. I will capture a series of images and i want them to be stitched together in a panorama effect. I have already accomplished the capturing part. I need help with the stitching of images one after another. Any heads up? Thanks in advance.

Are you talking about doing it runtime?Doing it in runtime round be very difficult.

First you need something like OpenCV, a library to help the software to understand images. There is a wrapper in asset store (~$100). Then you need to use OpenCV to get “features” from the images. And then you do matching with “features” of two image. And do rendering based on the position of matched “features”

If you assume it’s a mobile and it is fixed at an axis, then it may be easier because you can use the gyroscope direction.

By stitching images, you mean take two images and put them horizontally together to form 1 image? If that is what you mean, you are going to have to take either of the following routes.

  1. Put X meshes side by side, where X is the number of images you have. Then for each mesh, assign a texture, which is one of your images. Effectively, it will show X meshes side by side, each with a different image.

  2. This can be tricky. Assuming that you want to stitch them horizontally, and all the textures are the same size, you can do this using the new GUI system. Basically, set a texture 2d size of texture.width * X, texture.height, then read off the pixels from your source texture 2d, and place them side by side with texture.width as offset. You might find these links helpful :
    Texture2D and Set Pixels ref 1

Texture2D and Set Pixels ref 2

To stitch images in a panorama I recommend you the Microsoft Image Composite Editor or ICE. It’s free and easy to use.