why k means do not rectangle the red area drawn by harris corner?

Ho Yeung Lee jobmattcon at gmail.com
Mon Aug 14 18:27:39 EDT 2017


i would like to ask whether 
at line
dd = dst>0.01*dst.max()
and
the part of code below from script, whether write wrong in array access or assignment
 testing1 = zip(*np.where(dd == 1))
 locations = testing1
 testing1 = [list((float(elem[0]),float(elem[1]))) for elem in testing1]
 centroids,_ = kmeans(testing1,10)
 row,col = vq(testing1,centroids)
 locationsgroup = {}
 keyone = len(locationsgroup)+1
 for jj in range(0, len(row)):
 for ii in range(0, len(np.nonzero(row == jj)[0])):
 locationsgroup = addtogroupkey(locationsgroup, keyone, locations[np.nonzero(row == jj)[0][ii]])
 keyone = len(locationsgroup)+1
 #for ii in range(0, len(np.nonzero(row == jj)[0])):
 #locationsgroup = addtogroupkey(locationsgroup, keyone, locations[np.nonzero(row == jj)[0][ii]])
 #keyone = len(locationsgroup)+1
 colortolocation[eachcolor] = locationsgroup
On Tuesday, August 15, 2017 at 4:33:51 AM UTC+8, jlad... at itu.edu wrote:
> On Monday, August 14, 2017 at 12:30:21 PM UTC-7, Ho Yeung Lee wrote:
> > https://gist.github.com/hoyeunglee/df7e6cb9b76c576b26fd2bb2b26bfe2f
> > 
> > sample image
> > https://drive.google.com/file/d/0Bxs_ao6uuBDUY09qM1JMWS1Ob0k/view?usp=sharing
> > 
> > would like to rectangle bound the eye ,mouth corner etc
> > which detected by harris corner
> > 
> > but using kmeans can not rectangle the red area drawn by harris corner
>> Does your code run without errors? You appear to be asking more general question, about machine learning and image processing algorithms, than about Python.



More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /