java opencv orb_opencv python ORB算法
理論
ORB(Oriented FAST and Rotated BRIEF)是一種快速特征點提取和描述的算法,這個算法是由Ethan Rublee, Vincent Rabaud, Kurt Konolige以及Gary R.Bradski在2011年一篇名為“ORB:An Efficient Alternative to SIFTor SURF”的文章中提出.ORB算法分為兩部分,分別是特征點提取和特征點描述。特征提取是由FAST(Features from Accelerated Segment Test)算法發展來的,特征點描述是根據BRIEF(Binary Robust IndependentElementary Features)特征描述算法改進的.
ORB in OpenCV
import numpy as np
import cv2
import matplotlib.pyplot as plt
img = cv2.imread('img.jpg')
# Initiate ORB detector
orb = cv2.ORB_create()
# 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, None, color=(0,255,0), flags=0)
plt.imshow(img2), plt.show()
總結
以上是生活随笔為你收集整理的java opencv orb_opencv python ORB算法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql galera haproxy
- 下一篇: python数据算法有哪些_python