00001 /*!@file CINNIC/CINNICstats.C do statistical tests on CINNIC outputs */ 00002 00003 // //////////////////////////////////////////////////////////////////// // 00004 // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2001 by the // 00005 // University of Southern California (USC) and the iLab at USC. // 00006 // See http://iLab.usc.edu for information about this project. // 00007 // //////////////////////////////////////////////////////////////////// // 00008 // Major portions of the iLab Neuromorphic Vision Toolkit are protected // 00009 // under the U.S. patent ``Computation of Intrinsic Perceptual Saliency // 00010 // in Visual Environments, and Applications'' by Christof Koch and // 00011 // Laurent Itti, California Institute of Technology, 2001 (patent // 00012 // pending; application number 09/912,225 filed July 23, 2001; see // 00013 // http://pair.uspto.gov/cgi-bin/final/home.pl for current status). // 00014 // //////////////////////////////////////////////////////////////////// // 00015 // This file is part of the iLab Neuromorphic Vision C++ Toolkit. // 00016 // // 00017 // The iLab Neuromorphic Vision C++ Toolkit is free software; you can // 00018 // redistribute it and/or modify it under the terms of the GNU General // 00019 // Public License as published by the Free Software Foundation; either // 00020 // version 2 of the License, or (at your option) any later version. // 00021 // // 00022 // The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope // 00023 // that it will be useful, but WITHOUT ANY WARRANTY; without even the // 00024 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // 00025 // PURPOSE. See the GNU General Public License for more details. // 00026 // // 00027 // You should have received a copy of the GNU General Public License // 00028 // along with the iLab Neuromorphic Vision C++ Toolkit; if not, write // 00029 // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, // 00030 // Boston, MA 02111-1307 USA. // 00031 // //////////////////////////////////////////////////////////////////// // 00032 // 00033 // Primary maintainer for this file: Nathan Mundhenk <nathan@mundhenk.com> 00034 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/CINNIC/CINNICstats.C $ 00035 // $Id: CINNICstats.C 6410 2006-04-01 22:12:24Z rjpeters $ 00036 // 00037 00038 00039 // ############################################################ 00040 // ############################################################ 00041 // ##### ---CINNIC--- 00042 // ##### Contour Integration: 00043 // ##### T. Nathan Mundhenk nathan@mundhenk.com 00044 // ############################################################ 00045 // ############################################################ 00046 00047 #include "Util/Assert.H" 00048 #include "CINNIC/CINNICstatsRun.H" 00049 00050 //! the file to save stats out to 00051 const char *savefilename; 00052 //! this string contains the name of the list file to open of images 00053 const char* listfile; 00054 //! this contains the name of the config file 00055 const char* configFile; 00056 //! this contains the name of the config file 00057 const char* configFile2; 00058 //! this is the parameter special for this analysis 00059 const char* specialParam; 00060 //! This is the configFile object 00061 readConfig fileList(25); 00062 //! this is the main config file 00063 readConfig ReadConfigMain(25); 00064 //! this is the main config file 00065 readConfig ReadConfigMain2(25); 00066 //! main object for stats 00067 CINNICstatsRun runStats; 00068 00069 //! This is a package to run tests on the output from CINNIC 00070 int main(int argc, char* argv[]) 00071 { 00072 LINFO("STARTING CINNICstats"); 00073 LINFO("Copyright 2002 ACME Vision Systems, Wallawalla, WA"); 00074 //you must input a list of files 00075 ASSERT(argc >= 1); 00076 listfile = argv[1]; 00077 00078 if(argc > 2) 00079 { 00080 savefilename = argv[2]; 00081 } 00082 else 00083 { 00084 savefilename = "stats.noname"; 00085 } 00086 00087 if(argc > 3) 00088 { 00089 configFile = argv[3]; 00090 } 00091 else 00092 { 00093 configFile = "stats.conf"; 00094 } 00095 00096 if(argc > 4) 00097 { 00098 specialParam = argv[4]; 00099 } 00100 else 00101 { 00102 specialParam = "noSpecial"; 00103 } 00104 00105 if(argc > 5) 00106 { 00107 configFile2 = argv[5]; 00108 } 00109 else 00110 { 00111 configFile2 = "contour.conf"; 00112 } 00113 00114 int do1,do2; 00115 ReadConfigMain.openFile(configFile); 00116 ReadConfigMain2.openFile(configFile2); 00117 do1 = (int)ReadConfigMain.getItemValueF("runStandard"); 00118 do2 = (int)ReadConfigMain.getItemValueF("runPointAndFlood"); 00119 00120 fileList.openFile(listfile); 00121 //! main object for stats 00122 LINFO("SETTING stuff"); 00123 runStats.setStuff(fileList); 00124 LINFO("SETTING config"); 00125 runStats.setConfig(ReadConfigMain,ReadConfigMain2); 00126 00127 if(do1 == 1) 00128 runStats.runStandardStats(fileList); 00129 if((do1 == 1) && (do2 == 1)) 00130 runStats.setStuff(fileList); 00131 if(do2 == 1) 00132 runStats.runPointAndFlood(fileList,specialParam); 00133 } 00134 00135 // ###################################################################### 00136 /* So things look consistent in everyone's emacs... */ 00137 /* Local Variables: */ 00138 /* indent-tabs-mode: nil */ 00139 /* End: */