机器学习 opencv源代码是否有用

OpenCV2.0中机器学习函数与类_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
OpenCV2.0中机器学习函数与类
上传于||文档简介
&&详​细​介​绍​了​O​p​e​n​C​V.中​机​器​学​习​的​函​数​、​类​及​使​用​方​法
阅读已结束,如果下载本文需要使用0下载券
想免费下载更多文档?
定制HR最喜欢的简历
下载文档到电脑,查找使用更方便
还剩81页未读,继续阅读
定制HR最喜欢的简历
你可能喜欢下载及安装CMake3.0.1
要自己编译OpenCV2.4.9的源码,首先,必须下载编译工具,使用的比较多的编译工具是CMake。
下面摘录一段关于CMake的介绍:
CMake是一个跨平台的安装(编译)工具,可以用简单的语句来描述所有平台的安装(编译过程)。他能够输出各种各样的makefile或者project文件,能测试所支持的C 特性,类似UNIX下的automake。只是 CMake 的组态档取名为 CmakeLists.txt。Cmake 并不直接建构出最终的,而是产生标准的建构档(如
Unix 的 Makefile 或
Visual C 的 projects/workspaces),然后再依一般的建构方式使用。这使得熟悉某个集成开发环境(IDE)的可以用标准的方式建构他的软件,这种可以使用各平台的原生建构系统的能力是 CMake 和 SCons 等其他类似系统的区别之处。
CMake 可以编译、制作程式库、产生适配器(wrapper)、还可以用任意的顺序建构执行档。CMake 支援 in-place 建构(二进档和源代码在同一个目录树中)和 out-of-place 建构(二进档在别的目录里),因此可以很容易从同一个源代码目录树中建构出多个二进档。CMake 也支持静态与程式库的建构。
“CMake”这个名字是“Cross Platform Make”的缩写。虽然名字中含有“make”,但是CMake和Unix上常见的“make”系统是分开的,而且更为高阶。
通过以上介绍我们知道,我们可以用CMake这个工具将源码编译成VS2010的工程文件,使得我们可以在VS下以不同组的形式构建多个样例或者教程工程。
我们可以在CMake的官网:
&http://www.cmake.org/cmake/resources/.html&上找到最新版本的CMake安装文件。
选择文件“CMake-3.0.1-win32-x86.exe”下载,一共10.78MB,很快可以下完。
下载完成后,双击安装,即可开始CMake的安装。
安装很简单,基本上就是“下一步”,直至最后一步“完成”。
安装完成后,可以在“开始”菜单中找到已经安装好的CMake3.0.1程序的快捷方式&CMake (cmake-gui)&
安装好了以后,下面开始进行OpenCV源码的编译。
OpenCV2.4.9源码编译
这里假设我们已经将OpenCV2.4.9的源码下载并且安装好了。(如果这一步不知道怎么做,请参看本人另一个教程《学习OpenCV的学习笔记系列(一)环境配置》)
在“开始”菜单中点击“CMake (cmake-gui)”,打开CMake程序,此时将弹出编译设置界面。如下图所示
在&Where is the source code&选项的文本框中输入OpenCV源码所在的目录路径,可以点击&Browse Source…&选择,请根据源码安装的实际位置选择路径,此处选择的是&H:/opencv/sources&。
在&Where to build the binaries&选项的文本框中输入需要构建样例工程及源码的文件目录路径,此处选择的是与源码同一文件夹下的&H:/OpenCV/Solution&。
输入完源码路径及生成路径之后,点击编译设置界面左下角的&Configure&按钮
如果是第一次配置,那么将会弹出一个选择生成工程目标环境的界面,此处选择“Visual Studio 10 2010”选项,勾选&Use default native compilers&,然后点击&Finish&按钮。
如果生成目标目录路径不存在,那么会有一个提示新建目录的,如下图所示,直接点&Yes&即可。
第一次配置会出现很多红色的选项,别管它,再点击一次&Configure&按钮。
这一次,红色选项没有了,说明没有问题了,配置完成。
点击&Generate&按钮
在看到最下方有&Generating done&字样后,说明源码工程编译完毕。
OpenCV2.4.9源码工程测试
打开上一步设置的生成目录路径下的文件夹,可见有一个&Solution&文件夹,这个是上一步设置中自动生成的,双击该文件夹。
在&H:/opencv/Solution&路径下,我们可以看到有一个已经编译生成好了的VS2010工程文件&OpenCV.sln&,双击该文件,既可以在VS2010中打开该工程文件。
在打开的&OpenCV&工程中,我们可以看到有68个项目。
右键点击OpenCV,选择生成解决方案。
编译用时较长,我的PC配置算是比较好的,但是编译也一共耗时约2分钟左右,生成62个工程,失败0个,说明全部编译通过。恭喜自己一下!
接下来,就可以逐个工程去查看,编译了。关于这些样例工程及源码的解释,后续将补充。。。
OpenCV2.4.9自带样例源码编译及测试
以上介绍的是OpenCV的源码编译及工程,下面介绍怎么编译OpenCV自带的样例源码及工程。
熟门熟路地打开CMake3.0.1,将源码路径改为:&H:/opencv/sources/samples&(具体路径随安装位置而不同,在opencv的源码安装目录下可以找到“sample”文件夹)。
在一通配置(Configure)及生成(Generate)后(配置项同上,此处不赘述!),在目标目录下,可以找到已经生成好了的OpenCV的样例工程文件:“samples.sln”
点击打开&samples.sln&,看到解决方案中显示一共有172个项目(样例真多,好好看哈!)
右键点击解决方案,选择“生成解决方案”
大概一分钟左右(不同机器配置,编译时间有差别),编译完成,工程生成171个工程,失败0个,一次编译通过,点个赞!
整体编译无误后,随手打开一个样例工程,本文选择“(EXAMPLE) lkdemo”工程。此工程源码使用改进的Lucas-Kanade光流算法,用于检测视频运动目标。用鼠标点击目标点,可视频跟踪。
点击运行,发现一个命令行界面一闪而过,之后就退出了,这是为什么呢?
通过单步运行调试发现,在“lkdemo.cpp”文件的56行的&if( !cap.isOpened() );&判断语句中,播放器没有打开,直接在控制台显示一行“Could
not initialize capturing…”就退出了。分析其原因,是因为“cap.open(&Megamind.avi&);”这个语句中的视频文件“Megamind.avi”不在程序目录下。知道原因,就好解决了!
在“H:\opencv\sources\samples\cpp”目录下(源码文件目录)拷贝“Megamind.avi”文件至“H:\opencv\sampleSolution\cpp\Debug”目录下(此乃程序“cpp-example-lkdemo.exe”所在目录)。换句话说,就是要确保在程序运行的目录下有“Megamind.avi”文件即可。
在做完以上工作后,再次点击运行,就成功运行了,播放的是一个,在画面的一处点击左键后,会有一个绿色的标记点,该标记点的位置会随着周围物体的运动而改变,这应该就是所谓的视频跟踪了。截图如下:
OK,这其中的原理及工作流程我就不介绍了,自己看源码,其他样例工程的源码可以一个个去看,然后编译运行,相信将这些样例都熟悉理解摸透后,OpenCV对你将不再陌生。欢迎你步入OpenCV的殿堂,开始你的学习阶段吧!查看: 4429|回复: 5
很好的总结:计算机视觉、机器学习相关领域论文和源代码大集合--持续更新……
精华主题学分
勤奋农民-感谢提供高质量信息和讨论, 积分 892, 距离下一级还需 108 积分
在线时间 小时
购买链接:
注册一亩三分地论坛,查看更多干货!
才可以下载或查看,没有帐号?
以后就要转去搞CV和ML了,转发一个很有用的文章。源地址:-------------------计算机视觉、机器学习相关领域论文和源代码大集合--持续更新……注:下面有project网站的大部分都有paper和相应的code。Code一般是C/C++或者Matlab代码。最近一次更新:一、特征提取Feature Extraction:· SIFT [1] [][] []· PCA-SIFT [2] []· Affine-SIFT [3] []· SURF [4] [] []· Affine Covariant Features [5] []· MSER [6] [] []· Geometric Blur [7] []· Local Self-Similarity Descriptor [8] []· Global and Efficient Self-Similarity [9] []· Histogram of Oriented Graidents [10] [] []· GIST [11] []· Shape Context [12] []· Color Descriptor [13] []· Pyramids of Histograms of Oriented Gradients []· Space-Time Interest Points (STIP) [14][] []· Boundary Preserving Dense Local Regions [15][]· Weighted Histogram[]· Histogram-based Interest Points Detectors[][]· An OpenCV - C++ implementation of Local Self Similarity Descriptors []· Fast Sparse Representation with Prototypes[]· Corner Detection []· AGAST Corner Detector: faster than FAST and even FAST-ER[]二、图像分割Image Segmentation:· Normalized Cut [1] []· Gerg Mori’ Superpixel code [2] []· Efficient Graph-based Image Segmentation [3] [] []· Mean-Shift Image Segmentation [4] [] []· OWT-UCM Hierarchical Segmentation [5] []· Turbepixels [6] [] [] []· Quick-Shift [7] []· SLIC Superpixels [8] []· Segmentation by Minimum Code Length [9] []· Biased Normalized Cut [10] []· Segmentation Tree [11-12] []· Entropy Rate Superpixel Segmentation [13] []· Fast Approximate Energy Minimization via Graph Cuts[][]· Efficient Planar Graph Cuts with Applications in Computer Vision[][]· Ierimetric Graph Partitioning for Image Segmentation[][]· Random Walks for Image Segmentation[][]· Blossom V: A new implementation of a minimum cost perfect matching algorithm[]· An Experimental Comparison of Min-Cut/Max-Flow Algorithms for Energy Minimization in Computer Vision[][]· Geodesic Star Convexity for Interactive Image Segmentation[]· Contour Detection and Image Segmentation Resources[][]· Biased Normalized Cuts[]· Max-flow/min-cut[]· Chan-Vese Segmentation using Level Set[]· A Toolbox of Level Set Methods[]· Re-initialization Free Level Set Evolution via Reaction Diffusion[]· Improved C-V active contour model[][]· A Variational Multiphase Level Set Approach to Simultaneous Segmentation and Bias Correction[][]· Level Set Method Research by Chunming Li[]
三、目标检测Object Detection:· A simple object detector with boosting []· INRIA Object Detection and Localization Toolkit [1] []· Discriminatively Trained Deformable Part Models [2] []· Cascade Object Detection with Deformable Part Models [3] []· Poselet [4] []· Implicit Shape Model [5] []· Viola and Jones’s Face Detection [6] []· Bayesian Modelling of Dyanmic Scenes for Object Detection[][]· Hand detection using multiple proposals[]· Color Constancy, Intrinsic Images, and Shape Estimation[][]· Discriminatively trained deformable part models[]· Gradient Response Maps for Real-Time Detection of Texture-Less Objects: LineMOD []· Image Processing On Line[]· Robust ical Flow Estimation[]· Where's Waldo: Matching People in Images of Crowds[]四、显著性检测Saliency Detection:· Itti, Koch, and Niebur’ saliency detection [1] []· Frequency-tuned salient region detection [2] []· Saliency detection using maximum symmetric surround [3] []· Attention via Information Maximization [4] []· Context-aware saliency detection [5] []· Graph-based visual saliency [6] []· Saliency detection: A spectral residual approach. [7] []· Segmenting salient objects from images and videos. [8] []· Saliency Using Natural statistics. [9] []· Discriminant Saliency for Visual Recognition from Cluttered Scenes. [10] []· Learning to Predict Where Humans Look [11] []· Global Contrast based Salient Region Detection [12] []· Bayesian Saliency via Low and Mid Level Cues[]· Top-Down Visual Saliency via Joint CRF and Dictionary Learning[][]五、图像分类、聚类Image Classification, Clustering· Pyramid Match [1] []· Spatial Pyramid Matching [2] []· Locality-constrained Linear Coding [3] [] []· Sparse Coding [4] [] []· Texture Classification [5] []· Multiple Kernels for Image Classification [6] []· Feature Combination [7] []· SuperParsing []· Large Scale Correlation Clustering Optimization[]· Detecting and Sketching the Common[]· Self-Tuning Spectral Clustering[][]· User Assisted Separation of Reflections from a Single Image Using a Sparsity Prior[][]· Filters for Texture Classification[]· Multiple Kernel Learning for Image Classification[]· SLIC Superpixels[]
六、抠图Image Matting· A Closed Form Solution to Natural Image Matting []· Spectral Matting []· Learning-based Matting []七、目标跟踪Object Tracking:· A Forest of Sensors - Tracking Adaptive Background Mixture Models []· Object Tracking via Partial Least Squares Analysis[][]· Robust Object Tracking with Online Multiple Instance Learning[][]· Online Visual Tracking with Histograms and Articulating Blocks[]· Incremental Learning for Robust Visual Tracking[]· Real-time Compressive Tracking[]· Robust Object Tracking via Sparsity-based Collaborative Model[]· Visual Tracking via Adaptive Structural Local Sparse Appearance Model[]· Online Discriminative Object Tracking with Local Sparse Representation[][]· Superpixel Tracking[]· Learning Hierarchical Image Representation with Sparsity, Saliency and Locality[][]· Online Multiple Support Instance Tracking [][]· Visual Tracking with Online Multiple Instance Learning[]· Object detection and recognition[]· Compressive Sensing Resources[]· Robust Real-Time Visual Tracking using Pixel-Wise Posteriors[]· Tracking-Learning-Detection[][]· the HandVu:vision-based hand gesture interface[]
八、Kinect:· Kinect toolbox[]· OpenNI[]· zouxy09 CSDN Blog[]九、3D相关:· 3D Reconstruction of a Moving Object[] []· Shape From Shading Using Linear Approximation[]· Combining Shape from Shading and Stereo Depth Maps[][]· Shape from Shading: A Survey[][]· A Spatio-Temporal Descriptor based on 3D Gradients (HOG3D)[][]· Multi-camera Scene Reconstruction via Graph Cuts[][]· A Fast Marching Formulation of Perspective Shape from Shading under Frontal Illumination[][]· Reconstruction:3D Shape, Illumination, Shading, Reflectance, Texture[]· Monocular Tracking of 3D Human Motion with a Coordinated Mixture of Factor Analyzers[]· Learning 3-D Scene Structure from a Single Still Image[]十、机器学习算法:· Matlab class for computing Approximate Nearest Nieghbor (ANN) [ providing interface to]· Random Sampling[]· Probabilistic Latent Semantic Analysis (pLSA)[]· FASTANN and FASTCLUSTER for approximate k-means (AKM)[]· Fast Intersection / Additive Kernel SVMs[]· SVM[]· Ensemble learning[]· Deep Learning[]· Deep Learning Methods for Vision[]. more info
· Neural Network for Recognition of Handwritten Digits[]· Training a deep autoencoder or a classifier on MNIST digits[]· THE MNIST DATABASE of handwritten digits[]
· Ersatz:deep neural networks in the cloud[]
· Deep Learning []
· sparseLM : Sparse Levenberg-Marquardt nonlinear least squares in C/C++[]
· Weka 3: Data Mining Software in Java[]
· Invited talk &A Tutorial on Deep Learning& by Dr. Kai Yu (余凯)[]. 1point 3acres 璁哄潧
· CNN - Convolutional neural network class[]
· Yann LeCun's Publications[]
· LeNet-5, convolutional neural networks[]
· Training a deep autoencoder or a classifier on MNIST digits[]
· Deep Learning 大牛Geoffrey E. Hinton's HomePage[]. more info
十一、目标、行为识别Object, Action Recognition:· Action Recognition by Dense Trajectories[][]· Action Recognition Using a Distributed Representation of Pose and Appearance[]· Recognition Using Regions[][]· 2D Articulated Human Pose Estimation[]· Fast Human Pose Estimation Using Appearance and Motion via Multi-Dimensional Boosting Regression[][]· Estimating Human Pose from Occluded Images[][]· Quasi-dense wide baseline matching[]· ChaLearn Gesture Challenge: Principal motion: PCA-based reconstruction of motion histograms[]
十二、图像处理:· Distance Transforms of Sampled Functions[]· The Computer Vision Homepage[]
十三、一些实用工具:· EGT: a Toolbox for Multiple View Geometry and Visual Servoing[] []· a development kit of matlab mex functions for OpenCV library[]· Fast Artificial Neural Network Library[]
<p id="rate_46" onmouseover="showTip(this)" tip="感谢分享!&大米 + 3 升
" class="mtn mbn">
<p id="rate_07" onmouseover="showTip(this)" tip="感谢分享!&大米 + 10 升
" class="mtn mbn">
<p id="rate_59" onmouseover="showTip(this)" tip="很强大的一堆东西。。技术贴必须支持。。。.&大米 + 3 升
" class="mtn mbn">
<p id="rate_23" onmouseover="showTip(this)" tip="好东西啊!(是我等级不够所以最多只能加2米.&大米 + 2 升
" class="mtn mbn">
<p id="rate_76" onmouseover="showTip(this)" tip="不明觉厉&大米 + 5 升
" class="mtn mbn">
<p id="rate_81" onmouseover="showTip(this)" tip="欢迎来介绍你知道的情况&大米 + 5 升
" class="mtn mbn">
<p id="rate_35" onmouseover="showTip(this)" tip="感谢分享!&大米 + 10 升
" class="mtn mbn">
本帖被以下淘专辑推荐:
& |主题: 17, 订阅: 17
精华主题学分
在线时间 小时
Great! Second it.
精华主题学分
在线时间 小时
真是好贴!!
精华主题学分
在线时间 小时
机器视觉研究真的挺难的
精华主题学分
在线时间 小时
大赞!!!
精华主题学分
在线时间 小时
谢谢分享,收藏以下
<form method="post" autocomplete="off" id="fastpostform" action="forum.php?mod=post&action=reply&fid=77&tid=59236&extra=&replysubmit=yes&infloat=yes&handlekey=fastpost"
onSubmit="
// TODO Howard 11/3/2015
var sbtn = $('fastpostsubmit');
sbtn.disabled =
sbtn.innerHTML = ' 回复发表中... ';
sbtn.setAttribute('background', sbtn.style.background);
sbtn.setAttribute('bordercolor', sbtn.style.borderColor);
sbtn.style.background = '#C7C7C7';
sbtn.style.borderColor = '#8B8B8B';
var form =
// --product--
var isValid = fastpostvalidate(form, null, 0);
if(!isValid) reoverBtn();
return isV
// --product--
// --testing--
//setTimeout(function() {
// var isValid = fastpostvalidate(form, null, 0);
// if(!isValid) reoverBtn();
//}, 2000);
// --testing--
您需要登录后才可以回帖
回帖并转播
回帖后跳转到最后一页
Instant搜索更强大,不扣积分,内容组织的更好更整洁!目前仍在beta版本,努力完善中!
一亩三分地推荐 /5
地主Warald亲手做你的申请,针对你的背景和目标,考虑申请、学习、就业、移民等系列问题,制定申请策略。
“offer”指全额奖学金,免学费全免+每月工资,Berkeley, CMU, JHU, UIUC, Gatech, UMich, UCLA, Columbia,欢迎观赏。
电子工程、计算机、统计、金数金工、化工等, Stanford, Berkeley, CMU, Cornell, Yale, Columbia, Chicago, Duke, UPenn, UIUC, Brown, UMich, JHU等
有留学、申请、找工、职业规划上的难题?先上论坛提问!
论坛考古也帮不上忙,发帖得到的回答仍然不够?电话找Warald来解答!
WARALD新书上市啦:《你不知道的美国留学》清华大学出版社,各大电商发售
Powered by

我要回帖

 

随机推荐