登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 计算机科学与技术 > 正文

基于OpenCV的若干图像处理算法的优化实现

 2023-04-17 03:04  

论文总字数:21737字

摘 要

图像处理技术是计算机处理技术发展过程中不断走向成熟的技术,科技时代的到来,更离不开图像处理的重要作用。其中OpenCV是图像处理经常使用的,OpenCV是包含大量图像处理函数的第三方函数库。在编写程序时,通过包含头文件,可以轻松使用里面的各种图像处理功能。目前大多数的处理算法都是在串行基础上运行的,然而现在的计算机芯片技术十分发达,已经从单核跳跃到双核、四核、八核,因此串行程序已经远远不能充分使用计算机提供的资源了,所以迫切需要将串行程序重写成并行程序。

英特尔公司提供了创建线程模块的方法,突出了TBB优化技术,通过使用Cmake重新编译OpenCV,使之带有并行功能。当然,OpenCV官方也对TBB优化方法进行重新优化,结合它自身的程序,大大提高了图像处理的效率。

本文着力于研究OpenCV 图像处理算法,通过对其处理过程和函数原理的分析,测试运行效率,再利用带有TBB的OpenCV库进行优化测试,总结优化方法,然后再测试并优化给定的具有图像处理功能的函数。最后分析运行结果,总结出影响图像处理效率的因素。

关键词: OpenCV;图像处理;并行优化

The Optimization of Several Image Processing Algorithms Based on OpenCV

ABSTRACT

Image processing technology in computer processing technology development process continue to mature, the arrival of the technological era, can not do without an important role in image processing. OpenCV is frequently used during image processing.OpenCV is a third-party library which contains a large number of image processing functions.You can easily use a variety of image processing functions with including header file when you are writing a program.At present, most of the processing algorithms are running on a serial basis.But now the computer chip technology is well developed, it has been jumping from single-core to dual-core, quad-core, eight-core.So the serial program has been far from making full use of the resources that are provided by the computer.In a result,there is an urgent need to re-write parallel programs instead of serial program.

The Intel provides a method for creating a thread module, highlighting the TBB optimization technology by using Cmake to recompile OpenCV, so that it can has parallel function. Of course, OpenCV official also re-optimize TBB optimization method, combined with its own procedures, which greatly improves the efficiency of image processing.

This article focuses on the research of OpenCV image processing algorithms by analyzing its processes,function principle and testing its running efficiency.Then it uses the OpenCV library with TBB to test, summarizing the method of optimization .Next, it tests and optimizes the given function which has the image processing function,At last,it analyzes the operating results and summarizes the factors affecting the image processing efficiency.

Keywords:OpenCV; Image processing; Parallel optimization

目录

摘 要 …………………………………………………………………………………… Ⅰ

Abstract ………………………………………………………………………………… Ⅱ

第一章 引 言 ………………………………………………………………………… 1

1.1计算机图像处理技术的发展………………………………………………… 1

1.2传统计算机图像处理的缺点与发展趋势……………………………………… 1

1.3优化图像处理的必要性………………………………………………………… 1

1.4研究方向及方案设计…………………………………………………………… 2

1.4.1本项目关键问题及难点………………………………………………… 2

1.4.2设计方案论证…………………………………………………………… 2

第二章 OpenCV介绍……………………………………………………………………… 3

2.1 OpenCV简介…………………………………………………………………… 3

2.2 OpenCV特色…………………………………………………………………… 3

2.3 OpenCV的优势………………………………………………………………… 3

第三章 搭建测试环境…………………………………………………………………… 4

3.1软件平台简介…………………………………………………………………… 4

3.1.1 OpenCV 2.4.10………………………………………………………… 4

3.1.2 Visual studio 2008…………………………………………………… 4

3.1.3 CMake 2.8.8…………………………………………………………… 4

3.1.4 TBB…………………………………………………………………… 4

3.2 CMake编译OpenCV……………………………………………………………… 4

3.2.1生成解决方案…………………………………………………………… 4

3.2.2编译生成目标文件…………………………………………………… 8

第四章 图像处理………………………………………………………………………… 11

4.1图像处理 二值化……………………………………………………………… 11

4.1.1二值化原理……………………………………………………………… 11

4.1.2二值化常用方法………………………………………………………… 11

4.1.3 OpenCV中的二值化函数…………………………………………………12

4.1.4效果展示………………………………………………………………… 12

4.1.5图像二值化意义……………………………………………………… 13

4.2图像处理 形态学……………………………………………………………… 13

4.2.1概念…………………………………………………………………… 13

4.2.2基本形态学处理……………………………………………………… 13

4.3图像处理 卷积运算………………………………………………………… 16

4.3.1原理…………………………………………………………………… 16

4.3.2OpenCV中的函数……………………………………………………… 16

4.3.3卷积效果图…………………………………………………………… 17

4.4图像处理 模板运算…………………………………………………………… 17

4.4.1原理…………………………………………………………………… 17

4.4.2常用模板……………………………………………………………… 17

4.4.3使用模板常见问题…………………………………………………… 17

4.5图像处理 矩阵运算…………………………………………………………… 18

4.5.1 OpenCV中的矩阵操作函数…………………………………………… 18

4.6图像处理 直方图运算………………………………………………………… 18

4.6.1概念…………………………………………………………………… 18

4.6.2原理…………………………………………………………………… 18

4.6.3 OpenCV中的函数……………………………………………………… 18

4.6.4直方图的应用………………………………………………………… 19

4.7图像处理 FFT运算…………………………………………………………… 20

4.7.1原理…………………………………………………………………… 21

4.7.2空间域操作……………………………………………………………… 21

4.8图像处理 颜色转换…………………………………………………………… 21

4.8.1原理……………………………………………………………………… 21

4.8.2 OpenCV中的函数……………………………………………………… 21

第五章 基于OpenCV优化测试………………………………………………………… 23

5.1概述…………………………………………………………………………… 23

5.2提高并行化方法……………………………………………………………… 23

5.3 TBB线程构建模块的实现机制………………………………………………… 23

5.4 OpenCV对TBB的支持………………………………………………………… 24

5.4.1优化方法包含…………………………………………………………… 24

5.4.2优化方法………………………………………………………………… 24

剩余内容已隐藏,请支付后下载全文,论文总字数:21737字

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图