I've already check on stackOverflaw and especially in this link but it didn't answer to my question.
I compute an homography using Ransac with OpenCv in order to match two pictures. Here the code corresponding :
Mat H = findHomography( obj, scene, CV_RANSAC,3);
std::cout << "Size of homography " << *H.size << std::endl ;
//Print homography
for (int i=0;i<H.rows;i++){
for (int j=0;j<H.cols;j++){
std::cout << "valeur H : " << (int)H.at<double>(i,j) << endl;
}
}
int N=1;
const double det = H.at<double>(0, 0) * H.at<double>(1, 1) - H.at<double>(1, 0) * H.at<double>(0, 1);
std::cout << "Determinant homography : " << det << std::endl;
For a good match (exactly the same picture), i have on my terminal this :
Size of homography 3
valeur H : 1
valeur H : 0
valeur H : 0
valeur H : 0
valeur H : 1
valeur H : 0
valeur H : 0
valeur H : 0
valeur H : 1
Determinant homography : 1
For a bad match (two differents pictures),i have this :
Size of homography 3
valeur H : 0
valeur H : 0
valeur H : 241
valeur H : 0
valeur H : 0
valeur H : 277
valeur H : 0
valeur H : 0
valeur H : 1
Determinant homography : 0.00533235
I don't understand this result. Can someone explain me ? I would like to use these values to determine if this a good match or not. I expected to have only 1 in the first case but not.
I think,I'm using Homography and Ransaw without really understand. I've checked on the internet but it's complicated so if you have also good explanation, i take it.
Thank.