python - 使用类 ORB 的计算方法生成的描述符数组表示什么?

标签 python image opencv orb

我在 Python 中使用 OpenCV 来制作给定图像的特征描述符。为此,我正在使用 ORB 类。我不明白的是在使用 orb.detectorb.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?它代表什么?我知道它应该是每个关键点对应的描述符数组,但这些数字到底代表什么?

我已经从这个 link 中尝试了上面的代码.

最佳答案

默认每个 ORB 描述符的长度为 32 字节。每个字节包含 8 个像素强度比较,如官方论文中所述:https://www.willowgarage.com/sites/default/files/orb_final.pdf

同时检查:OpenCV ORB descriptor - how exactly is it stored in a set of bytes?

关于python - 使用类 ORB 的计算方法生成的描述符数组表示什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30801973/

相关文章:

c++ - OpenCV C++ 中的透明像素(使用 GrabCut 时)

opencv - 安装 Octave 依赖项 : tbb failed

python - 如何使用face_recognition模块执行python .exe文件

python - Numpy 对象数组

python - 根据最近的值合并 Pandas 数据帧

javascript - 更改 dropzone.js 的默认功能

python - Shopify API Python 使用 Python API 上传多张图片

python - Tensorflow:使用 num_parallel_calls 的数据集映射没有提供加速

Python - 从字典中分配和更改列表

iphone - 使用 parse.com 共享图像