Guest User

Untitled

a guest
Dec 13th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. img = Image.fromarray(fa)
  2. cimg = cv2.cvtColor(img,cv2.COLOR_GRAY2BGR)
  3.  
  4. circles = cv2.HoughCircles(img,cv2.HOUGH_GRADIENT,1,20,param1=50,param2=30,minRadius=0,maxRadius=0)
  5.  
  6. circles = np.uint16(np.around(circles))
  7. for i in circles[0,:]:
  8. # draw the outer circle
  9. cv2.circle(cimg,(i[0],i[1]),i[2],(0,255,0),2)
  10. # draw the center of the circle
  11. cv2.circle(cimg,(i[0],i[1]),2,(0,0,255),3)
Add Comment
Please, Sign In to add comment