3

Python で OpenCV を使用して、特定の画像の機能記述子を作成しています。そのために私はクラスを使用しています。ORB私が理解していないのは、orb.detectおよびorb.computeメソッドを使用した後に記述子配列に含まれるものです。

以下は私のコードです。

import cv2
from matplotlib import pyplot as plt
from sklearn.cluster import KMeans

img = cv2.imread('penguins.jpg',0)

# Initiate STAR detector
orb = cv2.ORB_create(nfeatures=1000)

# find the keypoints with ORB
kp = orb.detect(img,None)

# compute the descriptors with ORB
kp, des = orb.compute(img, kp)

# draw only keypoints location,not size and orientation
img2 = cv2.drawKeypoints(img,kp,des, color=(0,255,0), flags=0, )
plt.imshow(img2),plt.show()

print len(kp),len(des),len(des[1]), des[0]

最後の行の出力は次のとおりです。

1000 1000 32 [221  65  79 237   6   2 111 112 116 194 243  70  83  99 177 113 118 228
  62 238 233 181  37  76 244 171 230 128  45 178  96  49]

の各要素の長さdesが 32 なのはなぜですか? それは何を表していますか?各キーポイントに対応する記述子配列であることはわかっていますが、これらの数値は正確には何を表しているのでしょうか?

このリンクから上記のコードを試しました。

4

1 に答える 1

1

各 ORB 記述子のデフォルトの長さは 32 バイトです。公式論文で説明されているように、各バイトには 8 つのピクセル強度比較が含まれています: https://www.willowgarage.com/sites/default/files/orb_final.pdf

また、確認してください:OpenCV ORB記述子 - バイトセットに正確にどのように格納されていますか?

于 2015-06-12T13:01:56.950 に答える