OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Fri, 20 Sep 2019 10:14:45 -0500Interpolation of transformation matrixhttp://answers.opencv.org/question/218636/interpolation-of-transformation-matrix/Is it possible to interpolate transformation matrix? I want to have rough homography for every frame between two frames for which homography was calculated manualy.
For example there's frame 0 with calculated transformation matrix H and frame 101 with calculated matrix H'. Granted that camera movement is even I want to find 100 transformation matrices to every frame between 0 and 101.
![image description](/upfiles/15689924226327921.jpg)
Or is there any simplier solution for this problem?karlososFri, 20 Sep 2019 10:14:45 -0500http://answers.opencv.org/question/218636/How to decompose homography transformation matrix in opencvhttp://answers.opencv.org/question/105179/how-to-decompose-homography-transformation-matrix-in-opencv/Hello,
I have found feature points detection and matching using SURF and based on homography transformation matrix. Now, I want to decompose homography transformation matrix to retrieve rotation and translation parameters.
I have tried in opencv2.4.9 and all higher version. there is function for decomposePerspectiveMat but not for homography transformation matrix.
This function is available for opencv3.0 and higher version. But before to use this function, I have to find feature points using SURF and xfeature2d as per documentation is required. But when we installed opencv3.1.0, then no file available like xfeature2d.hpp.
Can you please help to decompose homgraphy transformation matrix?
Thank you,darshana.mistryWed, 19 Oct 2016 02:00:37 -0500http://answers.opencv.org/question/105179/homography matrixhttp://answers.opencv.org/question/42267/homography-matrix/After calibration, I can know each checkboard rotation and translation matrix, how can I calculate the homography matrix between the one checkboard to the camera please? cheers!shutingjiaThu, 18 Sep 2014 03:13:00 -0500http://answers.opencv.org/question/42267/Apply infinite homography to imagehttp://answers.opencv.org/question/37630/apply-infinite-homography-to-image/
Hi, <br>
I want to apply a infinite homography to an image, but I dont know how to do it. <br>
I'm working with the openCV api for java. <br>
I have the below code, but I dont get good results. <br>
From image A, I get image B <br>
Do someone know how to apply this homography ?
![image description](/upfiles/14059135876919384.png)
----------
Calib3d.stereoCalibrate(objectPoints_1, imagePoints_1, imagePoints_2,
cameraMatrix_1, distCoeffs_1, cameraMatrix_2, distCoeffs_2, imageSize_1, R, T, E, F,
new TermCriteria( TermCriteria.MAX_ITER + TermCriteria.EPS , 30, 0.1),
Calib3d.CALIB_FIX_INTRINSIC );
Imgproc.initUndistortRectifyMap(cameraMatrix_1, distCoeffs_1, new Mat(), new Mat(), newImageSize_1, CvType.CV_32FC1, mapx_1, mapy_1);
Imgproc.initUndistortRectifyMap(cameraMatrix_2, distCoeffs_2, new Mat(), new Mat(), newImageSize_2, CvType.CV_32FC1, mapx_2, mapy_2);
Imgproc.remap(image_1, undistorted_1, mapx_1, mapy_1, Imgproc.INTER_LINEAR);
Imgproc.remap(image_2, undistorted_2, mapx_2, mapy_2, Imgproc.INTER_LINEAR);
Mat cameraMatrix_2_inv = new Mat(cameraMatrix_2.size(),cameraMatrix_2.type());
Core.invert(cameraMatrix_2, cameraMatrix_2_inv);
Core.invert(R, R_inv);
// inverse Homography: H_inf = k1*R*k2_inv
Mat H_inf = new Mat(3,3,CvType.CV_64FC1);
Core.gemm(cameraMatrix_1, R, 1, cameraMatrix_2_inv, 1, H_inf);
Mat outputImage_3 = new Mat();
Imgproc.warpPerspective(undistorted_2, outputImage_3, H_inf, undistorted_2.size());
----------rafaocSun, 20 Jul 2014 22:35:11 -0500http://answers.opencv.org/question/37630/Inverse Perspective Mapping with Known Rotation and Translationhttp://answers.opencv.org/question/33267/inverse-perspective-mapping-with-known-rotation-and-translation/Hi,
I need to obtain a new view of an image from a desired point of view (a general case of bird's eye view).
Imagine we change the camera's position with a **known rotation and transformation**. what would be the new image of the same scene?
We may put it in another way: how can we compute **homography matrix** by having the rotation and translation matrices?
I really appreciate any help!gozariTue, 13 May 2014 11:25:31 -0500http://answers.opencv.org/question/33267/accessing element in a homography matrixhttp://answers.opencv.org/question/30553/accessing-element-in-a-homography-matrix/Hi all,
I have a 3x3 homography matrix , which I computed using findHomography() function.
I store it in a cv::Mat matrix.
I am trying to do element access using the following code
float cvHomography::accessElements(const cv::Mat& aCvMat)
{
//cout << aCvMat << endl;
const float* Mi;
for( int i = 0; i < aCvMat.rows; i++){
Mi = aCvMat.ptr<float>(i);
for( int j = 0; j < aCvMat.cols; j++){
cout << Mi[j] << endl;
}
}
}
The above does not return the correct value from the homography matrix.
I have searched through documentation , tutorials and google and I honestly cannot see what I am doing wrong.synthnassizerTue, 25 Mar 2014 08:58:35 -0500http://answers.opencv.org/question/30553/Paper image correctionhttp://answers.opencv.org/question/20717/paper-image-correction/Suppose I have this image:
![image description](/upfiles/13791871086487651.png)
How to automatically detect the outher box And Correct the corners of the destination image based on that outher box, so that the image looks like this?
![image description](/upfiles/13791871286837554.png)Tony HenriqueSat, 14 Sep 2013 14:35:21 -0500http://answers.opencv.org/question/20717/