moved shared pointer declaration to Cal3_S2.h
parent
3326759f0b
commit
dc9a966fdd
|
@ -122,6 +122,8 @@ namespace gtsam {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef boost::shared_ptr<Cal3_S2> shared_ptrK;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* convert intrinsic coordinates xy to image coordinates uv
|
* convert intrinsic coordinates xy to image coordinates uv
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -31,7 +31,6 @@ private:
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef boost::shared_ptr<VSLAMFactor> shared_ptr; // shorthand for a smart pointer to a factor
|
typedef boost::shared_ptr<VSLAMFactor> shared_ptr; // shorthand for a smart pointer to a factor
|
||||||
typedef boost::shared_ptr<Cal3_S2> shared_ptrK;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default constructor
|
* Default constructor
|
||||||
|
|
|
@ -32,7 +32,7 @@ TEST( VSLAMFactor, error )
|
||||||
double sigma=1.0;
|
double sigma=1.0;
|
||||||
int cameraFrameNumber=1, landmarkNumber=1;
|
int cameraFrameNumber=1, landmarkNumber=1;
|
||||||
boost::shared_ptr<VSLAMFactor>
|
boost::shared_ptr<VSLAMFactor>
|
||||||
factor(new VSLAMFactor(z, sigma, cameraFrameNumber, landmarkNumber, VSLAMFactor::shared_ptrK(new Cal3_S2(K))));
|
factor(new VSLAMFactor(z, sigma, cameraFrameNumber, landmarkNumber, shared_ptrK(new Cal3_S2(K))));
|
||||||
|
|
||||||
// For the following configuration, the factor predicts 320,240
|
// For the following configuration, the factor predicts 320,240
|
||||||
VSLAMConfig config;
|
VSLAMConfig config;
|
||||||
|
@ -77,10 +77,10 @@ TEST( VSLAMFactor, equals )
|
||||||
double sigma=1.0;
|
double sigma=1.0;
|
||||||
int cameraFrameNumber=1, landmarkNumber=1;
|
int cameraFrameNumber=1, landmarkNumber=1;
|
||||||
boost::shared_ptr<VSLAMFactor>
|
boost::shared_ptr<VSLAMFactor>
|
||||||
factor1(new VSLAMFactor(z, sigma, cameraFrameNumber, landmarkNumber, VSLAMFactor::shared_ptrK(new Cal3_S2(K))));
|
factor1(new VSLAMFactor(z, sigma, cameraFrameNumber, landmarkNumber, shared_ptrK(new Cal3_S2(K))));
|
||||||
|
|
||||||
boost::shared_ptr<VSLAMFactor>
|
boost::shared_ptr<VSLAMFactor>
|
||||||
factor2(new VSLAMFactor(z, sigma, cameraFrameNumber, landmarkNumber, VSLAMFactor::shared_ptrK(new Cal3_S2(K))));
|
factor2(new VSLAMFactor(z, sigma, cameraFrameNumber, landmarkNumber, shared_ptrK(new Cal3_S2(K))));
|
||||||
|
|
||||||
CHECK(assert_equal(*factor1, *factor2));
|
CHECK(assert_equal(*factor1, *factor2));
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ VSLAMGraph testGraph() {
|
||||||
Point2 z24( 125, 125);
|
Point2 z24( 125, 125);
|
||||||
|
|
||||||
double sigma = 1;
|
double sigma = 1;
|
||||||
VSLAMFactor::shared_ptrK sK(new Cal3_S2(625, 625, 0, 0, 0));
|
shared_ptrK sK(new Cal3_S2(625, 625, 0, 0, 0));
|
||||||
VSLAMGraph g;
|
VSLAMGraph g;
|
||||||
g.push_back(VSLAMFactor::shared_ptr(new VSLAMFactor(z11, sigma, 1, 1, sK)));
|
g.push_back(VSLAMFactor::shared_ptr(new VSLAMFactor(z11, sigma, 1, 1, sK)));
|
||||||
g.push_back(VSLAMFactor::shared_ptr(new VSLAMFactor(z12, sigma, 1, 2, sK)));
|
g.push_back(VSLAMFactor::shared_ptr(new VSLAMFactor(z12, sigma, 1, 2, sK)));
|
||||||
|
|
Loading…
Reference in New Issue