diff --git a/src/openMVG/linearProgramming/lInfinityCV/resection_kernel.hpp b/src/openMVG/linearProgramming/lInfinityCV/resection_kernel.hpp index 119a1f57..3d553ebd 100644 --- a/src/openMVG/linearProgramming/lInfinityCV/resection_kernel.hpp +++ b/src/openMVG/linearProgramming/lInfinityCV/resection_kernel.hpp @@ -42,7 +42,7 @@ using l1PoseResectionKernel = two_view::kernel::Kernel< l1SixPointResectionSolver, l1SixPointResectionSolver, - Mat34>; + Mat34, 2>; } // namespace kernel } // namespace lInfinityCV diff --git a/src/openMVG/multiview/solver_resection_kernel.hpp b/src/openMVG/multiview/solver_resection_kernel.hpp index 52385a56..f28b6f0f 100644 --- a/src/openMVG/multiview/solver_resection_kernel.hpp +++ b/src/openMVG/multiview/solver_resection_kernel.hpp @@ -43,7 +43,7 @@ using PoseResectionKernel = two_view::kernel::Kernel< SixPointResectionSolver, // Model estimator resection::PixelReprojectionError, // Error metric - Mat34>; + Mat34, 2>; } // namespace kernel } // namespace resection diff --git a/src/openMVG/multiview/solver_resection_kernel_test.cpp b/src/openMVG/multiview/solver_resection_kernel_test.cpp index 77314936..89156ff6 100644 --- a/src/openMVG/multiview/solver_resection_kernel_test.cpp +++ b/src/openMVG/multiview/solver_resection_kernel_test.cpp @@ -19,8 +19,6 @@ using namespace openMVG; using namespace openMVG::cameras; -#if 0 - TEST(Resection_Kernel_DLT, Multiview) { const int nViews = 3; @@ -259,7 +257,6 @@ TEST(UP2PSolver_Kukelova, Multiview) { } } } -#endif TEST(P2Pt_Fabbri_ECCV12, Multiview) { diff --git a/src/openMVG/multiview/two_view_kernel.hpp b/src/openMVG/multiview/two_view_kernel.hpp index f5be21c4..4536772e 100644 --- a/src/openMVG/multiview/two_view_kernel.hpp +++ b/src/openMVG/multiview/two_view_kernel.hpp @@ -65,7 +65,9 @@ namespace kernel { // should append new solutions to the end. template + typename ModelArg = Mat3, + int ImagePointDim = 3 + > class Kernel { public: Kernel(const Mat &x1, const Mat &x2) : x1_(x1), x2_(x2) {} @@ -87,7 +89,7 @@ class Kernel { } /// Return the error associated to the model and sample^nth point double Error(uint32_t sample, const Model &model) const { - return ErrorArg::Error(model, x1_.col(sample).head(3), x2_.col(sample).head(3)); + return ErrorArg::Error(model, x1_.col(sample).head(ImagePointDim), x2_.col(sample).head(3)); } /// Number of putative point size_t NumSamples() const {