31 #include <Base/Geometry/KMatrix.hh>
32 #include <Geometry/ProjectionParametersPerspective.hh>
33 #include <Image/CalibratedPyramid.hh>
44 K[0][0] = K[1][1] = focal;
45 K[0][2] = 320.0; K[1][2] = 240.0;
51 DynamicCast<ProjectionParametersBase>(projpersp);
60 im->FillImageWithXValue();
61 const double focal = 800.0;
73 im.FillImageWithXValue();
74 const int x = 42, y = 42;
75 unsigned char val = im.GetImageDataArray()[y][x];
82 const unsigned size = 2;
83 const double factor = 4.0;
84 cp.Init(ci, size, factor);
86 if (cp.IsEmpty()) { BIASABORT; }
87 if (cp.Size()!=size) { BIASABORT; }
88 if (!
Equal(cp.GetRescaleFactor(), factor)) { BIASABORT; }
91 unsigned char mval = cp[0].image->GetImageDataArray()[y][x];
92 if (val != mval) { BIASABORT; }
98 vector<CalibratedPyramid<unsigned char> > vcp(3);
100 GetCalibratedPyramid(cp);
105 int main(
int argc,
char *argv[])
This class takes care of consisiten re-sampling of images and associated ProjectionParameters.
camera parameters which define the mapping between rays in the camera coordinate system and pixels in...
pointer with reference count and automatic deletion
SharedPtr< Image< StorageType > > image
helper class holding image and associated calibration
bool Equal(const T left, const T right, const T eps)
comparison function for floating point values See http://www.boost.org/libs/test/doc/components/test_...
SharedPtr< ProjectionParametersBase > projection
K describes the mapping from world coordinates (wcs) to pixel coordinates (pcs).
virtual void SetK(const KMatrix &K)
sets the internal parameters from a given KMatrix and updates the cached K and its inverse ...