python opencv的orb特征检测(Oriented FAST and Rotated BRIEF)

官方文档:https://docs.opencv.org/4.10.0/d1/d89/tutorial_py_orb.html

SIFT/SURF/ORB对比

https://www.bilibili.com/video/BV1Yw411S7hH?spm_id_from=333.788.player.switch&vd_source=26bb43d70f463acac2b0cce092be2eaa&p=80

ORB代码

python 复制代码
import numpy as np
import cv2 as cv
from matplotlib import pyplot as plt

gray = cv.imread('12.png', cv.IMREAD_GRAYSCALE)
# https://docs.opencv.org/4.10.0/d1/d89/tutorial_py_orb.html
# Initiate ORB detector
orb = cv.ORB.create()

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

# compute the descriptors with ORB
kp, des = orb.compute(gray, kp)
print(type(kp))
print(des.shape)
print(len(kp))
print(len(des))
print(des[0])
# draw only keypoints location,not size and orientation
img2 = cv.drawKeypoints(gray, kp, None, flags=cv.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS)
cv.imshow('orb', img2)
cv.waitKey(0)
cv.destroyAllWindows()
python 复制代码
<class 'tuple'>
(79, 32)
79
79
[ 96  32  25  96   4  77  65   0 104  32  32   8 151  19   0  16 128 148
  72   8   8  96 208   0 193 136   1  48  64   0  71  34]
相关推荐
叫我辉哥e11 小时前
### 技术文章大纲:C语言造轮子大赛
c语言·开发语言
Hgfdsaqwr2 小时前
Django全栈开发入门:构建一个博客系统
jvm·数据库·python
guygg882 小时前
NOMA功率分配与64 QAM调制中的SIC的MATLAB仿真
开发语言·matlab
开发者小天2 小时前
python中For Loop的用法
java·服务器·python
flushmeteor2 小时前
JDK源码-基础类-String
java·开发语言
老百姓懂点AI3 小时前
[RAG实战] 向量数据库选型与优化:智能体来了(西南总部)AI agent指挥官的长短期记忆架构设计
python
u0109272713 小时前
C++中的策略模式变体
开发语言·c++·算法
雨季6664 小时前
构建 OpenHarmony 简易文字行数统计器:用字符串分割实现纯文本结构感知
开发语言·前端·javascript·flutter·ui·dart
雨季6664 小时前
Flutter 三端应用实战:OpenHarmony 简易倒序文本查看器开发指南
开发语言·javascript·flutter·ui
进击的小头4 小时前
行为型模式:策略模式的C语言实战指南
c语言·开发语言·策略模式