Definition at line 611 of file mainSrc.cpp. References Impala::Core::Stream::RgbDataSrcFactory::Construct(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CW(), Impala::Core::Stream::RgbDataSrc::FrameHeight(), Impala::Core::Stream::RgbDataSrc::FrameWidth(), gBorderSize, gCmd, gDispMode(), Impala::CmdOptions::GetArg(), Impala::CmdOptions::GetBool(), Impala::CmdOptions::GetDouble(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetInt(), Impala::CmdOptions::GetString(), gLogScale, gPrecision, gSigma, gSigmaA, gUseRecGauss, gVerbose, Impala::CmdOptions::Initialise(), Impala::Core::Stream::RgbDataSrcFactory::Instance(), Impala::Core::Stream::RgbDataSrc::LastFrame(), Impala::Core::Array::MakeGaussian1d(), Impala::Core::Array::MakeGaussIIR1d(), Impala::Max(), Impala::Application::DemoCamera2d::oglWnd, Impala::CmdOptions::ParseArgs(), OglGui::OglWindow::Valid(), and Impala::Core::Stream::RgbDataSrc::Valid(). Referenced by main(). 00612 { 00613 OglInit(&argc, &argv[0]); 00614 CmdOptions& options = CmdOptions::GetInstance(); 00615 options.Initialise(true, true); 00616 String usageStr = "cmd camera|filename\n\n"; 00617 usageStr += " cmd = stretch|pgm|png|jpg|rotate|skiz|geodesic|watershed|\n"; 00618 usageStr += " label|threshold|dilation|erosion|write|inv|segment|\n"; 00619 usageStr += " tgauss|keypoints\n"; 00620 if (! options.ParseArgs(argc, argv, usageStr, 2)) 00621 return 1; 00622 00623 gCmd = options.GetArg(0); 00624 String srcName = options.GetArg(1); 00625 00626 gVerbose = options.GetInt("verb"); 00627 gSigma = options.GetDouble("sigma"); 00628 gPrecision = options.GetDouble("precision"); 00629 gUseRecGauss = options.GetBool("recGauss"); 00630 gDispMode = options.GetString("disp"); 00631 gLogScale = options.GetDouble("logScale"); 00632 00633 Array2dScalarReal64* g = 0; 00634 if (gUseRecGauss) 00635 g = MakeGaussIIR1d(Max(gSigma,gSigmaA), 1, gPrecision); 00636 else 00637 g = MakeGaussian1d(Max(gSigma,gSigmaA), 1, gPrecision, 100); 00638 int gw = g->CW(); 00639 if (gw > gBorderSize) 00640 { 00641 std::cout << "Adjusting bordersize to " << gw << std::endl; 00642 gBorderSize = gw; 00643 } 00644 delete g; 00645 00646 RgbDataSrcFactory& factory = RgbDataSrcFactory::Instance(); 00647 RgbDataSrc* src = factory.Construct(srcName, options.GetString("src")); 00648 if (! src->Valid()) 00649 { 00650 std::cout << "RgbDataSrc failed" << std::endl; 00651 return 0; 00652 } 00653 std::cout << src->LastFrame()+1 << " frames of " << src->FrameWidth() 00654 << " x " << src->FrameHeight() << std::endl; 00655 00656 WindowSrc* oglWnd = new WindowSrc(src); 00657 if (! oglWnd->Valid()) 00658 { 00659 std::cout << "WindowSrc failed" << std::endl; 00660 return 0; 00661 } 00662 00663 return 1; 00664 }
Here is the call graph for this function: ![]()
|