extract-features.C

Go to the documentation of this file.
00001 /*!@file ObjRec/extract-features.C extract features 1 */
00002 
00003 // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2000-2003   //
00004 // by the University of Southern California (USC) and the iLab at USC.  //
00005 // See http://iLab.usc.edu for information about this project.          //
00006 // //////////////////////////////////////////////////////////////////// //
00007 // Major portions of the iLab Neuromorphic Vision Toolkit are protected //
00008 // under the U.S. patent ``Computation of Intrinsic Perceptual Saliency //
00009 // in Visual Environments, and Applications'' by Christof Koch and      //
00010 // Laurent Itti, California Institute of Technology, 2001 (patent       //
00011 // pending; application number 09/912,225 filed July 23, 2001; see      //
00012 // http://pair.uspto.gov/cgi-bin/final/home.pl for current status).     //
00013 // //////////////////////////////////////////////////////////////////// //
00014 // This file is part of the iLab Neuromorphic Vision C++ Toolkit.       //
00015 //                                                                      //
00016 // The iLab Neuromorphic Vision C++ Toolkit is free software; you can   //
00017 // redistribute it and/or modify it under the terms of the GNU General  //
00018 // Public License as published by the Free Software Foundation; either  //
00019 // version 2 of the License, or (at your option) any later version.     //
00020 //                                                                      //
00021 // The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope  //
00022 // that it will be useful, but WITHOUT ANY WARRANTY; without even the   //
00023 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
00024 // PURPOSE.  See the GNU General Public License for more details.       //
00025 //                                                                      //
00026 // You should have received a copy of the GNU General Public License    //
00027 // along with the iLab Neuromorphic Vision C++ Toolkit; if not, write   //
00028 // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,   //
00029 // Boston, MA 02111-1307 USA.                                           //
00030 // //////////////////////////////////////////////////////////////////// //
00031 // Primary maintainer for this file: Lior Elazary <elazary@usc.edu>
00032 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/ObjRec/extract-features.C $
00033 // $Id: extract-features.C 9108 2007-12-30 06:14:30Z rjpeters $
00034 
00035 
00036 #include "Component/ModelManager.H"
00037 #include "Media/FrameSeries.H"
00038 #include "Transport/FrameInfo.H"
00039 #include "Raster/GenericFrame.H"
00040 #include "Image/Image.H"
00041 #include "Image/ImageSet.H"
00042 #include "Image/DrawOps.H"
00043 #include "Image/ShapeOps.H"
00044 #include "Image/Layout.H"
00045 #include <math.h>
00046 #include <stdlib.h>
00047 #include "ObjRec/ObjRecBOF.H"
00048 #include "GUI/ImageDisplayStream.H"
00049 #include "GUI/XWinManaged.H"
00050 
00051 int main(const int argc, const char **argv)
00052 {
00053   MYLOGVERB = LOG_INFO;
00054   ModelManager *mgr = new ModelManager("Test ObjRec");
00055 
00056  // nub::ref<OutputFrameSeries> ofs(new OutputFrameSeries(*mgr));
00057   //mgr->addSubComponent(ofs);
00058 
00059   //nub::ref<InputFrameSeries> ifs(new InputFrameSeries(*mgr));
00060   //mgr->addSubComponent(ifs);
00061 
00062   nub::ref<ObjRecBOF> objRec(new ObjRecBOF(*mgr));
00063   mgr->addSubComponent(objRec);
00064 
00065   mgr->exportOptions(MC_RECURSE);
00066 
00067   if (mgr->parseCommandLine(
00068         (const int)argc, (const char**)argv, "", 0, 0) == false)
00069     return 1;
00070   mgr->start();
00071 
00072 
00073   //grab the images
00074   //GenericFrame input = ifs->readFrame();
00075   //objRec->extractFeatures(input.asRgb());
00076   //objRec->extractCodeWords(input.asRgb());
00077   //objRec->extractCodeWords("/lab/tmpib/u/objRec/salBayes/fv.tmp");
00078   //objRec->extractCodeWords("/home/elazary/images/VOCdevkit/VOC2007/salKp.tmp");
00079   mgr->stop();
00080 
00081   exit(0);
00082 
00083 }
Generated on Sun May 8 08:41:08 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3