基于OpenMV平台进行开发
具体原理有上一篇博客描述
运算结果:
程序代码:
import sensor, time, image
sensor.reset()
sensor.set_contrast(3)
sensor.set_gainceiling(16)
sensor.set_framesize(sensor.VGA)
sensor.set_windowing((320, 240))
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.skip_frames(time = 2000)
#sensor.set_auto_gain(False, value=100)
while True:
img = sensor.snapshot()
kpts = img.find_keypoints(max_keypoints=150, threshold=10, scale_factor=1.2)
if kpts != None:
img.draw_keypoints(kpts)