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

博客介绍了ffmpeg-0.11.1和OpenCV-2.4.2的配置过程,因OpenCV解码视频数据需依赖ffmpeg,所以要先安装ffmpeg。还说明了环境变量的设置方法,最后讲解了IDT源码的运行步骤,包括下载、解压、执行命令等。

来源 :仅作翻译使用

https://blog.youkuaiyun.com/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:
在这里插入图片描述

下载方式:https://pan.quark.cn/s/a4b39357ea24 布线问题(分支限界算法)是计算机科学和电子工程领域中一个广为人知的议题,它主要探讨如何在印刷电路板上定位两个节点间最短的连接路径。 在这一议题中,电路板被构建为一个包含 n×m 个方格的矩阵,每个方格能够被界定为可通行或不可通行,其核心任务是定位从初始点到最终点的最短路径。 分支限界算法是处理布线问题的一种常用策略。 该算法与回溯法有相似之处,但存在差异,分支限界法仅需获取满足约束条件的一个最优路径,并按照广度优先或最小成本优先的原则来探索解空间树。 树 T 被构建为子集树或排列树,在探索过程中,每个节点仅被赋予一次成为扩展节点的机会,且会一次性生成其全部子节点。 针对布线问题的解决,队列式分支限界法可以被采用。 从起始位置 a 出发,将其设定为首个扩展节点,并将与该扩展节点相邻且可通行的方格加入至活跃节点队列中,将这些方格标记为 1,即从起始方格 a 到这些方格的距离为 1。 随后,从活跃节点队列中提取队首节点作为下一个扩展节点,并将与当前扩展节点相邻且未标记的方格标记为 2,随后将这些方格存入活跃节点队列。 这一过程将持续进行,直至算法探测到目标方格 b 或活跃节点队列为空。 在实现上述算法时,必须定义一个类 Position 来表征电路板上方格的位置,其成员 row 和 col 分别指示方格所在的行和列。 在方格位置上,布线能够沿右、下、左、上四个方向展开。 这四个方向的移动分别被记为 012、3。 下述表格中,offset[i].row 和 offset[i].col(i=0,1,2,3)分别提供了沿这四个方向前进 1 步相对于当前方格的相对位移。 在 Java 编程语言中,可以使用二维数组...
conda_env.txt的内容是# This file may be used to create an environment using: # $ conda create --name <env> --file <this file> # platform: linux-64 _libgcc_mutex=0.1=main _openmp_mutex=5.1=1_gnu alabaster=0.7.12=pyhd3eb1b0_0 arrow=1.2.3=py312h06a4308_1 astroid=2.14.2=py312h06a4308_0 asttokens=2.0.5=pyhd3eb1b0_0 atomicwrites=1.4.0=py_0 attrs=23.1.0=py312h06a4308_0 autopep8=2.0.4=pyhd3eb1b0_0 babel=2.11.0=py312h06a4308_0 beautifulsoup4=4.12.2=py312h06a4308_0 binaryornot=0.4.4=pyhd3eb1b0_1 black=24.3.0=py312h06a4308_0 blas=1.0=mkl bleach=4.1.0=pyhd3eb1b0_0 brotli=1.0.9=h5eee18b_8 brotli-bin=1.0.9=h5eee18b_8 brotli-python=1.0.9=py312h6a678d5_8 bzip2=1.0.8=h5eee18b_6 ca-certificates=2024.3.11=h06a4308_0 certifi=2024.2.2=py312h06a4308_0 cffi=1.16.0=py312h5eee18b_1 chardet=4.0.0=py312h06a4308_1003 charset-normalizer=2.0.4=pyhd3eb1b0_0 click=8.1.7=py312h06a4308_0 cloudpickle=2.2.1=py312h06a4308_0 colorama=0.4.6=py312h06a4308_0 comm=0.2.1=py312h06a4308_0 contourpy=1.2.0=py312hdb19cb5_0 cookiecutter=2.6.0=py312h06a4308_0 cryptography=42.0.5=py312hdda0065_0 cuda-cudart=11.8.89=0 cuda-cupti=11.8.87=0 cuda-libraries=11.8.0=0 cuda-nvcc=12.4.131=0 cuda-nvrtc=11.8.89=0 cuda-nvtx=11.8.86=0 cuda-runtime=11.8.0=0 cudatoolkit=11.8.0=h6a678d5_0 cycler=0.11.0=pyhd3eb1b0_0 cyrus-sasl=2.1.28=h52b45da_1 dbus=1.13.18=hb2f20db_0 debugpy=1.6.7=py312h6a678d5_0 decorator=5.1.1=pyhd3eb1b0_0 defusedxml=0.7.1=pyhd3eb1b0_0 diff-match-patch=20200713=pyhd3eb1b0_0 dill=0.3.7=py312h06a4308_0 docstring-to-markdown=0.11=py312h06a4308_0 docutils=0.18.1=py312h06a4308_3 executing=0.8.3=pyhd3eb1b0_0 expat=2.6.2=h6a678d5_0 ffmpeg=4.3=hf484d3e_0 filelock=3.13.1=py312h06a4308_0 flake8=7.0.0=py312h06a4308_0 fontconfig=2.14.1=h4c34cd2_2 fonttools=4.51.0=py312h5eee18b_0 freetype=2.12.1=h4a9f257_0 glib=2.78.4=h6a678d5_0 glib-tools=2.78.4=h6a678d5_0 gmp=6.2.1=h295c915_3 gnutls=3.6.15=he1e5248_0 gst-plugins-base=1.14.1=h6a678d5_1 gstreamer=1.14.1=h5eee18b_1 icu=73.1=h6a678d5_0 idna=3.7=py312h06a4308_0 imagesize=1.4.1=py312h06a4308_0 importlib-metadata=7.0.1=py312h06a4308_0 inflection=0.5.1=py312h06a4308_1 intel-openmp=2023.1.0=hdb19cb5_46306 intervaltree=3.1.0=pyhd3eb1b0_0 ipykernel=6.28.0=py312h06a4308_0 ipython=8.20.0=py312h06a4308_0 isort=5.9.3=pyhd3eb1b0_0 jaraco.classes=3.2.1=pyhd3eb1b0_0 jedi=0.18.1=py312h06a4308_1 jeepney=0.7.1=pyhd3eb1b0_0 jellyfish=1.0.1=py312hb02cf49_0 jinja2=3.1.3=py312h06a4308_0 jpeg=9e=h5eee18b_1 jsonschema=4.19.2=py312h06a4308_0 jsonschema-specifications=2023.7.1=py312h06a4308_0 jupyter_client=8.6.0=py312h06a4308_0 jupyter_core=5.5.0=py312h06a4308_0 jupyterlab_pygments=0.2.2=py312h06a4308_0 keyring=24.3.1=py312h06a4308_0 kiwisolver=1.4.4=py312h6a678d5_0 krb5=1.20.1=h143b758_1 lame=3.100=h7b6447c_0 lazy-object-proxy=1.10.0=py312h5eee18b_0 lcms2=2.12=h3be6417_0 ld_impl_linux-64=2.38=h1181459_1 lerc=3.0=h295c915_0 libbrotlicommon=1.0.9=h5eee18b_8 libbrotlidec=1.0.9=h5eee18b_8 libbrotlienc=1.0.9=h5eee18b_8 libclang=14.0.6=default_hc6dbbc7_1 libclang13=14.0.6=default_he11475f_1 libcublas=11.11.3.6=0 libcufft=10.9.0.58=0 libcufile=1.9.1.3=0 libcups=2.4.2=h2d74bed_1 libcurand=10.3.5.147=0 libcusolver=11.4.1.48=0 libcusparse=11.7.5.86=0 libdeflate=1.17=h5eee18b_1 libedit=3.1.20230828=h5eee18b_0 libevent=2.1.12=hdbd6064_1 libffi=3.4.4=h6a678d5_1 libgcc-ng=11.2.0=h1234567_1 libgfortran-ng=11.2.0=h00389a5_1 libgfortran5=11.2.0=h1234567_1 libglib=2.78.4=hdc74915_0 libgomp=11.2.0=h1234567_1 libiconv=1.16=h5eee18b_3 libidn2=2.3.4=h5eee18b_0 libjpeg-turbo=2.0.0=h9bf148f_0 libllvm14=14.0.6=hdb19cb5_3 libnpp=11.8.0.86=0 libnvjpeg=11.9.0.86=0 libpng=1.6.39=h5eee18b_0 libpq=12.17=hdbd6064_0 libsodium=1.0.18=h7b6447c_0 libspatialindex=1.9.3=h2531618_0 libstdcxx-ng=11.2.0=h1234567_1 libtasn1=4.19.0=h5eee18b_0 libtiff=4.5.1=h6a678d5_0 libunistring=0.9.10=h27cfd23_0 libuuid=1.41.5=h5eee18b_0 libwebp-base=1.3.2=h5eee18b_0 libxcb=1.15=h7f8727e_0 libxkbcommon=1.0.1=h5eee18b_1 libxml2=2.10.4=hfdd30dd_2 llvm-openmp=14.0.6=h9e868ea_0 lz4-c=1.9.4=h6a678d5_1 markdown-it-py=2.2.0=py312h06a4308_1 markupsafe=2.1.3=py312h5eee18b_0 matplotlib=3.8.4=py312h06a4308_0 matplotlib-base=3.8.4=py312h526ad5a_0 matplotlib-inline=0.1.6=py312h06a4308_0 mccabe=0.7.0=pyhd3eb1b0_0 mdurl=0.1.0=py312h06a4308_0 mistune=2.0.4=py312h06a4308_0 mkl=2023.1.0=h213fc3f_46344 mkl-service=2.4.0=py312h5eee18b_1 mkl_fft=1.3.8=py312h5eee18b_0 mkl_random=1.2.4=py312hdb19cb5_0 more-itertools=10.1.0=py312h06a4308_0 mpmath=1.3.0=py312h06a4308_0 mypy_extensions=1.0.0=py312h06a4308_0 mysql=5.7.24=h721c034_2 nbclient=0.8.0=py312h06a4308_0 nbconvert=7.10.0=py312h06a4308_0 nbformat=5.9.2=py312h06a4308_0 ncurses=6.4=h6a678d5_0 nest-asyncio=1.6.0=py312h06a4308_0 nettle=3.7.3=hbbd107a_1 networkx=3.1=py312h06a4308_0 nspr=4.35=h6a678d5_0 nss=3.89.1=h6a678d5_0 numpy=1.26.4=py312hc5e2394_0 numpy-base=1.26.4=py312h0da6c21_0 numpydoc=1.5.0=py312h06a4308_0 openh264=2.1.1=h4ff587b_0 openjpeg=2.4.0=h3ad879b_0 openssl=3.0.13=h7f8727e_1 packaging=23.2=py312h06a4308_0 pandocfilters=1.5.0=pyhd3eb1b0_0 parso=0.8.3=pyhd3eb1b0_0 pathspec=0.10.3=py312h06a4308_0 pcre2=10.42=hebb0a14_0 pexpect=4.8.0=pyhd3eb1b0_3 pickleshare=0.7.5=pyhd3eb1b0_1003 pillow=10.3.0=py312h5eee18b_0 pip=23.3.1=py312h06a4308_0 platformdirs=3.10.0=py312h06a4308_0 pluggy=1.0.0=py312h06a4308_1 ply=3.11=py312h06a4308_1 prompt-toolkit=3.0.43=py312h06a4308_0 prompt_toolkit=3.0.43=hd3eb1b0_0 psutil=5.9.0=py312h5eee18b_0 ptyprocess=0.7.0=pyhd3eb1b0_2 pure_eval=0.2.2=pyhd3eb1b0_0 pybind11-abi=5=hd3eb1b0_0 pycodestyle=2.11.1=py312h06a4308_0 pycparser=2.21=pyhd3eb1b0_0 pydocstyle=6.3.0=py312h06a4308_0 pyflakes=3.2.0=py312h06a4308_0 pygments=2.15.1=py312h06a4308_1 pylint=2.16.2=py312h06a4308_0 pylint-venv=3.0.3=py312h06a4308_0 pyls-spyder=0.4.0=pyhd3eb1b0_0 pyparsing=3.0.9=py312h06a4308_0 pyqt=5.15.10=py312h6a678d5_0 pyqt5-sip=12.13.0=py312h5eee18b_0 pyqtwebengine=5.15.10=py312h6a678d5_0 pysocks=1.7.1=py312h06a4308_0 python=3.12.3=h996f2a0_0 python-dateutil=2.8.2=pyhd3eb1b0_0 python-fastjsonschema=2.16.2=py312h06a4308_0 python-lsp-black=2.0.0=py312h06a4308_0 python-lsp-jsonrpc=1.1.2=pyhd3eb1b0_0 python-lsp-server=1.10.0=py312h06a4308_0 python-slugify=5.0.2=pyhd3eb1b0_0 pytoolconfig=1.2.6=py312h06a4308_0 pytorch=2.3.0=py3.12_cuda11.8_cudnn8.7.0_0 pytorch-cuda=11.8=h7e8668a_5 pytorch-mutex=1.0=cuda pytz=2024.1=py312h06a4308_0 pyxdg=0.27=pyhd3eb1b0_0 pyyaml=6.0.1=py312h5eee18b_0 pyzmq=25.1.2=py312h6a678d5_0 qdarkstyle=3.2.3=pyhd3eb1b0_0 qstylizer=0.2.2=py312h06a4308_0 qt-main=5.15.2=h53bd1ea_10 qt-webengine=5.15.9=h9ab4d14_7 qtawesome=1.2.2=py312h06a4308_0 qtconsole=5.5.1=py312h06a4308_0 qtpy=2.4.1=py312h06a4308_0 readline=8.2=h5eee18b_0 referencing=0.30.2=py312h06a4308_0 requests=2.31.0=py312h06a4308_1 rich=13.3.5=py312h06a4308_1 rope=1.12.0=py312h06a4308_0 rpds-py=0.10.6=py312hb02cf49_0 rtree=1.0.1=py312h06a4308_0 scipy=1.13.0=py312hc5e2394_0 secretstorage=3.3.1=py312h06a4308_1 setuptools=68.2.2=py312h06a4308_0 sip=6.7.12=py312h6a678d5_0 six=1.16.0=pyhd3eb1b0_1 snowballstemmer=2.2.0=pyhd3eb1b0_0 sortedcontainers=2.4.0=pyhd3eb1b0_0 soupsieve=2.5=py312h06a4308_0 sphinx=5.0.2=py312h06a4308_0 sphinxcontrib-applehelp=1.0.2=pyhd3eb1b0_0 sphinxcontrib-devhelp=1.0.2=pyhd3eb1b0_0 sphinxcontrib-htmlhelp=2.0.0=pyhd3eb1b0_0 sphinxcontrib-jsmath=1.0.1=pyhd3eb1b0_0 sphinxcontrib-qthelp=1.0.3=pyhd3eb1b0_0 sphinxcontrib-serializinghtml=1.1.5=pyhd3eb1b0_0 spyder=5.5.1=py312h06a4308_0 spyder-kernels=2.5.0=py312h06a4308_0 sqlite=3.45.3=h5eee18b_0 stack_data=0.2.0=pyhd3eb1b0_0 sympy=1.12=py312h06a4308_0 tbb=2021.8.0=hdb19cb5_0 text-unidecode=1.3=pyhd3eb1b0_0 textdistance=4.2.1=pyhd3eb1b0_0 three-merge=0.1.1=pyhd3eb1b0_0 tinycss2=1.2.1=py312h06a4308_0 tk=8.6.12=h1ccaba5_0 tomli=2.0.1=py312h06a4308_1 tomlkit=0.11.1=py312h06a4308_0 torchaudio=2.3.0=py312_cu118 torchvision=0.18.0=py312_cu118 tornado=6.3.3=py312h5eee18b_0 tqdm=4.66.2=py312he106c6f_0 traitlets=5.7.1=py312h06a4308_0 typing_extensions=4.9.0=py312h06a4308_1 tzdata=2024a=h04d1e81_0 ujson=5.4.0=py312h6a678d5_0 unicodedata2=15.1.0=py312h5eee18b_0 unidecode=1.2.0=pyhd3eb1b0_0 urllib3=2.1.0=py312h06a4308_1 watchdog=2.1.6=py312h06a4308_0 wcwidth=0.2.5=pyhd3eb1b0_0 webencodings=0.5.1=py312h06a4308_2 whatthepatch=1.0.2=py312h06a4308_0 wheel=0.41.2=py312h06a4308_0 wrapt=1.14.1=py312h5eee18b_0 wurlitzer=3.0.2=py312h06a4308_0 xz=5.4.6=h5eee18b_1 yaml=0.2.5=h7b6447c_0 yapf=0.40.2=py312h06a4308_0 zeromq=4.3.5=h6a678d5_0 zipp=3.17.0=py312h06a4308_0 zlib=1.2.13=h5eee18b_1 zstd=1.5.5=hc292b87_1这是什么
09-07
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值