Imaging stitching with openCV - final stage difficulty
I'm using OpenCV 2.4 to convert a video into a long (narrow) mosaic. This is my first time using OpenCV, but so far I've managed the following with some success: Get frames from video. Get keypoint descriptors using SIFT. Sort out the outliers using RANSAC Find the homography matrix. The issue is when I apply the homography matrix to one of the frames/images and try and generate the mosaic. Sometimes I get an error complaining that the size of the destination matrix for warpPerspective() is too small. To get around this I guess an overly large size to make sure the result fits in. However, after a copy of frames have been joined together I have a huge image which is mostly black. So my question is, how can I do this in a smart way? How can I calculate the size of the destination matrix I'll need for the mosaic BEFORE I pass it to warpPerspective()? I've been trying things with ROI/Rect but I'm not really sure what I'm doing with that. If you have any suggestions I'd be eternally grateful.
apply the homography matrix to points representing the extremeties of your image frame: (0,0,1); (w,0,1) etc. These will give you the bounds of your new image.
Image Retrieval through fisher vectors: why my implementation works SO BAD?
Reduce number of weak classifiers in lower stages. OpenCV cascade classifier
OpenCV cascade classifier training - 1-stage stops
Reprojection of calibrateCamera and projectPoints
How to calculate matrix rank in OpenCV?
GdkGLExt-WARNING **: Window system doesn't support OpenGL
incorrect size of vector when converting Mat to Vector
Mingw doesn't find file strsafe.h while compiling OpenVC library
Opencv image regitsration mask
Detect presence and location of a ball in video with opencv
use of undefined type 'cv::cuda::GpuMat'
Camera Calibration Error Estimation in OpenCv
Using Levenberg-Marquardt optimization algorithm via opencv projectPoints() to estimate Calibration Errors
alternate function for erode to reduce the processing time
OpenCV Python calcOpticalFlowPyrLK returning points out of the camera frame
camera coordinate to pixel coordinate opencv