openmv之特征点检测
本例程利用 FAST/AGAST 算法进行特征提取,并且进行目标追踪,仅支持灰度图。 注意:本例程会把程序运行最开始的十秒左右出现的物体作为目标特征,请在程序运行的最开始,将目标物体放在摄像头中央识别,直至出现特征角点,证明已经识别记录目标特征。 匹配过程中,如果画面出现十字和矩形框,证明匹配成功。 1 # Object tracking with keypoints example. 2 # Show the camera an object and then run the script. A set of keypoints will be extracted 3 # once and then tracked in the following frames. If you want a new set of keypoints re-run 4 # the script. NOTE: see the docs for arguments to tune find_keypoints and match_keypoints. 5 import sensor, time, image 6 7 # Reset sensor 8 sensor.reset() 9 10 # Sensor settings 11 sensor.set_contrast(3) 12 sensor.set