How to stitch 4 images using opencv in c++ - c++

I have images of 4 different positions of a road and I want to stitch them together using OpenCV. The problem is that the changes between the pictures is not "smooth", the color and the texture of the images is not the same so it doesn't seem like this is actually 1 big picture.

You could try out the sticher class of opencv. Specially the examples examples opencv brings in the source code at opencv_source_code/samples/cpp/stitching.cpp and at opencv_source_code/samples/cpp/stitching_detailed.cpp.
If the result of executing the stiching example in your images is what you want you can explore the code to see how it was done.

Related

Problem stiching images from a drone with OpenCV due to a poor quality of the images

I am working with OpenCV and a quad ArDrone Parrot 2.0.
I'm capturing the images from the bottom camera of the quad and I wish to stitch them in order to get a larger image. I'm trying to detect the squares marked in the images.
I tried to perform keypoint detection with ORB, SIFT, SURF and BRISK and changing their parameters to different values and there weren't good results from that.
I am unsure about the quality of the images, so maybe a preprocessing would help?
IMAGES:
1 2 3 4 5

panoramic stitching of 3 images using opencv and C++

I am using open CV and C++ to stitch 3 images together so that it forms a panorama. So what I am doing is..
use SURF Detector then Surf Descriptor Extractor etc to stitch 2 images. I then save the result of these 2images in the folder where my project is located and repeat the same thing but this time with previous result of 2 stitched images and the last image that needs to be stitched..i get build errors :S can anyone help please?
Here is the code pastebin.com/QuDuN0Ze

C++ OpenCV sky image stitching

Some background:
Hi all! I have a project which involves cloud imaging. I take pictures of the sky using a camera mounted on a rotating platform. I then need to compute the amount of cloud present based on some color threshold. I am able to this individually for each picture. To completely achieve my goal, I need to do the computation on the whole image of the sky. So my problem lies with stitching several images (about 44-56 images). I've tried using the stitch function on all and some subsets of image set but it returns an incomplete image (some images were not stitched). This could be because of a lack of overlap of something, I dunno. Also the output image has been distorted weirdly (I am actually expecting the output to be something similar to a picture taken by a fish-eye lense).
The actual problem:
So now I'm trying to figure out the opencv stitching pipeline. Here is a link:
http://docs.opencv.org/modules/stitching/doc/introduction.html
Based on what I have researched I think this is what I want to do. I want to map all the images to a circular shape, mainly because of the way how my camera rotates, or something else that has uses a fairly simple coordinate transformation. So I think I need get some sort of fixed coordinate transform thing for the images. Is this what they call the homography? If so, does anyone have any idea how I can go about my problem? After this, I believe I need to get a mask for blending the images. Will I need to get a fixed mask like the one I want for my homography?
Am I going through a possible path? I have some background in programming but almost none in image processing. I'm basically lost. T.T
"So I think I need get some sort of fixed coordinate transform thing for the images. Is this what they call the homography?"
Yes, the homography matrix is the transformation matrix between an original image and the ideal result. It warps an image in perspective so it can fit in stitching to the other image.
"If so, does anyone have any idea how I can go about my problem?"
Not with the limited information you provided. It would ease the problem a lot if you know the order of pictures (which borders which.. row, column position)
If you have no experience in image processing, I would recommend you use a tutorial covering stitching using more basic functions in detail. There is some important work behind the scenes, and it's not THAT harder to actually do it yourself.
Start with this example. It stitches two pictures.
http://ramsrigoutham.com/2012/11/22/panorama-image-stitching-in-opencv/

How to make motion history image for presentation into one single image?

I am working on a project with gesture recognition. Now I want to prepare a presentation in which I can only show images. I have a series of images defining a gesture, and I want to show them in a single image just like motion history images are shown in literature.
My question is simple, which functions in opencv can I use to make a motion history image using lets say 10 or more images defining the motion of hand.
As an example I have the following image, and I want to show hand's location (opacity directly dependent on time reference).
I tried using GIMP to merge layers with different opacity to do the same thing, however the output is not good.
You could use cv::updateMotionHistory
Actually OpenCV also demonstrates the usage in samples/c/motempl.c

Stitching Panoramic Images

Today I came up with an interesting project from Germany: Throwable PanoramicBall Camera 36 images are captured in a small ball, then they are showed panoramically. The author declares to use OpenCV
Can you give me some idea about creating a model for cameras at fixed position/orientation and stitching images with OpenCV?
Look into Image rectification:
http://en.wikipedia.org/wiki/Image_rectification
This book also has some good explanations and code examples on how to do it in OpenCV in the later chapters:
http://www.amazon.com/OpenCV-Computer-Application-Programming-Cookbook/dp/1849513244/ref=sr_1_1?ie=UTF8&qid=1319209140&sr=8-1
The author was probably using the new samples available in OpenCV.
Here are links to the samples currently available in OpenCV...
stitching_detailed
stitching
You may want to start with these samples if you're trying to do image stitching in OpenCV.