opencv的sift算法
生活随笔
收集整理的這篇文章主要介紹了
opencv的sift算法
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
import cv2
import matplotlib.pyplot as pltchess = cv2.imread('./chess.png')gray = cv2.cvtColor(chess, cv2.COLOR_BGR2GRAY)#創(chuàng)建sift對象
#需要opencv-contrib-python
sift = cv2.xfeatures2d.SIFT_create()
#進行檢測kp = sift.detect(gray)
#kp是一個列表
#繪制關(guān)鍵點(gray是對誰畫,kp是畫的點,chess是畫的地方)
cv2.drawKeypoints(gray, kp, chess)
cv2.imshow('img', chess)cv2.waitKey(0)
cv2.destroyAllWindows()
?
總結(jié)
以上是生活随笔為你收集整理的opencv的sift算法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: LeNet论文全文翻译《Gradient
- 下一篇: 智能聊天对话机器人的对比