Hello everybody,
today I've a question for you all. I'm implementing an alorithm able to recover the fundamental matrix. Most of my pipeline is pretty easy, and can be found around of the web:
- Extract corresponding points from the images
- Match them using a matcher (FLANN or BFMatcher)
- Extract the matched points and put them in two std::vector<cv::point2i>
- Call findFundamentalMat to retrieve the fundamental matrix, I call with LMedS since I do some outlier removal before that.
Now it come out the question. In the official documentation it is written that the function input matching points should be in Float or Double. In that case I have points that are given as integer since each point is described by his x and y value, that I suppose are integer value (maybe I'm wrong with that?). The conversion to Float and Double to fulfill the requirements of the documentation seems to be useless to me but this drive me to that question: points need to be normalized before I call this function?
I know that normalized point coordinates gives more precision and stability in the eight points algorithm, this apply also to the LMedS case? Because as far as I remember, even the 8 points agorithm itself perform the normalization internally to the function findFundamentalMat. In case is necessary, how can I perform the normalization?
Just to be more precise, I'm asking this because If I simply convert the point from cv::Point2i to cv::Point2f the result doesn't change, I get the same fundamental matrix.
Another question that I have is: I want to extract the Essential matrix from F, I applied all the rules, following the algorithm provided in another question HERE that I've rewrote in C++. SVD in OpenCV is very different from the one from Python? Which flag I've to put on it to expect the same behavior? Because everytime I got completely different and strange result, and this make me crazy.
Probably I'm also using the wrong cameraMatrix. In the KITTI Dataset I'm using as camera matrix the two provided in the calibration file, K_00 and K_01, and I compute E as:
E = K_01.t() * F* K_00
It is that correct?