Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

int Impala::Application::DemoCamera2d::mainDemoCamera2d ( int  argc,
char *  argv[] 
)

Definition at line 613 of file mainDemoCamera2d.cpp.

References Impala::CmdOptions::AddOption(), Impala::Core::Stream::RgbDataSrcFactory::Construct(), curDemo, Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CW(), demo, Impala::Core::Stream::RgbDataSrc::FrameHeight(), Impala::Core::Stream::RgbDataSrc::FrameWidth(), Impala::CmdOptions::GetDouble(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetInt(), Impala::CmdOptions::GetString(), Impala::CmdOptions::Initialise(), Impala::Core::Stream::RgbDataSrcFactory::Instance(), Impala::Core::Stream::RgbDataSrc::LastFrame(), logScale, Impala::Core::Array::MakeGaussian1d(), nrDemo, oglWnd, Impala::CmdOptions::ParseArgs(), precision, SetCurDemo(), sigma, srcV, Impala::Core::Stream::RgbDataSrc::Valid(), and verbose.

Referenced by main().

00614 {
00615     CmdOptions& options = CmdOptions::GetInstance();
00616     options.Initialise(true, true);
00617     std::string demoAlt("");
00618     for (int i=0 ; i<nrDemo ; i++)
00619     {
00620         demoAlt += demo[i];
00621         if (i != nrDemo-1)
00622             demoAlt += "|";
00623     }
00624     options.AddOption(0, "demo", "name", "compinv", (char*) demoAlt.c_str());
00625     options.AddOption(0, "file", "name", "camera");
00626 
00627     if (! options.ParseArgs(argc, argv, "", 0))
00628         return 1;
00629 
00630     SetCurDemo(options.GetString("demo"));
00631     verbose = options.GetInt("verb");
00632     sigma = options.GetDouble("sigma");
00633     precision = options.GetDouble("precision");
00634     logScale = options.GetDouble("logScale");
00635     std::string srcName = options.GetString("file");
00636 
00637     RgbDataSrcFactory& factory = RgbDataSrcFactory::Instance();
00638     RgbDataSrc* src = factory.Construct(srcName, options.GetString("src"));
00639     if (! src->Valid())
00640     {
00641         std::cout << "RgbDataSrc failed" << std::endl;
00642         return 0;
00643     }
00644     std::cout << src->LastFrame()+1 << " frames of " << src->FrameWidth() 
00645               << " x " << src->FrameHeight() << std::endl;
00646 
00647     std::cout << "demo = " << demo[curDemo] << std::endl;
00648     std::cout << "sigma = " << sigma << ", precision = " << precision << std::endl;
00649     std::cout << "logScale = " << logScale << std::endl;
00650 
00651     Array2dScalarReal64* g = 0;
00652     g = MakeGaussian1d(sigma, 2, precision, 100);
00653     int borderSize = g->CW();
00654     delete g;
00655 
00656     srcV = ArrayCreate<Array2dVec3Real64>(src->FrameWidth(), src->FrameHeight(),
00657                                           borderSize, borderSize);
00658 
00659     //WindowCamera2d* oglWnd = new WindowCamera2d(srcName, src, &options);
00660     oglWnd = new WindowCamera2d(src);
00661     if (! oglWnd->Valid())
00662     {
00663         std::cout << "WindowCamera2d failed" << std::endl;
00664         return 0;
00665     }
00666     return 1;
00667 }

Here is the call graph for this function:


Generated on Fri Mar 19 10:39:10 2010 for ImpalaSrc by  doxygen 1.5.1