<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[com_fang_bean的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/com_fang_bean</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; com_fang_bean]]></copyright><item><title><![CDATA[ModuleNotFoundError: No module named ‘picamera‘]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/114684442</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/114684442</guid><author>com_fang_bean</author><pubDate>Fri, 12 Mar 2021 01:43:06 +0800</pubDate><description><![CDATA[1.On Windows, execute: set READTHEDOCS=True

2'.On Unix based systems, execute: export READTHEDOCS=True

3.Now execute: pip install picamera
]]></description><category></category></item><item><title><![CDATA[计算机视觉基础之简单目标识别]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/114683434</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/114683434</guid><author>com_fang_bean</author><pubDate>Fri, 12 Mar 2021 01:32:03 +0800</pubDate><description><![CDATA[检测到运动：

定义关键事件。
	将视频剪辑写入包含事件的文件。
步骤1：使用计算机视觉技术检测彩球的存在。
	步骤＃2：在视频帧中四处移动时跟踪球，并在移动时绘制其先前位置。




from collections import deque
from imutils.video import VideoStream
import numpy as np
import argparse
import cv2
import imutils
import time
ap = argparse.Argum...]]></description><category></category></item><item><title><![CDATA[计算机视觉入门之构建一个扫描仪]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/114682847</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/114682847</guid><author>com_fang_bean</author><pubDate>Thu, 11 Mar 2021 23:31:17 +0800</pubDate><description><![CDATA[源代码：


# import the necessary packages
from transform import four_point_transform
from skimage.filters import threshold_local
import numpy as np
import argparse
import cv2
import imutils
# construct the argument parser and parse the arguments
ap = argpa...]]></description><category></category></item><item><title><![CDATA[anaconda安装环境适配的第三方库]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/114600875</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/114600875</guid><author>com_fang_bean</author><pubDate>Tue, 09 Mar 2021 21:01:46 +0800</pubDate><description><![CDATA[输入anaconda search -t conda库名查看


在使用 anaconda show 文件名 就会告诉如何安装对应的库


]]></description><category></category></item><item><title><![CDATA[根据端口号kill相应的进程]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/114591593</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/114591593</guid><author>com_fang_bean</author><pubDate>Tue, 09 Mar 2021 17:36:21 +0800</pubDate><description><![CDATA[1.netstat -ano|findstr "8042"，根据端口号查找相应的进程的PID



2.根据PID杀死相应的进程。


]]></description><category></category></item><item><title><![CDATA[Intellij IDEA怎么自动生成serialVersionUID]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/114402424</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/114402424</guid><author>com_fang_bean</author><pubDate>Fri, 05 Mar 2021 16:45:45 +0800</pubDate><description><![CDATA[1.类继承Serializable，在idea工具栏中点击"File"按钮，在弹出的菜单中选择“Settings”选项。弹出Settings弹框后，在搜索栏中输入如下图所示的关键词并找到“Inspections”选项。

2.在右侧列表中选择“Serialization issues”并勾选该条目的所有选项，勾选完成后并点击“Ok”按钮。如下图所示



3.选中类名称Blog，按Alt+Enter快捷键。下拉弹框中找到“Add 'serialVersionUID' field”选项并点击该选项。



.]]></description><category></category></item><item><title><![CDATA[计算机视觉基础之质心跟踪算法1]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/113783221</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/113783221</guid><author>com_fang_bean</author><pubDate>Wed, 10 Feb 2021 20:52:21 +0800</pubDate><description><![CDATA[质心跟踪算法依赖于（1）现有对象质心（即，质心跟踪器之前已经看到的对象）与（2）视频中后续帧之间的新对象质心之间的欧几里得距离。质心跟踪算法的主要假设是一个给定的对象将潜在地移动在后续的帧之间，但距离为帧中的质心之间和将小比对象之间的所有其它距离。因此，如果我们选择将质心与后续帧之间的最小距离相关联，则可以构建对象跟踪器。另外，我们将在旧对象无法与任何现有对象匹配的情况下（总共N个后续帧）注销旧对象。

步骤1：接受边界框坐标并计算质心

步骤2：计算新边界框与现有对象之间的欧几里得距离

步骤3：更新（.]]></description><category></category></item><item><title><![CDATA[计算机视觉入门教程之将输出图像写入磁盘]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/113782887</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/113782887</guid><author>com_fang_bean</author><pubDate>Wed, 10 Feb 2021 15:36:32 +0800</pubDate><description><![CDATA[＃将输出图像写入磁盘
cv2。imwrite （args [ “ output” ] ，image ）




]]></description><category></category></item><item><title><![CDATA[计算机视觉入门教程之图像的屏蔽和按位运算]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/113781767</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/113781767</guid><author>com_fang_bean</author><pubDate>Wed, 10 Feb 2021 13:54:43 +0800</pubDate><description><![CDATA[一个典型的操作，我们可能想要应用的是采取我们的蒙版和按位添加到输入图像，只保留蒙面部分区域：


mask = thresh.copy()
output = cv2.bitwise_and(image, image, mask=mask)
cv2.imshow("Output", output)
cv2.waitKey(0)


...]]></description><category></category></item><item><title><![CDATA[计算机视觉入门教程之图像的侵蚀和膨胀]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/113781658</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/113781658</guid><author>com_fang_bean</author><pubDate>Wed, 10 Feb 2021 13:45:53 +0800</pubDate><description><![CDATA[侵蚀和膨胀通常用于减少二进制图像中的噪声。

为了减小前景对象的大小，我们可以通过多次迭代来侵蚀掉像素：


mask = thresh.copy()
mask = cv2.erode(mask, None, iterations=5)
cv2.imshow("Eroded", mask)
cv2.waitKey(0)

同样，我们可以在蒙版中前景区域。要扩大区域，同样地，膨胀会增加地面物体的大小：


mask = thresh.copy()
mask = cv2.dilate(mask, None, i]]></description><category></category></item><item><title><![CDATA[计算机视觉入门教程之显示检测到的图像轮廓数量]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/113781601</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/113781601</guid><author>com_fang_bean</author><pubDate>Wed, 10 Feb 2021 13:36:49 +0800</pubDate><description><![CDATA[text→形状轮廓数量的字符串

len(cnts)→计算此图像中的对象总数


text = "I found {} objects!".format(len(cnts))
cv2.putText(output, text, (10, 25),  cv2.FONT_HERSHEY_SIMPLEX, 0.7,
	(240, 0, 159), 2)
cv2.imshow("Contours", output)
cv2.waitKey(0)


...]]></description><category></category></item><item><title><![CDATA[计算机视觉入门教程之检测和绘制图像轮廓]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/113781401</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/113781401</guid><author>com_fang_bean</author><pubDate>Wed, 10 Feb 2021 13:14:38 +0800</pubDate><description><![CDATA[在图像中我们有6个图形的轮廓，我们使用代码来计算和查找轮廓。

查找前景对象的轮廓(即轮廓)，使用阈值化处理后的图像：


cnts = cv2.findContours(thresh.copy(), cv2.RETR_EXTERNAL,
	cv2.CHAIN_APPROX_SIMPLE)
cnts = imutils.grab_contours(cnts)
output = image.copy()

在轮廓上循环，在输出图像上用3px粗紫色绘制每个轮廓线outline，然后一次显示一个输出轮廓：


f]]></description><category></category></item><item><title><![CDATA[计算机视觉入门教程之将图像阈值处理]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/113781315</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/113781315</guid><author>com_fang_bean</author><pubDate>Wed, 10 Feb 2021 13:01:22 +0800</pubDate><description><![CDATA[图像阈值化是图像处理管道的重要中间步骤。阈值处理可以帮助我们去除较亮或较暗的图像区域和轮廓。阈值设置所有像素值小于225到255(白色;和所有像素值&gt;= 225到255(黑色;背景)，从而分割图像


thresh = cv2.threshold(gray, 225, 255, cv2.THRESH_BINARY_INV)[1]
cv2.imshow("Thresh", thresh)
cv2.waitKey(0)

代码示意：图像灰度化以后小于225的像素设置为黑色，大于的设置为白色。左为边缘计算以]]></description><category></category></item><item><title><![CDATA[计算机视觉入门教程之将图像边缘计算]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/113781266</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/113781266</guid><author>com_fang_bean</author><pubDate>Wed, 10 Feb 2021 12:52:42 +0800</pubDate><description><![CDATA[边缘检测可用于查找图像中对象的边界，对于分割目的非常有效。让我们执行边缘检测以查看该过程如何工作：

应用边缘检测，我们可以在其中找到对象的轮廓：

执行命令：python3 tuxiang.py -i jp.png


edged = cv2.Canny(gray, 30, 150)
cv2.imshow("Edged", edged)
cv2.waitKey(0)


...]]></description><category></category></item><item><title><![CDATA[计算机视觉入门教程之将图像转换为灰度]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/113781206</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/113781206</guid><author>com_fang_bean</author><pubDate>Wed, 10 Feb 2021 12:47:50 +0800</pubDate><description><![CDATA[加载输入图像(它的路径是通过命令行提供的)参数)，并将图像显示到屏幕上：


image = cv2.imread(args["image"])

cv2.imshow("Image", image)

cv2.waitKey(0)

将图像转换为灰度：


gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cv2.imshow("Gray", gray)
cv2.waitKey(0)


...]]></description><category></category></item><item><title><![CDATA[计算机视觉入门教程之导入argparse使用命令行参数]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/113777164</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/113777164</guid><author>com_fang_bean</author><pubDate>Wed, 10 Feb 2021 12:37:16 +0800</pubDate><description><![CDATA[下面我们将学习到如何使用必需的命令行参数运行脚本：

首先导包并且构造解析器：


import argparse
import imutils
import cv2
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True,
	help="path to input image")
args = vars(ap.parse_args())


...]]></description><category></category></item><item><title><![CDATA[计算机视觉入门教程之在图像上绘图（打标签标注）]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/113776679</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/113776679</guid><author>com_fang_bean</author><pubDate>Tue, 09 Feb 2021 22:58:53 +0800</pubDate><description><![CDATA[在输入图像上绘制矩形，圆形和直线。在图像上覆盖文本。

流程：

1.我们制作原始图像的副本，并将副本存储为output。

2.我们继续绘制称为output 就位，因此我们不会破坏原始图像。


output = image.copy()
cv2.rectangle(output, (320, 60), (420, 160), (0, 0, 255), 2)
cv2.imshow("Rectangle", output)
cv2.waitKey(0)



添加关键区域：画一个蓝色的20px(填充)圆在图]]></description><category></category></item><item><title><![CDATA[计算机视觉入门教程之平滑图像（模糊处理）]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/113776578</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/113776578</guid><author>com_fang_bean</author><pubDate>Tue, 09 Feb 2021 22:29:26 +0800</pubDate><description><![CDATA[在许多图像处理管道中，我们必须对图像进行模糊处理以减少高频噪声，从而使我们的算法更容易检测和理解图像的实际内容，而不仅仅是使“混淆”算法的噪声。在OpenCV中，对图像进行模糊处理非常容易，并且有多种方法可以完成图像处理。

使用到函数：GaussianBlur

应用11x11内核的高斯模糊平滑图像，在降低高频噪声时非常有用。


blurred = cv2.GaussianBlur(image, (11, 11), 0)
cv2.imshow("Blurred", blurred)
cv2.waitK.]]></description><category></category></item><item><title><![CDATA[计算机视觉入门教程之旋转图像]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/113776433</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/113776433</guid><author>com_fang_bean</author><pubDate>Tue, 09 Feb 2021 22:11:08 +0800</pubDate><description><![CDATA[#首先使用OpenCV顺时针旋转图像45度，计算图像中心，然后构造旋转矩阵，然后最后应用仿射经线。



center = (w // 2, h // 2)

M = cv2.getRotationMatrix2D(center, -45, 1.0)

rotated = cv2.warpAffine(image, M, (w, h))

cv2.imshow("OpenCV Rotation", rotated)

cv2.waitKey(0)


...]]></description><category></category></item><item><title><![CDATA[计算机视觉入门教程之调整图像大小]]></title><link>https://blog.youkuaiyun.com/com_fang_bean/article/details/113776182</link><guid>https://blog.youkuaiyun.com/com_fang_bean/article/details/113776182</guid><author>com_fang_bean</author><pubDate>Tue, 09 Feb 2021 21:52:31 +0800</pubDate><description><![CDATA[调整图像大小为200x200px，忽略纵横比：

resized = cv2.resize(image, (200, 200))

cv2.imshow("Fixed Resizing", resized)

cv2.waitKey(0)

效果：


]]></description><category></category></item></channel></rss>