Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/355.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 在模式中添加缺少的部分_Python_Opencv_Geometry_Hough Transform - Fatal编程技术网

Python 在模式中添加缺少的部分

Python 在模式中添加缺少的部分,python,opencv,geometry,hough-transform,Python,Opencv,Geometry,Hough Transform,我有一个视频流,我用圆圈记录简单的图案。我需要检测它们。我用的是HoughCircles。下面是一个示例框架: 但有时我并没有发现图案中的每个圆圈 我的目标是在检测所有圆时保存模式,接下来,如果我没有检测到所有圆,则尝试近似可能的位置并在那个里绘制矩形。问题是,有时我会错过一个圆圈,有时我会错过两个。我的检测代码: gauss = cv2.GaussianBlur(gray,(21,21),0); blurred = cv2.medianBlur(gauss, 21) minDist =

我有一个视频流,我用圆圈记录简单的图案。我需要检测它们。我用的是HoughCircles。下面是一个示例框架:

但有时我并没有发现图案中的每个圆圈

我的目标是在检测所有圆时保存模式,接下来,如果我没有检测到所有圆,则尝试近似可能的位置并在那个里绘制矩形。问题是,有时我会错过一个圆圈,有时我会错过两个。我的检测代码:

gauss = cv2.GaussianBlur(gray,(21,21),0);
blurred = cv2.medianBlur(gauss, 21)  
minDist = 70
param1 = 20#30 #smaller value-> more false circles
param2 = 30#50 #smaller value-> more false circles
minRadius = 10
maxRadius = 50
circles = cv2.HoughCircles(blurred, cv2.HOUGH_GRADIENT, 1, minDist, param1=param1, param2=param2, minRadius=minRadius, maxRadius=maxRadius)

我使用了一些不同的参数(用于模糊和Hough),我想没有更多的改进余地。

除了您提供的标记图像外,您能否将未标记的图像作为原始图像而不是屏幕抓取提供。谢谢。正如我所说,这是热像仪的截图,所以视图会动态变化。出于我的目的,最好以某种方式计算缺失圆的近似位置。