I am trying to find the fundamental matrix by manually identifying 7 corresponding points in two images and using the findFundamentalMatrix function. However on printing the matrix, it turns out to be 3x9. Seems to be a bug in my code but I cant figure it out.
void mouseEventOne(int event, int x, int y, int, void* param){
//select points in first image. store in one.
}
void mouseEventTwo(int event, int x, int y, int, void* param) {
//select points in second image. store in two.
set flag after 7 points
}
int main(int argc, char** argv) {
setMouseCallback("ImageOne", mouseEventOne, (void *) &ptOne);
setMouseCallback("ImageTwo", mouseEventTwo, (void *) &ptTwo);
for(;;) {
if(one.size() == 7 && two.size() == 7 && flag){
F = findFundamentalMat(one, two, CV_FM_7POINT);
flag = false;
cout<
↧