OpenCV stitching with georeferencing - opencv

Is it possible to create stitched image without loosing image position and geo-referencing using OpenCV?
For example I have 2 images taken from the plane and I have 2 polygons that describes where on the ground they are located. I am using OpenCV stitching example. OpenCV stitching process will rotate and change position of images. How can I preserve my geography information after stitching? Is it possible?
Thanks in advance!

Related

Applying lens distortion correction during panorama image stitching

I am trying to do a live panorama stitching while using 6 cameras streams (same camera model). Currently I am adapting the stitching_detailed.cpp file from OpenCV according to my needs.
My cameras lenses have a great amount of barrel distortion. Therefore, I calibrated my cameras with the checkboard function provided by OpenCV and got the respective intrinsic parameters and distortion parameters. By applying getOptimalNewCameraMatrix and initUndistortRectifyMap I get an undistorted image which fulfills my needs.
I have read in several sources that image lens correction should benefit image stitching. So far I have used the previously undistorted images as input to stitching_detailed.cpp, and the resulting stitched image looks fine.
However, my question is if I could somehow include the undistort step in the stitching pipeline.
[Stitching Pipeline taken from OpenCV documentation 1]
I am doing a cylindrical warping of the images in the stitching
process. My guess is that maybe during this warping I could somehow
include the undistortion maps calculated beforehand by
initUndistortRectifyMap.
I also do not know if the camera intrinsic matrix K from
getOptimalNewCameraMatrix could somehow help me in the whole process.
I am kind of lost and any help would be appreciated, thanks in advance.

Apply opencv Homography to Three.js planes

so I am trying to make a panorama in the browser out of 6 videos taken from 6 cameras. the stitching is done with OpenCV in python and that gives me back the homographies. How can I apply the homographies to 6 Three.js planes so that I get the same result as OpenCV ? and is it possible to extract the translations/rotations from a homography so that I can apply it to the plane?
Thanks a lot!

Opencv: correcting radially distorted images when chessboard images are not available

How do I recover correct image from a radially distorted image using OpenCV? for example:
Please provide me useful links.
Edit
The biggest problem is I neither have the camera used for taking the pic nor the chessboard image.
Is that even possible?
Well, there is not much to do if you don't have the camera, or at least the model of it. As you may know a usual camera model is pin-hole, this basically consist in the 3D world coordinates are transformed (mapped) to the camera image plane 2D coordinates.
Camera Resectioning
If you don't have access to the camera or at least two chessboard images, you can't estimate the focal, principal point, and distortion coefficients. At least not in a traditional way, if you have more images than the one that you showed or a video from that camera you could try auto or self calibration.
Camera auto-calibration
Another auto-calibration
yet another
Opencv auto-calibration

image stitching to generate a Panorama with opencv

Now, i'm doing the experiment with opencv to stitch several images into a panorame, but These pictures are taken at different angles. now i want to do is to project all the images onto a cylindrical surface, then using the SIFT to match the features to get the transform matrix. how should I do it? is there any interface of opencv to do that(to project all the images onto a cylindrical surface, and i don't know any parameter of the camera)?
In the OpenCV sample folder there is a script called stitching_detailed.cpp. It does the whole pipeline for creating panoramas including feature extraction, matching, warping and blending, etc.
You should have a look on it:
https://github.com/Itseez/opencv/blob/master/samples/cpp/stitching_detailed.cpp

Is stitching module of OpenCV able to stitch images taken from a parallel motion camera?

I was wondering if the stitching(http://docs.opencv.org/modules/stitching/doc/stitching.html) module of OpenCV is able to stitch the images taken from a camera that is in parallel motion to the plane which is being photographed ?
I know that generally all the panoramic stitching tools assume that the center of the camera is fixed and that the camera only experiences motion such as pan or pitch.
I was thinking if I can use this module to stitch the image taken from a camera which moves parallel to the plane. The idea is to create a panoramic map of the ground.
Regards
Just for the record.
The current stitching utility in open cv does not consider translation of the camera and only assumes that camera is rotated around its axis. So, basically it tries to create and project images on cylindrical or spherical canvas.
But in my case, I needed to consider the translation motion while predicting the camera transformation and this is not possible with the existing stitching utility of opencv.
All these observations are made based on the code walk-through of opencv code and through trials.
But, you are welcome to correct this information or to add more information so that this can be a useful future reference.
Regards

Resources