Home Database Mysql Tutorial 一览众山小:OpenCV 2.4.8组件结构全解析

一览众山小:OpenCV 2.4.8组件结构全解析

Jun 07, 2016 pm 03:43 PM
opencv at a glance components structure parse

【原文:http://blog.csdn.net/poem_qianmo/article/details/19925819】 文章链接: http://blog.csdn.net/poem_qianmo/article/details/19925819 作者:毛星云(浅墨)邮箱: happylifemxy@163.com 写作当前博文时配套使用OpenCV版本:2.4.8 之前啃了不少Op

【原文:http://blog.csdn.net/poem_qianmo/article/details/19925819】

 

文章链接: http://blog.csdn.net/poem_qianmo/article/details/19925819

作者:毛星云(浅墨)    邮箱: happylifemxy@163.com 

写作当前博文时配套使用OpenCV版本:2.4.8

 

 

之前啃了不少OpenCV的官方文档,发现如果了解了一些OpenCV整体的模块架构后,再重点学习自己感兴趣的部分的话,就会有一览众山小的感觉,于是,就决定写出这篇文章,作为启程OpenCV系列博文的第二篇。

 

至于OpenCV组件结构的研究方法,我们不妨管中窥豹,通过opencv安装路径下include目录里面头文件的分类存放,来一窥OpenCV这些年迅猛发展起来的庞杂组件架构。

我们进入到D:\ProgramFiles\opencv\build\include目录,可以看到有opencv和opencv2这两个文件夹。显然,opencv这个文件夹里面包含着旧版的头文件。而opencv2这个文件夹里面包含着具有时代意义的新版OpenCV2系列的头文件。

 一览众山小:OpenCV 2.4.8组件结构全解析

在opencv这个文件夹里面,也就是D:\Program Files\opencv\build\include\opencv目录下,可以看到如下的各种头文件。这里面大概就是opencv 1.0最核心的,而且保留下来的内容的头文件,可以把它们整体理解为一个组件。

 一览众山小:OpenCV 2.4.8组件结构全解析


 再来看看我们重点关注的opencv2这边,在D:\ProgramFiles\opencv\build\include\opencv2目录下,我们可以看到这些文件夹:

一览众山小:OpenCV 2.4.8组件结构全解析



我们灵机一动,发现下面有个叫opencv_modules.hpp的hpp文件,一看就知道里面存放的是opencv2中的新模块构造相关的说明代码,打开一看,果不其然,定义的是OpenCV2所有组件的宏:


[cpp] view plaincopyprint?一览众山小:OpenCV 2.4.8组件结构全解析一览众山小:OpenCV 2.4.8组件结构全解析

  1. /* 
  2.  *     ** File generated automatically, do not modify ** 
  3.  * 
  4.  *This file defines the list of modules available in current build configuration 
  5.  * 
  6.  * 
  7. */  
  8.    
  9. #define HAVE_OPENCV_CALIB3D  
  10. #define HAVE_OPENCV_CONTRIB  
  11. #define HAVE_OPENCV_CORE  
  12. #define HAVE_OPENCV_FEATURES2D  
  13. #define HAVE_OPENCV_FLANN  
  14. #define HAVE_OPENCV_GPU  
  15. #define HAVE_OPENCV_HIGHGUI  
  16. #define HAVE_OPENCV_IMGPROC  
  17. #define HAVE_OPENCV_LEGACY  
  18. #define HAVE_OPENCV_ML  
  19. #define HAVE_OPENCV_NONFREE  
  20. #define HAVE_OPENCV_OBJDETECT  
  21. #define HAVE_OPENCV_OCL  
  22. #define HAVE_OPENCV_PHOTO  
  23. #define HAVE_OPENCV_STITCHING  
  24. #define HAVE_OPENCV_SUPERRES  
  25. #define HAVE_OPENCV_TS  
  26. #define HAVE_OPENCV_VIDEO  
  27. #define HAVE_OPENCV_VIDEOSTAB  


 

OK,就不多客套了,下面就是OpenCV的所有模块介绍,按照顺序来:

 

【calib3d】——其实就是就是Calibration(校准)加3D这两个词的组合缩写。这个模块主要是相机校准和三维重建相关的内容。基本的多视角几何算法,单个立体摄像头标定,物体姿态估计,立体相似性算法,3D信息的重建等等。

 

【contrib】——也就是Contributed/Experimental Stuf的缩写, 该模块包含了一些最近添加的不太稳定的可选功能,不用去多管。2.4.8里的这个模块有新型人脸识别,立体匹配,人工视网膜模型等技术。

 

【core】——核心功能模块,包含如下内容:

  • OpenCV基本数据结构
  • 动态数据结构
  • 绘图函数
  • 数组操作相关函数
  • 辅助功能与系统函数和宏
  • 与OpenGL的互操作


 【imgproc——Image和Processing这两个单词的缩写组合。图像处理模块,这个模块包含了如下内容:

  • 线性和非线性的图像滤波
  • 图像的几何变换
  • 其它(Miscellaneous)图像转换
  • 直方图相关
  • 结构分析和形状描述
  • 运动分析和对象跟踪
  • 特征检测
  • 目标检测等内容

 

【features2d】 ——也就是Features2D, 2D功能框架 ,包含如下内容:

  • 特征检测和描述
  • 特征检测器(Feature Detectors)通用接口
  • 描述符提取器(Descriptor Extractors)通用接口
  • 描述符匹配器(Descriptor Matchers)通用接口
  • 通用描述符(Generic Descriptor)匹配器通用接口
  • 关键点绘制函数和匹配功能绘制函数


【flann】—— Fast Library for Approximate Nearest Neighbors,高维的近似近邻快速搜索算法库,包含两个部分:

  • 快速近似最近邻搜索
  • 聚类

 

【gpu】——运用GPU加速的计算机视觉模块

 

【highgui】——也就是high gui,高层GUI图形用户界面,包含媒体的I / O输入输出,视频捕捉、图像和视频的编码解码、图形交互界面的接口等内容

 

【legacy】——一些已经废弃的代码库,保留下来作为向下兼容,包含如下相关的内容: 

  • 运动分析
  • 期望最大化
  • 直方图
  • 平面细分(C API)
  • 特征检测和描述(Feature Detection and Description)
  • 描述符提取器(Descriptor Extractors)的通用接口
  • 通用描述符(Generic Descriptor Matchers)的常用接口
  • 匹配器

 

【ml】——Machine Learning,机器学习模块, 基本上是统计模型和分类算法,包含如下内容:

  • 统计模型 (Statistical Models)
  • 一般贝叶斯分类器 (Normal Bayes Classifier)
  • K-近邻 (K-NearestNeighbors)
  • 支持向量机 (Support Vector Machines)
  • 决策树 (Decision Trees)
  • 提升(Boosting)
  • 梯度提高树(Gradient Boosted Trees)
  • 随机树 (Random Trees)
  • 超随机树 (Extremely randomized trees)
  • 期望最大化 (Expectation Maximization)
  • 神经网络 (Neural Networks)
  • MLData

【nonfree】,也就是一些具有专利的算法模块 ,包含特征检测和GPU相关的内容。最好不要商用,可能会被告哦。

 

【objdetect】——目标检测模块,包含Cascade Classification(级联分类)和Latent SVM这两个部分。

 

【ocl】——即OpenCL-accelerated Computer Vision,运用OpenCL加速的计算机视觉组件模块

 

【photo】——也就是Computational Photography,包含图像修复和图像去噪两部分

 

【stitching】——images stitching,图像拼接模块,包含如下部分:

  • 拼接流水线
  • 特点寻找和匹配图像
  • 估计旋转
  • 自动校准
  • 图片歪斜
  • 接缝估测
  • 曝光补偿
  • 图片混合

【superres】——SuperResolution,超分辨率技术的相关功能模块

 

【ts】——opencv测试相关代码,不用去管他

 

【video】——视频分析组件,该模块包括运动估计,背景分离,对象跟踪等视频处理相关内容。

 

【Videostab】——Video stabilization,视频稳定相关的组件,官方文档中没有多作介绍,不管它了。


 

看到到这里,相信大家已经对OpenCV的模块架构设计有了一定的认识。

OpenCV其实就是这么多模块作为代码容器组合起来的一个SDK而已,没什么稀奇的,对吧。

 

最后配张图,养养眼:

一览众山小:OpenCV 2.4.8组件结构全解析


好了,OpenCV的组件结构介绍大概就是这些。

下篇文章见 :)

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

A deep dive into the meaning and usage of HTTP status code 460 A deep dive into the meaning and usage of HTTP status code 460 Feb 18, 2024 pm 08:29 PM

In-depth analysis of the role and application scenarios of HTTP status code 460 HTTP status code is a very important part of web development and is used to indicate the communication status between the client and the server. Among them, HTTP status code 460 is a relatively special status code. This article will deeply analyze its role and application scenarios. Definition of HTTP status code 460 The specific definition of HTTP status code 460 is "ClientClosedRequest", which means that the client closes the request. This status code is mainly used to indicate

iBatis and MyBatis: Comparison and Advantage Analysis iBatis and MyBatis: Comparison and Advantage Analysis Feb 18, 2024 pm 01:53 PM

iBatis and MyBatis: Differences and Advantages Analysis Introduction: In Java development, persistence is a common requirement, and iBatis and MyBatis are two widely used persistence frameworks. While they have many similarities, there are also some key differences and advantages. This article will provide readers with a more comprehensive understanding through a detailed analysis of the features, usage, and sample code of these two frameworks. 1. iBatis features: iBatis is an older persistence framework that uses SQL mapping files.

Detailed explanation of Oracle error 3114: How to solve it quickly Detailed explanation of Oracle error 3114: How to solve it quickly Mar 08, 2024 pm 02:42 PM

Detailed explanation of Oracle error 3114: How to solve it quickly, specific code examples are needed. During the development and management of Oracle database, we often encounter various errors, among which error 3114 is a relatively common problem. Error 3114 usually indicates a problem with the database connection, which may be caused by network failure, database service stop, or incorrect connection string settings. This article will explain in detail the cause of error 3114 and how to quickly solve this problem, and attach the specific code

OpenCV installation tutorial: a must-read for PyCharm users OpenCV installation tutorial: a must-read for PyCharm users Feb 22, 2024 pm 09:21 PM

OpenCV is an open source library for computer vision and image processing, which is widely used in machine learning, image recognition, video processing and other fields. When developing using OpenCV, in order to better debug and run programs, many developers choose to use PyCharm, a powerful Python integrated development environment. This article will provide PyCharm users with an installation tutorial for OpenCV, with specific code examples. Step One: Install Python First, make sure you have Python installed

Analysis of the meaning and usage of midpoint in PHP Analysis of the meaning and usage of midpoint in PHP Mar 27, 2024 pm 08:57 PM

[Analysis of the meaning and usage of midpoint in PHP] In PHP, midpoint (.) is a commonly used operator used to connect two strings or properties or methods of objects. In this article, we’ll take a deep dive into the meaning and usage of midpoints in PHP, illustrating them with concrete code examples. 1. Connect string midpoint operator. The most common usage in PHP is to connect two strings. By placing . between two strings, you can splice them together to form a new string. $string1=&qu

Parsing Wormhole NTT: an open framework for any Token Parsing Wormhole NTT: an open framework for any Token Mar 05, 2024 pm 12:46 PM

Wormhole is a leader in blockchain interoperability, focused on creating resilient, future-proof decentralized systems that prioritize ownership, control, and permissionless innovation. The foundation of this vision is a commitment to technical expertise, ethical principles, and community alignment to redefine the interoperability landscape with simplicity, clarity, and a broad suite of multi-chain solutions. With the rise of zero-knowledge proofs, scaling solutions, and feature-rich token standards, blockchains are becoming more powerful and interoperability is becoming increasingly important. In this innovative application environment, novel governance systems and practical capabilities bring unprecedented opportunities to assets across the network. Protocol builders are now grappling with how to operate in this emerging multi-chain

Angular components and their display properties: understanding non-block default values Angular components and their display properties: understanding non-block default values Mar 15, 2024 pm 04:51 PM

The default display behavior for components in the Angular framework is not for block-level elements. This design choice promotes encapsulation of component styles and encourages developers to consciously define how each component is displayed. By explicitly setting the CSS property display, the display of Angular components can be fully controlled to achieve the desired layout and responsiveness.

Analysis of new features of Win11: How to skip logging in to Microsoft account Analysis of new features of Win11: How to skip logging in to Microsoft account Mar 27, 2024 pm 05:24 PM

Analysis of new features of Win11: How to skip logging in to a Microsoft account. With the release of Windows 11, many users have found that it brings more convenience and new features. However, some users may not like having their system tied to a Microsoft account and wish to skip this step. This article will introduce some methods to help users skip logging in to a Microsoft account in Windows 11 and achieve a more private and autonomous experience. First, let’s understand why some users are reluctant to log in to their Microsoft account. On the one hand, some users worry that they

See all articles