Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to compile and use VLFeat

📅 2014-Feb-11 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ vlfeat ⬩ 📚 Archive

VLFeat is an open source library that has implementations of computer vision algorithms such as HOG and SIFT. The source code is particularly well written and is easy to read and understand.

Compile

export VLROOT=/home/joe/vlfeat

Use

Here is a minimal piece of source code from its documentation:

#include <vl/generic.h>

int main()
{
    VL_PRINT("Hello world!");
    return 0;
}

While compiling code that uses VLFeat, remember to pass its include directory, its library directory and the library itself:

$ g++ foobar.cpp -I$VLROOT -L$VLROOT/bin/glnxa64/ -lvl

Finally, add the $VLROOT/bin/glnxa64 directory to the ldconfig cache as explained here. This enables your program to find and load the libvl.so shared library when it is executed.

Tried with: VLFeat 0.9.18 and Ubuntu 12.04 LTS


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧