1
をジャンプさ:私が検出した場合にサークル検出は、私が円を検出するために、次のコードを使用してい
gray = cv2.GaussianBlur(gray, (5, 5), 0);
gray = cv2.medianBlur(gray, 5)
kernel = np.ones((2, 2), np.uint8)
gray = cv2.erode(gray, kernel, iterations=1)
gray = cv2.dilate(gray, kernel, iterations=1)
circles = cv2.HoughCircles(gray, cv2.HOUGH_GRADIENT, 1, 200,
param1=100, param2=50, minRadius=0, maxRadius=150)
if circles is not None:
# Convert the (x,y) coordinate and radius of the circles
circles = np.round(circles[0, :]).astype("int")
# Loop over the (x,y) coordinate and radius of the circles
for (x, y, r) in circles:
# Draw the circle in the output
cv2.circle(fancy_frame, (x+x1, y+y1), r, (0, 255, 0), 4)
しかし、円がジャンプしています。どうすればこれを整理できますか?それを検出するためのhaarまたはsvmはありますか?
これは私が取得しています出力されます:あなたのコードは正常に見える、最も可能性の高いあなただけHoughCircles
parametersを微調整する必要がリアルタイムの映像で
を私はすべての円を検出したい
あなたの結果と予想される結果を投稿してください。 – zindarod
更新された質問を確認してください – user1241241
カルマンフィルタなどのトラッキングアルゴリズムを適用する必要があります。 – eyllanesc