Lines Matching defs:x2
105 // forward_error = D(H * x1, x2)
106 // backward_error = D(H^-1 * x2, x1)
112 const Eigen::Matrix<T, 2, 1> &x2,
117 Vec3 y(x2(0), x2(1), T(1.0));
133 // D(H * x1, x2)^2 + D(H^-1 * x2, x1)^2
137 const Vec2 &x2) {
141 x2,
187 // | 0 -1 x2| |a b c| |y1| |0|
189 // |-x2 x1 0| |g h 1| |1 | |0|
193 // (-d+x2*g)*y1 + (-e+x2*h)*y2 + -f+x2 |0|
195 // (-x2*a+x1*d)*y1 + (-x2*b+x1*e)*y2 + -x2*c+x1*f |0|
199 const Mat &x2,
204 assert(x1.rows() == x2.rows());
205 assert(x1.cols() == x2.cols());
215 L(j, 6) = -x2(0, i) * x1(0, i); // g
216 L(j, 7) = -x2(0, i) * x1(1, i); // h
217 b(j, 0) = x2(0, i); // i
223 L(j, 6) = -x2(1, i) * x1(0, i); // g
224 L(j, 7) = -x2(1, i) * x1(1, i); // h
225 b(j, 0) = x2(1, i); // i
230 L(j, 0) = x2(1, i) * x1(0, i); // a
231 L(j, 1) = x2(1, i) * x1(1, i); // b
232 L(j, 2) = x2(1, i); // c
233 L(j, 3) = -x2(0, i) * x1(0, i); // d
234 L(j, 4) = -x2(0, i) * x1(1, i); // e
235 L(j, 5) = -x2(0, i); // f
281 TerminationCheckingCallback(const Mat &x1, const Mat &x2,
284 : options_(options), x1_(x1), x2_(x2), H_(H) {}
318 const Mat &x2,
323 assert(x1.rows() == x2.rows());
324 assert(x1.cols() == x2.cols());
329 x2,
341 x2.col(i));
359 TerminationCheckingCallback callback(x1, x2, options, H);
389 Mat x2 = x1;
390 for (int i = 0; i < x2.cols(); ++i) {
393 x2(0, i) = homogenous_x2(0) / homogenous_x2(2);
394 x2(1, i) = homogenous_x2(1) / homogenous_x2(2);
397 x2(0, i) += static_cast<double>(rand() % 1000) / 5000.0;
398 x2(1, i) += static_cast<double>(rand() % 1000) / 5000.0;
405 EstimateHomography2DFromCorrespondences(x1, x2, options, &estimated_matrix);