程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Orb key point detection (implemented in Python)

編輯:Python

List of articles

    • 1.SURF Key point detection ,SIFT Key point detection ,Shi-Tomasi Corner detection ,Harris Corner detection
    • 2.ORB(Oriented FAST and Rotated BRIEF)
    • 3. Use steps
    • 4. Code combat

1.SURF Key point detection ,SIFT Key point detection ,Shi-Tomasi Corner detection ,Harris Corner detection

Harris:
https://blog.csdn.net/Keep_Trying_Go/article/details/125384144
Shi-Tomasi:
https://blog.csdn.net/Keep_Trying_Go/article/details/125384218
SIFT:
https://blog.csdn.net/Keep_Trying_Go/article/details/125384278
SURF:
https://blog.csdn.net/Keep_Trying_Go/article/details/125384513


2.ORB(Oriented FAST and Rotated BRIEF)

advantage :
(1) real-time detection ;
FAST: It can achieve real-time detection of feature points ;
BRIEF: Describe the detected feature points ; It speeds up the establishment of feature descriptors , At the same time, the time of feature matching is greatly reduced ;


3. Use steps

(1) establish orb object ;cv2.ORB_create()
(2) Key point detection and feature matching :kp,des=orb.detectAndCompute(gray,mask);


4. Code combat

import os
import cv2
import numpy as np
img=cv2.imread('images/HaLiSi.jpg')
img=cv2.resize(src=img,dsize=(450,450))
gray=cv2.cvtColor(src=img,code=cv2.COLOR_BGR2GRAY)
#SIFT objects creating 
orb=cv2.ORB_create()
# To test , The second parameter is None, Indicates to test the whole picture 
kp=orb.detect(gray,None)
# Feature matching 
# kp,des=surf.compute(gray,kp)
kp,des=orb.detectAndCompute(gray,None)
print(des)
# Draw corners 
cv2.drawKeypoints(image=gray,keypoints=kp,outImage=img,color=(0,255,0))
cv2.imshow('img',img)
cv2.waitKey(0)
cv2.destroyAllWindows()
if __name__ == '__main__':
print('Pycharm')



  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved