31 #include <Utils/ThreeDOut.hh>
32 #include <Utils/Param.hh>
33 #include <Image/Camera.hh>
34 #include <Base/Image/ImageIO.hh>
42 int main(
int argc,
char* argv[]) {
47 "pass list of images containing projections",
"");
50 "name of resulting wrl",
"");
54 "color of coord frame, default [0.0 0.0 0.0 255.0]",
60 bool* help = params.
AddParamBool(
"help",
"this helpful output",
false,
'h');
66 cout<<argv[0]<<
" converts a list of projections into a vrml\n";
71 vector<string> vectorOfImageNames;
72 Param::ParseListFile(*imagesList, vectorOfImageNames);
74 vector<string>::iterator begin = vectorOfImageNames.begin();
75 vector<string>::iterator end = vectorOfImageNames.end();
79 for(vector<string>::iterator pos=begin; pos!=end; pos++) {
80 if(ImageIO::Load(*pos, img) != 0) {
81 BIASERR(
"could not image "<<*pos<<
"!");
87 col[0] = (
unsigned char)((*color)[0]);
88 col[1] = (
unsigned char)((*color)[1]);
89 col[2] = (
unsigned char)((*color)[2]);
90 col[3] = (
unsigned char)((*color)[3]);
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 ...
class RGBAuc is asynonym for a Vector4 of corerct type
Unified output of 3D entities via OpenGL or VRML.
bool * AddParamBool(const std::string &name, const std::string &help, bool deflt=false, char cmdshort=0, int Group=GRP_NOSHOW)
double * AddParamDouble(const std::string &name, const std::string &help, double deflt=0.0, double min=-DBL_MAX, double max=DBL_MAX, char cmdshort=0, int Group=GRP_NOSHOW)
configuration struct for drawing styles of various 3d objects
void SetParams(const ThreeDOutParameters ¶ms)
int ParseCommandLine(int &argc, char *argv[])
scan command line arguments for valid parameters
CameraDrawingStyle CameraStyle
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.
void Usage(std::ostream &os=std::cout)
print Help-Information to stdout
This class hides the underlying projection model, like projection matrix, spherical camera...
BIAS::Vector< double > * AddParamVecDbl(const std::string &name, const std::string &help, const BIAS::Vector< double > &deflt, char cmdshort=0, int Group=GRP_NOSHOW)
Add a parameter that expects a string on command line like "<value0> <value1> <value2> ...
This class Param provides generic support for parameters.
const BIAS::Projection & GetProj() const
std::string * AddParamString(const std::string &name, const std::string &help, std::string deflt="", char cmdshort=0, int Group=GRP_NOSHOW)
int ParseMetaData(bool bUse2x64bitTS=true)
After ImageIO::Load() operated on AppData_, this method fills P_, Timestamp, DC_*, ...