OpenCV学习---Range类

    

1.Range是OpenCV中新加入的一个类,该类有两个关键的变量start和end;

2.Range对象可以用来表示矩阵的多个连续的行或者多个连续的列

3.Range表示范围从start到end,包含start,但不包含end;

4.Range类还提供了一个静态方法all(),这个方法的作用如同Matlab中的“:”,表示所有的行或者所有的列

例子:

1.创建一个单位阵

Mat A= Mat::eye(10, 10, CV_32S);

2.提取第1到3列(不包括3)

Mat B = A(Range::all(),Range(1,3));

3.提取B的第5至9行(不包括9)

C= B(Range(5,9),Range::all());


  • 12
    点赞
  • 28
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Machine Learning for OpenCV by Michael Beyeler English | 14 July 2017 | ISBN: 1783980281 | ASIN: B0713QL4T3 | 382 Pages | AZW3 | 7.03 MB Expand your OpenCV knowledge and master key concepts of machine learning using this practical, hands-on guide. About This Book Load, store, edit, and visualize data using OpenCV and Python Grasp the fundamental concepts of classification, regression, and clustering Understand, perform, and experiment with machine learning techniques using this easy-to-follow guide Evaluate, compare, and choose the right algorithm for any task Who This Book Is For This book targets Python programmers who are already familiar with OpenCV; this book will give you the tools and understanding required to build your own machine learning systems, tailored to practical real-world tasks. What You Will Learn Explore and make effective use of OpenCV's machine learning module Learn deep learning for computer vision with Python Master linear regression and regularization techniques Classify objects such as flower species, handwritten digits, and pedestrians Explore the effective use of support vector machines, boosted decision trees, and random forests Get acquainted with neural networks and Deep Learning to address real-world problems Discover hidden structures in your data using k-means clustering Get to grips with data pre-processing and feature engineering In Detail Machine learning is no longer just a buzzword, it is all around us: from protecting your email, to automatically tagging friends in pictures, to predicting what movies you like. Computer vision is one of today's most exciting application fields of machine learning, with Deep Learning driving innovative systems such as self-driving cars and Google's DeepMind. OpenCV lies at the intersection of these topics, providing a comprehensive open-source library for classic as well as state-of-the-art computer vision and machine learning algorithms. In combination with Python Anaconda, you will have access to all the open-source computing libraries you could possibly ask for. Machine learning for OpenCV begins by introducing you to the essential concepts of statistical learning, such as classification and regression. Once all the basics are covered, you will start exploring various algorithms such as decision trees, support vector machines, and Bayesian networks, and learn how to combine them with other OpenCV functionality. As the book progresses, so will your machine learning skills, until you are ready to take on today's hottest topic in the field: Deep Learning. By the end of this book, you will be ready to take on your own machine learning problems, either by building on the existing source code or developing your own algorithm from scratch! Style and approach OpenCV machine learning connects the fundamental theoretical principles behind machine learning to their practical applications in a way that focuses on asking and answering the right questions. This book walks you through the key elements of OpenCV and its powerful machine learning classes, while demonstrating how to get to grips with a range of models.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值