text: """ -*- coding: utf-8 -*-
      @author: omerkocadayi 
      https://github.com/omerkocadayi
      https://www.linkedin.com/in/omerkocadayi/ """
  
  import cv2
  import numpy as np
  
  img = cv2.imread("toplar.jpeg")
  gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
  
  gray = cv2.medianBlur(gray, 3)
  rows = gray.shape[0]
  
  circles = cv2.HoughCircles(gray, cv2.HOUGH_GRADIENT, 1, rows / 8, param1=100, param2=30, minRadius=40, maxRadius=220)
  
  if circles is not None:
      circles = np.uint16(np.around(circles))
      for i in circles[0, :]:
          center = (i[0], i[1])
          # circle center
          cv2.circle(img, center, 1, (0, 100, 100), 3)
          # circle outline
          radius = i[2]
          cv2.circle(img, center, radius, (255, 0, 255), 3)
  
  cv2.imshow("Circles", img)
  cv2.waitKey(0)
  cv2.destroyAllWindows()