import cv2 as cv
import numpy as np
import os
def detect_circular_image(image_path, out_path):
# 读取文件
origin = cv.imread(image_path, 1)
img = cv.imread(image_path, 0)
# 获取图片中心点
(h, w) = img.shape[:2]
center_x, center_y = w / 2, h / 2
# 霍夫圆检测
circles = cv.HoughCircles(img, cv.HOUGH_GRADIENT, 1, 100
使用opencv获取图片上的圆形坐标,以图片为中心原点
于 2024-01-09 00:15:00 首次发布