py2c - an open source Python to C/C++ is looking for developers
jared.h.lam at gmail.com
jared.h.lam at gmail.com
Sat Apr 11 15:21:15 EDT 2020
On Monday, July 30, 2012 at 6:27:04 AM UTC-7, manian... at gmail.com wrote:
> I created py2c ( http://code.google.com/p/py2c )- an open source Python to C/C++ translator!
> py2c is looking for developers!
> To join create a posting in the py2c-discuss Google Group or email me!
> Thanks
> PS:I hope this is the appropiate group for this message.
Here is my code from python
import cv2
import numpy as np
img = cv2.imread('c1.pgm',0)
img = cv2.medianBlur(img,5)
cimg = cv2.cvtColor(img,cv2.COLOR_GRAY2BGR)
circles = cv2.HoughCircles(img,cv2.HOUGH_GRADIENT,1,20,
param1=50,param2=30,minRadius=10,maxRadius=60)
circles = np.uint16(np.around(circles))
for i in circles[0,:]:
# draw the outer circle
cv2.circle(cimg,(i[0],i[1]),i[2],(0,255,0),2)
# draw the center of the circle
cv2.circle(cimg,(i[0],i[1]),2,(0,0,255),3)
cv2.imshow('detected circles',cimg)
cv2.waitKey(0)
cv2.destroyAllWindows()
Thanks a bunch
More information about the Python-list
mailing list