adding 11 point example for cal3bundler
parent
91e58f5016
commit
bce9050672
|
@ -111,11 +111,11 @@ void create18PointExample1() {
|
||||||
|
|
||||||
// Create test data, we need 15 points
|
// Create test data, we need 15 points
|
||||||
vector<Point3> P;
|
vector<Point3> P;
|
||||||
P += Point3(-0.1, -0.5, 1), Point3(-0.1, 0, 1), Point3(-0.1, 0.5, 1),
|
P += Point3(-0.1, -0.5, 1), Point3(-0.1, 0, 1), Point3(-0.1, 0.5, 1), //
|
||||||
Point3(0, -0.5, 1), Point3(0, 0, 1), Point3(0, 0.5, 1),
|
Point3(0, -0.5, 1), Point3(0, 0, 1), Point3(0, 0.5, 1), //
|
||||||
Point3(0.1, -0.5, 1), Point3(0.1, 0, 1), Point3(0.1, 0.5, 1),
|
Point3(0.1, -0.5, 1), Point3(0.1, 0, 1), Point3(0.1, 0.5, 1), //
|
||||||
Point3(-0.1, -0.5, 0.5), Point3(-0.1, 0, 0.5), Point3(-0.1, 0.5, 0.5),
|
Point3(-0.1, -0.5, 0.5), Point3(-0.1, 0, 0.5), Point3(-0.1, 0.5, 0.5), //
|
||||||
Point3(0, -0.5, 0.5), Point3(0, 0, 0.5), Point3(0, 0.5, 0.5),
|
Point3(0, -0.5, 0.5), Point3(0, 0, 0.5), Point3(0, 0.5, 0.5), //
|
||||||
Point3(0.1, -0.5, 0.5), Point3(0.1, 0, 0.5), Point3(0.1, 0.5, 0.5);
|
Point3(0.1, -0.5, 0.5), Point3(0.1, 0, 0.5), Point3(0.1, 0.5, 0.5);
|
||||||
|
|
||||||
// Assumes example is run in ${GTSAM_TOP}/build/examples
|
// Assumes example is run in ${GTSAM_TOP}/build/examples
|
||||||
|
@ -123,12 +123,34 @@ void create18PointExample1() {
|
||||||
createExampleBALFile(filename, P, pose1, pose2);
|
createExampleBALFile(filename, P, pose1, pose2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ************************************************************************* */
|
||||||
|
void create11PointExample2() {
|
||||||
|
// Create two cameras poses
|
||||||
|
Rot3 aRb = Rot3::Yaw(M_PI_2);
|
||||||
|
Point3 aTb(10, 0, 0);
|
||||||
|
Pose3 pose1, pose2(aRb, aTb);
|
||||||
|
|
||||||
|
// Create test data, we need 11 points
|
||||||
|
vector<Point3> P;
|
||||||
|
P += Point3(0, 0, 100), Point3(0, 0, 100), Point3(0, 0, 100), //
|
||||||
|
Point3(-10, 0, 100), Point3(10, 0, 100), //
|
||||||
|
Point3(0, 50, 50), Point3(0, -50, 50), //
|
||||||
|
Point3(-10, 50, 50), Point3(10, -50, 50), //
|
||||||
|
Point3(-20, 0, 80), Point3(20, -50, 80);
|
||||||
|
|
||||||
|
// Assumes example is run in ${GTSAM_TOP}/build/examples
|
||||||
|
const string filename = "../../examples/data/11pointExample2.txt";
|
||||||
|
Cal3Bundler K(500, 0, 0);
|
||||||
|
createExampleBALFile(filename, P, pose1, pose2, K);
|
||||||
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
create5PointExample1();
|
create5PointExample1();
|
||||||
create5PointExample2();
|
create5PointExample2();
|
||||||
create18PointExample1();
|
create18PointExample1();
|
||||||
|
create11PointExample2();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue