1 | initial version |
Don't ask me why but if you add this two lines it works om my computer
// Apply TPS
transpose(pointmatrix1, pointmatrix1); // ADD
transpose(testpoints, testpoints); // ADD
Ptr<ThinPlateSplineShapeTransformer> mytps = createThinPlateSplineShapeTransformer(0);
mytps->estimateTransformation(pointmatrix1, pointmatrix1, good_matches); // Using same pointmatrix nothing should change in res
mytps->applyTransformation(testpointsmat, resmat);
Now There is something strange in source code here
2 | No.2 Revision |
Don't ask me why but if you add this two lines it works om my computer
// Apply TPS
transpose(pointmatrix1, pointmatrix1); // ADD
transpose(testpoints, testpoints); // ADD
Ptr<ThinPlateSplineShapeTransformer> mytps = createThinPlateSplineShapeTransformer(0);
mytps->estimateTransformation(pointmatrix1, pointmatrix1, good_matches); // Using same pointmatrix nothing should change in res
mytps->applyTransformation(testpointsmat, resmat);
3 | No.3 Revision |
Don't ask me why but if you add this two lines it works om my computer
// Apply TPS
transpose(pointmatrix1, pointmatrix1); // ADD
transpose(testpoints, testpoints); // ADD
Ptr<ThinPlateSplineShapeTransformer> mytps = createThinPlateSplineShapeTransformer(0);
mytps->estimateTransformation(pointmatrix1, pointmatrix1, good_matches); // Using same pointmatrix nothing should change in res
mytps->applyTransformation(testpointsmat, resmat);
Now There is something strange in source code here why cols and not rows
4 | No.4 Revision |
Don't ask me why but if you add this two lines it works om my computer
// Apply TPS
transpose(pointmatrix1, pointmatrix1); // ADD
transpose(testpoints, testpoints); // ADD
Ptr<ThinPlateSplineShapeTransformer> mytps = createThinPlateSplineShapeTransformer(0);
mytps->estimateTransformation(pointmatrix1, pointmatrix1, good_matches); // Using same pointmatrix nothing should change in res
mytps->applyTransformation(testpointsmat, resmat);
Now There is something strange in source code here why cols and not rows
Following remarks of @juanmanpr That's can be done too
// Apply TPS
Ptr<ThinPlateSplineShapeTransformer> mytps = createThinPlateSplineShapeTransformer(0);
mytps->estimateTransformation(points1, points1, good_matches); // Using same pointmatrix nothing should change in res
mytps->applyTransformation(testpointsmat, resmat);
that's better thanks @juanmanpr