******************************************************************************
* Non-Rigid Face Tracking
******************************************************************************
* by Jason Saragih, 5th Dec 2012
* http://jsaragih.org/
******************************************************************************
* Ch6 of the book "Mastering OpenCV with Practical Computer Vision Projects"
* Copyright Packt Publishing 2012.
* http://www.packtpub.com/cool-projects-with-opencv/book
******************************************************************************
----------------------------------------------------------
Building the project using CMake from the command-line:
----------------------------------------------------------
Linux:
export OpenCV_DIR="~/OpenCV/build"
mkdir build
cd build
cmake -D OpenCV_DIR=$OpenCV_DIR ../src
make
MacOSX (Xcode):
export OpenCV_DIR="~/OpenCV/build"
mkdir build
cd build
cmake -G Xcode -D OpenCV_DIR=$OpenCV_DIR ../src
open OPENCV_HOTSHOTS.xcodeproj
Windows (MS Visual Studio):
set OpenCV_DIR="C:\OpenCV\build"
mkdir build
cd build
cmake -G "Visual Studio 9 2008" -D OpenCV_DIR=%OpenCV_DIR% ../src
start OPENCV_HOTSHOTS.sln
- A static library will be written to the "lib" directory.
- The execuables can be found in the "bin" directory.
----------------------------------------------------------
Running the various programs:
----------------------------------------------------------
* On Linux or Mac: ./bin/program_name --help
* On Windows: bin\Debug\program_name --help
----------------------------------------------------------
Mini tutorial:
----------------------------------------------------------
(Follow these steps in the order 1 to 10)
1. Create "annotations.yaml":
---------
Usage:
> ./annotate [-v video] [-m muct_dir] [-d output_dir]
- video: video containing frames to annotate.
- muct_dir: directory containing "muct-landmarks/muct76-opencv.csv", the pre-annotated MUCT dataset (http://www.milbo.org/muct/).
- output_dir: contains the annotation file and annotated images (if using -v)
Example:
> mkdir muct
> ./annotate -m ${MY_MUCT_DIR}/ -d muct/
2. Visualise annotations:
----------
Usage:
> ./visualise_annotation annotation_file
Example:
> ./visualize_annotations muct/annotations.yaml
Keys:
- 'p': show next image and annotations
- 'o': show previous image and annotations
- 'f': show flipped image and annotations
3. Train shape model:
----------
Usage:
> ./train_shape_model annotation_file shape_model_file [-f fraction_of_variation] [-k maximum_modes] [--mirror]
- annotation_file: generated by "annotate"
- shape_model_file: output YAML file containing trained shape model
- fraction_of_variation: A fraction between 0 and 1 specifying ammount of variation to retain
- maximum_modes: A cap on the number of modes the shape model can have
- mirror: Use mirrored images as samples (only use if symmety points were specified in "annotate")
Example:
> ./train_shape_model muct/annotations.yaml muct/shape_model.yaml
4. Visualise shape model:
-----------
Usage:
> ./visualise_shape_model shape_model
- shape_model: generated using "train_shape_model"
Example:
> ./visualize_shape_model muct/shape_model.yaml
5. Train patch detectors:
--------------
Usage:
> ./train_patch_model annotation_file shape_model_file patch_model_file[-w face_width] [-p patch_size] [-s search_window_size] [--mirror]
- annotation_file: generated by "annotate"
- shape_model_file: generated by "train_shape_model"
- patch_model_file: output YAML file containing trained patch model
- face_width: How many pixels-wide the reference face is
- patch_size: How many pixels-wide the patches are in the reference face image
- search_window_Size: How many pixels-wide the search region is
- mirror: Use mirrored images as samples (only use if symmety points were specified in "annotate")
Example:
> ./train_patch_model muct/annotations.yaml muct/shape_model.yaml muct/patch_model.yaml
6. Visualise patch detectors:
------------
Usage:
> ./visualise_patch_model patch_model [-w face_width]
- patch_model: generated using "train_patch_model"
- face_width: Width of face to visualise patches on
Example:
> ./visualize_patch_model muct/patch_model.yaml
7. Build face detector:
------------
Usage:
> ./train_face_detector detector_file annotation_file shape_model_file detector_model_file [-f min_frac_of_pts_in_det_rect] [--mirror]
- detector_file: pre-trained OpenCV cascade face detector (look in the data directory of the OpenCV package)
- annotation_file: generated using "annotate"
- shape_model_file: generated using "train_shape_model"
- detector_model_file: output YAML file containing face detector model
- min_frac_of_pts_in_det_rect: Minimum fraction of points inside detection window for sample to be considered and inlier for training
- mirror: Use mirrored images as samples (only use if symmety points were specified in "annotate")
Example:
> ./train_face_detector ${MY_OPENCV_DIR}/data/lbpcascades/lbpcascade_frontalface.xml muct/annotations.yaml muct/shape_model.yaml muct/detector.yaml
8. Visualise face detector:
------------
Usage:
> ./visualise_face detector [video_file]
- detector: generated using "train_face_detector"
- video_file: Optional video to test results on. Default is to use webcam
Example:
> ./visualize_face_detector muct/detector.yaml
9. Train face tracker:
-----------
Usage:
> ./train_face_tracker shape_model_file patch_models_file face_detector_file face_tracker_file
- shape_model_file: generated using "train_shape_model"
- patch_model_file: generated using "train_patch_model"
- face_detector_file: generated using "train_face_detector"
- face_tracker_file: output YAML file containing face tracker model
Example:
> ./train_face_tracker muct/shape_model.yaml muct/patch_model.yaml muct/detector.yaml muct/tracker.yaml
10. Test face tracker:
----------
Usage:
> ./visualise_face_tracker tracker [video_file]
- tracker: generated using "train_face_tracker"
- video_file: Optional video to test tracker on. Default is to use webcam
Example:
./visualize_face_tracker muct/tracker.yaml
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
包含九个项目,1.适用于Android的Cartoonifier和换肤器。2.iPhone或iPad上基于标记的增强现实技术。3.无标记增强现实。4.使用OpenCV从Motion探索结构。5.基于SVM和神经网络的车牌识别。6.非刚性人脸跟踪。7.使用AAM和POSIT进行3D头部姿态估计。8.使用特征脸或Fisherfaces进行人脸识别。9.使用Microsoft Kinect开发Fluid Wall。 Chapter1_AndroidCartoonifier Chapter2_iPhoneAR Chapter3_MarkerlessAR Chapter4_StructureFromMotion Chapter5_NumberPlateRecognition Chapter6_NonRigidFaceTracking Chapter7_HeadPoseEstimation Chapter8_FaceRecognition Chapter9_FluidInteractionUsingKinect
资源推荐
资源详情
资源评论
收起资源包目录
opencv小项目练习,一共九个 (311个子文件)
PyramidPatternTest.bmp 900KB
.classpath 444B
ImageUtils_0.7.cpp 86KB
ImageUtils_0.7.cpp 85KB
main.cpp 32KB
fluidWall.cpp 32KB
fluidWall_2.cpp 32KB
MultiCameraPnP.cpp 19KB
main.cpp 17KB
preprocessFace.cpp 17KB
FindCameraMatrices.cpp 15KB
annotate.cpp 15KB
cartoon.cpp 13KB
PAW.cpp 13KB
Visualization.cpp 12KB
MarkerDetector.cpp 12KB
ARDrawingContext.cpp 11KB
FluidSolver.cpp 11KB
OCR.cpp 10KB
patch_model.cpp 10KB
PatternDetector.cpp 10KB
face_tracker.cpp 9KB
recognition.cpp 9KB
BundleAdjuster.cpp 8KB
ft_data.cpp 8KB
shape_model.cpp 8KB
DetectRegions.cpp 8KB
Triangulation.cpp 7KB
KinectController.cpp 7KB
face_detector.cpp 7KB
main_desktop.cpp 7KB
Common.cpp 7KB
detectObject.cpp 7KB
main.cpp 6KB
RichFeatureMatcher.cpp 6KB
MultiCameraDistance.cpp 6KB
jni_part.cpp 5KB
OFFeatureMatcher.cpp 5KB
visualize_patch_model.cpp 5KB
Marker.cpp 4KB
main.cpp 4KB
train_patch_model.cpp 4KB
main.cpp 4KB
visualize_shape_model.cpp 4KB
FluidSolverMultiUser.cpp 4KB
train_shape_model.cpp 3KB
GPUSURFFeatureMatcher.cpp 3KB
visualize_face_tracker.cpp 3KB
GeometryTypes.cpp 3KB
trainOCR.cpp 3KB
GeometryTypes.cpp 3KB
train_face_detector.cpp 3KB
evalOCR.cpp 3KB
trainSVM.cpp 3KB
visualize_face_detector.cpp 2KB
CameraCalibration.cpp 2KB
visualize_annotations.cpp 2KB
CameraCalibration.cpp 2KB
train_face_tracker.cpp 2KB
Pattern.cpp 2KB
Plate.cpp 2KB
ARPipeline.cpp 1KB
TinyLA.cpp 1KB
Distance.cpp 978B
Triangle.cpp 660B
SfMUpdateListener.cpp 175B
AbstractFeatureMatcher.cpp 35B
.cproject 5KB
Current 1B
core_c.h 77KB
types_c.h 56KB
kmeans_index.h 34KB
imgproc_c.h 30KB
highgui_c.h 25KB
dist.h 25KB
hierarchical_clustering_index.h 21KB
ImageUtils.h 21KB
ImageUtils.h 21KB
autotuned_index.h 20KB
kdtree_single_index.h 20KB
kdtree_index.h 19KB
lsh_table.h 17KB
types_c.h 16KB
lsh_index.h 15KB
result_set.h 15KB
index_testing.h 11KB
FluidSolver.h 10KB
any.h 7KB
hdf5.h 7KB
nn_index.h 6KB
allocator.h 6KB
composite_index.h 6KB
all_indices.h 6KB
saving.h 6KB
simplex_downhill.h 6KB
KinectController.h 5KB
cap_ios.h 5KB
defines.h 5KB
dynamic_bitset.h 4KB
heap.h 4KB
共 311 条
- 1
- 2
- 3
- 4
资源评论
- 普通网友2021-06-06【完整版14章】OpenCV三大经典项目实战 一次性掌握计算机视觉核心技能 网盘地址:https://pan.baidu.com/s/1lfhRdNJde6NicdN8PXRPrQ 提取码: r9gy
iduanbin
- 粉丝: 93
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功