Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cygnet ceres support unproject ray #240

Merged
merged 9 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/sophus2/geometry/ray.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Ray {
}

struct IntersectionResult {
double lambda;
TScalar lambda;
Eigen::Matrix<TScalar, kN, 1> point;
};

Expand Down
20 changes: 10 additions & 10 deletions cpp/sophus2/sensor/camera_distortion/brown_conrady.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,27 +116,27 @@ class BrownConradyTransform {
TScalar const c4 = c3 * c2; // pow(c2, 3);
TScalar const c5 = c2 * d[5] + c3 * d[6] + c4 * d[7] + 1.0;
TScalar const c6 = c5 * c5; // pow(c5, 2);
TScalar const c7 = 1.0 / c6;
TScalar const c7 = TScalar( 1.0) / c6;
TScalar const c8 = a * d[3];
TScalar const c9 = 2.0 * d[2];
TScalar const c10 = 2 * c2;
TScalar const c11 = 3 * c3;
TScalar const c9 = TScalar(2.0) * d[2];
TScalar const c10 = TScalar(2) * c2;
TScalar const c11 = TScalar(3) * c3;
TScalar const c12 = c2 * d[0];
TScalar const c13 = c3 * d[1];
TScalar const c14 = c4 * d[4];
TScalar const c15 =
2.0 * (c10 * d[6] + c11 * d[7] + d[5]) * (c12 + c13 + c14 + 1.0);
TScalar const c16 = 2.0 * c10 * d[1] + 2.0 * c11 * d[4] + 2.0 * d[0];
TScalar const c17 = 1.0 * c12 + 1.0 * c13 + 1.0 * c14 + 1.0;
TScalar(2.0) * (c10 * d[6] + c11 * d[7] + d[5]) * (c12 + c13 + c14 + TScalar(1.0));
TScalar const c16 = TScalar(2.0) * c10 * d[1] + 2.0 * c11 * d[4] + TScalar( 2.0) * d[0];
TScalar const c17 = TScalar(1.0) * c12 + TScalar(1.0) * c13 + TScalar(1.0) * c14 + TScalar(1.0);
TScalar const c18 = b * d[3];
TScalar const c19 = a * b;
TScalar const c20 = -c15 * c19 + c16 * c19 * c5;
du_dx =
c7 * (-c0 * c15 + c5 * (c0 * c16 + c17) + c6 * (b * c9 + 6.0 * c8));
c7 * (-c0 * c15 + c5 * (c0 * c16 + c17) + c6 * (b * c9 + TScalar(6.0) * c8));
du_dy = c7 * (c20 + c6 * (a * c9 + 2 * c18));
dv_dx = c7 * (c20 + c6 * (2 * a * d[2] + 2.0 * c18));
dv_dx = c7 * (c20 + c6 * (TScalar(2) * a * d[2] + TScalar(2.0) * c18));
dv_dy = c7 * (-c1 * c15 + c5 * (c1 * c16 + c17) +
c6 * (6.0 * b * d[2] + 2.0 * c8));
c6 * (TScalar(6.0) * b * d[2] + TScalar(2.0) * c8));
}

// | du_dx du_dy | | a b |
Expand Down
Loading