没有合适的资源?快使用搜索试试~ 我知道了~
最新完整的、原版的opencv参考手册,数字图像处理必用的。
资源推荐
资源详情
资源评论
The OpenCV Reference Manual
Release 2.3
October 15, 2011
CONTENTS
1 Introduction 1
1.1 API Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 core. The Core Functionality 7
2.1 Basic Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Basic C Structures and Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.3 Dynamic Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
2.4 Operations on Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
2.5 Drawing Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
2.6 XML/YAML Persistence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
2.7 XML/YAML Persistence (C API) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
2.8 Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
2.9 Utility and System Functions and Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
3 imgproc. Image Processing 199
3.1 Image Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
3.2 Geometric Image Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
3.3 Miscellaneous Image Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
3.4 Histograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
3.5 Structural Analysis and Shape Descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
3.6 Planar Subdivisions (C API) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
3.7 Motion Analysis and Object Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
3.8 Feature Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
3.9 Object Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
4 highgui. High-level GUI and Media I/O 299
4.1 User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
4.2 Reading and Writing Images and Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
4.3 Qt New Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
5 video. Video Analysis 321
5.1 Motion Analysis and Object Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
6 calib3d. Camera Calibration and 3D Reconstruction 335
6.1 Camera Calibration and 3D Reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
7 features2d. 2D Features Framework 365
7.1 Feature Detection and Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
7.2 Common Interfaces of Feature Detectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
7.3 Common Interfaces of Descriptor Extractors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
i
7.4 Common Interfaces of Descriptor Matchers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
7.5 Common Interfaces of Generic Descriptor Matchers . . . . . . . . . . . . . . . . . . . . . . . . . . 400
7.6 Drawing Function of Keypoints and Matches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
7.7 Object Categorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
8 objdetect. Object Detection 413
8.1 Cascade Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
9 ml. Machine Learning 421
9.1 Statistical Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
9.2 Normal Bayes Classifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
9.3 K-Nearest Neighbors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
9.4 Support Vector Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
9.5 Decision Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
9.6 Boosting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
9.7 Gradient Boosted Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
9.8 Random Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
9.9 Extremely randomized trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
9.10 Expectation Maximization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
9.11 Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
9.12 MLData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
10 flann. Clustering and Search in Multi-Dimensional Spaces 473
10.1 Fast Approximate Nearest Neighbor Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
10.2 Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
11 gpu. GPU-accelerated Computer Vision 479
11.1 GPU Module Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
11.2 Initalization and Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
11.3 Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
11.4 Operations on Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
11.5 Per-element Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
11.6 Image Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
11.7 Matrix Reductions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
11.8 Object Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
11.9 Feature Detection and Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
11.10 Image Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524
11.11 Camera Calibration and 3D Reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538
Bibliography 547
ii
CHAPTER
ONE
INTRODUCTION
OpenCV (Open Source Computer Vision Library: http://opencv.willowgarage.com/wiki/) is an open-source BSD-
licensed library that includes several hundreds of computer vision algorithms. The document describes the so-called
OpenCV 2.x API, which is essentially a C++ API, as opposite to the C-based OpenCV 1.x API. The latter is described
in opencv1x.pdf.
OpenCV has a modular structure, which means that the package includes several shared or static libraries. The
following modules are available:
• core - a compact module defining basic data structures, including the dense multi-dimensional array Mat and
basic functions used by all other modules.
• imgproc - an image processing module that includes linear and non-linear image filtering, geometrical image
transformations (resize, affine and perspective warping, generic table-based remapping), color space conversion,
histograms, and so on.
• video - a video analysis module that includes motion estimation, background subtraction, and object tracking
algorithms.
• calib3d - basic multiple-view geometry algorithms, single and stereo camera calibration, object pose estimation,
stereo correspondence algorithms, and elements of 3D reconstruction.
• features2d - salient feature detectors, descriptors, and descriptor matchers.
• objdetect - detection of objects and instances of the predefined classes (for example, faces, eyes, mugs, people,
cars, and so on).
• highgui - an easy-to-use interface to video capturing, image and video codecs, as well as simple UI capabilities.
• gpu - GPU-accelerated algorithms from different OpenCV modules.
• ... some other helper modules, such as FLANN and Google test wrappers, Python bindings, and others.
The further chapters of the document describe functionality of each module. But first, make sure to get familiar with
the common API concepts used thoroughly in the library.
1.1 API Concepts
cv Namespace
All the OpenCV classes and functions are placed into the cv namespace. Therefore, to access this functionality from
your code, use the cv:: specifier or using namespace cv; directive:
1
剩余552页未读,继续阅读
资源评论
x15198276466
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功