
00001 /* -*- mode: text; fill-column: 70; indent-tabs-mode: nil -*- 00002 $Id: programmer-notes.dxy 11538 2009-07-30 06:23:37Z itti $ 00003 00004 ------------------------------------ 00005 iLab Neuromorphic Vision C++ Toolkit 00006 ------------------------------------ 00007 00008 Programmer Notes 00009 ---------------- 00010 00011 */ 00012 00013 /*! \page programmer-notes Programmer notes 00014 00015 The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2001-2005 by 00016 the University of Southern California (USC) and iLab at USC. 00017 00018 Major portions of the iLab Neuromorphic Vision C++ Toolkit are 00019 protected under the U.S. patent ``Computation of Intrinsic Perceptual 00020 Saliency in Visual Environments, and Applications'' by Christof Koch 00021 and Laurent Itti, California Institute of Technology, 2001 (patent 00022 pending; application number 09/912,225 filed July 23, 2001; see 00023 http://pair.uspto.gov/cgi-bin/final/home.pl for current status) 00024 00025 This file is part of the iLab Neuromorphic Vision C++ Toolkit. 00026 00027 The iLab Neuromorphic Vision C++ Toolkit is free software; you can 00028 redistribute it and/or modify it under the terms of the GNU General 00029 Public License as published by the Free Software Foundation; either 00030 version 2 of the License, or (at your option) any later version. 00031 00032 The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope 00033 that it will be useful, but WITHOUT ANY WARRANTY; without even the 00034 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00035 PURPOSE. See the GNU General Public License for more details. 00036 00037 You should have received a copy of the GNU General Public License 00038 along with the iLab Neuromorphic Vision C++ Toolkit; if not, write to 00039 the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 00040 Boston, MA 02111-1307 USA. 00041 00042 Table of contents: 00043 00044 - \ref introduction 00045 - \ref getting-the-code 00046 - \ref file-organization 00047 - \ref compiling 00048 - \ref executables 00049 - \ref video-clips 00050 - \ref parallel-code 00051 - \ref documentation 00052 - \ref writing-code 00053 - \ref roadmap 00054 00055 <!--############################################################--> 00056 <!--############################################################--> 00057 <!--############################################################--> 00058 00059 \section introduction 1. INTRODUCTION 00060 00061 00062 <!--############################################################--> 00063 00064 \subsection purpose-and-objectives 1.1. Purpose and Objectives 00065 00066 00067 This toolkit provides a number of C++ classes to assist you in 00068 developing neuromorphic vision algorithms. Neuromorphic algorithms are 00069 motivated by and closely follow the architecture of biological brains. 00070 00071 Originally, this toolkit was developed to implement our model of 00072 bottom-up, saliency-based visual attention, as described in the 00073 following scientific articles (all available in PDF format from 00074 http://iLab.usc.edu): 00075 00076 L. Itti, C. Koch, E. Niebur, A Model of Saliency-Based Visual 00077 Attention for Rapid Scene Analysis, IEEE Transactions on Pattern 00078 Analysis and Machine Intelligence, Vol. 20, No. 11, pp. 1254-1259, Nov 00079 1998. 00080 00081 L. Itti, Models of Bottom-Up and Top-Down Visual Attention, California 00082 Institute of Technology, Jan 2000. [Ph.D. Thesis] 00083 00084 L. Itti, C. Koch, A saliency-based search mechanism for overt and 00085 covert shifts of visual attention, Vision Research, Vol. 40, 00086 No. 10-12, pp. 1489-1506, May 2000. 00087 00088 L. Itti, C. Koch, Computational Modeling of Visual Attention, Nature 00089 Reviews Neuroscience, Vol. 2, No. 3, pp. 194-203, Mar 2001. 00090 00091 and many others (see web site, under 'publications'). 00092 00093 The model takes an input color image or video sequence and predicts 00094 which locations in this image will attract our visual attention (that 00095 is, are conspicuous, or 'salient'). It replicates processing in 00096 posterior parietal cortex and other brain areas along the dorsal 00097 visual stream in the primate brain. The model includes a bottom-up 00098 (image-based) computation of low-level color, intensity, orientation 00099 and motion features, as well as a non-linear spatial competition which 00100 enhances salient locations in each of these feature channels. All 00101 feature channels feed into a unique scalar ``saliency map'' which 00102 controls where to next focus attention onto. Because it includes a 00103 detailed low-level vision front-end, the model has been applied not 00104 only to laboratory stimuli, but also to a wide variety of natural 00105 scenes. In addition to predicting a wealth of psychophysical 00106 experiments, the model demonstrates remarkable performance at 00107 detecting salient objects in outdoors imagery --- sometimes exceeding 00108 human performance --- despite wide variations in imaging conditions, 00109 targets to be detected, and environments. 00110 00111 00112 <!--############################################################--> 00113 00114 \subsection classes-included 1.2. Classes included in the package 00115 00116 00117 - low-level graphic elements such as a 2D point (Point2D), an RGB 00118 pixel (PixRGB), a rectangle, etc 00119 00120 - a template Image class that defines a 2D array (of data type chosen 00121 through the C++ template mechanism) and provides numerous low-level 00122 image processing functions, such as convolution, rescaling, basic 00123 arithmetic operations, decimation & interpolation, various 00124 normalizations, type conversions, omnidirectional lens distortion 00125 correction, various methods to draw lines, circles, rectangles, 00126 points, etc and miscellaneous functions such as speckle noise 00127 addition, 3D warping, flooding, edge detection, 3/4 chamfer distance 00128 transform, etc 00129 00130 - a template ImageSet class which implements collections of Image 00131 objects, possibly forming dyadic pyramids of various data types 00132 (defined as template argument) and for various pyramid schemes. A 00133 dyadic pyramid is a series of images (one image per pyramid 'level,' 00134 where the base of the pyramid, or level 0, is the original image 00135 from which the pyramid is built), such that the next level in the 00136 pyramid is derived from the current level by applying some filter 00137 and then reducing the size of the level by a factor two horizontally 00138 and vertically (hence the term 'dyadic,' which means in powers of 00139 two). Pyramid schemes include Gaussian pyramids with several 00140 Gaussian filter sizes (thus, a Gaussian (= blurring) filter is 00141 applied to each level before size reduction), Laplacian (= edge 00142 detector), Gabor (= detect oriented edges in a given direction), etc 00143 00144 - a Raster namespace and set of functions which allow storage and 00145 retrieval of Image objects as PNM (Portable aNyMap; also known as 00146 PPM Portable PixMap and PPM Portable GreyMap) image files on disk, a 00147 very easy to use, uncompressed and standardized image file 00148 format. PNM is a very convenient format because of the availability 00149 of the 'netpbm' suite (installed by default in many Linux 00150 distributions), which includes many programs to convert from any 00151 other image format to PPM/PGM, and then from PPM/PGM to any other 00152 format. We also support other common image formats such as JPEG and 00153 PNG (not to be confused with PNM), as well as raw YUV image formats 00154 (see RasterFileFormat and VideoFormat). 00155 00156 - several classes which are specific to our model of bottom-up, 00157 saliency-based visual attention, such as a number of Channel classes 00158 (which wrap underlying image pyramids of various types), a 00159 VisualCortex class (contains several pyramids for color, intensity, 00160 orientation and flicker information), a SaliencyMap class (which is 00161 a 2D array of simple leaky integrate & fire neurons), a 00162 WinnerTakeAll class (which is a distributed neuronal algorithm by 00163 which the location of maximum activity can be detected in the 00164 saliency map), a Brain class (contains a retina, visual cortex, 00165 saliency map, winner-take-all and a few other objects), a number of 00166 SaccadeController classes which allow for the control of eye 00167 movements from shifts of attention, a ShapeEstimator class which 00168 computes an estimate bounding region around an attended object, etc 00169 00170 - several classes that are specific to our model of contour 00171 integration in the primate brain. These classes simulate intricate 00172 patterns of connections between neurons visually responsive to 00173 various locations in our visual environment, and allow the model to 00174 extract salient contours from surrounding noise and clutter 00175 (contourNeuron and contourRun classes). 00176 00177 - several classes specific to symbolic knowledge representation, which 00178 we use to model the influence of a verbally-specified task/goal onto 00179 the spatiotemporal deployment of attention and eye movements. 00180 00181 - several classes that deal with object recognition, including a 00182 re-implementation of the HMAX model, a 2-layer backpropagation 00183 network for object recognition, etc. 00184 00185 - a Jet class, which is a vector of responses from various neurons all 00186 responding to a same location in the visual field, but with 00187 different sensitivities (e.g., one neuron is tuned to red color, 00188 another to vertical orientation, etc). Several operations are 00189 provided that allow the computation of mean jets, distance between 00190 two jets, etc. This class has been applied to some fairly 00191 unsuccessful (so far) attempt at segmenting objects from scenes 00192 using some jet-based metric. 00193 00194 - a V4Lgrabber class, which allows very easy capture of video frames 00195 from any Video4Linux-compliant framegrabber device installed in your 00196 computer (see http://roadrunner.swansea.uk.linux.org/v4l.shtml). 00197 00198 - an IEEE1394grabber class, which allows very easy capture of video 00199 frames from any IEEE-1394 (FireWire) digital camera (i.e., web-cam, 00200 as opposed to DV camcorders, which use a different data stream 00201 format). 00202 00203 - various other hardware drivers, such as a Serial port class, a 00204 Serial-Servo-Controller (SSC) class, an alphanumeric LCD display 00205 driver, various pan/tilt camera head drivers with associated 00206 calibration code, a Keyboard driver, AudioGrabber and AudioMixer 00207 abstractions, etc. 00208 00209 - an XWindow class which just opens a window on the screen and can 00210 display Images in it, and is extremely easy to use; and an 00211 XWinManaged class which in addition responds to various mouse and 00212 widget events. 00213 00214 - A ParamMap class for storage/retrieval of various parameters in 00215 config files; and a somewhat overlapping readConfig class which 00216 allows easy reading/parsing/storage of configuration files for your 00217 applications. 00218 00219 - a set of very fast and multithreaded interprocess communication 00220 classes which allow quick transfer of images and other data from one 00221 computer to another over the network; most of these classes 00222 (TCPxxxx.C/.H) will not be of interest to the user, who will mostly 00223 deal with the Beowulf class (sets up interconnections between 00224 different computers on a network) and the TCPmessage class (builds 00225 messages to be passed between machines and can contain various 00226 elements such as images, text strings, etc). 00227 00228 - a very convenient logging facility which provides a set of functions 00229 to be used instead of printf to report debugging messages, 00230 information messages, errors or fatal errors. In addition to 00231 accepting the same syntax as printf, these functions will print the 00232 program name, class name, method name, possible system messages (see 00233 'man perror'), etc. either to standard output or through the 00234 systemwide system logs (see 'man syslog'). 00235 00236 - several other classes, such as a Timer class which can be used to 00237 measure time, a Range class, etc. 00238 00239 00240 <!--############################################################--> 00241 00242 \subsection basic-features 1.3. Basic features of the programming environment 00243 00244 00245 The toolkit makes use of a number of advanced C++ programming 00246 techniques, which are intended to make use of its various components 00247 easier and more flexible to the knowledgeable programmer. While this 00248 brings many advantages described below, one drawback is that some of 00249 the constructs and techniques employed may be unfamiliar to the 00250 inexperienced programmer. If you are only moderately familiar with 00251 C++, we urge you to very carefully read the book "The C++ Programming 00252 Language" (Third Edition or Special Edition), by Bjarne Stroustrup 00253 Addison-Wesley, ISBN 0-201-88954-4 or 0-201-70073-5. See 00254 http://www.research.att.com/~bs/3rd.html for details. 00255 00256 - Full configure process so that the source tree should compile on a 00257 variety of computing environments (see configure.in, configure and 00258 Makefile.in); 00259 00260 - Full test suite to ensure that various pieces of the code continue 00261 to work the same as you implement new functionality (see TestSuite.H 00262 and "make test"); 00263 00264 - Heavy use of C++ template mechanisms, so that many classes are 00265 implemented in a type-generic manner, and may be instantiated for 00266 various data types (e.g., the Image class is parameterized by a 00267 template argument defining the datatype to use for individual 00268 pixels; functions operating on the Image class are written in a 00269 generic manner, with as few assumptions as possible made on what the 00270 pixel datatype may end up being; Image objects may then be created 00271 in your programs that may use pixels of type byte, int, float, 00272 PixRGB<byte>, IntFireNeuron, Jet<byte>, or an open-ended variety of 00273 other datatypes); 00274 00275 - Heavy use of inheritance and class hierarchies. When a model 00276 component is being implemented in several forms, either for 00277 experimentations with several possible approaches, or for re-use of 00278 a generic framework in various specializations, usually we define a 00279 base class to specify the interface (sometimes that base class is 00280 purely virtual), and then a number of derived classes which 00281 implement various behaviors behind that interface. Examples are the 00282 Channel hierarchy, where ChannelBase defines the common interface, 00283 then derived into SingleChannel (contains one ImageSet) and 00284 ComplexChannel (contains a collection of SingleChannel and/or 00285 ComplexChannel objects), and further derived into IntensityChannel, 00286 RedGreenChannel, DirectionChannel, MotionChannel, etc; 00287 00288 - Reference-counted, copy-on-write memory allocation for large objects 00289 such as images (so that various copies of an image share the same 00290 physical memory until one of the copies attempts to modify that 00291 memory, at which point a copy of the memory is first made; see 00292 ArrayData.H and its use in Image.H and TCPmessage.H); 00293 00294 - Automatic type promotion, so that operations among template classes 00295 automatically avoid all overflows (e.g., multiplying an image of 00296 bytes by a float coefficient results in an image of floats; see 00297 Promotions.H); 00298 00299 - Automatic range checking and clamping during demotion of types 00300 (e.g., assigning an image of floats to an image of bytes 00301 transparently converts and clamps all pixel values to the 0..255 00302 range; see Promotions.H); 00303 00304 - Smart reference-counted pointers, so that when the last pointer to 00305 an object is destroyed, memory allocated for the pointee is 00306 automatically freed (see SharedPtr.H); 00307 00308 - Persistent model parameters that may be stored/retrieved to/from 00309 configuration files, or configured via command-line options. A 00310 framework is provided where a run-time selection of various model 00311 components may export at run-time command-line options that will 00312 allow tuning of some of their internal parameters. The mechanism is 00313 pushed to the extreme, so that new model components selected via the 00314 command line may export their set of command-line options while the 00315 command line is being parsed (see ModelParam.H, ModelComponent.H and 00316 ModelManager.H for the general framework, and 00317 VisualCortexConfigurator.H for exporting options while the 00318 command-line is being parsed); 00319 00320 - Atomic operations (see atomic.H); 00321 00322 - Range-checked iterators that may be used in place of normal 00323 iterators, for debugging purposes (see CheckedIterator.H); 00324 00325 - MMX/SSE alternative faster implementations for some of our core 00326 image processing functions (e.g., lowPass3, byte-to-int conversions, 00327 etc; see mmx-sse.H); 00328 00329 - Wrappers to use some of our classes from within Matlab (see, e.g., 00330 mexSaliency.C); 00331 00332 - Use of multi-threading (see, e.g., RadioDecoder.H, TCPcommunicator.H 00333 and others); 00334 00335 - A large collection of test programs that demonstrate the minimal use 00336 of a given class (see test-*.C); 00337 00338 To get started, please see the online documentation at 00339 http://iLab.usc.edu/sdoc/html/ (use the same username/pass as you used 00340 to obtain this code). Make sure you read all of the introductory pages 00341 (links to them are both on the front page and on the side bar, under 00342 "Related pages"). Once you have read those, a good way to get 00343 accustomed to the code base is to browse through the class hierarchy 00344 and click on the name of any highlighted entity you may not be 00345 familiar with. Also, be sure to check the online repository browser, 00346 which will allow you to check the full edit history of every source 00347 file, at 00348 00349 http://ilab.usc.edu/cgi-bin/secure/viewcvs.cgi/trunk/saliency/ 00350 00351 (same username/pass as for the documentation). 00352 00353 Also, a wrapper to "man" is provided and named saliency/bin/mn; once 00354 you have saliency/bin in you path, you can use it just like "man" to 00355 view documentation about a class or file as a man page; for example: 00356 00357 \verbatim 00358 mn lcd 00359 mn FrameGrabber.H 00360 \endverbatim 00361 00362 and so on. The actual man pages reside in saliency/doc/man and are 00363 created when you type "make doc" from within saliency/src/. 00364 00365 00366 <!--############################################################--> 00367 <!--############################################################--> 00368 <!--############################################################--> 00369 00370 \section getting-the-code 2. GETTING THE CODE 00371 00372 00373 <!--############################################################--> 00374 00375 \subsection subversion 2.1. Subversion (SVN) 00376 00377 00378 The easiest way to obtain the latest revision of the source code is 00379 from our Subversion repository. Subversion (abbreviated SVN, homepage 00380 http://subversion.tigris.org) is a version control system designed as 00381 a new-and-improved replacement for CVS. 00382 00383 \note 00384 There is an excellent O'Reilly book about Subversion, 00385 which is available, for free, in its entirety, here: 00386 00387 \par 00388 http://svnbook.red-bean.com/ 00389 00390 \par 00391 (Make sure that you click on links for the latest version of 00392 the book -- currently there are 1.0 and 1.1 versions, and 00393 (obviously) 1.1 is the more recent version). 00394 00395 \par 00396 If you have a question about subversion that isn't answered in 00397 this README, your next source should be the svn book online. 00398 00399 Subversion allows several programmers to simultaneously work on the 00400 same code and that will keep track of all changes made; to achieve 00401 that, the master copy of the source code is maintained in a central 00402 database, and the various programmers download a working copy of the 00403 code to their various machines and home directories. After they have 00404 modified the code and the modifications work, they post their changes 00405 back to the master repository for everyone to enjoy. 00406 00407 You can see the contents of our neuromorphic vision toolkit subversion 00408 repository through a web interface at: 00409 00410 http://ilab.usc.edu/cgi-bin/secure/viewcvs.cgi/trunk/saliency/ 00411 00412 (Be assured that although the URL contains 'viewcvs', you are indeed 00413 looking at a subversion (svn) repository, not a cvs one. The 'viewcvs' 00414 web interface works with both CVS and svn repositories). 00415 00416 This will allow you to see the various revisions, who made them and 00417 when, and to highlight differences between various versions of the 00418 code. You should not use this to download the code; rather follow 00419 these instructions: 00420 00421 00422 <!--############################################################--> 00423 00424 \subsection using-svn 2.2. Using svn 00425 00426 00427 Go to the directory where you want to install the source code. Then 00428 type: 00429 00430 \verbatim 00431 svn checkout svn://ilab.usc.edu/trunk/saliency 00432 \endverbatim 00433 00434 this will download the entire source tree. 00435 00436 You can now start editing the code (see below for the various 00437 subdirectories). Once you have made changes and have tested that 00438 everything compiles fine and works ok, you can check which files you 00439 have modified locally by typing: 00440 00441 \verbatim 00442 svn status 00443 \endverbatim 00444 00445 \note 00446 CVS USERS SEE NOTE BELOW REGARDING 'svn status' and 'svn update' 00447 00448 Once you are satisfied that your changes are ready for the world to 00449 see, you can post them by issuing (from the directory where you have 00450 made changes): 00451 00452 \verbatim 00453 svn commit -m"short message describing what you did" 00454 \endverbatim 00455 00456 If someone else has modified the same source code as you have, svn 00457 will refuse to commit your changes and ask you to first update your 00458 source to the latest subversion repository revision; you do that by 00459 typing: 00460 00461 \verbatim 00462 svn update 00463 \endverbatim 00464 00465 \note 00466 NOTE TO CVS USERS: Unlike in CVS, you should NOT use 'svn 00467 update' to quickly check which files you have modified 00468 locally. Instead you should use 'svn status', and here's why. 00469 00470 \par 00471 In fact CVS has a 'cvs status' command that would give you 00472 information about local changes, but its output is so verbose 00473 that nobody ever uses it; everyone uses 'cvs update' 00474 instead. Of course there are two problems with that: (1) it 00475 might bring in new modifications from the repository, which 00476 you don't necessarily want, and (2) it requires significant 00477 network bandwidth to communicate with the CVS repository and 00478 determine what changes you have made. In svn, the situation is 00479 much nicer. For one thing, the output of 'svn status' is now 00480 compact, just like the output of 'cvs update' was. For another 00481 thing, 'svn status' requires no network traffic -- subversion 00482 keeps pristine copies of the unmodified files tucked away 00483 inside the various .svn directories in your working 00484 copy. Therefore you can do 'svn status' or 'svn diff' to 00485 examine local changes without having to wait for the network, 00486 and without placing undue load on the svn server. </tt> 00487 00488 When you do 'svn update', subversion will try to merge other 00489 people's into your own working copy. Usually this is fully automatic, 00490 unless you have been editing exactly the same lines in a file as 00491 someone else has (you should then talk to that person to figure out 00492 why both of you are editing the same code, since usually different 00493 people will work on different parts of the code!). In this case, 00494 subversion will notify you that there has been a conflict by printing 00495 a 'C' next to the offending file's name during your 'svn 00496 update'. Subversion's approach to conflicts is more user-friendly than 00497 CVS's approach -- in particular, it won't let you commit a file 00498 containing those pesky >>>>>>>> conflict markers by accident. With 00499 subversion, you must explicitly notify svn after you've resolved the 00500 conflict, by using the 'svn resolved' command. 00501 00502 If there has been a conflict, subversion puts three extra files in 00503 your working copy: 00504 00505 \verbatim 00506 filename.mine [contains just your local modifications] 00507 filename.r5000 [the base file against which you made local mods] 00508 filename.r5001 [the latest version on the server] 00509 \endverbatim 00510 00511 where '5000' is the revision against which you had made local 00512 modifications, and '5001' is the latest revision on the server. 00513 00514 You can do one of three things to fix the conflict: 00515 00516 - merge the changes by hand, by editing <filename> and removing the 00517 various conflict markers 00518 00519 - OR, copy one of the three temporary files listed above back on top 00520 of <filename> 00521 00522 - OR, throw away your local changes by doint 'svn revert <filename>' 00523 00524 Once you are done fixing the conflict, you must inform svn of 00525 this by doing 'svn resolved <filename>'. 00526 00527 Then, you can commit any remaining changes in <filename> to the 00528 server with another 'svn commit', BUT... be sure to first run 'svn 00529 diff' on the file in question, to make sure you really know which 00530 changes you have added. 00531 00532 Subversion will safely ignore all files that have not been 00533 explicitly added to the repository; these include your .o files, 00534 editor backups, and so on. So it is not necessary to clean up those 00535 files before doing a 'svn commit'. 00536 00537 In summary, the recommended strategy for smooth interaction with the 00538 source tree is: 00539 00540 - NEVER copy files around (e.g., put them onto another computer), 00541 then edit them, meanwhile do something else in your working svn 00542 tree and do an update once in a while, then some day copy those old 00543 files back into your svn working copy, overwriting the up-to-date 00544 ones. This will break the entire mechanism if someone else has also 00545 edited that file and committed changes (indeed, subversion will 00546 think that you just decided to delete all of this other person's 00547 edits!); 00548 00549 - Instead, if you need to have various copies of the code at various 00550 places, just checkout a copy at each place and work in those 00551 checked-out trees. Once you are done with some edits at one place 00552 (e.g., home) just commit them to the server and when you get to 00553 another place (e.g., work), just update your tree there. Thus, you 00554 are using the central svn server to keep your various copies of the 00555 code in sync and transfer your edits from one place to another; 00556 00557 - Once you have made a bunch of changes that work ("make all" and 00558 "make test" pass, though it is okay if your new code is bogus in 00559 its execution as long as you are the only one using it), do the 00560 following: 00561 - 'svn update' to make sure that you are in sync; 00562 - 'svn status' to show you with an "M" prefix all the files you 00563 have modified. If some files show up there that you did not 00564 think you had modified or did not wish to modify, try 'svn diff 00565 <file>' to see how your copy differs from the server's master 00566 copy. If you realize that these are edits you made while 00567 debugging, but you don't want to commit them, simply do an 'svn 00568 revert <file>' to restore that file to its pristine unmodified 00569 state. 00570 - If you have made a large number of changes, and a single commit 00571 message would not work well, you may wish to commit your 00572 modified files individually or in smaller groups; for example: 00573 \verbatim 00574 svn commit -m"fixed bug with lowPass3()" Image_FilterOps.C 00575 svn commit -m"new compute() function" myStuff.H myStuff.C 00576 \endverbatim 00577 00578 \par 00579 However, note that in subversion, unlike CVS, commits are 00580 atomic -- everything that happens in a single 'svn commit' 00581 command is stored as a single revision in the server, and bumps 00582 the global revision number only once. Therefore, it is 00583 sub-optimal (though not catastrophic) to use more than one 'svn 00584 commit' for a set of changes that really belong together in a 00585 single unit. 00586 00587 \par 00588 And so on. You can do an 'svn status' after each step to 00589 see which files remain to commit. Using this simple behavior, 00590 you will avoid committing changes you did not wish to commit. 00591 00592 00593 <!--############################################################--> 00594 00595 \subsection svn-advanced 2.3. Advanced svn techniques 00596 00597 PLEASE DO NOT USE THE FOLLOWING UNLESS YOU REALLY KNOW WHAT YOU ARE 00598 DOING! 00599 00600 To add a new file to the repository, you need to tell svn by doing: 00601 00602 \verbatim 00603 svn add newfile 00604 \endverbatim 00605 00606 this will schedule the file for addition; it will actually be added 00607 when you next commit. 00608 00609 To remove a file from the repository, do 00610 00611 \verbatim 00612 svn delete file 00613 \endverbatim 00614 00615 and it will be deleted when you next commit. Deleted files aren't 00616 really gone forever; they can still be retrieved by doing an 'svn 00617 checkout' with an older date or revision number. 00618 00619 To add a new subdirectory 00620 00621 \verbatim 00622 svn mkdir newdir 00623 svn commit -m"created newdir" 00624 \endverbatim 00625 00626 To remove a directory: unlike in CVS, this is actually possible in 00627 subversion. It's the same as deleting a file: 00628 00629 \verbatim 00630 svn delete somedir 00631 \endverbatim 00632 00633 To rename a file or directory: this is another thing that was not 00634 possible in CVS, but is trivial in subversion: 00635 00636 \verbatim 00637 svn move name1 name2 00638 \endverbatim 00639 00640 00641 <!--############################################################--> 00642 00643 \subsection about-svn-properties 2.4. About svn properties 00644 00645 00646 \note 00647 The most important thing about this section -- if you 00648 are going to commit code to the subversion repository, you 00649 should modify your ~/.subversion/config file so that the 00650 svn:keywords property gets set automatically on any files that 00651 you add to the repo. See the "svn:keywords" section below. 00652 00653 Subversion allows you to use arbitrarily-named properties to associate 00654 any user-specified content with versioned files (can be text, or other 00655 MIME types... so e.g. it's possible to put images into an svn 00656 property). Changes to properties are versioned just like changes to 00657 file contents. 00658 00659 The main subcommands associated with properties are the following: 00660 00661 \verbatim 00662 svn proplist -v <filename> 00663 svn propset <property-name> <property-value> <filename> 00664 svn propget <property-name> <filename> 00665 svn propedit <property-name> <filename> 00666 svn propdel <property-name> <filename> 00667 \endverbatim 00668 00669 \note 00670 In order to use 'svn propedit', you need to set at least 00671 one of the SVN_EDITOR, VISUAL, or EDITOR environment 00672 variables. If you haven't done that, you'll get an error like 00673 the following: 00674 \verbatim 00675 svn: None of the environment variables SVN_EDITOR, VISUAL or 00676 EDITOR is set, and no 'editor-cmd' run-time configuration 00677 option was found 00678 \endverbatim 00679 \par 00680 To set one of the env vars, just do 00681 \verbatim 00682 export SVN_EDITOR="emacs -nw" (in sh or bash) 00683 00684 or 00685 00686 setenv SVN_EDITOR "emacs -nw" (in csh or tcsh) 00687 \endverbatim 00688 \par 00689 and if you want to make that change permanent, add the line 00690 somewhere in your ~/.bashrc or ~/.cshrc. 00691 00692 For example: 00693 00694 \verbatim 00695 cd /path/to/saliency 00696 svn propedit svn:ignore . (brings up an emacs window for editing the property) 00697 svn proplist -v . 00698 --> Properties on '.': 00699 svn:ignore : Makefile 00700 Makefile.local 00701 TAGS 00702 autom4te-2.5x.cache 00703 autom4te.cache 00704 build 00705 config.log 00706 config.status 00707 depoptions 00708 inst 00709 mexopts.sh 00710 \endverbatim 00711 (The svn:ignore property is equivalent to the old .cvsignore files.) 00712 00713 \verbatim 00714 svn proplist -v src/Image/Image.H 00715 --> Properties on 'src/Image/Image.H': 00716 svn:keywords : Author Date Id Revision 00717 svn:eol-style : native 00718 \endverbatim 00719 00720 \verbatim 00721 svn proplist -v devscripts/extract_templates.tcl 00722 --> Properties on 'devscripts/extract_templates.tcl': 00723 svn:executable : * 00724 svn:keywords : Author Date Id Revision 00725 svn:eol-style : native 00726 \endverbatim 00727 00728 Properties can have any name; for example you could associate 00729 copyright information with a file like this: 00730 00731 \verbatim 00732 svn propset copyright 'Copyright (2005)...' foofile 00733 \endverbatim 00734 00735 But there are also some 'magic' properties that start with the svn: 00736 prefix, and these have a special meaning to svn... 00737 00738 <ul> 00739 00740 00741 <li> svn:ignore -- just like the .cvsignore files. The most common use 00742 for svn:ignore is likely to be when you add a new executable that 00743 will get built in the bin/ directory -- since of course we don't 00744 want to check binary executables in to the svn repository, svn 00745 will show that it doesn't recognize the new executable by 00746 indicating it with a '?' when you run "svn status". Suppose the 00747 new executable is named bin/myprog. Then, initially we have the 00748 following: 00749 \verbatim 00750 $ svn status 00751 ? bin/myprog 00752 \endverbatim 00753 You can avoid that noise by adding myprog to the svn:ignore 00754 property of the bin directory... e.g., 00755 \verbatim 00756 $ svn propedit svn:ignore bin 00757 00758 (brings up an editor window with the list of items in 00759 svn:ignore, just add 'myprog' to that list; if you get an error 00760 message, then see the NOTE above about setting one of the 00761 SVN_IGNORE, VISUAL, or EDITOR environment variables) 00762 00763 $ svn proplist -v bin 00764 Properties on 'bin': 00765 svn:ignore : BeobotLauncher 00766 CINNICanova 00767 CINNICinteract 00768 CINNICstats 00769 CINNICtest 00770 ... 00771 00772 (lists all properties and their current values for bin) 00773 \endverbatim 00774 \verbatim 00775 $ svn status 00776 M bin 00777 00778 (now no longer shows a '?' for myprog, but shows a " M" for bin, 00779 indicating that bin has locally-changed properties) 00780 \endverbatim 00781 \verbatim 00782 $ svn commit -m"Added myprog to svn:ignore for bin." bin 00783 00784 (commits the changed property) 00785 \endverbatim 00786 </li> 00787 00788 <li> svn:keywords -- specifies which RCS keywords get substituted; unlike 00789 CVS, this property defaults to being empty, which means that 00790 people either have to remember to set svn:keywords explicitly e.g. 00791 00792 \verbatim 00793 svn propset svn:keywords "Author Date Id Revision HeadURL" foo.C 00794 \endverbatim 00795 00796 or can add some lines to $HOME/.subversion/config to make 00797 svn:keywords get set automatically anytime you 'svn add' a new 00798 file that has a particular filename extension. 00799 00800 We recommend that developers who plan to contribute code to our 00801 subversion repository add lines similar to the following to the 00802 end of their ~/.subversion/config file: 00803 00804 \verbatim 00805 [miscellany] 00806 enable-auto-props = yes 00807 00808 [auto-props] 00809 *.[cC] = svn:eol-style=native;svn:keywords=Author Date Id Revision HeadURL 00810 *.[hH] = svn:eol-style=native;svn:keywords=Author Date Id Revision HeadURL 00811 *.cc = svn:eol-style=native;svn:keywords=Author Date Id Revision HeadURL 00812 *.cpp = svn:eol-style=native;svn:keywords=Author Date Id Revision HeadURL 00813 *.hh = svn:eol-style=native;svn:keywords=Author Date Id Revision HeadURL 00814 *.hpp = svn:eol-style=native;svn:keywords=Author Date Id Revision HeadURL 00815 *.html = svn:eol-style=native;svn:keywords=Author Date Id Revision HeadURL 00816 *.m = svn:eol-style=native;svn:keywords=Author Date Id Revision HeadURL 00817 *.pl = svn:eol-style=native;svn:executable;svn:keywords=Author Date Id Revision HeadURL 00818 *.py = svn:eol-style=native;svn:executable;svn:keywords=Author Date Id Revision HeadURL 00819 *.sh = svn:eol-style=native;svn:executable;svn:keywords=Author Date Id Revision HeadURL 00820 *.tcl = svn:eol-style=native;svn:executable;svn:keywords=Author Date Id Revision HeadURL 00821 *.txt = svn:eol-style=native;svn:keywords=Author Date Id Revision HeadURL 00822 *.xml = svn:eol-style=native;svn:keywords=Author Date Id Revision HeadURL 00823 *.xsl = svn:eol-style=native;svn:keywords=Author Date Id Revision HeadURL 00824 Makefile* = svn:eol-style=native;svn:keywords=Author Date Id Revision HeadURL 00825 00826 *.gif = svn:mime-type=image/gif 00827 *.jpg = svn:mime-type=image/jpeg 00828 *.png = svn:mime-type=image/png 00829 \endverbatim 00830 </li> 00831 00832 <li> svn:executable -- doesn't matter what the content of this property 00833 is, but if it is present, then svn knows to chmod +x the file when 00834 checking it out 00835 </li> 00836 00837 <li> svn:special -- for now, the only thing this is used for is for 00838 storing symlinks in the svn repo... e.g., 00839 00840 \verbatim 00841 ln -s devscripts scripts 00842 svn add scripts 00843 svn proplist -v scripts 00844 --> Properties on 'scripts': 00845 svn:special : * 00846 svn revert scripts 00847 rm scripts 00848 \endverbatim 00849 </li> 00850 00851 </ul> 00852 00853 00854 <!--############################################################--> 00855 <!--############################################################--> 00856 <!--############################################################--> 00857 00858 \section file-organization 3. FILE ORGANIZATION 00859 00860 00861 The full tree contains the following (you may not get all of this): 00862 00863 \verbatim 00864 00865 README this file 00866 00867 src/ source code (historical note [2005-06-12]: the current src/ 00868 directory was renamed from src3/, which itself was a 00869 descendent of earlier src2/ and src/ directories, all of 00870 which are available from earlier revisions of the 00871 subversion repository) 00872 00873 src/Util/ 00874 src/Image/ 00875 src/Raster/ 00876 src/Component/ 00877 src/agentMinder/ 00878 src/qt/ 00879 as of 2005-06, we are currently undergoing a transition 00880 to split the source code into subdirectories consisting 00881 of logically related modules 00882 00883 notes/ various (mostly obsolete) documentation and research notes; 00884 don't worry too much about it, everything you need is in 00885 the present README; 00886 00887 devscripts/ shell scripts and other resources used in the course of 00888 maintaining the source code repository, see 00889 devscripts/README for more details 00890 00891 doc/ if you do 'make doc', then the resulting output will go 00892 in doc/html, doc/latex, doc/man, doc/rtf 00893 00894 bin/ executables; this is where the results of your compilation will 00895 be; everything that remains there after a 'make clean' 00896 is a shell or perl script that was written to do various 00897 batch processing; 00898 00899 params/ learning parameters for specialization of the system to one 00900 given visual search task (e.g., detecting traffic 00901 signs); 00902 00903 tests/ a test suite consisting of blackbox and whitebox tests 00904 to verify the behavior of different components of our 00905 toolkit; to run, do 'cd tests; ./run_test_suite.tcl' 00906 (takes ~30 seconds on a 2.8GHz Xeon), or do 'cd tests; 00907 ./run_testlong_suite.tcl' (takes ~300 seconds) 00908 00909 matlab/ some Matlab code for the new version of the oriented filters 00910 (under development; to be used in conjunction with 00911 Roberto Manduchi's steerable-scalable filter 00912 optimization code). 00913 00914 \endverbatim 00915 00916 00917 <!--############################################################--> 00918 <!--############################################################--> 00919 <!--############################################################--> 00920 00921 \section compiling 4. COMPILING 00922 00923 00924 <!--############################################################--> 00925 00926 \subsection basic-compilation 4.1. Basic compilation 00927 00928 00929 Use the following steps to build the executables from source: 00930 00931 \verbatim 00932 cd saliency ### switch to the source code's directory 00933 00934 ./configure --help ### to see a list of possible configuration options 00935 00936 ./configure ### run the configure script with optional options 00937 ### e.g. ./configure --prefix=/usr/local 00938 ### or ./configure --enable-mmx --enable-sse 00939 ### or ./configure --enable-mem-debug 00940 00941 make 00942 00943 make test ### optional test if you want to run the test suite 00944 00945 make testlong ### optional more stringent tests, takes long time 00946 \endverbatim 00947 00948 will compile the core executables (see below) and place them in the 00949 bin/ subdirectory of the installation location you chose with the 00950 configure script (default will be saliency/bin/ in your working 00951 saliency directory). You should have zero errors and zero warnings. 00952 00953 \verbatim 00954 make core ### just a few core programs if you get some errors 00955 ### about missing libs when you just type "make". 00956 ### The core programs should not require 00957 ### unusual or exotics libs (like FireWire, etc) 00958 00959 make all ### build everything 00960 \endverbatim 00961 00962 If you run 'make test', be aware that some of the tests unfortunately 00963 rely on the specific way that Intel processors do floating-point 00964 computations; so if you're running on a different processor, you may 00965 see some test failures due to this fact. 00966 00967 There are additional targets for make, which will require some 00968 nonstandard software packages to compile. These include: 00969 00970 \verbatim 00971 make -> only builds the base executables (into saliency/bin/) 00972 make base -> same as above 00973 make core -> builds only core programs that don't need funny libs 00974 make bot -> builds beobot-related executables 00975 make mex -> builds Matlab MEX files 00976 make gtk -> builds GTK-dependent executables 00977 make sdl -> builds SDL-dependent executables 00978 make qt -> builds Qt-dependent executables 00979 make mpeg -> builds MPEG-related executables 00980 make tprogs -> builds test programs 00981 make all -> builds everything except for mex 00982 make xml -> builds all Xerces-C XML library dependent stuff 00983 make doc -> builds the doxygen documentation into ../doc 00984 make doc-latex -> builds the doxygen LaTeX doc into ../doc 00985 \endverbatim 00986 00987 See Makefile.in for the current list of possible targets. 00988 00989 On SMP machines, you may use the provided "mk" script (in 00990 saliency/bin/) to enable parallel compilation. For example (assuming 00991 that saliency/bin/ is in your path), typing: 00992 00993 \verbatim 00994 mk all 00995 \endverbatim 00996 00997 on a dual-CPU machine will make everything, running two jobs in 00998 parallel throughout the build process. On an n-CPU machine it will run 00999 n compilation jobs in parallel. mk passes all its arguments to make, 01000 so it has the same syntax. 01001 01002 01003 <!--############################################################--> 01004 01005 \subsection architecture-issues 4.2. Architecture & Operating System Issues 01006 01007 We use an autoconf-controlled build system (see the \ref autoconf 01008 section below) to detect and handle OS differences, but currently most 01009 things are heavily aimed at Linux, and may not work at all under 01010 different systems (although with the configure script you should at 01011 least expect some message hinting at the reason for the failure). Most 01012 of the code should compile on other Unix architectures, including \ref 01013 macosx-fink "Mac OS X (10.2 or greater)" and the \ref windows-cygwin 01014 "Cygwin environment under Windows". 01015 01016 If you run into problems building the software on a non-Linux system, 01017 you might try the following types of modifications: 01018 01019 - different compiler and linker options 01020 - system functions defined in different include files than those used 01021 (you will then get warnings about standard functions like printf() 01022 or time() being used but not declared; the man page for the 01023 corresponding function should tell you which include file to use if 01024 it is well written as it is under Linux, otherwise, you can try to 01025 locate the include file yourself using the 'find' unix command; for 01026 example "find /usr/include -name time.h -print") 01027 01028 If you are able to tweak things to get the software to build under a 01029 new system, please consider moving those tweaks into the configure.ac 01030 template script and contributing your changes back to our subversion 01031 repository, so that others with similar systems can benefit from your 01032 changes. 01033 01034 <!--############################################################--> 01035 01036 \subsubsection linux-build 4.2.1 Building under Linux 01037 01038 The operating system principally used for development of the iLab 01039 Neuromorphic Vision C++ Toolkit is Mandriva Linux. 01040 01041 Under Mandriva, make sure that you setup the following media sources: 01042 01043 - main 01044 - main_updates 01045 - contrib 01046 - contrib_updates 01047 - non-free 01048 - non-free-updates 01049 - plf-free 01050 - plf-nonfree 01051 01052 Then you can use the uprmi system to download and install additional 01053 packages and their dependencies automatically. 01054 01055 As of Mandriva 2009.1, the following packages should be installed (for 01056 a 64-bit distribution, you can easily guess the corresponding names 01057 for 32-bit): 01058 01059 \verbatim 01060 urpmi emacs 01061 urpmi tcl-devel 01062 urpmi tk-devel 01063 urpmi popt-devel 01064 urpmi bzip2-devel 01065 urpmi ffmpeg-devel 01066 urpmi fftw-devel 01067 urpmi gsl-devel 01068 urpmi blas-devel 01069 urpmi lapack-devel 01070 urpmi avc1394-devel 01071 01072 # pick one, as they conflict... 01073 urpmi dc1394-devel 01074 urpmi lib64dc1394_22-devel 01075 01076 urpmi raw1394-utils 01077 urpmi SDL-devel 01078 urpmi SDL_gfx-devel 01079 urpmi SDL_mixer-devel 01080 urpmi SDL_image-devel 01081 urpmi openmpi 01082 urpmi gd-devel 01083 urpmi readline-devel 01084 urpmi termcap-devel 01085 urpmi qwt-devel 01086 urpmi ode-devel 01087 urpmi cwiimote-devel 01088 urpmi bluez-devel 01089 urpmi qt3-devel 01090 01091 urpmi opencv-devel 01092 01093 # and don't forget the essentials: 01094 urpmi xv 01095 urpmi mencoder 01096 urpmi mplayer 01097 urpmi zsh 01098 01099 # needed for ice 3.3.0 (in http://ilab.usc.edu/packages/forall/current/) 01100 urpmi db4.6 01101 urpmi lib64dbcxx4.6 01102 urpmi openssl (should be installed already) 01103 urpmi expat (should be installed already) 01104 rpm -Uvh ice-3.3.0-1.rhel5.noarch.rpm 01105 # In the command below, first run it without the --nodeps and make 01106 # sure you only get complaints about libcrypto, libssl and libdb, 01107 # all of which should be installed already, then 01108 rpm -Uvh --nodeps ice-c++-devel-3.3.0-1.rhel5.x86_64.rpm 01109 ice-libs-3.3.0-1.rhel5.x86_64.rpm 01110 ice-servers-3.3.0-1.rhel5.x86_64.rpm 01111 ice-utils-3.3.0-1.rhel5.x86_64.rpm 01112 \endverbatim 01113 01114 Some packages do not have readily available RPMs for Mandriva. Look in 01115 saliency/packages for .spec files to make these RPMs for your system 01116 yourself. 01117 01118 <!--############################################################--> 01119 01120 \subsubsection macosx-fink 4.2.2 Building under Mac OS X 01121 01122 In order to get the most use out of the toolkit under Mac OS X, you 01123 will need to do two things: 01124 01125 - make sure you have installed the Mac OS X Developer Tools (also 01126 known as the Xcode from 10.3 onward), which you can install either 01127 from a separate Developer Tools CD that may have accompanied your 01128 shrinkwrapped copy of Mac OS X, or which you can download and 01129 install from Apple's web site (follow links from 01130 http://developer.apple.com/) 01131 01132 - install Fink (http://fink.sourceforge.net/), which is essentially a 01133 packaging system for ports of common unix/linux utilities to Mac OS 01134 X. With Fink you will be able to download and install many of the 01135 3rd-party libraries that provide additional functionality for the 01136 programs in the iLab Neuromorphic Vision Toolkit. See 01137 http://fink.sourceforge.net/download/ for a "Quick Start" tutorial 01138 on Fink -- in particular, see the section on X11; you'll need to 01139 have either Apple's or Fink's X11 installed. 01140 01141 Here is an example of packages which I installed on a Leopard macbook, 01142 at svn revision 11488 of our code, using manual "fink install" 01143 commands (I said yes to install all dependencies when asked): 01144 01145 \verbatim 01146 gcc42 01147 sdl sdl-image sdl-mixer 01148 libpng3 01149 libjpeg 01150 popt 01151 qt3 qt3-designer 01152 gsl 01153 ffmpeg 01154 \endverbatim 01155 01156 then, if you allow yourself to install unstable fink packages from 01157 source, you can also get things like fftw3, a recent gcc compiler, etc 01158 01159 To list all installed Fink packages, do "fink list" from a terminal 01160 command line -- installed packages will be shown with a "i" at the 01161 beginning of the line. To give you some guidance in selecting packages 01162 for installation, one of our Mac OS X (10.3) systems has the following 01163 packages installed, and is able to build most of the programs in the 01164 toolkit: 01165 01166 \verbatim 01167 anacron 2.3-4 Periodic command scheduler 01168 apr-ssl-shlibs 0.9.5-15 Apache Portable Runtime 01169 apt 0.5.4-37 Advanced front-end for dpkg 01170 apt-shlibs 0.5.4-37 Advanced front-end for dpkg 01171 arts 1.1.4-22 KDE - analog realtime synthesizer 01172 arts-shlibs 1.1.4-22 KDE - arts shared libraries 01173 audiofile 0.2.6-10 Audio File Library *Developement Files* 01174 audiofile-bin 0.2.6-10 Audio File Library *Binaries* 01175 audiofile-shlibs 0.2.6-10 Audio File Library *Shared Libraries* 01176 base-files 1.9.2-1 Directory infrastructure 01177 bzip2 1.0.2-12 Block-sorting file compressor 01178 bzip2-dev 1.0.2-12 Developer files for bzip2 package 01179 bzip2-shlibs 1.0.2-12 Shared libraries for bzip2 package 01180 cctools 525-1 [virtual package representing the developer tools] 01181 cctools-extra 1:495-3 Extra software from cctools 01182 cctools-single-module 1.0-1 [virtual package, your dev tools support -single_module] 01183 ctan-other-misc 1.0-1 LaTeX macros from CTAN contrib/other/misc directory 01184 cvs 1.11.17-1 Version control system 01185 cyrus-sasl2-shlibs 2.1.15-23 Cyrus Simple Authentication and Security Layer Library 01186 daemonic 20010902-2 Interface to daemon init scripts 01187 darwin 7.9.0-1 [virtual package representing the kernel] 01188 db42-ssl-shlibs 4.2.52-12 Shared Libraries for db42-ssl 01189 debianutils 1.23-11 Misc. utilities specific to Debian (and Fink) 01190 detex 2.7-2 Filter to strip TeX commands from a .tex file 01191 diffutils 2.8.1-1 Tools to compare files 01192 dosunix 1.0.13-1 Converts DOS text files to unix text format 01193 dpkg 1.10.21-202 The Debian package manager 01194 emacs21 21.2-26 Flexible real-time text editor, v21.2 with X11 support 01195 emacsen-common 1.4.13-2 Common facilities for all emacsen 01196 esound 0.2.32-4 Enlightened Sound Daemon 01197 esound-bin 0.2.32-4 Enlightened Sound Daemon 01198 esound-common 0.2.32-4 Enlightened Sound Daemon 01199 esound-shlibs 0.2.32-4 Enlightened Sound Daemon 01200 expat-shlibs 1.95.7-1 C library for parsing XML 01201 file 3.41-1 Determine file type (magic) 01202 fileutils 4.1-4 Common shell commands like ls, touch, chmod 01203 fink 0.21.3-1 The Fink package manager 01204 fink-mirrors 0.21.1.1-1 Mirror infrastructure 01205 fink-prebinding 0.7.1-2 Tools for enabling prebinding in Fink 01206 gawk 3.1.2-12 The Awk processing language, GNU edition 01207 gcc2 2.95.2-1 [virtual package representing the gcc 2.95.2 compiler] 01208 gcc2.95 2.95.2-1 [virtual package representing the gcc 2.95.2 compiler] 01209 gcc3.1 3.1-1 [virtual package representing the gcc 3.1 compiler] 01210 gcc3.3 3.3-1 [virtual package representing the gcc 3.3 compiler] 01211 gdbm3-shlibs 1.8.3-1 Shared libraries for gdbm3 package 01212 gettext 0.10.40-18 Message localization support 01213 gettext-bin 0.10.40-18 Executables for gettext package 01214 gettext-dev 0.10.40-18 Developer files for gettext package 01215 ghostscript 8.00-3 Interpreter for PostScript and PDF 01216 ghostscript-fonts 6.0-3 Standard fonts for Ghostscript 01217 gimp-print-shlibs 4.2.5-1 [virtual package representing Apple's install of Gimp Print] 01218 glib 1.2.10-18 Common C routines used by Gtk+ and other libs 01219 glib-shlibs 1.2.10-18 Common C routines used by Gtk+ and other libs 01220 glib2-shlibs 2.2.3-2 GTK+ - low-level core libraries 01221 gmp-shlibs 4.1.2-11 Shared libraries for gmp package 01222 gnupg 1.2.4-1 Gnu privacy guard - A Free PGP replacement 01223 grep 2.4.2-3 Search text files for patterns 01224 gtk+ 1.2.10-27 The Gimp Toolkit 01225 gtk+-data 1.2.10-27 The Gimp Toolkit 01226 gtk+-shlibs 1.2.10-27 The Gimp Toolkit 01227 gzip 1.2.4a-6 The gzip file compressor 01228 ifmslide 0.45-4 Powerful presentations with PDFLaTeX and LaTeX 01229 imagemagick 5.5.1-23 Image manipulation tools 01230 kdebase3-ssl 3.1.4-21 KDE - base system 01231 kdebase3-ssl-shlibs 3.1.4-21 KDE - base shared libraries 01232 kdegames3-base 3.1.4-21 KDE - kdegames base package 01233 kdegames3-common 3.1.4-21 KDE - game shared libraries 01234 kdelibs3-ssl 3.1.4-22 KDE - essential libraries 01235 kdelibs3-ssl-shlibs 3.1.4-22 KDE - essential shared libraries 01236 kshisen 3.1.4-21 KDE - Shisen-So - a Mah Jong-like game 01237 latex2html 2002-2-1-1 Converts LaTeX documents to HTML 01238 lcms-shlibs 1.12-1 Free color management engine in 100K 01239 less 381-10 Featureful text pager 01240 lesstif-shlibs 1:0.93.18-1 Free implementation of OSF/Motif 01241 libart2-shlibs 2.3.16-2 Library for high-performance 2D graphics 01242 libiconv 1.9.1-11 Character set conversion library 01243 libiconv-bin 1.9.1-11 Executables for libiconv package 01244 libiconv-dev 1.9.1-11 Developer files for libiconv package 01245 libjpeg 6b-16 JPEG image format handling library 01246 libjpeg-bin 6b-16 Executables for libjpeg package 01247 libjpeg-shlibs 6b-16 Shared libraries for libjpeg package 01248 libmad-shlibs 0.15.0b-2 MPEG audio decoder library 01249 libogg-shlibs 1.1-1 Ogg bitstream shared libraries 01250 libpng3 1:1.2.5-2 PNG image format handling library 01251 libpng3-shlibs 1:1.2.5-2 Shared libraries for libpng3 package 01252 libtiff 3.6.1-1 TIFF image format library and tools 01253 libtiff-bin 3.6.1-1 Executables for libtiff package 01254 libtiff-shlibs 3.6.1-1 Shared libraries for libtiff package 01255 libvorbis0-shlibs 1.0.1-1 Vorbis audio codec shared libraries 01256 libwww-bin 5.3.2-4 General-purpose Web API written in C for Unix and Windows 01257 libwww-shlibs 5.3.2-4 General-purpose Web API written in C for Unix and Windows 01258 libxml2-bin 2.6.7-2 XML parsing library, version 2 01259 libxml2-shlibs 2.6.7-2 XML parsing library, version 2 01260 libxslt-shlibs 1.1.4-3 XML stylsheet transformation shared libraries 01261 m4 1.4-6 Advanced macro processing language 01262 macosx 10.3.9-1 [virtual package representing the system] 01263 make 3.79.1-3 Software build tool 01264 ncurses 5.3-20031018-2 Full-screen ascii drawing library 01265 ncurses-dev 5.3-20031018-2 Development files for ncurses package 01266 ncurses-shlibs 5.3-20031018-2 Shared libraries for ncurses package 01267 neon24-ssl-shlibs 0.24.7-11 HTTP/WebDAV client library with a C API 01268 netpbm-bin 10.12-3 Graphics manipulation programs and libraries 01269 netpbm10 10.12-3 Graphics manipulation programs and libraries 01270 netpbm10-shlibs 10.12-3 Graphics manipulation programs and libraries 01271 nget 0.23-2 Downloader for binary news postings 01272 openldap-ssl-shlibs 2.1.22-25 Shared libraries for LDAP 01273 openslp-ssl-shlibs 1.0.9a-4 Shared Libraries for OpenSLP + SSL Support 01274 openssh 3.7.1p1-1 Secure shell (remote login) client and server 01275 openssl 0.9.6m-11 Secure Sockets Layer and general crypto library 01276 openssl-shlibs 0.9.6m-11 Secure Sockets Layer and general crypto library 01277 openssl097-shlibs 0.9.7d-1 Secure Sockets Layer and general crypto library 01278 patch 2.5.4-2 Utility to apply patches to source trees 01279 pcre-shlibs 4.2-2 Perl Compatible Regular Expressions Library 01280 pdfscreen 1.5-6 Resize LaTeX-produced pdf to fit on computer screen 01281 popt 1.7-3 Library for parsing command line options 01282 popt-shlibs 1.7-3 Library for parsing command line options 01283 ppower4 0.9.4-1 Post-processor for PDF presentations created by pdf(La)TeX 01284 python23 1:2.3.3-23 Interpreted, object-oriented language 01285 python23-shlibs 1:2.3.3-23 Interpreted, object-oriented language 01286 python23-socket 1:2.3.3-23 Socket plugin for python 01287 python23-socket-ssl 1:2.3.3-23 Socket plugin for python (SSL version) 01288 qt3 3.2.2-12 Cross-Platform GUI application framework 01289 qt3-designer 3.2.2-12 Cross-Platform GUI application framework 01290 qt3-doc 3.2.2-12 Cross-Platform GUI application framework 01291 qt3-linguist 3.2.2-12 Cross-Platform GUI application framework 01292 qt3-shlibs 3.2.2-12 Cross-Platform GUI application framework 01293 readline 4.3-25 Comfortable terminal input library 01294 readline-shlibs 4.3-25 Comfortable terminal input library 01295 rsync 2.5.5-1 Synchronize filesystems between hosts 01296 sdl 1.2.7-1 Cross-platform multimedia library 01297 sdl-image 1.2.3-1 SDL image file loading library 01298 sdl-image-shlibs 1.2.3-1 SDL image file loading library 01299 sdl-mixer 1.2.5-12 SDL multi-channel audio mixer library 01300 sdl-mixer-shlibs 1.2.5-12 SDL multi-channel audio mixer library 01301 sdl-shlibs 1.2.7-1 Cross-platform multimedia library 01302 sed 4.0.5-1 The stream editor, GNU version 01303 smpeg-shlibs 0.4.4-25 SDL MPEG Player Library 01304 storable-pm 1.0.14-7 Placeholder for versioned Storable packages 01305 swig-shlibs 1.3.20-11 Tool that connects C, C++ programs with high-level languages 01306 system-java 1.4.2-1 [virtual package representing Java 1.4.2] 01307 system-java13 1.3.1-1 [virtual package representing Java 1.3.1] 01308 system-java13-dev 1.3.1-1 [virtual package representing Java 1.3.1 development headers] 01309 system-java14 1.4.2-1 [virtual package representing Java 1.4.2] 01310 system-java14-dev 1.4.2-1 [virtual package representing Java 1.4.2 development headers] 01311 system-perl 5.8.1-1 [virtual package representing perl] 01312 system-xfree86 2:4.3-2 [placeholder for user installed x11] 01313 system-xfree86-dev 2:4.3-2 [placeholder for user installed x11 development tools] 01314 system-xfree86-shlibs 2:4.3-2 [placeholder for user installed x11 shared libraries] 01315 t1lib1-shlibs 1.3.1-2 Shared libs for generating Type 1 Font bitmaps 01316 tar 1.13.25-12 GNU tar - tape archiver 01317 tcltk 8.4.1-12 Tool Command Language and the Tk toolkit 01318 tcltk-dev 8.4.1-12 Tool Command Language and the Tk toolkit 01319 tcltk-shlibs 8.4.1-12 Tool Command Language and the Tk toolkit 01320 tetex 2.0.2-36 Complete distribution of the TeX typesetting system 01321 tetex-base 2.0.2-36 Base programs for a teTeX installation 01322 tetex-shlibs 2.0.2-36 Shared libraries for a teTeX installation 01323 tetex-texmf 2.0.2-2 Main texmf tree for a teTeX installation 01324 tex4ht 20030412-10 TeX to Hypertext translator 01325 texinfo 4.7-11 Texinfo documentation system 01326 texpower 0.0.8h-1 Creating dynamic online presentations with LaTeX 01327 type1inst 0.6.1-3 Type 1 PostScript font installation utility 01328 unrar 3.3.5-21 RAR archive decoder 01329 unzip 5.50-14 Decompression compatible with pkunzip 01330 wget 1.8.2-2 Automatic web site retreiver 01331 xfontpath 0.4-12 X font path manager for fink 01332 \endverbatim 01333 01334 Once you have the Xcode/Developer Tools and Fink installed, you can 01335 build the toolkit from a terminal window 01336 (/Applications/Utilities/Terminal.app) using the standard ./configure 01337 and make sequence shown in \ref basic-compilation. 01338 01339 <!--############################################################--> 01340 01341 \subsubsection windows-cygwin 4.2.3 Building under Windows in the Cygwin environment 01342 01343 In order to build the toolkit under Windows, you will need to install 01344 a Cygwin environment (http://www.cygwin.com/), which provides a 01345 unix-style development environment. 01346 01347 To install cygwin, essentially you need to download the program 01348 setup.exe from http://www.cygwin.com/, then run the setup.exe program 01349 which will guide you through selecting a set of packages to 01350 install. You can always go back and re-run setup.exe if you find you 01351 need to install additional packages later on, or if you want to 01352 upgrade your packages to the latest version. 01353 01354 To list all installed packages, do "cygcheck -c -d" from a cygwin bash 01355 shell. To give you some guidance in selecting packages for 01356 installation, one of our Windows systems has the following packages 01357 installed, and is able to build most of the programs in the toolkit: 01358 01359 \verbatim 01360 _update-info-dir 00349-1 01361 agetty 2.1-1 01362 alternatives 1.3.20a-2 01363 apache 1.3.33-2 01364 apr 0.9.7-1 01365 apr-util 0.9.7-1 01366 ash 20040127-3 01367 astyle 1.15.3-3 01368 atk 1.9.1-1 01369 atk-devel 1.9.1-1 01370 atk-doc 1.9.1-1 01371 atk-runtime 1.9.1-1 01372 autoconf 2.59-2 01373 autoconf-devel 2.59-2 01374 autoconf-stable 2.13-6 01375 autoconf2.1 2.13-1 01376 autoconf2.5 2.59-2 01377 automake 1.7.9-2 01378 automake-devel 1.9.2-2 01379 automake-stable 1.4p6-3 01380 automake1.4 1.4p6-2 01381 automake1.9 1.9.6-1 01382 autossh 1.3-2 01383 base-files 3.7-1 01384 base-passwd 2.2-1 01385 bash 3.0-14 01386 bc 1.06-2 01387 binutils 20050610-1 01388 bison 20030307-1 01389 byacc 1.9-1 01390 bzip2 1.0.3-1 01391 c-client 2002e-3 01392 c3270 3.2.20-1 01393 cabextract 1.1-1 01394 ccache 2.2-1 01395 ccdoc 0.8.41-2 01396 ccrypt 1.7-1 01397 check 0.9.1-1 01398 chere 0.6-3 01399 chkconfig 1.2.24h-1 01400 clamav 0.87.1-1 01401 clear 1.0-2 01402 clisp 2.38-1 01403 cmake 2.2.3-2 01404 cocom 0.995-1 01405 compface 1.5.2-1 01406 coreutils 5.93-3 01407 cpio 2.6-5 01408 cppunit 1.9.14-1 01409 cron 3.0.1-19 01410 crypt 1.1-1 01411 ctags 5.5-4 01412 curl 7.15.1-1 01413 curl-devel 7.15.1-1 01414 cvs 1.11.17-1 01415 cygipc 2.03-2 01416 cygrunsrv 1.12-1 01417 cygutils 1.2.9-1 01418 cygwin 1.5.19-4 01419 cygwin-doc 1.4-3 01420 cyrus-sasl 2.1.19-3 01421 d 1.2.0-1 01422 ddd 3.3.9-1 01423 dejagnu 20021217-2 01424 desktop-file-utils 0.10-1 01425 diffstat 1.40-1 01426 diffutils 2.8.7-1 01427 distcc 2.18.3-1 01428 doxygen 1.4.6-1 01429 dpkg 1.10.4-2 01430 e2fsimage 0.2.0-2 01431 e2fsprogs 1.35-3 01432 ed 0.2-1 01433 editrights 1.01-1 01434 ELFIO 1.0.2-1 01435 emacs 21.2-13 01436 emacs-el 21.2-13 01437 emacs-X11 21.2-13 01438 esound 0.2.36-1 01439 expat 1.95.8-1 01440 expect 20030128-1 01441 fftw3 3.0.1-2 01442 fftw3-dev 3.0.1-2 01443 fftw3-doc 3.0.1-2 01444 file 4.16-1 01445 fileutils 4.1-3 01446 findutils 4.2.27-1 01447 flex 2.5.4a-3 01448 fltk 1.1.4-2 01449 fontconfig 2.2.2-1 01450 freeglut 2.2.0-1 01451 freetype2 2.1.9-1 01452 gawk 3.1.5-2 01453 gcc 3.4.4-1 01454 gcc-ada 3.4.4-1 01455 gcc-core 3.4.4-1 01456 gcc-g++ 3.4.4-1 01457 gcc-g77 3.4.4-1 01458 gcc-gdc 3.4.4-1 01459 gcc-gpc 3.3.3-3 01460 gcc-java 3.4.4-1 01461 gcc-mingw 20040810-1 01462 gcc-mingw-ada 20050522-1 01463 gcc-mingw-core 20050522-1 01464 gcc-mingw-g++ 20050522-1 01465 gcc-mingw-g77 20050522-1 01466 gcc-mingw-gdc 20050522-1 01467 gcc-mingw-gpc 20040810-1 01468 gcc-mingw-java 20050522-1 01469 gcc-mingw-objc 20050522-1 01470 gcc-objc 3.4.4-1 01471 gdb 20041228-3 01472 gdbm 1.8.3-7 01473 gettext 0.14.5-1 01474 gettext-devel 0.14.5-1 01475 ghostscript 8.15-2 01476 ghostscript-base 8.15-2 01477 ghostscript-x11 8.15-2 01478 glib 1.2.10-3 01479 glib-devel 1.2.10-3 01480 glib2 2.6.6-2 01481 glib2-devel 2.6.6-2 01482 glib2-runtime 2.6.6-2 01483 gmp 4.1.4-2 01484 gnome-common 2.12.0-1 01485 gnome-keyring 0.4.6-1 01486 gnome-mime-data 2.4.2-1 01487 gnupg 1.4.1-1 01488 gperf 2.7.2-1 01489 grep 2.5.1a-2 01490 groff 1.18.1-2 01491 gtk+-devel 1.2.10-2 01492 gtk-doc 1.3-1 01493 gtk2-x11 2.6.10-1 01494 gtk2-x11-devel 2.6.10-1 01495 gtk2-x11-doc 2.6.10-1 01496 gtk2-x11-runtime 2.6.10-1 01497 guile 1.6.7-4 01498 guile-devel 1.6.7-4 01499 guile-doc 1.6.7-4 01500 gzip 1.3.5-1 01501 help2man 1.35.1-1 01502 indent 2.2.9-1 01503 inetutils 1.3.2-35 01504 initscripts 0.9-1 01505 intltool 0.33-1 01506 ioperm 0.4-1 01507 irc 20010101-3 01508 jasper 1.701.0-1 01509 jbigkit 1.5-3 01510 jpeg 6b-11 01511 keychain 2.5.3.1-1 01512 lablgtk2 2.4.0-2 01513 lcms 1.14-1 01514 less 381-1 01515 lesstif 0.93.94-2 01516 lftp 2.6.10-2 01517 libapr0 0.9.7-1 01518 libaprutil0 0.9.7-1 01519 libart_lgpl 1.4.2-3 01520 libart_lgpl2 2.3.17-1 01521 libaudiofile-devel 0.2.6-2 01522 libaudiofile0 0.2.6-2 01523 libbonobo2 2.10.1-1 01524 libbonobo2-devel 2.10.1-1 01525 libbonobo20 2.10.1-1 01526 libbz2_1 1.0.3-1 01527 libcharset1 1.9.2-2 01528 libcroco06 0.6.0-1 01529 libcurl3 7.15.1-1 01530 libdb4.1 4.1.25-1 01531 libdb4.2 4.2.52-1 01532 libdb4.3 4.3.28-1 01533 libesound-devel 0.2.36-1 01534 libesound0 0.2.36-1 01535 libfontconfig-devel 2.2.2-1 01536 libfontconfig1 2.2.2-1 01537 libfpx 1.2.0.12-1 01538 libfreetype2-devel 2.1.9-1 01539 libfreetype26 2.1.9-1 01540 libgcrypt 1.2.1-1 01541 libgdbm 1.8.0-5 01542 libgdbm-devel 1.8.3-7 01543 libgdbm3 1.8.3-3 01544 libgdbm4 1.8.3-7 01545 libgettextpo0 0.14.5-1 01546 libglade2 2.5.1-1 01547 libgnomecanvas2 2.10.2-1 01548 libgpg-error 1.1-1 01549 libGraphicsMagick-devel 1.0.6-1 01550 libGraphicsMagick0 1.0.6-1 01551 libguile12 1.6.7-4 01552 libguile16 1.7.1.20041006-1 01553 libiconv 1.9.2-2 01554 libiconv2 1.9.2-2 01555 libIDL 0.5.17-2 01556 libIDL2 0.8.6-1 01557 libintl 0.10.38-3 01558 libintl1 0.10.40-1 01559 libintl2 0.12.1-3 01560 libintl3 0.14.5-1 01561 libjpeg62 6b-11 01562 libjpeg6b 6b-8 01563 libkpathsea3 2.0.2-15 01564 libkpathsea4 3.0.0-3 01565 libltdl3 1.5.20-2 01566 libltdl6 1.9f_20041024-1 01567 libMagick-devel 6.0.4-1 01568 libMagick6 6.0.4-1 01569 libncurses-devel 5.4-4 01570 libncurses5 5.2-1 01571 libncurses6 5.2-8 01572 libncurses7 5.3-4 01573 libncurses8 5.4-4 01574 libneon24 0.24.7-2 01575 libneon25 0.25.5-1 01576 libnetpbm10 10.30-1 01577 libopenldap2 2.1.25-1 01578 libopenldap2_2_7 2.2.26-2 01579 libpcre 4.1-2 01580 libpcre0 6.3-1 01581 libpng 1.2.8-2 01582 libpng12 1.2.8-2 01583 libpng12-devel 1.2.8-2 01584 libpopt0 1.6.4-4 01585 libreadline4 4.1-2 01586 libreadline5 4.3-5 01587 libreadline6 5.1-1 01588 libsasl2 2.1.19-3 01589 libsasl2-devel 2.1.19-3 01590 libsmi 0.4.2-1 01591 libtiff-devel 3.7.3-1 01592 libtiff4 3.6.0-5 01593 libtiff5 3.7.3-1 01594 libtool 1.5b-2 01595 libtool-devel 1.5.10-2 01596 libtool-stable 1.4.3-3 01597 libtool1.5 1.5.20-2 01598 libungif 4.1.4-1 01599 libungif4 4.1.4-1 01600 libwnck 2.8.1-1 01601 libXft 2.1.6-1 01602 libXft-devel 2.1.6-1 01603 libXft1 1.0.0-1 01604 libXft2 2.1.6-1 01605 libxml2 2.6.22-1 01606 libxml2-devel 2.6.22-1 01607 libxml2-python 2.6.22-1 01608 libxslt 1.1.15-2 01609 lighttpd 1.4.9-1 01610 login 1.9-7 01611 m4 1.4.4-1 01612 make 3.80-1 01613 man 1.5p-1 01614 mc 4.6.1-2 01615 mingw-runtime 3.9-2 01616 minires 1.00-1 01617 minires-devel 1.00-1 01618 mktemp 1.5-3 01619 more 2.11o-2 01620 mt 2.3.1-1 01621 naim 0.11.8.1-1 01622 nano 1.2.2-1 01623 nasm 0.98.39-1 01624 ncftp 3.1.7-1 01625 ncurses 5.4-4 01626 nedit 5.5-1 01627 neon 0.25.5-1 01628 netcat 1.10-2 01629 netpbm 10.30-1 01630 ocaml 3.08.1-1 01631 openjade 1.3.3-1 01632 openldap 2.2.26-2 01633 openldap-devel 2.2.26-2 01634 OpenSP 1.5.1-1 01635 openssh 4.2p1-1 01636 openssl 0.9.8a-1 01637 openssl-devel 0.9.8a-1 01638 openssl097 0.9.7i-1 01639 ORBit2 2.12.3-1 01640 ORBit2-devel 2.12.3-1 01641 pango 1.8.1-1 01642 pango-devel 1.8.1-1 01643 pango-doc 1.8.1-1 01644 pango-runtime 1.8.1-1 01645 patch 2.5.8-8 01646 patchutils 0.2.31-1 01647 pcre 6.3-1 01648 pcre-devel 6.3-1 01649 pcre-doc 6.3-1 01650 pdksh 5.2.14-3 01651 perl 5.8.7-5 01652 perl-libwin32 0.26-1 01653 ping 1.0-1 01654 pkgconfig 0.17.2-2 01655 popt 1.6.4-4 01656 postgresql 8.0.4-1 01657 pr3270 3.2.20-1 01658 procps 3.2.5-1 01659 proftpd 1.2.10-1 01660 python 2.4.1-1 01661 qt3 3.3.4-2 01662 qt3-bin 3.3.4-2 01663 qt3-devel 3.3.4-2 01664 qt3-doc 3.3.4-2 01665 rcs 5.7-3 01666 readline 5.1-1 01667 rebase 2.4.2-1 01668 rpm 4.1-2 01669 rpm-build 4.1-1 01670 rpm-doc 4.1-1 01671 rsync 2.6.6-1 01672 ruby 1.8.4-1 01673 run 1.1.6-1 01674 rxvt 2.7.10-6 01675 s3270 3.2.20-1 01676 sed 4.1.4-1 01677 setsid 0.0-3 01678 sh-utils 2.0.15-5 01679 shared-mime-info 0.16-1 01680 sharutils 4.5.3-1 01681 shutdown 1.7-1 01682 splint 3.1.1-1 01683 startup-notification 0.8-1 01684 stunnel 4.14-2 01685 subversion 1.2.3-1 01686 subversion-devel 1.2.3-1 01687 suite3270 3.2.20-1 01688 SWI-Prolog 5.2.6-1 01689 swig 1.3.25-1 01690 sysvinit 2.84-4 01691 t1lib 5.1.0-1 01692 tar 1.15.1-3 01693 tcl3270 3.2.20-1 01694 tcltk 20030901-1 01695 tcm 2.20-1 01696 tcp_wrappers 7.6-1 01697 tcsh 6.14.00-5 01698 termcap 20050421-1 01699 terminfo 5.4_20041009-1 01700 tetex-base 3.0.0-3 01701 tetex-bin 3.0.0-3 01702 tetex-devel 3.0.0-3 01703 tetex-extra 3.0.0-3 01704 texinfo 4.8-1 01705 TeXmacs 1.0.6-1 01706 textutils 2.0.21-2 01707 time 1.7-1 01708 tin 1.8.0-1 01709 transfig 3.2.4-2 01710 ttcp 19980512-1 01711 tzcode 2005r-2 01712 unison 2.10.2-4 01713 units 1.77-1 01714 unzip 5.50-5 01715 upx 1.24-1 01716 uw-imap 2002e-3 01717 vim 6.4-4 01718 w32api 3.6-1 01719 which 1.7-1 01720 whois 4.7.11-1 01721 WordNet 2.0-1 01722 X-startup-scripts 1.0.11-1 01723 x3270 3.2.20-1 01724 Xaw3d 1.5D-5 01725 xemacs 21.4.18-2 01726 xemacs-emacs-common 21.4.18-2 01727 xemacs-mule-sumo 2005-12-08-1 01728 xemacs-sumo 2005-12-08-1 01729 xemacs-tags 21.4.18-2 01730 xerces-c-devel 2.5.0-1 01731 XFree86-lib-compat 4.3.0-2 01732 xinetd 2.3.9-1 01733 xorg-x11-base 6.8.2.0-1 01734 xorg-x11-bin 6.8.2.0-1 01735 xorg-x11-bin-dlls 6.8.2.0-1 01736 xorg-x11-bin-lndir 6.8.2.0-1 01737 xorg-x11-devel 6.8.2.0-2 01738 xorg-x11-etc 6.8.2.0-1 01739 xorg-x11-f100 6.8.1.0-3 01740 xorg-x11-fenc 6.8.1.0-2 01741 xorg-x11-fnts 6.8.1.0-3 01742 xorg-x11-fscl 6.8.1.0-2 01743 xorg-x11-fsrv 6.8.2.0-1 01744 xorg-x11-libs-data 6.8.2.0-1 01745 xorg-x11-man-pages 6.8.2.0-1 01746 xorg-x11-xwin 6.8.2.0-4 01747 xpdf 3.01-1 01748 xterm 202-1 01749 zip 2.3-6 01750 zlib 1.2.3-1 01751 zsh 4.2.6-1 01752 \endverbatim 01753 01754 Once you have a cygwin environment installed, you can build the 01755 toolkit from cygwin shell window using the standard ./configure and 01756 make sequence shown in \ref basic-compilation. 01757 01758 If you want to use any of the tcl-based apps (e.g., bin/invt), you may 01759 get an error like the following: 01760 \verbatim 01761 fatal initialization error (package 'Tcl'): 01762 Can't find a usable init.tcl in the following directories: 01763 \endverbatim 01764 In that case, you need to set the TCL_LIBRARY environment variable, 01765 either on the command-line or in your ~/.bashrc, like so: 01766 \verbatim 01767 export TCL_LIBRARY="C:/cygwin/usr/share/tcl8.4" 01768 \endverbatim 01769 01770 <!--############################################################--> 01771 01772 \subsection parallel-code-notes 4.3. Parallel code notes 01773 01774 01775 NOTE: PVM SUPPORT HAS BEEN OBSOLETED AND REMOVED AT SVN REVISION 8264. 01776 01777 You need to install PVM (Parallel Virtual Machine), a supercomputing 01778 message passing toolkit from Oak Ridge National Laboratory 01779 (www.epm.ornl.gov/pvm/pvm_home.html) for 'pvision' and 01780 'pvision-master' to compile. These two programs implement our model of 01781 bottom-up, saliency-based visual attention to run on a cluster of 01782 Linux machines connected through a high-speed network. These two 01783 programs are rather obsolete as better versions are now available that 01784 do not require PVM (pvisionTCP, pvisionTCP2, etc). If you do not wish 01785 to install PVM and to compile those two programs, don't try "make 01786 pvm". 01787 01788 Note that "make pvm" is implicitly called by "make all" so you will 01789 need to have PVM installed for "make all" to work. 01790 01791 01792 <!--############################################################--> 01793 01794 \subsection other-libs 4.4. IEEE-1394, SDL, ffmpeg, and other libs code notes 01795 01796 01797 You will need the FireWire development libs for the IEEE1394 code to 01798 compile properly. On Mandrake 9.0, that means that you will need to 01799 install: 01800 01801 \verbatim 01802 libdc1394_0-0.9.0-1mdk.i586.rpm 01803 libdc1394_0-devel-0.9.0-1mdk.i586.rpm 01804 libraw1394_5-0.9.0-2mdk.i586.rpm 01805 libraw1394_5-devel-0.9.0-2mdk.i586.rpm 01806 \endverbatim 01807 01808 or later versions. That will allow the code to compile. To run it, you 01809 will in addition need to (as root): 01810 01811 \verbatim 01812 mknod -m 777 /dev/raw1394 c 171 0 01813 mkdir /dev/video1394 01814 mknod -m 777 /dev/video1394/0 c 171 16 01815 01816 modprobe ohci1394 01817 modprobe raw1394 01818 modprobe video1394 01819 \endverbatim 01820 01821 You will need SDL development libs for the SDL-related code to 01822 compile, ffmpeg libs to the MPEG-related code, etc. It can be a long 01823 and frustrating process to find and install all the packages needed 01824 for "make all" to succeed. To help you, please see: 01825 01826 http://iLab.usc.edu/packages/ 01827 01828 which contains the list of "exotic" packages we have installed on our 01829 machines so that "make all" will work. 01830 01831 01832 01833 <!--############################################################--> 01834 01835 \subsection autoconf 4.5. Using autoconf to control the build process 01836 01837 01838 <!--############################################################--> 01839 01840 \subsubsection just-building 4.5.1. If you are just going to build the software 01841 01842 01843 The first thing you'll notice is that there is no Makefile in the 01844 subversion repository! This is because we have a configure script 01845 that checks various features of the build environment (i.e. your 01846 computer), and uses that information to generate a Makefile from a 01847 Makefile.in template. In addition, the configure script allows you 01848 to toggle additional switches controlling how the build will be 01849 done. 01850 01851 To see the list of available configuration options: 01852 01853 \verbatim 01854 ./configure --help 01855 \endverbatim 01856 01857 To run the configure script, just type ./configure. In general, if 01858 you don't specify any additional options to ./configure, you'll just 01859 get the right default behavior (for old-timers: similar to what we 01860 got previously from the old Makefile). 01861 01862 01863 <!--############################################################--> 01864 01865 \subsubsection editing-makefile 4.5.2. If you need to edit or add to the Makefile 01866 01867 01868 Then the most important thing is DON'T EDIT THE FILE CALLED 01869 "Makefile"!!! 01870 01871 (Sorry to yell ;) but I find that that is the hardest part to 01872 remember of the entire autoconf process...) 01873 01874 Instead, you should edit "Makefile.in". This is the template file 01875 that ./configure uses to generate the Makefile. You'll find that 01876 Makefile.in looks very familiar. The main differences are: 01877 01878 - at the top of Makefile.in there are a bunch of lines like this: 01879 01880 \verbatim 01881 CXX := @CXX@ 01882 \endverbatim 01883 \par 01884 those are the lines where the configure script substitutes in 01885 the information it has garnered from its various checks. You 01886 won't need to worry about these unless you're also editing the 01887 configure script (then see step 3 below). 01888 01889 - instead of hardcoding the installation location for executables 01890 as "../bin", we now use "$(exec_prefix)/bin", which allows the 01891 user to specify a different installation location via the 01892 --prefix or --exec-prefix options to the configure script (but 01893 the default exec_prefix is still "..", so the default 01894 installation location is "../bin". 01895 01896 01897 <!--############################################################--> 01898 01899 \subsubsection editing-configure 4.5.3. If you need to change the configure script 01900 01901 01902 Then, just like the Makefile, DON'T EDIT THE FILE CALLED 01903 "configure"!!! 01904 01905 Instead, you should edit "configure.ac". This file is processed by 01906 the autoconf program to generate the configure script. 01907 01908 Next most important, if you change "configure.ac" and commit changes 01909 back to the subversion repository, then AFTERWARDS you MUST also run 01910 autoconf again, and then 'svn commit' the generated "configure" 01911 script. Here's why: 01912 01913 - Most people don't need to modify the configure.ac 01914 script. Therefore we don't want to require them to have autoconf 01915 installed on their system. Therefore they need to have access to 01916 the generated "configure" script, which is itself very highly 01917 portable bourne shell code. Therefore, we always need to have 01918 the most recent version of the "configure" script available on 01919 the svn server. 01920 01921 - It's important that you 'svn commit' the generated "configure" 01922 script AFTER the corresponding commit of "configure.ac", so that 01923 the timestamps are correct on the files. That's because the 01924 makefile has a rule to regenerate configure from 01925 configure.ac. But, we don't want that rule to get triggered 01926 unnecessarily. Therefore we need to make sure that, in the 01927 subversion repository, "configure" always has a later timestamp 01928 than "configure.ac". 01929 01930 - By convention, you don't need to put anything substantial in the 01931 svn log message for "configure"; in fact the best thing is to 01932 put something like "From configure.ac revision 4567", so we can 01933 always see which revisions correspond between the two files. 01934 01935 The configure.ac file itself is an m4-macroized version of bourne 01936 shell code. So you can put any bourne shell code into configure.ac, as 01937 long as its portable (i.e. shouldn't rely on bash-specific 01938 extensions). m4 is a macro language, just like the C preprocessor, 01939 except on steroids. The autoconf distribution basically consists of a 01940 large set of m4 macros that help you do useful tests. 01941 01942 You can read more about autoconf here: 01943 01944 - http://www.gnu.org/software/autoconf/autoconf.html 01945 - http://www.gnu.org/manual/autoconf/index.html 01946 01947 Running autoconf is very simple. You just type "autoconf". It looks 01948 for a file named "configure.ac" (or "configure.in", the older 01949 deprecated name for the script template), then does its 01950 m4-processing business, and writes the results to "configure". If 01951 all goes well, you'll see no messages. 01952 01953 Our configure.ac template requires autoconf 2.53 or later. In 01954 particular, it won't work with autoconf 2.13, which is still the 01955 default in some distros, although recent distros should at least 01956 have autoconf 2.53 available. 01957 01958 BE WARNED: Just because autoconf runs successfully does not mean 01959 that your configure script will be syntactically correct bourne 01960 shell code. All the autoconf does is run the m4 processor over your 01961 template. Therefore you should always try running the generated 01962 configure script to make sure there are no shell script syntax 01963 errors, before you 'svn commit' changes to "configure.ac". 01964 01965 Here's a quick overview of what happens in the configure.ac file: 01966 01967 - You'll notice two kinds of comments: those starting with "#", 01968 and those starting with "dnl". The "#" comments will be carried 01969 over intact into the generated "configure" file, while the "dnl" 01970 comments will be discarded by m4. 01971 01972 - The autoconf macros are easy to spot as they're all in all caps 01973 and the all start with AC_. 01974 01975 - Quoting in m4 is done with square brackets []. This is a bit of 01976 black magic. Nobody is really sure how many levels of quotes you 01977 should have. Conventional wisdom is: "if it doesn't work, add 01978 another level of quotes". In general, all arguments to macros 01979 should be quoted, even if they're a single word, or the result 01980 of another macro call. This is to avoid m4 getting overeager 01981 about what it tries to macro-process. 01982 01983 - configure.ac must start with AC_INIT() to specify the name of 01984 the project, its version number, an email address for bug 01985 reports, and a short name to be used in generated tar.gz 01986 distros. 01987 01988 - Near the end of the file will be one or more AC_CONFIG_FILES() 01989 calls. These tell the script that it should generated the named 01990 files by substituting all of the "output variables" (see below) 01991 into the corresponding template file. For example 01992 AC_CONFIG_FILES([Makefile:Makefile.in]) causes Makefile to be 01993 generated by doing output-variable-substitution in Makefile.in. 01994 01995 - The script builds a number of "output variables", which are 01996 variables that will be substituted during AC_CONFIG_FILES() 01997 calls. Some of the output variables are managed more or less 01998 automatically; these include: 01999 - the names of the C and C++ compilers (CC and CXX) 02000 These are computed by AC_PROG_CC() and AC_PROG_CXX(). 02001 - the C preprocessor flags (CPPFLAGS) -- e.g. -I options to gcc 02002 - C preprocessor definitions (DEFS) -- a list of -D options 02003 - the C compiler flags (CFLAGS) 02004 - the C++ compiler flags (CXXFLAGS) 02005 - the linker flags (LDFLAGS) 02006 - the libraries to be linked in to executables (LIBS) 02007 This is manipulated by AC_CHECK_LIB(), for example. 02008 02009 - In general, the idea is that you don't add something to one of 02010 the variables until you know that it works. That is, don't add a 02011 library to LIBS until you've checked that the library is present 02012 and working. Autoconf macros are designed to make these checks 02013 very simple. 02014 02015 - In general you need to do the checks in the order of least 02016 dependent to most dependent, since autoconf uses the various 02017 CPPFLAGS/CXXFLAGS/LIBS variables as it runs its tests. That is, 02018 if libfoo depends on libbar, then you need to check for libbar 02019 first. If libbar is present, then autoconf will add -lbar to 02020 LIBS. Then when you check for libfoo, it's dependence on libbar 02021 will already be satisfied. 02022 02023 - To add a -D option to the DEFS output variable, use AC_DEFINE() 02024 02025 - To your own variable into an output variable, call AC_SUBST() 02026 with the variable's name. 02027 02028 - To add a switch that the user can give as a command-line option 02029 to configure, use AC_ARG_ENABLE(). Probably best for you to read 02030 the docs if you need to use this, rather than for me to try to 02031 explain it... (or take a look at some of the existing usages in 02032 our own configure.ac). 02033 02034 - To add a macro that has already been written, you can place it 02035 in the acsite.m4 file, which will get included with configure.ac 02036 when running autoconf. You can examine the file to see how the 02037 autoqt macro (http://autoqt.sourceforge.net) was added. 02038 02039 02040 <!--############################################################--> 02041 02042 \subsection qt-notes 4.6. Qt code notes 02043 02044 02045 We are developing GUI applications for the Toolkit and some of these 02046 programs will depend on Qt, a very easy-to-use library that has 02047 cross-platform support, includes a powerful visual Designer software, 02048 and significantly reduces the amount of code necessary to create user 02049 interfaces (less than Xlib or Gtk). Qt has extensive documentation and 02050 widespread popularity throughout the open source community. Qt is 02051 released under GPL and is available for download from http://www.trolltech.com/ 02052 02053 Also, if you are running KDE, you should have Qt already installed 02054 because KDE is a very well-known Qt-based desktop environment. 02055 02056 To code with Qt, please follow these instructions: 02057 02058 - Qt applications usually need the user to work with three types of 02059 files: 02060 -# ui files written in XML that describe the user interface -- 02061 can be automatically generated by Qt Designer 02062 -# ui.h files with additional code for setting up signals/slots 02063 and extending widgets -- Qt Designer will help set up the 02064 framework of these files 02065 -# cpp files, one of which is a generic main() function that you 02066 can freely modify -- Qt Designer can provide you with a 02067 barebones version, but you are better off writing it yourself 02068 or basing it on one of the existing ones 02069 02070 - Source code for Qt applications need to be placed in the 02071 saliency/src/Qt directory. This includes all three kinds of files 02072 mentioned above. 02073 02074 - Some of the files in the saliency/src/Qt directory are helpers 02075 that convert between formats recognized by Qt and those used in 02076 the rest of this toolkit. You can use these by including the 02077 appropriate header (e.g., #include "ImageConvertQt.H") 02078 02079 - Qt Designer will be very helpful for creating user interfaces and 02080 setting up the signals/slots interaction system. Qt Designer also 02081 includes Qt Assistant, which will direct you to the extensive Qt 02082 documentation available. 02083 02084 Compile notes for Qt applications: 02085 02086 - configure will check for Qt libraries on your machine and export 02087 the appropriate directory where Qt sources and binaries reside. 02088 02089 - Makefile.in has an option for "make qt" which will build 02090 Qt-dependent executables. 02091 02092 - Qt executables should go in depoptions.in just like any other 02093 programs. Make sure to use the "--exeformat qt" option. 02094 02095 - The make process will generate dependency information based on 02096 the source files present. However, some of this dependency 02097 information is only available after the intermediary source files 02098 created by the Qt User Interface Compiler (uic) have been 02099 generated. Thus, for the first time you build the program, you 02100 need to do the following (assume you have user interface files 02101 MyForm.ui and MyForm.ui.h): 02102 \verbatim 02103 make src/Qt/ui/MyForm.h 02104 make src/Qt/ui/MyForm.cpp 02105 \endverbatim 02106 After these files are created for the first time, they should not 02107 be removed so that the cdeps dependency generator can refer to 02108 them. However, you should not have to ever edit them since they 02109 will always be created automatically by uic. 02110 02111 - By default, make will keep intermediary source files in the 02112 src/Qt/ui directory. The corresponding object code will be built 02113 into build/obj/Qt/ui. 02114 02115 - IMPORTANT -- when adding a new Qt user interface to the svn 02116 repository, it will be necessary to also include the files that 02117 were created just for the sake for generating dependencies. If 02118 you created an interface called MyForm, all of the following 02119 files will need to be added to svn: 02120 \verbatim 02121 svn add src/Qt/MyForm.ui 02122 svn add src/Qt/MyForm.ui.h 02123 svn add src/Qt/ui/MyForm.h 02124 svn add src/Qt/ui/Myform.cpp 02125 \endverbatim 02126 Do not worry about the object files, those are ignored by svn and 02127 will have no effect. 02128 02129 - Note #1: Although Trolltech recommends using qmake to build Qt 02130 projects, we do not use it because it is difficult to pass on 02131 dependency information to it. 02132 02133 - Note #2: The basic outline of the make process for Qt 02134 applications is available at: 02135 \par 02136 http://doc.trolltech.com/3.2/designer-manual-9.html#3-1 02137 \par 02138 It can also be found in the corresponding section of the Qt 02139 Assistant. See "Creating Makefiles without qmake" under Qt 02140 Designer manual, "Customizing and Integrating Qt Designer." 02141 02142 - Note #3: We run moc (Qt's Meta-Object Compiler) on the fly when 02143 compiling files with .cpp or .Q extensions. Previously, we used 02144 to store the moc_*.cpp files in the repository, but this is no 02145 longer necessary. However, by running moc on the fly, we minimize 02146 dependency bookkeeping and avoid churn in the svn repository, at 02147 the expense of very little compile time (e.g., moc usually takes 02148 <0.5s to run, while compiling the .cpp file itself typically 02149 takes ~10-20s for Qt source code). 02150 02151 As an example you should look at the simple application test-Qt, which 02152 was created almost entirely in Qt Designer and required only about 25 02153 additional lines of code to be written by the programmer. This should 02154 demonstrate both the power and the simplicity of Qt. 02155 02156 02157 <!--############################################################--> 02158 <!--############################################################--> 02159 <!--############################################################--> 02160 02161 \section executables 5. EXECUTABLES 02162 02163 02164 <ul> 02165 02166 <li> ezvision: This is the main executable. Try to run it with a "--help" 02167 command-line option to see the various supported options. 02168 02169 Typically, you will run: 02170 02171 \verbatim 02172 ezvision -T --io=raster:image.ppm 02173 \endverbatim 02174 02175 to process an image 'image.ppm'. This will take image.ppm as the 02176 input image, and will generate output images using the filename stem 02177 'image.ppm'. To also see the output images in onscreen windows 02178 (assuming you have a connection to an X server), you can add 02179 --out=display 02180 02181 \verbatim 02182 ezvision -T --io=raster:image.ppm --out=display 02183 \endverbatim 02184 02185 To send the output to the display only, without writing any files, 02186 using a --in instead of --io (note that --io=foo is an alias for 02187 --in=foo --out=foo): 02188 02189 \verbatim 02190 ezvision -T --in=raster:image.ppm --out=display 02191 \endverbatim 02192 02193 A target map is a binary map which is black everywhere except that 02194 objects that you wish to detect in the image.ppm appear in the 02195 target map as white blobs. So, typically you will use a target map 02196 if you want the program to report when it has found a given target, 02197 and to automatically stop when it has found all the targets. In this 02198 case, save your target map as a target.pgm portable greymap file, 02199 and run: 02200 02201 \verbatim 02202 ezvision -T --io=raster:image.ppm targets.pgm 02203 \endverbatim 02204 02205 If you want to look at some internals of the model, you can use the 02206 various "show ..." options; for example: 02207 02208 \verbatim 02209 ezvision -T --save-conspic-maps --io=raster:image.ppm 02210 \endverbatim 02211 02212 will show the attentional trajectory (T option), and various 02213 conspicuity maps. 02214 02215 \verbatim 02216 ezvision -Kx \ 02217 --input-frames=0-100@30Hz \ 02218 --output-frames=0-100@30Hz \ 02219 --rescale-output=640x480 \ 02220 --ehc-type=Simple \ 02221 --esc-type=Monkey2 \ 02222 --vc-chans=IC:5.2OFM \ 02223 --nodisplay-additive \ 02224 --foveate-input \ 02225 --io=raster:frame#.ppm 02226 \endverbatim 02227 02228 will process a series of input images named frame000000.ppm through 02229 frame000100.ppm, loading a new frame every 33.333ms (30Hz) of 02230 simulated time (--input-frames option), displaying in an X-window 02231 (-x option) a combination of original, attention trajectory, and 02232 various internal maps (-K option) in a non-additive manner (drawings 02233 are erased at every new frame; --nodisplay-additive), rescaling the 02234 output image to 640x480 (--rescale-output option), using a 02235 SaccadeController of type "Monkey2" to generate eye/head movements 02236 in addition to the covert attention shifts (--esc-type option), using 02237 a foveation filter to foveate each input frame according to current 02238 eye position (--foveate-input option), using a VisualCortex that has 02239 intensity (I), color with weight 5.2 (C:5.2), orientation (O), 02240 flicker (F), motion (M) channels (--vc-chans option; note that your 02241 channels could also be all off-loaded from your machine and running 02242 instead on distant CPUs part of a Beowulf cluster if you added a "B" 02243 letter to the --vc-chans option; use this only if you know what you 02244 are doing, and see SingleChannelBeo.H and friends). 02245 02246 Note that if you want your output to go to movie files instead of 02247 raster file series, you can use "--in=raster:frame#.ppm --out=mpeg" 02248 instead of "--io=raster:frame#.ppm". You can also take the input 02249 from an movie file like this "--in=somefile.mpg --out=mpeg". 02250 02251 Note a few special options that exist in all "proper" executables: 02252 02253 \verbatim 02254 -h, --[no]help [on] 02255 Show help message and option syntax [ShowHelpMessage] 02256 02257 -d, --[no]debug 02258 Use debug mode, which, in particular, will increase the 02259 verbosity of the log messages and printout all model parameter 02260 values just before the model starts. [DebugMode] 02261 02262 --[no]use-fpe [on] 02263 Use floating-point exceptions, which will abort execution if 02264 overflow, underflow, invalid or division by zero are 02265 encountered. [UsingFPE] 02266 02267 -Z, --[no]test-mode 02268 Use test mode, which, in particular, will turn off randomness 02269 (like --nouse-random), reset random numbers to a reproducible 02270 pseudo sequence, and turn off most displays. This is mostly 02271 useful for execution of the test suite, or any situation where 02272 you need deterministic, reproducible behavior. [TestMode] 02273 02274 --load-config-from=<file.pmap> [] 02275 Load configuration from file [LoadConfigFile] 02276 02277 --save-config-to=<file.pmap> [] 02278 Save configuration to file [SaveConfigFile] 02279 \endverbatim 02280 02281 In particular, the last one will allow you so save a snapshot of all 02282 current settings, for later re-loading. So if you have a very long 02283 list of command-line options, you may as well use 02284 "--save-config-to=settings.pmap", so that next time instead of 02285 re-typing that long list you will only have to type 02286 "--load-config-from=settings.pmap". 02287 02288 Note that some new options may pop-up on the fly as you instantiate 02289 run-time plugin components; for example, compare: 02290 02291 \verbatim 02292 ezvision --help 02293 \endverbatim 02294 02295 to 02296 02297 \verbatim 02298 ezvision --ehc-type=Simple --esc-type=Monkey2 --help 02299 \endverbatim 02300 02301 and you will see a bunch of new options that will allow you to tune 02302 the Monkey2 SaccadeController. 02303 02304 For the other options, the best is to ask us or look at the source 02305 code. 02306 02307 <li> test-grab: tests your framegrabber by just grabbing a frame and 02308 displaying it in a window; 02309 02310 <li> pvisionTCP, pvisionTCP-master: parallel saliency computation, 02311 using our direct TCP transfer library, and spreading processing of 02312 each frame across several CPUs (such that one CPU processes color, 02313 another intensity, etc). No flicker/motion processing (each new 02314 frame is processed independently from the previous ones). Because 02315 this is a truly parallel program, both throughput is increased and 02316 latency is decreased; runs at 30fps on our 16-CPU cluster. Typically 02317 you would run pvisionTCP on each of your slave Beowulf nodes, and 02318 pvisionTCP-master on your head node. There are scripts in bin/ to 02319 get this started; 02320 02321 To start it, run "pvisionTCPgo" which will start the slave processes 02322 on the Beowulf compute nodes, then run "pvisionTCPmaster" on your 02323 framegrabber-equipped head node; 02324 02325 <li> pvisionTCP2, pvisionTCP2-master: same as above except that flicker 02326 is detected as well and the program runs at 15fps; 02327 02328 <li> CINNICtest: test executable for the contour integration model; 02329 02330 <li> beograb, beograb-master: parallel frame grabbing; will grab at 30fps 02331 and store grabbed frames in round robin onto the local disk of each 02332 slave node. This way it is actually possible to grab & save at 02333 30fps, while typically this is too much data for a single CPU to be 02334 able to save on its disk in real time (but here each CPU saves only 02335 one in 16 frames onto its disk); 02336 02337 <li> test-hmax, test-psycho: early versions of new test programs for 02338 object recognition and the generation of psychophysics displays. 02339 02340 </ul> 02341 02342 02343 <!--############################################################--> 02344 <!--############################################################--> 02345 <!--############################################################--> 02346 02347 \section video-clips 6. PROCESSING VIDEO CLIPS 02348 02349 02350 Video clips can be processed using ezvision just like series of image 02351 frames. Just pass --in=path/to/mymovie.mpg to use a movie for input; 02352 likewise you can save your output to movies by using 02353 --out=mpeg:path/to/outdir/. 02354 02355 02356 <!--############################################################--> 02357 02358 \subsection grabbing-video 6.1. Grabbing video 02359 02360 02361 The easiest way to grab video is to use some Windoze machine equipped 02362 with a framegrabber. Typically, we try to grab at 30 frames/s in 02363 640x480 resolution, RGB555 uncompressed mode. You may use other modes 02364 as well, like YV12, as supported by your framegrabber. As you grab, 02365 make sure that you don't have any dropped frames and that you grab 02366 uncompressed data. Indeed, compression (e.g., MPEG, DivX, etc.) will 02367 introduce artifacts, and that will have to be taken into account later 02368 when you attempt to process your data and interpret the results; that 02369 is, are the results you see due to the genuine contents of the video 02370 clip, or to the artifacts created by the compression process? That can 02371 be very important if your goal is, for example, to use our model to 02372 determine priority regions in a video clip and use those regions in a 02373 region-based video compression algorithm. If the data you use had 02374 already been compressed before, that will taint your results on how 02375 well your new compression algorithm is doing. 02376 02377 So, RGB555 640x480 30fps uncompressed AVI is usually the most 02378 desirable setting. If you have options to do deinterlacing, you may or 02379 may not want to use them (just make a note of what you did and be 02380 consistent over your collection of clips). 02381 02382 02383 <!--############################################################--> 02384 02385 \subsection converting-tbz 6.2. Converting video to .tbz files 02386 02387 02388 The easiest way of doing batch processing on video data is to first 02389 convert (in a lossless manner) your movie file into a series of 02390 individual PPM frames, and then to create a tar archive with all the 02391 frames in it, and to compress this archive using the bzip2 02392 program. Once you have a .tbz file in this format, we have a number of 02393 scripts that will be able to run the attention model on those 02394 files. You must create your .tbz exactly as described below for these 02395 scripts to work. 02396 02397 To convert from a movie to .tbz, use the movie2tbz.pl script in 02398 saliency/bin/. The script accepts any input video format that 02399 'mplayer' can deal with: 02400 02401 \verbatim 02402 movie2tbz.pl movie1.avi movie2.mpg movie3.mov 02403 \endverbatim 02404 02405 will convert all three movies to .tbz format, yielding movie1.tbz, 02406 movie2.tbz and movie3.tbz. There are additional options that 02407 movie2tbz.pl accepts; have a look at the script itself to see a 02408 description of the usage, in the comment block at the top of the 02409 script. 02410 02411 If you want to create your .tbz files manually, you can certainly do 02412 that too. The .tbz files should contain a series of frames with the 02413 file names: 02414 02415 \verbatim 02416 frame000000.ppm 02417 frame000001.ppm 02418 ... 02419 \endverbatim 02420 02421 be sure to have a six-digit number, to start at frame zero, and to 02422 have no gap in the number sequence. Follow this naming convention, as 02423 it is required by the scripts that process .tbz files. Then tar and 02424 compress all the frames, such that your tar file contains no 02425 directory/subdirectory information (i.e., when it is untarred, the 02426 extracted frames should go into the current directory). For example: 02427 02428 \verbatim 02429 tar cvf - frame*.ppm | bzip2 -9 > mymovie.tbz 02430 \endverbatim 02431 02432 or, if you have so many frames that your shell complains that 02433 "frame*.ppm" has too many files, you can also use: 02434 02435 \verbatim 02436 tar cvf - . | bzip2 -9 > mymovie.tbz 02437 \endverbatim 02438 02439 in which case your archive will contain files ./frame000000.ppm, 02440 ./frame000001.ppm, etc and the leading ./ is okay (note that .tbz 02441 files created with this manner will have an additional entry for just 02442 "./", so be sure that you know that if you are trying to count the 02443 number of frames in a movie by listing the files the .tbz archive 02444 contains). 02445 02446 02447 <!--############################################################--> 02448 02449 \subsection processing-tbz 6.3. Processing a .tbz file 02450 02451 02452 To process a .tbz file through ezvision, use the script 02453 process_movie.pl in saliency/bin/; typically: 02454 02455 \verbatim 02456 process_movie.pl /path/to/movie.tbz 02457 \endverbatim 02458 02459 will unpack the .tbz, process the frames through ezvision, and 02460 compress the results into a .mpg file. There are many options that 02461 process_movie.pl accepts; have a look at the script itself to see a 02462 description of the usage, in the comment block at the top of the 02463 script. In particular, you can decide on the output format (mpeg, 02464 quicktime, divx, tbz, etc) and pass additional options to ezvision 02465 too. There are also specialized versions of process_movie.pl that are 02466 just shorthands which call process_movie.pl with a bunch of preset 02467 options; for example, process_movie_foveated.sh, 02468 process_movie_headanim.sh, etc 02469 02470 For process_movie.pl to work, you need to have ezvision and several 02471 other programs installed and in your path (mpeg_encode, mencoder, 02472 etc). Have a look at the script for details. 02473 02474 02475 <!--############################################################--> 02476 <!--############################################################--> 02477 <!--############################################################--> 02478 02479 \section parallel-code 7. RUNNING PARALLEL CODE 02480 02481 02482 Before you run parallel code (such as pvisionTCP), make sure that you 02483 master the Beowulf administration tools, such as 'brsh,' so that you 02484 cleanup after yourself when you are done with the beowulf. For 02485 example, if you have started a bunch of pvisionTCP processes, be sure 02486 to execute: 02487 02488 \verbatim 02489 brsh killall -9 pvisionTCP 02490 \endverbatim 02491 02492 when you are done. For brsh to work, you need to have a .rhosts file 02493 with: 02494 02495 \verbatim 02496 iLab1.usc.edu itti 02497 iLab2.usc.edu itti 02498 iLab3.usc.edu itti 02499 iLab4.usc.edu itti 02500 iLab5.usc.edu itti 02501 iLab6.usc.edu itti 02502 iLab7.usc.edu itti 02503 bsl10.usc.edu itti 02504 bsl11.usc.edu itti 02505 n01.beo.usc.edu itti 02506 n02.beo.usc.edu itti 02507 n03.beo.usc.edu itti 02508 n04.beo.usc.edu itti 02509 n05.beo.usc.edu itti 02510 n06.beo.usc.edu itti 02511 n07.beo.usc.edu itti 02512 n08.beo.usc.edu itti 02513 n09.beo.usc.edu itti 02514 n10.beo.usc.edu itti 02515 n11.beo.usc.edu itti 02516 n12.beo.usc.edu itti 02517 n13.beo.usc.edu itti 02518 n14.beo.usc.edu itti 02519 n15.beo.usc.edu itti 02520 n16.beo.usc.edu itti 02521 \endverbatim 02522 02523 in your home directory, except that you replace "itti" by your login 02524 name and make sure that your own computer's name also is in the list. 02525 Then, brsh will execute the command passed as argument on every node 02526 in the beowulf; for example: 02527 02528 \verbatim 02529 brsh ps aux # shows you all processes 02530 brsh df -h # shows you all disk space 02531 ... 02532 \endverbatim 02533 02534 Also check out the real time CPU and network load graphs at 02535 http://iLab.usc.edu/beo/ 02536 02537 02538 <!--############################################################--> 02539 <!--############################################################--> 02540 <!--############################################################--> 02541 02542 \section documentation 8. DOCUMENTATION 02543 02544 02545 Documentation is automatically extracted from the source code and 02546 published on the web at: 02547 02548 http://iLab.usc.edu/sdoc/html/ 02549 02550 It is also available in PDF or RTF format. 02551 02552 Please document your code using the doxygen syntax (see 02553 http://www.doxygen.org/). Doxygen will extract special comments from 02554 your code and organize them along with the class names and methods 02555 into some nice web pages. Regular comments will not be used by 02556 doxygen, so feel free to use them a lot inside your code. So the idea 02557 is that all regular comments are only for people editing the code, and 02558 a few special comments are provided for people just wanting to use 02559 your classes but not look at the code in detail. So the special 02560 comments explain what the class does and what each method does. 02561 Typically this means: 02562 02563 - towards the top of your class definition in your .H, have a block 02564 like: 02565 \verbatim 02566 //! Short summary in one line 02567 /*! Longer description of what the class does, that 02568 can take several lines 02569 */ 02570 \endverbatim 02571 If you have only a short summary, only write the first one-line 02572 comment (using <code>//!</code>); if you have a long description 02573 (using <code>/*! ... * /</code>), then make sure you still include 02574 the short summary too in that case. Any deviation from this scheme 02575 will produce bogus documentation; 02576 02577 - before each method in your .H, either a single-line comment or if 02578 you have more to say, both a single-line comment and a multiline 02579 comment as above; 02580 02581 - do not repeat these comments in your .C; what the method does and 02582 what parameters it takes is documented in the .H; however, put 02583 extensive regular comments inside your functions (without using the 02584 doxygen markers) to explain people editing the code what you are 02585 doing; 02586 02587 - the first line of both your .H and you .C should be a single-line, 02588 regular (non-doxygen) comment that states the file name and a very 02589 short description of what the class does (useful for printing, so 02590 that we know which file corresponds to a given printout; also useful 02591 for the roadmap below); 02592 02593 - see V4Lgrabber.H and V4Lgrabber.C for a good example to use when 02594 writing a new class. 02595 02596 02597 <!--############################################################--> 02598 <!--############################################################--> 02599 <!--############################################################--> 02600 02601 \section writing-code 9. WRITING CODE 02602 02603 02604 Please follow these guidelines when writing new code: 02605 02606 - no 'printf,' 'cout,' or 'cerr' allowed. Instead, use the functions 02607 provided by log.H to display various messages; 02608 02609 - please keep line length to less than 80 characters, so that the code 02610 will print properly and we won't get very annoyed because we have to 02611 resize our editor windows; 02612 02613 - try to avoid 'malloc' and 'free,' unless you have to use it (e.g., 02614 will do a 'realloc' later). Instead use the C++ functions 'new' and 02615 'delete'; 02616 02617 - make sure that each time you allocate memory with 'new' you also 02618 free it with 'delete.' So, if possible do not allocate memory for 02619 return values of your functions, leaving it to the user of the 02620 function to free the memory when they are done with the return value; 02621 rather ask the user to pass a memory buffer that has been already 02622 allocated as a parameter to your function. Try to use SharedPtr's to 02623 handle your dynamically allocated objects (see SharedPtr.H, and try a 02624 "grep SharedPtr *.C" for examples of how to use it); 02625 02626 - try to avoid passing pointers as function parameters; rather use the 02627 C++ passing of arguments by reference (using an &; for example use 02628 'function(float& retval)' rather than 'function(float *retval)'; this 02629 way you will not have to deal with pointers inside your function and 02630 your code will be easier to read and cleaner); 02631 02632 - when writing a new class, follow the general architecture that has 02633 been used in other classes: make a .H file, a .C file, enclose your 02634 definitions in the .H file by \#ifndef MY_CLASS_DEFINED, try to 02635 #include as few files as possible in your .H (just what is needed for 02636 class definition) and include the rest in your .C (what is needed for 02637 actual implementation of the class), do not repeat comments from your 02638 .H in your .C, separate your methods in your .C by // ###.. (70 times 02639 #), and so on. See V4Lgrabber.H and V4Lgrabber.C for a good example to 02640 use when writing a new class (and see previous section regarding 02641 comments). When creating a new class, start from a copy of the 02642 templates provided in NewClass.H and NewClass.C; 02643 02644 - make sure that your class has a constructor with no argument; this 02645 is useful if people want to have your class as a member inside their 02646 class, or to create arrays of objects from your class. Typically, I 02647 find it useful to have a boolean variable 'initialized' inside my 02648 classes that let me know whether proper initialization was done; see 02649 for example Image.H/.C. If you have several possible constructors 02650 (e.g., with various numbers of parameters, I find it useful to only 02651 write the initialization code once as an 'init' method, and then have 02652 the various constructors call this method); similarly a 'freeMem' 02653 method is useful if you want to reinitialize your object (and then 02654 your destructor just calls freeMem()); 02655 02656 - do not declare all your variables at the top of your function like 02657 you must do in C; rather declare each variable the first time it is 02658 used, as is usual in C++. Similarly, unless you want to use a loop 02659 variable after the loop is finished, declare your loop variable inside 02660 your loop statement; declaring variables so that they have as short a 02661 lifetime (because they run out of scope) as possible will help you 02662 avoid lots of bugs! 02663 \code 02664 // instead of: 02665 02666 void MyClass::myFunction() // WRONG! 02667 { 02668 int x, y, z, i; 02669 ... 02670 for (i = 0; i < 10; i ++) { 02671 x = i * 2; 02672 do_stuff(x); 02673 } 02674 ... // never use 'i' again... 02675 } 02676 02677 // write: 02678 02679 void MyClass::myFunction() 02680 { 02681 ... 02682 for (int i = 0; i < 10; ++i) { 02683 const int x = i * 2; 02684 do_stuff(x); 02685 } 02686 02687 // 'i' and 'x' run out of scope here so the compiler will 02688 // complain if you inadvertently use them past this point. 02689 ... 02690 } 02691 \endcode 02692 02693 - use capitalized names for classes and uncapitalized names for 02694 methods; for example: 02695 \code 02696 class MyCoolClass; // note uppercase M at start 02697 void MyCoolClass::myCoolMethod(); // note lowercase m at start 02698 \endcode 02699 <b>Use your class name as your file name (MyCoolClass.H and 02700 MyCoolClass.C); using different names for class and file DOES NOT 02701 MAKE SENSE (e.g., ssc.H and class SSC are getting on my nerves! it 02702 should be Ssc.H and class Ssc)</b> 02703 02704 - in your classes, please put public methods first (under a public: 02705 heading), then your private methods and data (under a private: 02706 heading). Indeed, users of your class do not care about the private 02707 members, so why would you want to bore them from the start by putting 02708 your private section first? see V4Lgrabber.H/.C; 02709 02710 - if possible, use emacs as editor; it will properly highlight and 02711 indent (using <TAB>) your code automatically for you! 02712 02713 - use only the five following base datatypes if you need a guaranteed 02714 data size: 02715 02716 \code 02717 byte // for a 8-bit unsigned integer number 02718 int16 // for a 16-bit signed integer number 02719 int32 // for a 32-bit signed integer number 02720 float // for a 32-bit floating point number 02721 double // for a 64-bit floating point number 02722 \endcode 02723 02724 If you could tolerate that your variable be either a 32 or 64-bit int, 02725 then use int. 02726 02727 - use 'const' whenever possible in your function declarations, as this 02728 makes the function declaration much easier to understand and it also 02729 avoids lots of bugs; so every read-only parameter should be declared 02730 const; every read-write parameter should be passed by reference (&) 02731 and not declared const; every method which does not modify the data 02732 members of the class should be declared const; for example: 02733 02734 \code 02735 void MyClass::getInfo(const int32 zz, float& result1, 02736 byte& result2) const; 02737 \endcode 02738 02739 is a method with 1 read-only parameter, 2 read-write parameters, and 02740 which does not modify the internal data members of MyClass; 02741 02742 - try to have as few hardcoded numbers as possible; each time you need 02743 a hardcoded number that someone may want to modify later, use a 02744 #define statement in your .H to give a macro name to that number, then 02745 use the macro name in your code; for example, instead of: 02746 02747 \code 02748 // in myClass.C: 02749 Image<float> im(100, 100); 02750 \endcode 02751 02752 write: 02753 02754 \code 02755 // in myClass.H: 02756 // image size: 02757 const int IMWIDTH = 100; 02758 const int IMHEIGHT = 100; 02759 02760 // in myClass.C: 02761 Image<float> im(IMWIDTH, IMHEIGHT); 02762 \endcode 02763 02764 and try to avoid hardcoded numbers in any case! Use ModelParam<T> 02765 parameters instead (see ModelParam.H). Of course do not abuse of that 02766 rule: if you implement some math functions you will have lots of 02767 numbers; so use your judgment to decide when to #define a constant; 02768 typically you will do it if you use it several times in several 02769 different methods, but not if you just use it once in one method 02770 (unless you consider that it is a tunable parameter of your code). 02771 02772 - if you want to check the validity of parameters in a function, use 02773 the ASSERT() macro, which we can either #define as calling assert() 02774 (see 'man assert') while in development mode, or as doing nothing so 02775 that we save some computation time when the code is stable; for 02776 example: 02777 \code 02778 void Image::getValue(const int32 x, const int32 y) 02779 { 02780 ASSERT(x >= 0 && x < w); // will quit if x coordinate outside image 02781 ASSERT(y >= 0 && y < h); // will quit if y coordinate outside image 02782 ... 02783 } 02784 \endcode 02785 02786 - please write readable code! Most cryptic C++ constructs will not 02787 buy you anything in execution time (on the contrary), which is our 02788 main priority. So use lots of parentheses, even if you know that some 02789 of them are not needed, to make your code easier to read. The compiler 02790 will remove all extra parentheses before compiling. Also use lots of 02791 spaces, as they make fast reading of the code much easier. For 02792 example: 02793 \verbatim 02794 NO! YES 02795 ------------------------------------------------------------------------------ 02796 for(int i=0;i<10;i++) ... for (int i = 0; i < 10; ++i) ... 02797 02798 myfunction(a,b,10,z); myFunction(a, b, 10, z); 02799 02800 if(x=func()==1) ... x = func(); // comment 02801 if (x == 1) ... 02802 02803 for(z=0,x=0;x<imgx;x++,buf++) z = 0; // comment 02804 for (int x = 0; x < imgx; ++x) { 02805 ... 02806 ++buf; // comment 02807 } 02808 02809 x=x>y?x:y; if (x < y) x = y; // faster 02810 02811 printf("bug %d\n", x); LERROR("bug %d", x); 02812 \endverbatim 02813 see Image.H and Image.C as a good example of our writing style and 02814 class organization rules. 02815 02816 02817 <!--############################################################--> 02818 <!--############################################################--> 02819 <!--############################################################--> 02820 02821 \section roadmap 10. ROADMAP 02822 02823 02824 Have a look at the papers and at section 1 for general information and 02825 a brief description of what the various classes do. Then check out the 02826 online documentation. Then look at the code itself. 02827 02828 Use the online documentation (see above). It is clickable, so that 02829 each time you encounter an object type that you don't know, you can 02830 just click on it to instantly discover what it is. 02831 02832 A good order in which to get acquainted with the various classes is as 02833 follows (look at both the .H and .C) -- NOTE: the list below may be 02834 obsolete; the online documentation is the only up-to-date reference 02835 (updated nightly): 02836 02837 02838 <!--############################################################--> 02839 02840 \subsection visual-attention-model 10.1. Visual attention model 02841 02842 02843 - log.H -- Error message facility and interface to syslog 02844 - saliency.H -- type definitions and macros 02845 - Pixels.H -- basic pixel types 02846 - Point2D.H -- a basic 2D point class 02847 - Rectangle.H -- a basic rectangle class 02848 - Image.H -- an image template class with many image processing functions 02849 - Raster.H -- writes a raster to disk / displays it 02850 - ImageSet.H -- a template image pyramid class 02851 02852 - SaliencyMap.H -- class declarations for saliency map 02853 - WinnerTakeAll.H -- header file for winner-take-all network 02854 - VisualCortex.H -- the early visual processing stages 02855 - Brain.H -- the whole brain 02856 - SaccadeController.H -- optional eye/head movement generation 02857 - ShapeEstimator.H -- estimate the size/shape of attended objects 02858 - SimulationViewer.H -- do various drawings to display results 02859 - StdBrain.H -- a Brain with a bunch of standard modules pre-implemented in it 02860 02861 - ezvision.C -- main executable 02862 - openvision.C -- similar to ezvision but uses filters defined in a text file 02863 - streamvision.C -- similar to ezvision but reads/writes movie streams 02864 - vision.C -- this is now obsolete; use ezvision instead 02865 02866 02867 <!--############################################################--> 02868 02869 \subsection contour-integration-model 10.2. Contour integration model 02870 02871 02872 - readConfig.H -- deal with configuration files 02873 - contourNeuron.H -- CINNIC classes 02874 - CINNICtest.H -- test binary for CINNIC neuron 02875 02876 02877 <!--############################################################--> 02878 02879 \subsection frame-grabbing 10.3. Grabbing & displaying images 02880 02881 02882 - FrameGrabber.H -- abstraction of a frame grabber 02883 - V4Lgrabber.H -- definition and access functions for video4linux grabber 02884 - IEEE1394grabber.H -- definition and access functions for FireWire grabber 02885 - XWindow.H -- class definition for a simple window 02886 - XWinManaged.H -- an X window with event management 02887 - Timer.H -- a simple class for precise time measurements 02888 02889 02890 <!--############################################################--> 02891 02892 \subsection parallel-computing 10.4. Parallel computing 02893 02894 02895 - TCPmessage.H -- direct message passing over TCP connections 02896 - Beowulf.H -- simple interfacing to a Beowulf cluster 02897 - pvisionTCP.H -- Definitions for pvisionTCP & pvisionTCP-master 02898 02899 02900 <!--############################################################--> 02901 02902 \subsection low-level-parallel 10.5. Low-level details of parallel computing (should not be needed) 02903 02904 02905 - TCPdefs.H -- common definitions for the various TCPxxx classes 02906 - SockServ.H -- a simple multi-client socket server 02907 - TCPcliServ.H -- a client/server to receive/send TCPmessage 02908 - TCPcommunicator.H -- a class to handle multiple TCPmessage communications 02909 02910 02911 <!--############################################################--> 02912 02913 \subsection audio 10.6. Audio 02914 02915 02916 - AudioGrabber.H -- grab audio samples from /dev/dsp 02917 - AudioMixer.H -- control audio mixer and select audio grab source 02918 02919 02920 <!--############################################################--> 02921 02922 \subsection hardware-drives 10.7. Misc hardware drivers 02923 02924 02925 - ssc.H -- driver for a serial R/C servo controller 02926 - carcontrol.H -- control an R/C car like the one of the Beobots 02927 - serial.H -- serial port driver 02928 - GPS.H -- driver for Gramin/NMEA global positioning system unit 02929 - Gyro.H -- interface to a GyroMouse 02930 - lcd.H -- interface to a small alphanumeric serial LCD display 02931 - SpeedSensor -- driver for a mouse-based speed sensor 02932 - VCC4.H -- driver for a VCC4 pan/tilt/zoom camera 02933 02934 02935 <!--############################################################--> 02936 02937 \subsection psychophysics-displays 10.8. Psychophysics displays 02938 02939 02940 - PsychoDisplay.H -- easily create psychophysics displays using SDL 02941 02942 - psycho-movie.C -- show movies and record eye movements 02943 - psycho-still.C -- show still images and record eye movements 02944 - psycho-search.C -- search for one target 02945 - psycho-dsearch.C -- search for two targets 02946 - psycho-headmove.C -- record head movements 02947 - psycho-only.C -- pure psychophysics display of still images (no eye mvts) 02948 02949 */
1.4.4