画像のORB記述子をコンピュータに入力し、それらをクラスタ化しようとしています空間的にです。私はscikitにscikit-DBSCANクラスタリング(x.y)座標点でエラーが発生する
detector = cv2.ORB(500)
orb_kp = detector.detect(gray,None)
# compute the descriptors with ORB
kps, descs = detector.compute(gray, orb_kp)
img2 = cv2.drawKeypoints(gray,kps,color=(0,255,0), flags=0)
#extract the x,y points from the list (since kp contains various other attribs)
pts = (p.pt for p in kps)
db = DBSCAN(eps=0.3, min_samples=5).fit(pts)
をDBSCANを使用しようとしていたが、私はこのエラーを取得:
float() argument must be a string or a number
ので、私が試した: pts = (int(p.pt) for p in kps)
と pts = ([int(p.pt.x),int(p.pt.y)] for p in kps)
とまだ同じエラーを取得します。
私はPythonでPTSを印刷しようとしたが、このメッセージが表示されます:
print pts None <generator object <genexpr> at 0x10fcab3c0>
私はint