小编Moh*_*avi的帖子

opencv python中的椭圆检测

我的图片在这里:

我的照片在这里。

我正在寻找更好的解决方案或算法来检测这张照片中的椭圆部分(碟形),并在 Opencv 的另一张照片中将其遮蔽。你能给我一些建议或解决方案吗?我的代码是:

 circles = cv2.HoughCircles(img, cv2.HOUGH_GRADIENT, 1.2, 1, param1=128, minRadius=200, maxRadius=600)
    # draw detected circles on image
    circles = circles.tolist()
    for cir in circles:
        for x, y, r in cir:
            x, y, r = int(x), int(y), int(r)
            cv2.circle(img, (x, y), r, (0, 255, 0), 4)

    # show the output image
    cv2.imshow("output", cv2.resize(img, (500, 500)))
Run Code Online (Sandbox Code Playgroud)

python opencv python-2.7 scikit-image

2
推荐指数
2
解决办法
3万
查看次数

标签 统计

opencv ×1

python ×1

python-2.7 ×1

scikit-image ×1