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

OGLIMAGE* Impala::Application::SDash::RoiLoader::Load ( int  videoId,
int  frameNr,
int  roiNr 
) [inline]

Definition at line 42 of file RoiLoader.h.

References GetDummyImage(), mRoiPath, Impala::Visualization::RgbOglImage::OglImage(), Impala::Core::Array::ReadJpg(), and Impala::Persistency::File::Valid().

Referenced by Impala::Application::SDash::IdentificationPane::DisplayFunc(), and Impala::Application::SDash::VideoPlayerView::OnMouse().

00043     {
00044         std::ostrstream roiFileName;
00045         roiFileName << "roi_" << videoId << '_' << frameNr << '_' << roiNr << ".jpg" << std::ends;
00046         //std::cout << "reading roi from: " << roiFileName.str() << std::endl;
00047         std::ostrstream roiFilePath;
00048         roiFilePath << mRoiPath << "video" << videoId << '/';
00049         roiFilePath << roiFileName.str() << std::ends;
00050 
00051         OGLIMAGE* regionImage;
00052         File file(std::string(roiFilePath.str()), "r", false);
00053         if (file.Valid())
00054         {
00055             file.Close();
00056             Core::Array::Array2dVec3UInt8* im = 0;
00057             Core::Array::ReadJpg(im, roiFilePath.str());
00058             regionImage = Visualization::RgbOglImage::OglImage(im);
00059         }
00060         else
00061         {
00062             std::cout << "failed to read roi" << std::endl;
00063             regionImage = GetDummyImage();
00064         }
00065         return regionImage;
00066     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:16:07 2011 for ImpalaSrc by  doxygen 1.5.1