opencv - How to Detect Color Combination using python? -
i can detect blue color using hough circle, but, need detect 5 color exist , show number of robot. how detect combination using python or opencv? suggestion?
this image:
i don't think need use hough circles, if image size constant per id. here's alternative:
in id image, figure out approx locations of yellowed points shown below:
you'll have 5 interest points- (x[0],y[0]) (x[4],y[4])
let's suppose 1 yellow interest point located @ (10,10).
since you're using python, can intensity of interest points using:
img=imread("id.jpg")#read image b=[]#declare empty lists g=[] r=[] x=[] y=[] #save points of interest___ x[0]=10 y[0]=10 #likewise remaining 4 points in range(5) b[i]=img(x[i],y[i],0)#img single id image g[i]=img(x[i],y[i],1) r[i]=img(x[i],y[i],2) if(b[0]==100 , g[0]==0 , r[0]==255)#pinkish colour print "1st dot pink"
now have total of 15 integers (5 points x 3 colours). can decide unique id based on values.
Comments
Post a Comment