IDT Source Code Running Guide(Linux+ffmpeg-0.11.1+opencv-2.4.2)

来源 :仅作翻译使用

https://blog.csdn.net/sinat_27318881/article/details/52103896#commentBox

1. ffmpeg-0.11.1 Configuration

Due to opencv needs ffmpeg to decode video data, so we should install ffmepg first. If you have already installed opencv , i suggest to uninstall the opencv .
ffmpeg and opencv download address : http://lear.inrialpes.fr/people/wang/improved_trajectories
Then decompress to the directory ffmpeg-0.11.1.
Open the terminal input the command as follows:

  1. delete the ffmpeg which had already install to avoid conflict
    sudo apt-get remove ffmpeg x264
    sudo apt- get autoremove
  2. Install necessary support
    sudo apt-get install make automake g++ bzip2 python unzip patch subversion ruby build-essential git-core checkinstall yasm texi2html libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvdpau-dev libvorbis-dev libvpx-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
    In the above command, we install multiple necessary support which are after automake and use spaces to separate them. It can also be installed separately.
  3. Compile in folder ffmpeg-0.1.11.1
    ./configure --enable-gpl --enable-nonfree --enable-version3 --enable-shared --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-libvpx
    Success is indicated by the following figure
    在这里插入图片描述
    if there is a problem with xxx not found ,it may lack of decoder, you can download x264 . Then enter the folder cd x264, and use the command as follows
    ./configure --enable-static --enable-shared
    If no error is reported, return the third compilation step can be returned.
  4. Install
    make
    make install
    idconfig
  5. Test
    Using the command ffmpeg, If an error is reported, it may conflict with gstreamer’s dynamic library. Unload gstreamer. But if you uninstall gstreamer’s multimedia software, it will not work. So you can uninstall ffmpeg and recompile it into a static library. In the third step, enable-shared is replaced by enable-static.(Static libraries are not recommended.)
    If there are still errors, try adding - prefix=/usr/local/ffmpeg after. / configure in step 3

2. OpenCV-2.4.2 Configuration

  1. Install necessary support
    apt-get install pkg-config
    export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
    apt-get install cmake
  2. Install openCV
    Download and unzip to the opencv2.4.2 folder
    mkdir release
    cd release
    cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON
    Success is indicated by the following figure
    在这里插入图片描述
    Finally make , make install idconfig

3. Setting environment variables

sudo vim /etc/ld.so.conf.d/opencv.conf
add /usr/local/lib at the end。(Here you use VIM editing commands, you should know the basic VIM commands)
Finally idconfig

4. IDT Source Running

Download : http://lear.inrialpes.fr/people/wang/improved_trajectories
Enter folder input after decompression and use make , You can see the release folder, where Video and DenseTrackStab are executable files, and then enter: ./release/DenseTrackStab ./test_sequences/person01_boxing_d1_uncomp.avi
You can see a string of numbers flashing through the terminal, if you first modify the DenseTrackStab. CPP Change 0 to 1 for better visualization int show_track = 0;
To output features, enter: ./release/DenseTrackTrack ./test_sequences/person01_boxing_d1_uncomp.avi | gzip > out.features.gz
The source code supports the following parameter modifications
在这里插入图片描述
Here’s the structure of feature:
The feature is that each of the calculations is a separate column, given in the following format:

frameNum mean_x mean_y var_x var_y length scale x_pos y_pos t_pos Trajectory HOG HOF MBHx MBHy

The first ten parts are about trajectories:
在这里插入图片描述
The following five parts are connected one by one:
在这里插入图片描述

发布了32 篇原创文章 · 获赞 7 · 访问量 7576

猜你喜欢

转载自blog.csdn.net/Isaacddx/article/details/88660665
今日推荐