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

virtual void Impala::Core::ImageSet::InterestPointProc::HandleNewFile ( ImageSet is,
int  fileId,
Array::Array2dVec3UInt8 im 
) [inline, virtual]

Arrived at given DB_FILE in a "normal" walk.

Reimplemented from Impala::Core::ImageSet::Listener.

Definition at line 142 of file InterestPointProc.h.

References Impala::Core::Feature::InterestPointFeature::FindInterestPoints(), Impala::Core::Feature::InterestPointFeature::GetFeatureName(), Impala::CmdOptions::GetInt(), Impala::CmdOptions::GetString(), Impala::GetTmpPath(), ILOG_DEBUG, ILOG_ERROR, ILOG_INFO, Impala::Core::Feature::InterestPointFeature::mClusterInputImage, mInterestPointFeature, Impala::Core::Array::MirrorY(), mNoZIP, mOptions, mSkipThisFolder, mTempFilenames, Impala::PathJoin(), and Impala::Persistency::RepositoryGetFile().

00143     {
00144         if (mSkipThisFolder)
00145             return;
00146         int dirId = is->GetDirIdOfFile(fileId);
00147         // silent failures - we might be reading from ImageArchives
00148         String fileName = is->GetAsPath(fileId);
00149         // create temporary output filename
00150         String outputFilename =
00151             PathJoin(GetTmpPath(), is->GetFileBase(fileId) + "." +
00152                      mInterestPointFeature.GetFeatureName());
00153         ILOG_DEBUG(" outputFilename=" << outputFilename  << "; fileId=" << fileId
00154                    << "; dirId=" << dirId);
00155         if (im == 0)
00156         {
00157             ILOG_ERROR("No image " << fileName);
00158             return;
00159         }
00160         
00161         Util::IOBuffer* detectorCache = 0;
00162         if (mOptions.GetString("useDetectorCache") != "")
00163         {
00164             String udc = mOptions.GetString("useDetectorCache");
00165             String detectorCacheFilename = PathJoin
00166                 ("FeatureData", udc, is->GetContainerDirOfFile(fileId),
00167                  is->GetFileBase(fileId) + "." + udc);
00168             FileLocator fLoc(is->GetLocator(), detectorCacheFilename);
00169             File file = RepositoryGetFile(fLoc, false, false);
00170             detectorCache = file.GetReadBuffer();
00171             ILOG_INFO("detectorCacheFilename = " << detectorCacheFilename);
00172         }
00173         if (mNoZIP)
00174         {
00175             outputFilename = "";
00176         }
00177         mInterestPointFeature.mClusterInputImage =
00178             QuidObj(is->GetQuidImage(fileId)).ToString();
00179             
00180         if (mOptions.GetInt("mirror"))
00181         {
00182             if (mOptions.GetInt("mirror") == 1)
00183             {
00184                 Array::MirrorY(im, im);
00185             }
00186         }
00187 
00188         if (!mInterestPointFeature.FindInterestPoints(mOptions, im, 
00189                is->GetQuidImage(fileId), outputFilename, true, detectorCache))
00190         {
00191             ILOG_ERROR("Extracting interest points/descriptors failed: " <<
00192                        fileName);
00193         }
00194         if (detectorCache)
00195             delete detectorCache;
00196 
00197         // post-processing functionality
00198         if (mOptions.GetString("interestPointPostProcess") != "")
00199         {
00200             String cmd = mOptions.GetString("interestPointPostProcess")
00201                 + " " + outputFilename;
00202             ILOG_INFO("Post-processing = " << cmd);
00203             system(cmd.c_str());
00204         }
00205         if (!mNoZIP)
00206         {
00207             mTempFilenames.push_back(outputFilename);
00208         }
00209     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:20:03 2011 for ImpalaSrc by  doxygen 1.5.1