I 基于OpenCV的图像轮廓提取的实现
【摘 要】 OpenCV是近几年来推出的一个开源的、免费的计算机视觉库.OpenCV的目标是构建一个简单易用的计算机视觉框架,利用它所包含的函数帮助开发人员方便快捷地实现图像处理和视频处理。而图像的轮廓是图像的一种基本特征,携带着一幅图像大部分的信息,经常被应用到较高层次的图像应用中。它在图像分离,图像识别和图像压缩等领域有很广泛的应用,也是图像处理的基础。本文首先阐述了OpenCV的特点和结构,然后采用一系列的可行性算法来获取图像特征参数并通过各种算子(Sobel算子,Laplace算子,Canny算子)对图像的灰度进行分析,调节,用实现对图像的边缘检测和轮廓提取。
【关键词】 OpenCV 图像 轮廓提取 II
The realization of the image contour extraction based on OpenCV
【Abstract】OpenCV is launched an open source in recent years.Free computer vision
library. OpenCV's goal is to build a simple and easy to use computer vision framework, function
to help developers use it contains quick and easy to realize image processing and video
processing.And the outline of the image is a basic feature of image, carrying an image, most of
the information is often applied to the higher level of the image application.It in image
separation, image recognition and image compression, and other fields have a wide range of
applications, is also the basis of image processing.At first, this paper expounds the characteristics
and structure of OpenCV, then a series of the feasibility of the algorithm is used to obtain image
feature parameters and through a variety of operator (Sobel operator, Laplace operator, Canny
operator) analysis of image gray level, adjustment, use of image edge detection and contour
extraction.
【Key words】 OpenCV Image Contour extraction III
目录
1引言 .............................................................................................................................................. 1
1.1 课题背景 ........................................................................................................................... 1
1.2 研究的目的及意义 ........................................................................................................... 1
1.3 可行性分析 ....................................................................................................................... 2
2 开发工具及轮廓提取概述 ......................................................................................................... 3
2.1 OpenCV .............................................................................................................................. 3
2.1.1 OpenCV简介 ......................................................................................................... 3
2.1.2 OpenCV安装及环境搭建 ..................................................................................... 3
2.2 边缘检测 ........................................................................................ 错误!未定义书签。
2.2.1 边缘检测 .............................................................................................................. 4
2.2.2 边缘检测原理 ...................................................................................................... 5
2.2.3 边缘检测算子 ...................................................................................................... 5
2.3 轮廓提取 .......................................................................................................................... 9
2.3.1轮廓提取目的 ....................................................................................................... 9
2.3.2 轮廓提取内容 ...................................................................................................... 9
3 需求分析 ................................................................................................................................... 10
3.1 系统功能分析 ................................................................................................................ 10
3.2 系统流程图 .................................................................................................................... 10
4 总体设计 ................................................................................................................................... 11
4.1 系统功能要求及说明和实现方法 ................................................................................ 11
4.2 系统功能模块 ................................................................................................................ 11
5 详细设计与实现 ....................................................................................... 错误!未定义书签。
5.1 图片提取 ........................................................................................ 错误!未定义书签。
5.2 图像边缘检测 ................................................................................................................ 15
5.3 图像轮廓提取 .............................................................................. 错误!未定义书签。8
6 程序界面 ................................................................................................... 错误!未定义书签。
总结与展望 ................................................................................................................................... 23
参考文献 ....................................................................................................................................... 23
致 谢 ............................................................................................................................................. 26