Panorama – Image Stitching in OpenCV

Posted: November 22, 2012 in Technology
Tags: , , , ,

The code  snippet shown below  is  for simple image stitching of two images in OpenCV . It can easily be modified to stitch multiple images together and create a Panorama.

OpenCV also has a stitching module which helps in achieving this task and which is more robust than this. The code presented here will help in understanding the major steps involved in image stitching algorithm. I am using OpenCV 2.4.3 and Visual studio 2010.  This code is based on the  openCV tutorial  available here.

The main parts of stitching algorithm are –  1) Finding Surf descriptors in both images 2) Matching the surf descriptors between two images . 3) Using  RANSAC to estimate the homography matrix using the matched surf descriptors. 4) Warping the images based on the homography matrix.

Input images :    

Stitched Output:

Code:

#include <stdio.h>
#include <iostream>

#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/nonfree/nonfree.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/imgproc/imgproc.hpp"

using namespace cv;

void readme();

/** @function main */
int main( int argc, char** argv )
{
 if( argc != 3 )
 { readme(); return -1; }

// Load the images
 Mat image1= imread( argv[2] );
 Mat image2= imread( argv[1] );
 Mat gray_image1;
 Mat gray_image2;
 // Convert to Grayscale
 cvtColor( image1, gray_image1, CV_RGB2GRAY );
 cvtColor( image2, gray_image2, CV_RGB2GRAY );

imshow("first image",image2);
 imshow("second image",image1);

if( !gray_image1.data || !gray_image2.data )
 { std::cout<< " --(!) Error reading images " << std::endl; return -1; }

//-- Step 1: Detect the keypoints using SURF Detector
 int minHessian = 400;

SurfFeatureDetector detector( minHessian );

std::vector< KeyPoint > keypoints_object, keypoints_scene;

detector.detect( gray_image1, keypoints_object );
 detector.detect( gray_image2, keypoints_scene );

//-- Step 2: Calculate descriptors (feature vectors)
 SurfDescriptorExtractor extractor;

Mat descriptors_object, descriptors_scene;

extractor.compute( gray_image1, keypoints_object, descriptors_object );
 extractor.compute( gray_image2, keypoints_scene, descriptors_scene );

//-- Step 3: Matching descriptor vectors using FLANN matcher
 FlannBasedMatcher matcher;
 std::vector< DMatch > matches;
 matcher.match( descriptors_object, descriptors_scene, matches );

double max_dist = 0; double min_dist = 100;

//-- Quick calculation of max and min distances between keypoints
 for( int i = 0; i < descriptors_object.rows; i++ )
 { double dist = matches[i].distance;
 if( dist < min_dist ) min_dist = dist;
 if( dist > max_dist ) max_dist = dist;
 }

printf("-- Max dist : %f \n", max_dist );
 printf("-- Min dist : %f \n", min_dist );

//-- Use only "good" matches (i.e. whose distance is less than 3*min_dist )
 std::vector< DMatch > good_matches;

for( int i = 0; i < descriptors_object.rows; i++ )
 { if( matches[i].distance < 3*min_dist )
 { good_matches.push_back( matches[i]); }
 }
 std::vector< Point2f > obj;
 std::vector< Point2f > scene;

for( int i = 0; i < good_matches.size(); i++ )
 {
 //-- Get the keypoints from the good matches
 obj.push_back( keypoints_object[ good_matches[i].queryIdx ].pt );
 scene.push_back( keypoints_scene[ good_matches[i].trainIdx ].pt );
 }

// Find the Homography Matrix
 Mat H = findHomography( obj, scene, CV_RANSAC );
 // Use the Homography Matrix to warp the images
 cv::Mat result;
 warpPerspective(image1,result,H,cv::Size(image1.cols+image2.cols,image1.rows));
 cv::Mat half(result,cv::Rect(0,0,image2.cols,image2.rows));
 image2.copyTo(half);
 imshow( "Result", result );

 waitKey(0);
 return 0;
 }

/** @function readme */
 void readme()
 { std::cout << " Usage: Panorama < img1 > < img2 >" << std::endl; }

Running the code :

Build the code and pass in the two images to be stitched as arguments to the generated exe. Sometimes if the stitching  output is not proper reversing the order of the two images when you pass to the exe would help.

Advertisements
Comments
  1. Anonymous says:

    I think at lines 30 & 31:
    imshow(“first image”,image2);
    imshow(“second image”,image1);

    should be:
    imshow(“first image”,image1);
    imshow(“second image”,image2);

  2. Anonymous says:

    Hi man,

    thenk you for the useful stitching code. I have a problem with some images that have big sizes or Low overlap parts. Would you please help me with that?

    Thanks 🙂

  3. Anonymous says:

    Thank you my friend,

    just another question is about the mosaic images not panorama images. Does the openCV have this possiblity to make a mosaic images ?

    • As far as I know opencv doesn’t have any default modules to do mosaic images .

    • Red says:

      Mosaicing for non-panoramic images should be similar to the things written in this article with the addition that you have to determine the orientation of each image before you stich them together. In this post the author assumes that those images are part of a panorama because of the line with warpPerspective and the size that is used there – the sum of the columns of all images but the rows remain the same, which is typical for this type of images. You can use the keypoints that are matched in the image sequence to calculate rotation, translation etc.

      • RB says:

        General mosaicing is similar to stitching panoramic images but it’s actually much more difficult. Panoramic images are a very simplified case of mosaicing, that is there is no translation and we rotate only around one axes. This leads to the very simple case that each image has 1 (applies only for the first and last image in the stitching) or 2 neighbours . Introducing multiple rotations and translations poses a greater challenge since an image can and probably will have more than 2 neighbours (which is the case with panoramic images). And OpenCV’s stitching module assumes pure rotation (rotation of the camera around one of it’s axes). All the estimators and also the implemented bundle adjustment take rotation into consideration. Introducing translation creates bad results (tested it myself with multiple image sets translating the camera along a single axis, which is the simplest way to test for translation issues in the stitcher module).

  4. Atul says:

    Thanks for this blog I have tried to run this code on VS 2010 and opencv 243 but your code is not working; I have added all the lib path and every thing but it showing this error
    :\WINDOWS\SysWOW64\imm32.dll’, Cannot find or open the PDB file
    ‘opencvnewhello.exe’:
    Loaded ‘C:\WINDOWS\SysWOW64\msctf.dll’, Cannot find or open the PDB file

    please help

  5. aphyMan says:

    Nice work! I’m sort of new to image processing.Why is it important to convert the images to gray scale? What if I have two images that don’t have any defined borders of any sort? Instead of lines within the overlap, the overlap contains colors (like a gradient). Wouldn’t this be problematic?

    • aphyMan says:

      By the way, I’ve tried commenting out lines 27-28 and 33-34 and I get this error “Assertion failed…….”. I have no idea what I’m doing. :))
      I’m just trying to learn the stitching pipeline. Your code looks like a nice way to start. 🙂

    • You want to extract spatial features so you need grayscale or single color image.

      If you have properties with colors etc overlapping then try to extract any one channel ( RGB or HSV etc) when the features you are looking for are prominent and try stitching.

      Hope that helps!

  6. Sharan says:

    I’ getting only image2 in the result image, where i might hav gone wrong?? plz help…

    • Reverse the image order when giving to command line. If you were giving image1 and image 2 as arguments previously , change the order now

      • Sharan says:

        thanks 🙂
        i want to stitch 2 images which are actually frames extracted from a video it is not possible to fit them inside an image of size (img1.rows+img2.rows) and(img1.cols+img2.cols), the result shows only 1 image with other image being stretched crazily:( what should i do to stitch images of this kind. Stitcher class works perfectly but requires a lot of time when i try to stitch high-res images. plz help…

      • Stitcher class is more robust. If it works perfect then you should use that.. You can downsample the images to reduce processing time.

  7. kk says:

    Hi….I have one problem with your code.Your code is working fine for some of the images like for images available at http://stackoverflow.com/questions/10256802/how-to-merge-two-images-in-opencv and https://ramsrigoutham.com/2012/11/22/panorama-image-stitching-in-opencv/ .But if I capture image from camera and try to stitch that images then i got status as ERR_NEED_MORE_IMGS instead of OK although i have passed two images which is sufficient for image stitching.Have you any idea.Please help me …Thanks.

    • Hi,

      The code mentioned in this page doesn’t give error message “ERR_NEED_MORE_IMGS”.
      The error message is output through stitcher class. See if you are using stitcher class.
      Also make sure the two images have good overlap and distinct features(not blank wall /background etc)

      Hope that helps.

      Cheers,
      Ramsri

      • kk says:

        Hey….Thanks for the reply.I am using stitcher class and by mistake posted here.Actually I want post on your another tutorial of stitcher class.Anyways can you plz me how can i identify that images have good overlap?? and Is it possible to stitch any of the two images using stitcher class or surf and sift?

  8. Asma says:

    opencv2/nonfree/nonfree.hpp: No such file or directory.

    • Hi Asma,

      Just remove the line
      #include opencv2/nonfree/nonfree.hpp and compile.

      In the recent version of Opencv SURF and SIFT are moved to non free if you are using older version they are still there in features2D.cpp. So you can remove the inclusion of nonfree module if you are using version older than 2.4.3.

      Hope that helps!
      Best,
      Ramsri

  9. charline says:

    HI Ramsri,

    I am also trying the stitching code you posted here.Thank you for sharing.But there is a problem

    popping out when running the program.After the two images being showed , an error saying

    “Debug assertion failed! File:..\vc\include\vector Line:932 Expression:vector subscript out of

    range.” I’ve been trying to fix it ,however it seems not working.I am using vs 2010 and opencv

    2.4.3,same as you.Would you know what is wrong? Thank you for reading.

    Best,

    Charline

  10. Alex says:

    Hy. If i try to put this code in a function, and to call the function from main i get an error like here : http://stackoverflow.com/questions/10172436/c-error-on-ms-visual-studio-windows-has-triggered-a-breakpoint-in-javaw-exe . Have a nice day ! Alex

  11. shweta says:

    hi,
    can we do tis in python?

  12. Avdutdut says:

    Hi,
    I am newbie in OpenCV, I want to know if the stitcher class can use different image orientation, scale or a single word, with different transformations and stitch them together to create a panoramic image ?

  13. Anonymous says:

    how can i run this code on a pydev module on eclipse???
    is that even possible??

  14. madhusudan says:

    hello sir,
    i unable to find nonfree header in ubuntu 12.04
    how to install it????
    plz help me..i am new to opencv…

  15. Hi Ramsri,
    Thanks for your stitching code, worked like a charm. Now, I would like to know if it would be possible to recover the camera motion, based on the homography matrix above computed. Thanks in advance for you time.

  16. Anonymous says:

    Hi, Thanks for providing the stitching code example. I wanted to know how to capture the input images with correct alignment before sending them to the stitching code. Could you plz share any information on that?.

  17. Mohit says:

    Sir
    Thanks for this nice tutorial. I have a doubt about the constructor of Mat you used in 93rd line, Could you please explain what you did with that line. I would be very grateful.

  18. Rubychan says:

    Hi ,Ramsri
    I’m new in opencv.I tried the code you post there,but it showed up that

    1> —— Build started: Project: opencvtes, Configuration: Debug Win32 ——
    1> opencvtes.cpp
    1> c: \ users \ asus \ documents \ visual studio 2010 \ projects \ opencvtes \ opencvtes \ opencvtes.cpp (1): warning C4627: ‘# include “opencv2/highgui/highgui.hpp”‘: Looking for precompiled header use skipped
    1> Add directive to ‘StdAfx.h’ or rebuild precompiled header
    1> c: \ users \ asus \ documents \ visual studio 2010 \ projects \ opencvtes \ opencvtes \ opencvtes.cpp (2): warning C4627: ‘# include “opencv2/stitching/stitcher.hpp”‘: Looking for precompiled header use skipped
    1> Add directive to ‘StdAfx.h’ or rebuild precompiled header
    1> c: \ users \ asus \ documents \ visual studio 2010 \ projects \ opencvtes \ opencvtes \ opencvtes.cpp (20): fatal error C1010: Looking for precompiled header file directives encountered unexpected end of file. Your original file is not forget to add ‘# include “StdAfx.h”‘?
    ========== Build: 0 succeeded, 1 failed, 0 up-date, 0 skipped ==========

    what should i do to solve this?

  19. Rubychan says:

    The problem has been solved .thks!

  20. Anonymous says:

    Hello Ramsri,
    I am a newbie in opencv. I try to run your code, There is no error when I debug I don’t get any result (no image at all). Thanks for your advice 🙂

  21. Anonymous says:

    Would this run on opencv2.2 and if not which functions aren’t compatible?

  22. Liu says:

    Hi,Ramsri.
    Thanks your shared code.
    I debug your code in the two image is every perfectly.
    But when I use another two images to sitch, there is a vertical line in the joint of two image.
    I use the blend code to merge the two image, but when the right image transformed,
    the two images do not the same size. so the laplacian-pyramid-blender can not use.
    http://www.morethantechnical.com/2011/11/13/just-a-simple-laplacian-pyramid-blender-using-opencv-wcode/
    could you give me some advise how to remove the annoying line(It is because the bad transition between the two image).

    best regards!
    yours liu

  23. Geena says:

    Hi,

    Can I use this code snippet as a dll. I want to call the function and need to stitch those two images, is that possible.

    Many Thanks
    Geena Chacko

  24. Aisha says:

    Hi Ramsri,
    can I make this program in android? For example, i take two photos from camera, or pick them up from gallery, and both photos have an overlapping area, and then when i press a button like ‘Stitch them up’, the program will produce a new photo stitch from the two photos before?

  25. Campuchia says:

    Hi, Ramsri Goutham
    I copy your code and make project with VS2010 and Opencv 2.4.6 so it has some errors I haven’t resolve.
    error LNK2019: unresolved external symbol “public: __thiscall cv::flann::KDTreeIndexParams::KDTreeIndexParams(int)” (??0KDTreeIndexParams@flann@cv@@QAE@H@Z) referenced in function _main C:\Users\lab308_141\Documents\Visual Studio 2010\Projects\Mainc\Mainc\thu.obj
    error LNK2019: unresolved external symbol “public: __thiscall cv::flann::SearchParams::SearchParams(int,float,bool)” (??0SearchParams@flann@cv@@QAE@HM_N@Z) referenced in function _main C:\Users\lab308_141\Documents\Visual Studio 2010\Projects\Mainc\Mainc\thu.obj
    error LNK2019: unresolved external symbol “public: __thiscall cv::flann::IndexParams::~IndexParams(void)” (??1IndexParams@flann@cv@@QAE@XZ) referenced in function “public: void * __thiscall cv::flann::IndexParams::`scalar deleting destructor'(unsigned int)” (??_GIndexParams@flann@cv@@QAEPAXI@Z) C:\Users\lab308_141\Documents\Visual Studio 2010\Projects\Mainc\Mainc\thu.obj
    error LNK1120: 3 unresolved externals C:\Users\lab308_141\Documents\Visual Studio 2010\Projects\Mainc\Debug\Mainc.exe 1

  26. gorvinsky says:

    do you have Python version of this code?

  27. Anonymous says:

    Hello Ramsri,

    Thanks for the wonderful tutorial. But when I run it only displays the first image in the result. Can you please let me know where I am going wrong?

  28. how to stitch the live video. can you please give me some sample code.

  29. Hou Wenbo says:

    Hi,
    could you please help me on the following question:
    I can’t fully understand the function waveCorrect(…) in OpenCV , could you please introduce more detail info. about the function ? what’s the algorithm in the function ? Looking forward to your more explanation.

    motion_estimators.cpp in stitching module

    Thanks a lot in advance !

  30. csv says:

    Hi, how long it takes to process this program? how long it would take to process two 5Mpx images?

  31. Vijeyta says:

    Hi, I tried the above code for other images and also tried to stitch more than 2 images. I can see a seam between the stitched images. I am implementing the code in opencv. Can you tell me how I can get rid of the seam?

    Thank You!

  32. Rajesh says:

    With the above code, the output image size is multiples of input image width. I mean if we give 2 images for stitching with size 640×480 then the panorama output image size is 1280×480. Width becomes twice.. similarly for n inputs.. Can you please let me know how to handle this output size.
    I want stitched image should be with 640×480 dimensions. This may require resizing the input images

  33. Rami says:

    Thanks for this blog I have tried to run this code on VS 2010 and opencv 247 but your code for stitching the same images you used but is not working;
    it showing this error,
    “Unhandled exception at 0x00007ff8807cf8b0 in opencv.exe: 0xC0000005: Access violation reading location 0x0000000000000009.”

    the error at line :
    detector.detect( gray_image1, keypoints_object );

    but i don’t know what the problem ,,, can you help me ?? and can i used this code for stitching video files not only for images or not ??

    thanks

  34. ekim cakmak says:

    hI, I have recieved a error in the findHomography line

    error: undefined reference to `cv::findHomography(cv::_InputArray const&, cv::_InputArray const&, int, double, cv::_OutputArray const&)’

    Can you help me?

    • Red says:

      Either you haven’t included the features2d header file or you haven’t linked the features2d library depending on when you get this error.

  35. Latisha says:

    I see a lot of interesting articles on your page. You have to spend a lot
    of time writing, i know how to save you a lot of work, there is a tool that creates unique, google
    friendly posts in couple of minutes, just type in google – k2 unlimited content

  36. satya wirawan says:

    how to modified this source code to stitch multiple images together and create a Panorama? i can’t figure out if create a panorama must stitch stitched image with the next image and so on. please help me sir.

    thanks

  37. Cathleen says:

    You share interesting things here. I think that your page can go
    viral easily, but you must give it initial boost and
    i know how to do it, just search in google for – wcnu
    traffic increase

  38. michael says:

    i need help i hape two images one is upper image one is the lower i cant modify the example to stich can you help

  39. skg says:

    the application was unable to start properly.
    code 0xc000007b.
    The code compiled fine but did not start.
    Please help me.

  40. […] follow Panorama – Image Stitching in OpenCV to do same task on Android,by using openCV4Android.My problem is in about warping image by founded […]

  41. Hello,

    I copied this code suggested by you and appeared various errors when will compile. Can you help me ?
    These are the errors appeared error link2019 and error link1120 .

    My opencv version is 2.4.2 .

    Thanks!

    • diegumorera says:

      This is my problem…
      I am compiling your code using a opencv version 2.4.2 and VS 2012.

      error LNK2019: unresolved external symbol “public: __thiscall cv::flann::KDTreeIndexParams::KDTreeIndexParams(int)” (??0KDTreeIndexParams@flann@cv@@QAE@H@Z) referenced in function _main C:\Users\lab308_141\Documents\Visual Studio 2010\Projects\Mainc\Mainc\thu.obj
      error LNK2019: unresolved external symbol “public: __thiscall cv::flann::SearchParams::SearchParams(int,float,bool)” (??0SearchParams@flann@cv@@QAE@HM_N@Z) referenced in function _main C:\Users\lab308_141\Documents\Visual Studio 2010\Projects\Mainc\Mainc\thu.obj
      error LNK2019: unresolved external symbol “public: __thiscall cv::flann::IndexParams::~IndexParams(void)” (??1IndexParams@flann@cv@@QAE@XZ) referenced in function “public: void * __thiscall cv::flann::IndexParams::`scalar deleting destructor'(unsigned int)” (??_GIndexParams@flann@cv@@QAEPAXI@Z) C:\Users\lab308_141\Documents\Visual Studio 2010\Projects\Mainc\Mainc\thu.obj
      error LNK1120: 3 unresolved externals C:\Users\lab308_141\Documents\Visual Studio 2010\Projects\Mainc\Debug\Mainc.exe 1

  42. eskizo says:

    your code si simply what I was looking for!! thank you very much!! 🙂

  43. I want users to be able to upload photos using `add_cap(‘upload_files’)` but in their profile page, the Media Library shows every image that’s been uploaded. How can I filter that so that they can only view the images *they* uploaded?

    Here’s my solution for the moment… I’m doing a simple WP query, then a Loop on the user’s “Profile” page

    $querystr = ” SELECT wposts.post_date,wposts.post_content,wposts.post_title, guid
    FROM $wpdb->posts wposts
    WHERE wposts.post_author = $author
    AND wposts.post_type = ‘attachment’
    ORDER BY wposts.post_date DESC”;

    $pageposts = $wpdb->get_results($querystr, OBJECT);

  44. Mabrouk says:

    hi mate
    just i want to match the edges for two images after canny edge detector
    thanks

  45. Article writing is also a excitement, if you
    be acquainted with after that you can write otherwise it is complicated to write.

  46. Mabrouk says:

    Hi
    i have two images close to each other i mean there is overlap. and i did the probabilistic Hough transform algorithm for line detection as you can see in this link http://docs.opencv.org/modules/imgproc/doc/feature_detection.html?highlight=vec4i
    my question is how to match these edges (red lines) ?
    Thanks

  47. Darshana Mistry says:

    Hello, When I used this code with same image. I do not get stitch image for given same input image. Can you please tell me why?

  48. Bjorn says:

    Hi!I’m using this code for creating a mosaic from a video,but I have a problem. After a certain point, my stitch is bigger than the image that should contain it. How can I resize the stitch so it will always fit a predefined sized image?

  49. ajay alakkan says:

    plssssssss plssss help to convert this c++ code to python ….really urgent

  50. ajay alakkan says:

    plss rply

  51. Gina says:

    Hi, thanks for sharing your code. Im trying to run this code, but when the generated .exe show up, i cannot pass in the images. maybe i do it wrong, i cannot type or copy anything and there are no error. It would be great if you could tell me how to run it after build it, thank you

  52. abdullah amareen says:

    the code did not work when I used larg images for example each image with size 4500 X 1000.

  53. pieter says:

    hi man, love your code, good work. but can you also help us to convert this to python, that will be verry helpfull 🙂 .

    thank you and please reply

  54. tech says:

    Hy Ramsri Goutham!
    Can you get me through the code?
    Also I have a problem with the displaying of the final image.It displays only the first part(what is on the right part) and I think that is not related to that if I switch the order of the image arguments.(the images are the right size).

    Thank you very much!

    • Hi , Sorry for the delay ! Could you figure out the problem? Try to debug in steps to see if you could load images, extract descriptors, match descriptors, calculate homography etc

  55. ayushi says:

    sir ,if u can pls provide me with the steps of how to run the code u have mentioned above.i need it in order to complete my project.and it’s an emergency,i would be very grateful.

  56. ayushi says:

    i tried a lot to install opencv but it is always showing me download error.pls provide me with the suitable links from where i can install this and which version.I have to show my project on monday and if i fail to do so ,i will lose my grades.pls help me in accomplishing this task successfully.

  57. ayushi says:

    pls if u can reply as soon as possible and help me in accomplishing my task.I am very much worried regarding my project.

    • Hi , I would say try to google like “Install opencv on windows” or “Install opencv on Ubuntu” whichever you are using. You can also search the same in youtube that have detailed video instructions. I can help you run my code once you have opencv setup.

  58. ayushi says:

    i am using windows8 on my laptop.is it appropriate to download opencv3 version.will it run with visual studio 2010.

  59. ayushi says:

    will 2.1version of opencv run with visual studio2010?i have downloaded this one.

  60. ayushi says:

    I have installed all the setups ,now pls help me in running this code,i am getting lot of errors.

  61. ayushi says:

    my main error is this”the system cannot find the path specified”,why is it showing so?

  62. ayushi says:

    also it is showing errors in all the header files u ha ve mentioned in the program above.Sir.pls help me in finding solutions of the above mentioned problems.

  63. Xiang says:

    Thank you. In your code, the image “result” is not a stitching image. After warp, how to get a stitching image?

  64. Salman Anjum says:

    Hi.! I’m trying to run this code in opencv3.0/visualstudio13. In opencv 3.0 the non free module is replaced therefore i’m unable to run this code. I’ve read few articles to solve this, but I couldn’t run this code.! Please Help.

    • Anonymous says:

      u need opencv_contrib and recompile opencv agian and also there are some other changes in code like constant that are diffrent in opencv3 and also some changes in comute and extractor

      • Salman Anjum says:

        i’ve configured OPENCV 2.4.5. The recommended version 2.4.3 is unavailable now :(… i’m getting these errors and i’m unable to remove them :/ .

        Warning 1 warning C4018: ‘<' : signed/unsigned mismatch in line number 81

        Error 2 error LNK2019: unresolved external symbol "public: __thiscall cv::flann::KDTreeIndexParams::KDTreeIndexParams(int)" (??0KDTreeIndexParams@flann@cv@@QAE@H@Z) referenced in function _main

  65. Salman says:

    Is want to run this code in new versions. e.g. OpenCV 2.4.11. Is there anyone who can help? pls?

  66. george says:

    Hi Ramsri, do you have a code like this that can process multiple images?

  67. TurBoss says:

    Hi,
    Is posible to use this code to stihtch images vertically?
    i don’t know how to change it to made it posible

  68. Kaeious Ooi says:

    Hi pro , I’m trying to start openCV stitching function by using your code and it builds well, but when it come to compile , some error pop out saying that “The application was unable to start correctly (0xc000007b). Click OK to close the application.” Please tell me how to fix it, I’ve try several way taught in the internet(e.g. aio runtime) but they didn’t work. I built this in opencv 2.4.10 , using window 7 Visual Studio 2012 with ,,,vc11\bin; Please do show me some direction on making it works, Thanks

  69. Ellia says:

    Hi, Ramsri!
    I’m trying to run your, code everything seems to be well but I’d like to wonder:
    1) Where do I have to store images? (which folder)
    2) How do I have to name them?

  70. JinBao Hong says:

    Hi,
    Thanks for your code.
    Can you please share multi images stitching code?

  71. charlotte says:

    Hello, thanks for sharing your code. I’m trying to run this code,I use opencv2.4.9 and VS2013,but I can’t get the same result.The result image shows the image2,I can’t use this code to stitch these two images.I checked the code and found the Homography Matrix is not exist.I just start to learn opencv and I don’t know what’s wrong.can you help me?

  72. ARATI KUSHWAHA says:

    hello, i’m not getting stitched image, only geting image2…please help

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s