OpenCV 4.2 python ORB菜鸟1

这篇博客是新手学习OpenCV 4.2的入门文章,聚焦于ORB(Oriented FAST and Rotated BRIEF)特征检测。作者通过阅读相关博主的文章和论文,了解ORB的理论,并使用Python实现关键点检测和显示。在代码中,作者导入必要的库,读取图像,应用ORB创建器进行关键点检测和描述符计算,最后绘制关键点位置。

关于ORB的理论,感谢这些博主分享:

论文原文

https://blog.csdn.net/hujingshuang/article/details/46898007

https://blog.csdn.net/hujingshuang/article/details/46910259

https://blog.csdn.net/gaotihong/article/details/78712017

菜鸟初学计算机视觉,下载了OpenCv4.2,python版。

 

 

import numpy as np
import cv2 
from matplotlib import pyplot as plt

img=cv2.imread(’.\st.jpg',0)

#initiate star 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()

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值