Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8129645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:23:05+00:00 2026-06-06T08:23:05+00:00

I’m working on a project of image stitching using OpenCV 2.3.1 on Visual Studio

  • 0

I’m working on a project of image stitching using OpenCV 2.3.1 on Visual Studio 2010.

I’m currently having 2 problems.

(My reputation is not over 10 so I can only post 2 hyperlinks in this post. I’ll post another 2 in the comment area)

I followed the steps mentioned in the following link
Stitching 2 images in opencv

  1. Finding SURF features in both images and match them
  2. Removing outliers with RANSAC
  3. Computing Homography
  4. Warping the target image to the reference image

and the picture below is the result I currently have:

Two images are taken using a camera at the same position but in different direction(I used a tripod).

enter image description here

Then I tried another test. This time I still take 2 images using the same camera. However, I moved my camera a bit from its original position and then I took the second picture.
The result is rather terrible as shown:

enter image description here

Problem1:**Does it mean that **if the 2 cameras are at different positions, the standard panorama stitching technique (based on a homography or camera rotational model) won’t work?

I tried to stitch images taken at different positions because in the future I would like to implement the stitching algorithm on 2 cameras in different positions so as to widen the FOV,
sort of like this:(I’ll post the picture in the comment, plz check Widen FOV)

but now it looks like I’m going the wrong way :(.


I just found out that during the algorithm, the feature finding and matching takes most of the time.

Problem 2: Can I just compute features in certain part(Overlap area) of the 2 images and still perform transformation using the Homography?
i.e , NOT to compute the whole image.

I think in this way because I think it’s not necessary to compute features in the whole image if I specifify the amount of the overlap area between 2 images. If I can just compute and match the features in the overlap area it should greatly increase the speed.

The first code shown below is the original code which computes features across the whole images.

    int minHessian = 3000;

    SurfFeatureDetector detector( minHessian );
    vector<KeyPoint> keypoints_1, keypoints_2;

    detector.detect( frm1, keypoints_1 );
    detector.detect( frm2, keypoints_2 );

    //-- Calculate descriptors (feature vectors)  
    SurfDescriptorExtractor extractor; ///

    Mat descriptors_1, descriptors_2;

    extractor.compute( frm1, keypoints_1, descriptors_1 );
    extractor.compute( frm2, keypoints_2, descriptors_2 );

I did the following thing to try to reduce the time required to run the whole algorithm:

    //detector.detect( frm1(Rect(0.5*frm1.cols,0,0.5*frm1.cols,frm1.rows)), keypoints_1 );
    //detector.detect( frm2(Rect(0,0,0.6*frm2.cols,frm2.rows)), keypoints_2 );

    //-- Calculate descriptors (feature vectors)
    SurfDescriptorExtractor extractor; ///

    Mat descriptors_1, descriptors_2;

    extractor.compute( frm1(Rect(0.5*frm1.cols,0,0.5*frm1.cols,frm1.rows)), keypoints_1, descriptors_1 );
    extractor.compute( frm2(Rect(0,0,0.6*frm2.cols,frm2.rows)), keypoints_2, descriptors_2 );

Using the code above, the computation time is significantly decreased while giving a bad result:
(I’ll post the picture in the comment, plz check Bad Result)

Currently stuck and have no idea what to do next. Really hope and aprreciate any help.
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T08:23:06+00:00Added an answer on June 6, 2026 at 8:23 am

    Problem 1:
    I can’t be very sure, but the problem with the stitching does seem to be due to the camera translation between the 2 pictures. With only a global homography transform, there’s no way you can overlay the 2 images perfectly. Homography only suffices in the following 2 cases:

    1. Camera undergoes a pure rotation (no translation)
    2. Camera undergoes general motion, but the scene is planar

    That said, your scene is fairly planar (objects are fairly far away compared to the translation of the camera) if not for the bottle. So an approximation by homography may still be sufficient. You just need to blend the images properly. To do so, you first need to find a place to “cut” the images where there is minimum difference between the 2 images, and apply (e.g. laplacian) blending. For your problem of cameras mounted on top of the car, this approximation may still be reasonable, so you may still be able to use a homography model.

    If homography with proper blending is not sufficient, you may need to look at either 3D reconstruction techniques, or other methods that “relaxes” the homography requirement. There’s a couple of papers in the literature that deals with parallax during mosaicking. These are however significantly more complex than the basic homography stitching though.

    Problem 2:
    Yes, that can be done, as long you are very sure where the overlap is. However, you need to make sure that this overlapping region is not too small, or else the homography that you compute may be skewed.
    The problem with your office dataset appears to be due to camera translation, as explained before.

    Lastly, you might want to adjust your SURF feature detection/matching parameters a bit. The feature points seem to be slightly on the low side.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I am currently running into a problem where an element is coming back from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.