CodeLibrary/03_pycharm_python_coursework_20240427/opencv_01.py
JRNitre 2092240e04 计算机专业前沿作业 Python
Date: 20240427
Design by JRNitre
2024-04-27 20:40:24 +08:00

13 lines
361 B
Python

import numpy as np
import cv2
import matplotlib.pyplot as plt
# 读取图片
img = cv2.imread('source/data_01.png')
orb = cv2.ORB_create()
keypoints, descriptors = orb.detectAndCompute(img, None)
output_image = cv2.drawKeypoints(img, keypoints, None, color=(0, 255, 0), flags=0)
cv2.imshow('Feature KeyPoints', output_image)
cv2.waitKey(0)
cv2.destroyWindow()