The NDFS-II is available for download at http://www.nist.gov/smartspace
First, you need to install the ACE (Adaptive Communication Environment) 5.* libraries and Qt4 libraries for graphical tools and client nodes on your system. If you don’t intend to use Qt-based programs on a specific system, Qt is optional.
ACE can be compiled from sources or installed from packages. If you choose this last option, be sure to install the ace and ace-xml packages and the associated development packages as well.
Once ACE is installed you need to set up the $ACE_ROOT variable if it has been installed in a custom folder by modifying your .profile, .login, .tcshrc or .bashrc file. If you don't want to edit one of these scripts, you can customize the files env.csh (if you have csh or tcsh shell), or env.sh (if you have a bash shell) located in the NDFS-II root folder and load the environment variables specified in the script.
If you install ACE in /opt/ACE you can add in your .login, .profile or .tcshrc (in case your shell is csh or tcsh).
setenv ACE_ROOT /opt/ACE
#for linux/unix
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${ACE_ROOT}/lib
#for Mac OS X
setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${ACE_ROOT}/lib If your shell is bash, you need to add the following lines in your .login, .profile or .bashrc:
ACE_ROOT=/opt/ACE
#for linux/unix
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${ACE_ROOT}/lib
#for Mac OS X
DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${ACE_ROOT}/lib
export ACE_ROOT After you have installed ACE, you need to make sure Qt4 is installed on your system if you plan on using the Graphical User Interfaces provided with the framework. If Qt is not present, you need to install it. The development package of Qt is required. After its installation, make sure you properly set up your environment variables. If you install Qt in /opt/qt, you need to add the following lines in your .login, .profile or .bashrc (in case your shell is bash):
QTDIR=/opt/qt PATH=$QTDIR/bin:$PATH #for linux/unix LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH #for Mac OS DYLD_LIBRARY_PATH=$QTDIR/lib:$DYLD_LIBRARY_PATH #for linux/unix export QTDIR PATH MANPATH LD_LIBRARY_PATH #for Mac OS export QTDIR PATH MANPATH DYLD_LIBRARY_PATH
If your shell is csh or tcsh, you need to add the following lines in your .tcshrc, .login or .profile
setenv QTDIR /opt/qt setenv PATH $QTDIR/bin:$PATH #for linux/unix setenv LD_LIBRARY_PATH $QTDIR/lib:$LD_LIBRARY_PATH #for Mac OS setenv DYLD_LIBRARY_PATH $QTDIR/lib:$DYLD_LIBRARY_PATH
After Qt and ACE are properly installed, you can take care of the NDFS-II. First you need to unpack the archive if you haven't already done it:
tar -xzf Smartflow2.tar.gz #uncompress and unpack the archive
Now you need to set up some environment variables for the NDFS-II such as the SF2_ROOT variable. Here the NDFS-II has been uncompressed in /opt. Add this following lines to your .login, .profile or .tcshrc file (if your shell is csh or tcsh):
setenv SF2_ROOT /opt/Smartflow2
#for linux/unix
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${SF2_ROOT}/lib:${SF2_ROOT}/lib/flows:
${SF2_ROOT}/lib/utility
#for Mac OS
setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${SF2_ROOT}/lib:${SF2_ROOT}/lib/flows:
${SF2_ROOT}/lib/utility
setenv PATH ${PATH}:${SF2_ROOT}/bin/admin:${SF2_ROOT}/bin/clients:${SF2_ROOT}/bin/tools
If you use bash, add the following lines to your .login, .profile or .bashrc
SF2_ROOT=/opt/Smartflow2
#for linux/unix
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SF2_ROOT/lib:$SF2_ROOT/lib/flows:$SF2_ROOT/lib/utility
#for Mac OS
DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$SF2_ROOT/lib:$SF2_ROOT/lib/flows:$SF2_ROOT/lib/utility
#for both
PATH=$PATH:$SF2_ROOT/bin:$SF2_ROOT/bin/admin:${SF2_ROOT}/bin/clients:${SF2_ROOT}/bin/tools
#for linux/unix
export SF2_ROOT LD_LIBRARY_PATH PATH
#for Mac OS
export SF2_ROOT DYLD_LIBRARY_PATH PATH
You are now ready to build the system. There are presently two ways to do it, using the Qt method with qmake or using the configure; make; make install method. Having two different ways to build the project on the same platform can seem odd. Originally qmake was used, since it is a very convenient way to build the project. However, it requires Qt installed on the machine. If you intend to deploy the framework on machines without need for any graphical tool of the system, you don't need Qt so we don't want to force the installation of Qt only for the purpose of building the project.
The NDFS-II comes with a variety of client nodes that can capture video data from a camera, or audio data from a NIST Mk-III microphone array, etc. Some of these client nodes have specific dependencies. By default, these client nodes won't be built but you can enable them by editing the file sf2.pro.inc located at the root folder of the NDFS-II folder (named Smartflow2 for historical reasons). To do this, un comment the following lines:
#If you have OpenCV installed CONFIG += sf2_opencv #If you have OpenGL installed CONFIG += sf2_opengl #To compile Audio Processing clients (microphone array/array signal processing) CONFIG += sf2_audio_processing #To compile Video Processing clients (capturing, compression, computer vision, sensor fusion) CONFIG += sf2_video_processing
You are now ready to build NDFS-II. Qmake will generate the Makefiles. Run qmake in the root directory of the NDFS-II. Once the Makefiles are created, run make to build NDFS-II. It first compiles the NDFS-II library, then the server (and duplicator), the flows, the client nodes and finally the tools.
NDFS-II can also be built using the configure; make; make install method. A lot of parameters such as the destination directory can be overridden. To get the details, just invoke:
configure --help
The configure script automatically detects the libraries installed on your machine and generates the Makefiles for the client nodes accordingly. For example, if it finds opencv, it generates the Makefiles for the client nodes using opencv.
After you run the configure script, just type make and then make install to finish the installation.
If no prefix is specified when running the configure script, the destination folder will be /usr/local/bin for executables and /usr/local/lib for the libraries. When building the system this way, the sub folders used to sort the executable's programs of the system and the libraries are not created and every executable and library is saved in the bin and lib folders.
In that case, you need to update the PATH and LD_LIBRARY_PATH environment variables accordingly.
The configure script presently does not build the Control Center under Mac OS X. If you need it, build it using the qmake method provided by Qt.
There are two ways to install the NDFS-II on Windows XP.
An installer is provided including every binary of the system and the sources, the ACE and Qt libraries, and some libraries used in specific client nodes.
The source can also be downloaded and the system built using Visual Studio 2005. A Visual Studio solution file is provided and located in the root folder of the system.
If you download the project sources, you will need to download Qt and ACE and build them before building the NDFS-II.
