İçeriğe geç
ShiftDelete.Net
Haber ara/ SDN'ye SorGiriş
Haber Akışı SDNTV İnceleme Forum Yapay Zeka Akıllı Telefon Elektrikli Otomobil Oyun ShiftDelete.Net Global Teknoloji Haberleri Mobil Otomobil Donanım Savunma Bilim Sosyal Medya İnternet Giyilebilir Teknoloji Rehber Ürünler Son dakika Yazarlar
  1. Ana sayfa
  2. Topluluk
  3. Yazılım
  4. Diğer Yazılım Konuları
Diğer Yazılım Konuları

opencv

boom16609.01.20234 cevap746 görüntüleme
2023'den beri5 mesaj
#1
deneme
Cevaplar
2023'den beri4 mesaj
#2
#para saydırma
import cv2
import numpy as np

image = cv2.imread('images/1404418.jpg')
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cv2.imshow('gray', gray)
cv2.waitKey(0)
ret,thresh = cv2.threshold(gray,160,255,cv2.THRESH_BINARY)
cv2.imshow('thresh', thresh)
cv2.waitKey(0)
blur = cv2.medianBlur(thresh, 21)
cv2.imshow('blur', blur)
cv2.waitKey(0)

circles = cv2.HoughCircles(gray, cv2.HOUGH_GRADIENT, 1, 90,minRadius=50,maxRadius=105)
#circles = cv2.HoughCircles(gray, cv.CV_HOUGH_GRADIENT, 2, 50,minRadius=30,maxRadius=70)

#circles = np.uint8(np.around(circles))

for i in circles[0,:]:
# draw the outer circle
cv2.circle(image,(int(i[0]), int(i[1])), int(i[2]), (0, 0, 255), 2)

# draw the center of the circle
cv2.circle(image, (int(i[0]), int(i[1])), 2, (0, 255, 0), -1)

cv2.imshow('detected circles', image)
cv2.waitKey(0)
cv2.destroyAllWindows()
2023'den beri3 mesaj
#3
#para saydırma
import cv2
import numpy as np


image = cv2.imread('images/1404418.jpg')
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cv2.imshow('gray', gray)
cv2.waitKey(0)
ret,thresh = cv2.threshold(gray,160,255,cv2.THRESH_BINARY)
cv2.imshow('thresh', thresh)
cv2.waitKey(0)
blur = cv2.medianBlur(thresh, 21)
cv2.imshow('blur', blur)
cv2.waitKey(0)


circles = cv2.HoughCircles(gray, cv2.HOUGH_GRADIENT, 1, 90,minRadius=50,maxRadius=105)
#circles = cv2.HoughCircles(gray, cv.CV_HOUGH_GRADIENT, 2, 50,minRadius=30,maxRadius=70)

#circles = np.uint8(np.around(circles))

for i in circles[0,:]:
# draw the outer circle
cv2.circle(image,(int(i[0]), int(i[1])), int(i[2]), (0, 0, 255), 2)

# draw the center of the circle
cv2.circle(image, (int(i[0]), int(i[1])), 2, (0, 255, 0), -1)

cv2.imshow('detected circles', image)
cv2.waitKey(0)
cv2.destroyAllWindows()
2023'den beri2 mesaj
#4
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2023'den beri4 mesaj
#5
#para saydırma
import cv2
import numpy as np


image = cv2.imread('images/1404418.jpg')
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cv2.imshow('gray', gray)
cv2.waitKey(0)
ret,thresh = cv2.threshold(gray,160,255,cv2.THRESH_BINARY)
cv2.imshow('thresh', thresh)
cv2.waitKey(0)
blur = cv2.medianBlur(thresh, 21)
cv2.imshow('blur', blur)
cv2.waitKey(0)


circles = cv2.HoughCircles(gray, cv2.HOUGH_GRADIENT, 1, 90,minRadius=50,maxRadius=105)
#circles = cv2.HoughCircles(gray, cv.CV_HOUGH_GRADIENT, 2, 50,minRadius=30,maxRadius=70)

#circles = np.uint8(np.around(circles))

for i in circles[0,:]:
    # draw the outer circle
    cv2.circle(image,(int(i[0]), int(i[1])), int(i[2]), (0, 0, 255), 2)
    
    # draw the center of the circle
    cv2.circle(image, (int(i[0]), int(i[1])), 2, (0, 255, 0), -1)

cv2.imshow('detected circles', image)
cv2.waitKey(0)
cv2.destroyAllWindows()

Cevabını yaz

Cevap yazmak için giriş yap ya da üye ol. Eski forum kullanıcı adın ve parolanla girebilirsin.