IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 人工智能 -> Opencv basic functions -> 正文阅读

[人工智能]Opencv basic functions

COLOR_BGR2GRAY

So here we are going to use the same test image and then we are going to look at the basic function that we can use which are present in the image processing, so after reading our image, we are going to first convert it into grayscale. So to convert it we can write cvtColor and then here you can see that we have all the arguments that are required. So we can write first argument here the input image, and second argument here then we have to write the output image or the destination image. So we will write imageGray, and then third argument here we will write the conversion. So we need to convert from COLOR_BGR2GRAY. Now this is giving error because it does not recognize imageGray, so what we cat do is we can define here Mat, and we can write here imageGray (define Mat imageGray ). So now it should be fine. So if we write it again COLOR_BGR2GRAY. Imshow imageGray ,run it. So here we have the original image and here we have the image gray.

ADD BLUR

Next we will add a little bit of blur, so we have different types of blurs that we can add but one of the most common ones is gaussian blur. So we are going to use that so let’s write here GaussianBlur and then we are going to define our image then our destination image now if you remember in python, We don’t actually write the destination. Inside the function but most of the time we write it outside. Input corresponding arguments. Run it.

Edge detection

We will learn how to perform edge detection and one of the most commonly used edge detector is canny edge detector. So let’s write down the canny ()

Dilate and erode an image

We well learn dilate and erode image. So a lot of the times when you detect the edges, they are not completely filled or you can say they are not joined or they are very thin to actually detect properly. So what you can do is you can dilate it, which means it will increase their thickness and you can erode it which means it will decrease their thickness. So let’s see how we can do that so here we will write dilate(). So we are going to give in our image (imagecanny), And then we are going to give out our image output. So we will write image dilation.

?这次练习主要关于opencv的基本函数,彩色图像转变为灰度图像,添加模糊主要使用的是高斯模糊,边缘提取,边缘扩张和边缘侵蚀。

图像效果:

?

?

  人工智能 最新文章
2022吴恩达机器学习课程——第二课(神经网
第十五章 规则学习
FixMatch: Simplifying Semi-Supervised Le
数据挖掘Java——Kmeans算法的实现
大脑皮层的分割方法
【翻译】GPT-3是如何工作的
论文笔记:TEACHTEXT: CrossModal Generaliz
python从零学(六)
详解Python 3.x 导入(import)
【答读者问27】backtrader不支持最新版本的
上一篇文章      下一篇文章      查看所有文章
加:2021-09-27 14:05:27  更:2021-09-27 14:07:26 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年5日历 -2024/5/1 18:48:30-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码