基于Python的机器学习的昆虫识别和数目统计系统 毕业论文+源码及数据集

摘 要

农业与民生和经济发展息息相关,对农业发展科学化的关注既是民生需求, 也是经济稳步发展的迫切需求。病虫害是影响农作物生长的重要因素,对农作物的产量和品质都能造成无法估计的损害。

针对目前广大农业产区农业植保人员稀缺、病虫害识难度大等问题,论文在当前已有的研究基础上进行设计,提出了一套基于机器视觉的远程害虫种类识别和数量检测系统,该系统能够在农业产区进行害虫捕杀和图像采集,同时将昆虫图像上传到虫类鉴别服务器进行昆虫识别。论文以机器视觉为核心,利用 OpenCV 开源视觉库,研究和实现了昆虫识别的完整流程。论文研究的内容主要包括:

(1) 对昆虫图像进行图像预处理的研究。使用了加权平均法对图像进行灰度化处理,再使用高斯滤波对图像进行平滑处理,最后使用大津法对灰度化后的图像进行二值化处理。

(2) 对昆虫图像进行特征提取的研究。使用 OpenCV 对二值化后的图像进行轮廓查找,同时实现昆虫计数,然后分别针对昆虫轮廓的矩形度、延长度、似圆度、球状性、叶状性进行数学定义和特征提取。

(3) 对昆虫识别进行了分类器的研究。选取了逻辑斯蒂回归模型、线性 SVM 模型和 K 临近模型进行分类器的训练和测试,比较了三种分类器在昆虫识别上的性能。

论文对基于机器视觉的昆虫种类及数量检测机制进行了研究,并在此基础实现了昆虫的识别和计数。

ABSTRACT

Agriculture is closely related to people’s livelihood and economic development. Scientific research on the development of agriculture is not only the need for people’s livelihood, but also the urgent need for steady economic development. Pests are important factors that affecting the growth of crops, and pests can cause unpredictable damage to the yield and quality of crops.

To deal with the problems such as the scarcity of agricultural plant protection per- sonnel and the difficulty of identification for pest and disease, This paper presents a set of remote pest species identification and quantity detection system based on machine vision, which is based on the existing research. This system is capable of pest killing and image acquisition in agriculture areas, while uploading pest images to insect iden- tification servers for insect identification. This paper the use of OpenCV open source vision library. This paper includes the following contents:

(1) Research on image preprocessing of insect image. Use the weighted average method to gray the image, and then use Gaussian filtering to smooth the image. Finally, binarize the gray scale image by OTSU method.

(2) Research on Feature Extraction of insect image. Use OpenCV to find the contour of binarized image, while realized the insect counting. Then propose the mathematical definition of insect features and extract the insect features, insect features include rec- tangularity, elongation, roundness, sphericity, leafy.

(3) Research on Classifier for insect identification. This paper chose the logistic regres- sion model, the linear SVM model and the k-nearest neighbors model as the insect clas- sifier to training and testing. Then compare the performance of three classifiers on in- sect identification.

This paper studies the counting and identification of insects based on machine vi- sion, achieve the counting and identification of insects.

目 录

摘 要 I

ABSTRACT II

目 录 III

第 1 章 绪论 1

1.1 课题研究的背景和意义 1

1.2 国内外研究现状 1

1.2.1 国内研究现状 2

1.2.2 国外研究现状 2

1.3 研究的内容和目的 3

1.3.1 研究内容 3

1.3.2 研究目的 3

1.4 章节安排 4

第 2 章 系统总体设计 5

2.1 系统设计目标 5

2.2 系统总体架构 5

2.3 图像采集节点 6

2.3.1 装置总体设计 6

2.3.2 运行流程 9

2.4 虫类鉴别服务器和虫类信息数据库设计 10

2.4.1 服务器设计 10

2.4.2 服务器虫类分类器实现 11

2.4.3 PC 上的昆虫分类识别软件 12

第 3 章 昆虫图像预处理与计数研究 15

3.1 昆虫图像的采集 15

3.2 昆虫图像的预处理 16

3.2.1 图像的灰度化,高斯滤波和尺度变换 16

3.2.2 二值化 17

3.2.3 大津法 OTSU 在昆虫图像二值化上的应用 18

3.3 昆虫图像的计数 20

3.3.1 检测轮廓 20

3.3.2 昆虫计数 20

第 4 章 昆虫图像特征提取与识别研究 23

4.1 特征的选取 23

4.2 特征描述以及提取方式 23

4.3 分类器的选择和训练 32

4.4 机器学习结果分析 33

4.4.1 性能评价指标 33

4.4.2 三种分类器的性能比较 34

第 5 章 总结与展望 37

5.1  总结 37

5.1.1 完成的工作 37

5.1.2 创新点和不足之处 37

5.2  展望 38

致谢...........................................................................................   错误!未定义书签。

参考文献 40

附录一:部分昆虫图像样本 42

附录二:OTSU 的 PYTHON 实现 44

  • 30
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
基于Python机器学习昆虫识别数目统计系统的项目源码数据集可以包含以下内容: 1. 数据集:该系统需要一个合适的昆虫图像数据集,可以利用现有的公开数据集,也可以自行收集。数据集应包含不同种类的昆虫图像,每个种类都有足够数量的样本进行训练和测试。每个图像样本需要标记对应的昆虫种类和数量。 2. 采集数据:如果用于数目统计系统,还需要一个适当的数据采集方法来获取昆虫的图像和它们的数目,可以通过照相或者摄像来获得昆虫图像,并结合基于图像处理的方法来实现昆虫数目统计。 3. Python代码:项目的源码应包含用于昆虫图像处理、特征提取和机器学习模型训练的Python代码。首先,需要编写图像处理的代码来对昆虫图像进行预处理,例如调整大小、去噪和增强。然后,通过适当的特征提取方法从图像中提取有用的特征,例如颜色、纹理或形状等。接下来,利用这些特征来训练机器学习模型,比如支持向量机(Support Vector Machine)或深度学习模型,用于识别昆虫的种类和数量。最后,需要编写代码来对新的昆虫图像进行分类和数目统计。 4. 交互界面:可以为该系统设计一个用户友好的交互界面,使用户能够方便地上传昆虫图像并获取识别结果和统计数目。 总结来说,基于Python机器学习昆虫识别数目统计系统的项目源码数据集包括昆虫图像数据集、数据采集方法、图像处理代码、特征提取和机器学习模型训练代码以及交互界面设计等。通过这些内容的结合,可以实现一个功能完善的昆虫识别数目统计系统
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序员小马软件开发定制

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值