31 #include <Utils/ThreeDOut.hh>
32 #include <Geometry/Projection.hh>
33 #include <Base/Image/ImageIO.hh>
34 #include <Base/Image/ImageConvert.hh>
36 #include <Base/Math/Random.hh>
41 int main(
int argc,
char* argv[])
45 cout<<argv[0]<<
" <projectionFile.xml> <ouputFile> [texture]\n";
49 int count = atoi(argv[3]);
54 for(
int i = 0; i < count; i++){
104 (
double)(rand()%1000)/100.0);
106 (
double)(rand()%1000)/100.0,
107 (
double)(rand()%1000)/100.0,
108 (
double)(rand()%1000)/100.0);
117 (
double)(rand()%1000)/100.0,
118 (
double)(rand()%1000)/100.0);
123 R.
SetXYZ((
double)(rand()%1000)/100.0,
124 (
double)(rand()%1000)/100.0,
125 (
double)(rand()%1000)/100.0);
130 cout << Q[0] <<
", " << Q[1] <<
", " << Q[2] <<
", " << Q[3] << endl;
140 if(P.GetParameters() == NULL) {
141 cout<<
"Fatal error generating projection object!\n";
147 (
double)(rand()%100)/100.00,
148 "puppy me", (rand()%2));
150 cout <<
"Projection " << i <<
" added" << endl;
159 cout<<
"finished\n"<<flush;
virtual void SetPrincipal(const double x, const double y)
Set principal point (in pixels relative to top left corner).
void SetXYZ(ROTATION_MATRIX_TYPE PhiX, ROTATION_MATRIX_TYPE PhiY, ROTATION_MATRIX_TYPE PhiZ)
Set Euler angles (in rad) in order XYZ.
int VRMLOut(const std::string &sFilename)
flush all 3d objects to a vrml file with name sFilename, this is the function most users would call ...
camera parameters which define the mapping between rays in the camera coordinate system and pixels in...
class RGBAuc is asynonym for a Vector4 of corerct type
virtual void SetImageSize(const unsigned int w, const unsigned int h)
Set image dimensions (in pixels).
Unified output of 3D entities via OpenGL or VRML.
void SetUndistortion(double kc1, double kc2)
int GetQuaternion(Quaternion< ROTATION_MATRIX_TYPE > &quat) const
Calculates quaternion representation for this rotation matrix.
unsigned int AddProjection(const Projection &p, const RGBAuc &colorSelection=RGBAuc_WHITE_OPAQUE, const double radius=0.1, const double scale=1.0, const std::string &identifier="", const int camera_type=-1)
Add a projection object to ThreeDOut mem.
virtual void SetQ(const BIAS::Quaternion< double > &Q)
Set orientation from unit quaternion Q.
This class hides the underlying projection model, like projection matrix, spherical camera...
virtual void SetAspectratio(const double AspectRatio)
Set CCD aspect ratio (i.e.
void SetFocalLengthAndAspect(double f, double AspectRatio)
Set the current camera focal length in pixel and the a spect ratio.
Camera parameters which define the mapping between rays in the camera coordinate system and pixels in...
virtual void SetC(const BIAS::Vector3< double > &C)
Set projection center.
class for producing random numbers from different distributions