Ubuntu_ROS中应用kinect v2笔记

时间:2021-12-15 07:48:58

Ubuntu_ROS中应用kinect v2笔记

个人觉得最重要的资料如下:

1.

Microsoft Kinect v2 Driver Released

http://www.ros.org/news/2014/09/microsoft-kinect-v2-driver-released.html

2.

OpenKinect

https://github.com/OpenKinect/libfreenect2

3.

code-iai

https://github.com/code-iai/iai_kinect2

测试基本效果

http://v.youku.com/v_show/id_XMTQyNDAzNTM2OA

机器人课件分享

http://pan.baidu.com/s/1eRrM4QA

rtabmap kinect2:

http://official-rtab-map-forum.67519.x6.nabble.com/rtabmap-for-kinect-v2-on-ROS-Indigo-td61.html

https://github.com/introlab

附件::

libfreenect2

Table of Contents

Description

Driver for Kinect for Windows v2 (K4W2) devices (release and developer preview).

Note: libfreenect2 does not do anything for either Kinect for Windows v1 or Kinect for Xbox 360 sensors. Use libfreenect1 for those sensors.

If you are using libfreenect2 in an academic context, please cite our work using the following DOI: Ubuntu_ROS中应用kinect v2笔记

If you use the KDE depth unwrapping algorithm implemented in the library, please also cite this ECCV 2016 paper.

This driver supports:

  • RGB image transfer
  • IR and depth image transfer
  • registration of RGB and depth images

Missing features:

Watch the OpenKinect wiki at www.openkinect.org and the mailing list at https://groups.google.com/forum/#!forum/openkinect for the latest developments and more information about the K4W2 USB protocol.

The API reference documentation is provided here https://openkinect.github.io/libfreenect2/.

Requirements

Hardware requirements

  • USB 3.0 controller. USB 2 is not supported.

Intel and NEC USB 3.0 host controllers are known to work. ASMedia controllers are known to not work.

Virtual machines likely do not work, because USB 3.0 isochronous transfer is quite delicate.

Requirements for multiple Kinects

It has been reported to work for up to 5 devices on a high-end PC using multiple separate PCI Express USB3 expansion cards (with NEC controller chip). If you're using Linux, you may have to increase USBFS memory buffers. Depending on the number of Kinects, you may need to use an even larger buffer size. If you're using an expansion card, make sure it's not plugged into an PCI-E x1 slot. A single lane doesn't have enough bandwidth. x8 or x16 slots usually work.

Operating system requirements

  • Windows 7 (buggy), Windows 8, Windows 8.1, and probably Windows 10
  • Debian, Ubuntu 14.04 or newer, probably other Linux distros. Recommend kernel 3.16+ or as new as possible.
  • Mac OS X

Requirements for optional features

  • OpenGL depth processing: OpenGL 3.1 (Windows, Linux, Mac OS X). OpenGL ES is not supported at the moment.
  • OpenCL depth processing: OpenCL 1.1
  • CUDA depth processing: CUDA (6.5 and 7.5 are tested; The minimum version is not clear.)
  • VAAPI JPEG decoding: Intel (minimum Ivy Bridge or newer) and Linux only
  • VideoToolbox JPEG decoding: Mac OS X only
  • OpenNI2 integration: OpenNI2 2.2.0.33
  • Jetson TK1: Linux4Tegra 21.3 or later. Check Jetson TK1 issues before installation. Jetson TX1 is not yet supported as the developers don't have one, but it may be easy to add the support.

Troubleshooting and reporting bugs

First, check https://github.com/OpenKinect/libfreenect2/wiki/Troubleshooting for known issues.

When you report USB issues, please attach relevant debug log from running the program with environment variable LIBUSB_DEBUG=3, and relevant log from dmesg. Also include relevant hardware information lspci and lsusb -t.

Maintainers

  • Joshua Blake joshblake@gmail.com
  • Florian Echtler
  • Christian Kerl
  • Lingzhu Xiang (development/master branch)

Installation

Windows / Visual Studio

  • Install UsbDk driver

    1. (Windows 7) You must first install Microsoft Security Advisory 3033929 otherwise your USB keyboards and mice will stop working!
    2. Download the latest x64 installer from https://github.com/daynix/UsbDk/releases, install it.
    3. If UsbDk somehow does not work, uninstall UsbDk and follow the libusbK instructions.

    This doesn't interfere with the Microsoft SDK. Do not install both UsbDK and libusbK drivers

  • (Alternatively) Install libusbK driver

    You don't need the Kinect for Windows v2 SDK to build and install libfreenect2, though it doesn't hurt to have it too. You don't need to uninstall the SDK or the driver before doing this procedure.

    Install the libusbK backend driver for libusb. Please follow the steps exactly:

    1. Download Zadig from http://zadig.akeo.ie/.
    2. Run Zadig and in options, check "List All Devices" and uncheck "Ignore Hubs or Composite Parents"
    3. Select the "Xbox NUI Sensor (composite parent)" from the drop-down box. (Important: Ignore the "NuiSensor Adaptor" varieties, which are the adapter, NOT the Kinect) The current driver will list usbccgp. USB ID is VID 045E, PID 02C4 or 02D8.
    4. Select libusbK (v3.0.7.0 or newer) from the replacement driver list.
    5. Click the "Replace Driver" button. Click yes on the warning about replacing a system driver. (This is because it is a composite parent.)

    To uninstall the libusbK driver (and get back the official SDK driver, if installed):

    1. Open "Device Manager"
    2. Under "libusbK USB Devices" tree, right click the "Xbox NUI Sensor (Composite Parent)" device and select uninstall.
    3. Important: Check the "Delete the driver software for this device." checkbox, then click OK.

    If you already had the official SDK driver installed and you want to use it:

    1. In Device Manager, in the Action menu, click "Scan for hardware changes."

    This will enumerate the Kinect sensor again and it will pick up the K4W2 SDK driver, and you should be ready to run KinectService.exe again immediately.

    You can go back and forth between the SDK driver and the libusbK driver very quickly and easily with these steps.

  • Build libusb

    Open a Git shell (GitHub for Windows), or any shell that has access to git.exe and msbuild.exe

    cd depends/
    .\install_libusb_vs2013.cmd

    Or install_libusb_vs2015.cmd. If you see some errors, you can always open the cmd files and follow the git commands, and maybe build libusb_201x.sln with Visual Studio by hand. Building with "Win32" is not recommended as it results in lower performance.

  • Install TurboJPEG

    Download from http://sourceforge.net/projects/libjpeg-turbo/files, extract it to c:\libjpeg-turbo64 or depends/libjpeg-turbo64, or anywhere as specified by the environment variable TurboJPEG_ROOT.

  • Install GLFW

    Download from http://www.glfw.org/download.html (64-bit), extract as depends/glfw (rename glfw-3.x.x.bin.WIN64 to glfw), or anywhere as specified by the environment variable GLFW_ROOT.

  • Install OpenCL (optional)
    1. Intel GPU: Download "Intel® SDK for OpenCL™ Applications 2016" from https://software.intel.com/en-us/intel-opencl (requires free registration) and install it.
  • Install CUDA (optional, Nvidia only)
    1. Download CUDA Toolkit and install it. NOTE: CUDA 7.5 does not support Visual Studio 2015.
  • Install OpenNI2 (optional)

    Download OpenNI 2.2.0.33 (x64) from http://structure.io/openni, install it to default locations (C:\Program Files...).

  • Build

    The default installation path is install, you may change it by editing CMAKE_INSTALL_PREFIX.

    mkdir build && cd build
    cmake .. -G "Visual Studio 12 2013 Win64"
    cmake --build . --config RelWithDebInfo --target install

    Or -G "Visual Studio 14 2015 Win64".

  • Run the test program: .\install\bin\Protonect.exe, or start debugging in Visual Studio.
  • Test OpenNI2 (optional)

    Copy freenect2-openni2.dll, and other dll files (libusb-1.0.dll, glfw.dll, etc.) in install\bin to C:\Program Files\OpenNI2\Tools\OpenNI2\Drivers. Then run C:\Program Files\OpenNI\Tools\NiViewer.exe. Environment variable LIBFREENECT2_PIPELINE can be set to cl, cuda, etc to specify the pipeline.

Mac OSX

Use your favorite package managers (brew, ports, etc.) to install most if not all dependencies:

  • Make sure these build tools are available: wget, git, cmake, pkg-config. Xcode may provide some of them. Install the rest via package managers.
  • Download libfreenect2 source

    git clone https://github.com/OpenKinect/libfreenect2.git
    cd libfreenect2
  • Install dependencies: libusb, GLFW

    brew update
    brew install libusb
    brew tap homebrew/versions
    brew install glfw3
  • Install TurboJPEG (optional)

    brew tap homebrew/science
    brew install jpeg-turbo
  • Install CUDA (optional): TODO
  • Install OpenNI2 (optional)

    brew install openni2
    export OPENNI2_REDIST=/usr/local/lib/ni2
    export OPENNI2_INCLUDE=/usr/local/include/ni2
  • Build

    mkdir build && cd build
    cmake ..
    make
    make install
  • Run the test program: ./bin/Protonect
  • Test OpenNI2. make install-openni2 (may need sudo), then run NiViewer. Environment variable LIBFREENECT2_PIPELINE can be set to cl, cuda, etc to specify the pipeline.

Linux

Note: Ubuntu 12.04 is too old to support. Debian jessie may also be too old, and Debian stretch is implied in the following.

  • Download libfreenect2 source

    git clone https://github.com/OpenKinect/libfreenect2.git
    cd libfreenect2
  • (Ubuntu 14.04 only) Download upgrade deb files

    cd depends; ./download_debs_trusty.sh
  • Install build tools

    sudo apt-get install build-essential cmake pkg-config
  • Install libusb. The version must be >= 1.0.20.
    1. (Ubuntu 14.04 only) sudo dpkg -i debs/libusb*deb
    2. (Other) sudo apt-get install libusb-1.0-0-dev
  • Install TurboJPEG
    1. (Ubuntu 14.04 and newer) sudo apt-get install libturbojpeg libjpeg-turbo8-dev
    2. (Debian) sudo apt-get install libturbojpeg0-dev
  • Install OpenGL
    1. (Ubuntu 14.04 only) sudo dpkg -i debs/libglfw3*deb; sudo apt-get install -f; sudo apt-get install libgl1-mesa-dri-lts-vivid (If the last command conflicts with other packages, don't do it.)
    2. (Odroid XU4) OpenGL 3.1 is not supported on this platform. Use cmake -DENABLE_OPENGL=OFF later.
    3. (Other) sudo apt-get install libglfw3-dev
  • Install OpenCL (optional)
    • Intel GPU
      1. (Ubuntu 14.04 only) sudo apt-add-repository ppa:floe/beignet; sudo apt-get update; sudo apt-get install beignet-dev; sudo dpkg -i debs/ocl-icd*deb
      2. (Other) sudo apt-get install beignet-dev
      3. For older kernels, # echo 0 >/sys/module/i915/parameters/enable_cmd_parser is needed. See more known issues at https://www.freedesktop.org/wiki/Software/Beignet/.
    • AMD GPU: Install the latest version of the AMD Catalyst drivers from https://support.amd.com and apt-get install opencl-headers.
    • Mali GPU (e.g. Odroid XU4): (with root) mkdir -p /etc/OpenCL/vendors; echo /usr/lib/arm-linux-gnueabihf/mali-egl/libmali.so >/etc/OpenCL/vendors/mali.icd; apt-get install opencl-headers.
    • Verify: You can install clinfo to verify if you have correctly set up the OpenCL stack.
  • Install CUDA (optional, Nvidia only):
    • (Ubuntu 14.04 only) Download cuda-repo-ubuntu1404...*.deb ("deb (network)") from Nvidia website, follow their installation instructions, including apt-get install cuda which installs Nvidia graphics driver.
    • (Jetson TK1) It is preloaded.
    • (Nvidia/Intel dual GPUs) After apt-get install cuda, use sudo prime-select intel to use Intel GPU for desktop.
    • (Other) Follow Nvidia website's instructions.
  • Install VAAPI (optional, Intel only)
    1. (Ubuntu 14.04 only) sudo dpkg -i debs/{libva,i965}*deb; sudo apt-get install -f
    2. (Other) sudo apt-get install libva-dev libjpeg-dev
    3. Linux kernels 4.1 to 4.3 have performance regression. Use 4.0 and earlier or 4.4 and later (Though Ubuntu kernel 4.2.0-28.33~14.04.1 has backported the fix).
  • Install OpenNI2 (optional)
    1. (Ubuntu 14.04 only) sudo apt-add-repository ppa:deb-rob/ros-trusty && sudo apt-get update (You don't need this if you have ROS repos), then sudo apt-get install libopenni2-dev
    2. (Other) sudo apt-get install libopenni2-dev.
  • Build

    cd ..
    mkdir build && cd build
    cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/freenect2
    make
    make install

    You need to specify cmake -Dfreenect2_DIR=$HOME/freenect2/lib/cmake/freenect2 for CMake based third-party application to find libfreenect2.

  • Set up udev rules for device access: sudo cp ../platform/linux/udev/90-kinect2.rules /etc/udev/rules.d/, then replug the Kinect.
  • Run the test program: ./bin/Protonect
  • Run OpenNI2 test (optional): sudo apt-get install openni2-utils && sudo make install-openni2 && NiViewer2. Environment variable LIBFREENECT2_PIPELINE can be set to cl, cuda, etc to specify the pipeline.

IAI Kinect2

Maintainer

Read this first

Please read this README and the ones of the individual components throughly before asking questions. We get a lot of repeated questions, so when you have a problem, we urge everyone to check the github issues (including closed ones). Your issue is very likely discussed there already.

The goal of this project is to give you a driver and the tools needed to receive data from the Kinect-2 sensor, in a way useful for robotics. You will still need to know how to use ROS to make use of it. Please follow the ROS tutorials. You will also need to learn how to work with point-clouds, or depth-clouds, or images (computer vision) to do useful things with the data.

Note: Please use the GitHub issues for questions and problems regarding the iai_kinect2 package and its components. Do not write emails.

Table of contents

Description

This is a collection of tools and libraries for a ROS Interface to the Kinect One (Kinect v2).

It contains:

FAQ

If I have any question or someting is not working, what should I do first?

First you should look at this FAQ and the FAQ from libfreenect2.Secondly, look at issue page from libfreenect2 andthe issue page of iai_kinect2 for similar issues and solutions.

Point clouds are not being published?

Point clouds are only published when the launch file is used. Make sure to start kinect2_bridge with roslaunch kinect2_bridge kinect2_bridge.launch.

Will it work with OpenCV 3.0

Short answer: No.

Long answer: Yes, it is possible to compile this package with OpenCV 3.0, but it will not work.This is because cv_bridge is used, which itself is compiled with OpenCV 2.4.x in ROS Indigo/Jade andlinking against both OpenCV versions is not possible. Working support for OpenCV 3.0 might come with a future ROS release.

kinect2_bridge is not working / crashing, what is wrong?

There are many reasons why kinect2_bridge might not working. The first thing to find out whether the problem is related to kinect2_bridge or libfreenect2.A good tool for testing is Protonect, it is a binary located in libfreenect2/build/bin/Protonect.It uses libfreenect2 directly with a minimal dependency on other libraries, so it is a good tool for the first tests.

Execute:

  • ./Protonect gl to test OpenGL support.
  • ./Protonect cl to test OpenCL support.
  • ./Protonect cpu to test CPU support.

Before running kinect2_bridge please make sure Protonect is working and showing color, depth and ir images.If some of them are black, than there is a problem not related to kinect2_bridge and you should look at the issues from the libfreenect2 GitHub page for help.

If one of them works, try out the one that worked with kinect2_bridge: rosrun kinect2_bridge kinect2_bridge _depth_method:=<opengl|opencl|cpu>.You can also change the registration method with _reg_method:=<cpu|opencl>.

Protonect works fine, but kinect2_bridge is still not working / crashing.

If that is the case, you have to make sure that Protonect uses the same version of libfreenect2 as kinect2_bridge does.To do so, run make and sudo make install in the build folder again. And try out kinect2_bridge again.

cd libfreenect2/build
make & sudo make install

Also make sure that you are not using OpenCV 3.0.

If it is still crashing, compile it in debug and run it with gdb:

cd <catkin_ws>
catkin_make -DCMAKE_BUILD_TYPE="Debug"
cd devel/lib/kinect2_bridge
gdb kinect2_bridge
// inside gdb: run until it crashes and do a backtrace
run
bt
quit

Open an issue and post the problem description and the output from the backtrace (bt).

kinect2_bridge hangs and prints "waiting for clients to connect"

This is the normal behavior. 'kinect2_bridge' will only process data when clients are connected (ROS nodes listening to at least one of the topics).This saves CPU and GPU resources. As soon as you start the kinect_viewer or rostopic hz on one of the topics, processing should start.

rosdep: Cannot locate rosdep definition for [kinect2_bridge] or [kinect2_registration]

rosdep will output errors on not being able to locate [kinect2_bridge] and [kinect2_registration].That is fine because they are all part of the iai_kinect2 package and rosdep does not know these packages.

Protonect or kinect2_bridge outputs [TransferPool::submit] failed to submit transfer

This indicates problems with the USB connection.

I still have an issue, what should I do?

First of all, check the issue pages on GitHub for similar issues, as they might contain solutions for them.By default you will only see the open issues, but if you click on closed you will the the ones solved. There is also a search field which helps to find similar issues.

If you found no solution in the issues, feel free to open a new issue for your problem. Please describe your problem in detail and provide error messages and log output.

Dependencies

  • ROS Hydro/Indigo
  • OpenCV (2.4.x, using the one from the official Ubuntu repositories is recommended)
  • PCL (1.7.x, using the one from the official Ubuntu repositories is recommended)
  • Eigen (optional, but recommended)
  • OpenCL (optional, but recommended)
  • libfreenect2 (>= v0.2.0, for stability checkout the latest stable release)

Install

  1. Install the ROS. Instructions for Ubuntu 14.04
  2. Setup your ROS environment
  3. Install libfreenect2:

    Follow the instructions and enable C++11 by using cmake .. -DENABLE_CXX11=ON instead of cmake ..

    If something is not working, check out the latest stable release, for example git checkout v0.2.0.

  4. Clone this repository into your catkin workspace, install the dependencies and build it:

    cd ~/catkin_ws/src/
    git clone https://github.com/code-iai/iai_kinect2.git
    cd iai_kinect2
    rosdep install -r --from-paths .
    cd ~/catkin_ws
    catkin_make -DCMAKE_BUILD_TYPE="Release"

    Note: rosdep will output errors on not being able to locate [kinect2_bridge] and [depth_registration].That is fine because they are all part of the iai_kinect2 package and rosdep does not know these packages.

    Note: If you installed libfreenect2 somewhere else than in $HOME/freenect2 or a standard location like /usr/localyou have to specify the path to it by adding -Dfreenect2_DIR=path_to_freenect2/lib/cmake/freenect2 to catkin_make.

  5. Connect your sensor and run kinect2_bridge:

    roslaunch kinect2_bridge kinect2_bridge.launch
  6. Calibrate your sensor using the kinect2_calibration. Further details
  7. Add the calibration files to the kinect2_bridge/data/<serialnumber> folder. Further details
  8. Restart kinect2_bridge and view the results using rosrun kinect2_viewer kinect2_viewer kinect2 sd cloud.

GPU acceleration

OpenCL with AMD

Install the latest version of the AMD Catalyst drivers from https://support.amd.com and follow the instructions. Also install opencl-headers.

sudo apt-get install opencl-headers

OpenCL/CUDA with Nvidia

Go to developer.nvidia.com/cuda-downloads and select linux, x86_64, Ubuntu, 14.04, deb(network).Download the file and follow the instructions. Also install nvidia-modprobe and opencl-headers.

sudo apt-get install nvidia-modprobe opencl-headers

You also need to add CUDA paths to the system environment, add these lines to you ~/.bashrc:

export LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"
export PATH="/usr/local/cuda/bin:${PATH}"

A system-wide configuration of the libary path can be created with the following commands:

echo "/usr/local/cuda/lib64" | sudo tee /etc/ld.so.conf.d/cuda.conf
sudo ldconfig

OpenCL with Intel

You can either install a binary package from a PPA like ppa:floe/beignet, or build beignet yourself.It's recommended to use the binary from the PPA.

sudo add-apt-repository ppa:floe/beignet && sudo apt-get update
sudo apt-get install beignet beignet-dev opencl-headers

Citation

If you used iai_kinect2 for your work, please cite it.

@misc{iai_kinect2,
author = {Wiedemeyer, Thiemo},
title = {{IAI Kinect2}},
organization = {Institute for Artificial Intelligence},
address = {University Bremen},
year = {2014 -- 2015},
howpublished = {\url{https://github.com/code-iai/iai\_kinect2}},
note = {Accessed June 12, 2015}
}

The result should look something similar to this (may depend on the bibliography style used):

T. Wiedemeyer, “IAI Kinect2,” https://github.com/code-iai/iai_kinect2,
Institute for Artificial Intelligence, University Bremen, 2014 – 2015,
accessed June 12, 2015.

Screenshots

Here are some screenshots from our toolkit:Ubuntu_ROS中应用kinect v2笔记Ubuntu_ROS中应用kinect v2笔记Ubuntu_ROS中应用kinect v2笔记Ubuntu_ROS中应用kinect v2笔记

Ubuntu_ROS中应用kinect v2笔记的更多相关文章

  1. 【翻译】Kinect v2程序设计&lpar;C&plus;&plus;-&rpar; AudioBeam篇

    Kinect v2,Microphone Array可以用来对于水平面音源方向的推测(AudioBeam)和语音识别(Speech Recognition).这一节是介绍如何取得AudioBeam. ...

  2. 【翻译】Kinect v2程序设计&lpar;C&plus;&plus;&rpar; Body 篇

    Kinect SDK v2预览版的主要功能的使用介绍,基本上完成了.这次,是关于取得Body(人体姿势)方法的说明.   上一节,是使用Kinect SDK v2预览版从Kinect v2预览版取得B ...

  3. 【翻译】Kinect v2程序设计&lpar;C&plus;&plus;&rpar; Color篇

    Kinect SDK v2预览版,获取数据的基本流程的说明.以及取得Color图像的示例程序的介绍. 上一节,是关于当前型号Kinect for Windows(后面称作Kinect v1)和次世代型 ...

  4. Kinect开发笔记之三Kinect开发环境配置具体解释

            0.前言:        首先说一下我的开发环境,Visual Studio是2013的,系统是win8的64位版本号,SDK是Kinect for windows SDK 1.8版本 ...

  5. Kinect v2控制鼠标原理分析和源码

    https://blog.csdn.net/baolinq/article/details/54381284 此程序为利用Kinect v2实现用手指隔空控制鼠标,是我另一个项目的一部分,因为在另外那 ...

  6. ROS indigo下Kinect v2的驱动安装与调试

    ROS indigo下Kinect v2的驱动安装与调试 一.libfreenect2源码安装与测试 github地址:https://github.com/OpenKinect/libfreenec ...

  7. 【计算机视觉】深度相机(五)--Kinect v2&period;0

    原文:http://blog.csdn.NET/qq1175421841/article/details/50412994 ----微软Build2012大会:Kinect for Windows P ...

  8. 【计算机视觉】深度相机(六)--Kinect v2&period;0 手势样本库制作

    目录为1.如何使用Kinect Studio录制手势剪辑:2.如何使用Visual Gesture Builder创建手势项目:3.如何在我的C#程序中使用手势:4.关于录制.剪辑手势过程中的注意事项 ...

  9. Kinect v2&period;0 for windows开发环境说明

    官方文档里是这些: Supported Operating Systems and Architectures The following operating systems and architec ...

随机推荐

  1. 切分 Tomcat 的 catalina&period;out 文件,解决日志文件过大的问题

    原文:http://unmi.cc/split-tomcat-catalina-out-file Linux 下使用 cronolog 工具来切分 catalina.out 这里重点介绍这种方法,具体 ...

  2. YCSB测试Mysql&comma;MongoDB&comma;TokuMX&comma;Couchbase性能

    测试是由同事完成的,这里只做收藏. 测试说明: 1.数据量为3kw记录,每条记录11个字段,一个为主键,主键为字符类型,类似:user****,后续为数值 其他10字段为字符类型,100字符,记录长度 ...

  3. phpstorm 16&period;1 注册码

    phpstorm 2016.1 的注册与phpstorm 10 相同,可以采用:“服务器注册” 方式进行注册,又快又方便. 服务器注册:http://idea.qinxi1992.cn IDEA 20 ...

  4. MongoDB的安装及CURD操作

    MongoDB的下载地址:http://www.mongodb.org/downloads MongoDB有32bit和64bit两个版本,32bit只能存放2GB数据.我们选择64bit版进行下载. ...

  5. hdu杭电1671 &sol; poj3630 字典树

    传送门 题意:输入n串数字 找出是否有存在串的前缀与另一个串相同 如果存在 输出NO否则输出YES 思路:用字典树解决 标记字典树总串的结尾 查找出一个串内部是否有被标记的节点 如果有那么说明存在前缀 ...

  6. cnblog可以直接黏贴qq截图,但最好不要偷懒

    秋秋(qq)基本上算是ytkah本人开机后要开的软件了,平时也习惯用Ctrl+Alt+A快捷键来进行截图.很早以前ytkah一个无意间发现cnblog可以直接黏贴qq截图,当时截图后可能是忘记黏贴到其 ...

  7. js中获得当前时间是年份和月份

    js中获得当前时间是年份和月份,形如:201208       //获取完整的日期 var date=new Date; var year=date.getFullYear();  var month ...

  8. HDU 3974 Assign the task 简单搜索

    根据Rex 的思路才知道可以这么写. 题目意思还是很好理解的,就是找到当前雇员最近的任务. 做法是,可以开辟一个 tim 变量,每次有雇员得到昕任务时候 ++tim 然后取寻找最近的任务的时候写一个搜 ...

  9. Windows 8 动手实验系列教程 实验6:设置和首选项

    动手实验 实验6:设置和首选项 2012年9月 简介 实验3介绍了合约并演示了应用程序如何轻松地与共享和搜索合约实现集成.合约同样包含设置超级按钮,它对活动的Windows应用商店应用的设置进行修改. ...

  10. 最大流算法之Dinic

    引言: 在最大流(一)中我们讨论了关于EK算法的原理与代码实现,此文将讨论与EK算法同级别复杂度(O(N^2M))的算法--Dinic算法. Dinic算法用到的思想是图的分层结构,通过BFS将每一个 ...