七月在线Opencv学习机器视觉 学习笔记之 Fundamental of Computer Vision

本文介绍了计算机视觉的基本概念及其重要性,列举了多个应用领域如图像编辑、科学医疗、车辆安全等,并详细探讨了OpenCV这一开源库的使用,包括其支持的编程语言、操作系统及图像处理中关键的Mat对象构造函数与ROI操作。

What is Computer Vision?


Goal of computer vision is to write computer programs that can interpret images.

Why computer vision matters

 

Examples of application areas


 

Applications
 

Geometric reconstruction: modeling, forensics,
special effects (ILM, RealVis)
• Image and video editing (Avid, Adobe)
• Scientific / medical applications (GE)

Tracking and surveillance (Sarnoff)
• Fingerprint recognition (Digital Persona)
• Biometrics / iris scans (Iridian Technologies)
• Vehicle safety (MobilEye)
• Optical motion capture (Vicon)


Vicon
 

MobileEye

Open Libraries/projects
 

OpenCV http://opencv.org/
 C++, C, Python and Java interfaces
 Windows, Linux, Mac OS, iOS and Android
HALCON http://www.halcon.com/
 Easy programming in C++, C, C# or VB.NET
 Available for Windows, Linux, Mac OS
 

OpenBR

 

http://openbiometrics.org/

EasyPR

 

http://git.oschina.net/easypr/EasyPR
 

Opencv安装配置
 

Image Watch
 

https://marketplace.visualstudio.com/items?itemName=VisualCPPTeam.ImageWatch

Image Watch is a watch window for viewing in-memory bitmaps when debugging native C++ code. 

The current version (release notes)has built-in support for OpenCV image types (cv::Mat, cv::Mat_<>, CvMat, _IplImage). To enable user-defined image types please refer to the Image Watch documentation.

 

认识图像
 

 

 

常用构造函数
 

MAT

 Mat::Mat()
 Mat::Mat(int rows, int cols, int type)
 Mat::Mat(Size size, int type)
 Mat::Mat(int rows, int cols, int type, const Scalar& s)
 Mat::Mat(Size size, int type, const Scalar& s)
 Mat::Mat(const Mat& m)
 Mat::Mat(int rows, int cols, int type, void* data, size_t
step=AUTO_STEP)
 Mat::Mat(Size size, int type, void* data, size_t step=AUTO_STEP)
 Mat::Mat(const Mat& m, const Range& rowRange, const Range&
colRange)
 Mat::Mat(const Mat& m, const Rect& roi)


全是浅copy

 

ROI

 

#include <opencv.hpp>
#include <iostream>

using namespace std;
using namespace cv;

void main()
{
	Mat image = imread("book.jpg");
	Mat imags;
	Mat image2= image;

	Mat M(3,  2,  CV_8UC3, Scalar(0, 0, 225));
	Rect rect(100, 100, 200, 200);
	Mat roi = Mat(image, rect);
	imshow("roi", roi);

	imshow("books", image);
	waitKey();


}

 

Mat的赋值和拷贝问题
 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值