STAIR Vision Library

Frequently Asked Questions (FAQ)


How do I report a bug?
Before sending a bug report, please make sure that the problem is not in your code or in one of the external libraries. For example, OpenCV bugs should be reported directly to OpenCV bug tracker. If you're certain the problem is in the STAIR Vision Library, send an email to <> with subject line "SVL bug report". Include in your email the version (and build) number and a short description of the bug (including the behavior you expect). A short code snippet that demonstrates the bug will also help.

How can I plot a PR curve produced by scoreDetections?
The following Matlab code will produce nicely formatted PR curves.

curve = dlmread(FILENAME, ',', 1, 0);
plot(curve(:, 2), curve(:, 3), 'b-', 'LineWidth', 2);
axis([0 1 0 1]); grid on; xlabel('recall'); ylabel('precision');

How can I set my editor to replace tabs with spaces?
If you're using emacs add the following to your .emacs file:

(setq c-basic-offset 4)
(setq tab-width 4 indent-tabs-mode nil)
(setq-default indent-tabs-mode nil)

If you're using Microsoft Visual Studio:

  1. Select Tools|Options...
  2. Expand Text Editor | C/C++ | Tabs
  3. Select Insert Spaces
Can I get an email when code changes in the repository?
Yes, you need to be added to the email group. Contact one of the maintainers if you would like to be added.

What is the format of the data that pointCloudViewer reads?
The format of the data read by pointCloudViewer is a 10-element vector per point containing location (x y z), normal (nx ny nz), color (r g b) normalized between 0 and 1, and arbitrary weight (w). You can also import point cloud files containing on location only (x y z) using File|Import....

I have pre-compiled 32-bit .mexglx Matlab functions. Can I use these on a 64-bit machine?
Yes, invoke Matlab with:

matlab -glnx86

Compilation/Build Troubleshooting


I just checked out the latest release from the repository and it doesn't compile.
If you have not successfully compiled SVL before then follow the installation instructions. Otherwise follow these steps:


I installed OpenCV in the default location, but make fails.
Add the following to your make.local file:
OPENCV_CFLAGS += /usr/local/include/opencv/
OPENCV_LFLAGS += /usr/local/lib/
I can't get OpenCV to find my installed version of ffmpeg.
These instructions are for ffmpeg version SVN-r6410. Different versions may give different results. Try modifying the OpenCV script to remove the check for avcodec. The code changes from
    if test x"$with_ffmpeg" = "xyes"; then
                        AC_CHECK_LIB(avcodec, avcodec_decode_video,
                                       AC_CHECK_LIB(avformat, av_open_input_file,
                                                      AC_DEFINE(HAVE_FFMPEG,,[FFMpeg video library])
                                                      FFMPEGLIBS="-lavcodec -lavformat"
                                                    [ have_ffmpeg=no ],
                                     [ have_ffmpeg=no ]),
                        [ have_ffmpeg=no ])
if test x"$with_ffmpeg" = "xyes"; then
                          AC_DEFINE(HAVE_FFMPEG,,[FFMpeg video library])
                          FFMPEGLIBS="-lavcodec -lavformat"
                        [ have_ffmpeg=no ])
Now re-configure and re-make OpenCV:
./configure --enable-static --without-quicktime --with-ffmpeg \
make install

If the above does not work, or you cannot find the corresponding section within your script, try commenting out one of the last lines in external/opencv-1.0.0/otherlibs/highgui/cvcap_ffmpeg.cpp:

    if (!(mywriter->fmt->flags & AVFMT_NOFILE)) {
            /* close the output file */
Error loading shared libraries.
If you see a message like "error loading shared libraries: ...", then try setting the LD_LIBRARY_PATH environment variable. For example OpenCV usually installs to /usr/local/lib so make sure you have export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib in your .bashrc file or setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/usr/local/lib in your .cshrc.user file.

How can I compile for 32-bit linux on a 64-bit system?
Create a file called make.local in the root SVL directory and add the line


Building the Matlab mex Applications.
By default the Matlab mex applications are not built. This is because not all systems will have Matlab installed. To build the mex applications automatically create a file called make.local in the root SVL directory and add the line


The pointCloudViewer runs, but does not show anything.
You probably need to install a whole lot of OpenGL libraries.

OpenCV 1.0 fails to compile on Ubuntu 9.10 (with gcc 4.4)
If you get the following error message:

../../cxcore/include/cxmisc.h:133:6: error: #elif with no expression

when compiling OpenCV 1.0.0 on Ubuntu 9.10, it's probably due to an error in the OpenCV code. The fix is explained here: and basically requires changing line 133 in cxmisc.h from #elif to #else.

wxWidgets fails to compile on Ubuntu 9.10
If you get the following error message:

Error: ./include/wx/gsocket.h:40: error: using typedef-name 'GSocket' after 'class'
        /usr/include/glib-2.0/gio/giotypes.h:120: error: 'GSocket' has a previous declaration here

when compiling wxWidgets on Ubuntu 9.10, it's probably due to a conflict between glib and wxWidgets. See the wxWidgets tracker for the fix.


I installed wxWidgets but SVL can't find the include files.
Try compiling wxWidgets in Release mode.

I can't get a video to play in OpenCV?
Make sure the video is encoded with a codec installed on your machine. You can find a bunch of video codecs for Windows at K-Lite Codec Pack. Other useful software for converting between video formats in Windows is Video Converter.

I get the error, Error: Could not detect a compiler on local system which can compile the specified input file(s) at C:\MATLAB7/bin/win32/ line 519., while trying to compile a mex file using the mex command in MATLAB
You will need to run mex -setup in MATLAB to specify the C++ compiler MATLAB is to use.