load_decriptor方法一直报错
import sensor, time, image, pyb
sensor.reset() # Initialize the camera sensor.
sensor.set_pixformat(sensor.GRAYSCALE) # or sensor.GRAYSCALE
sensor.set_framesize(sensor.B128X128) # or sensor.QQVGA (or others)
sensor.set_windowing((92,112))
sensor.skip_frames(10) # Let new settings take affect.
sensor.skip_frames(time = 500) #等待5s
# 拍摄当前人脸。
img = sensor.snapshot()
d0 = img.find_lbp((0, 0, img.width(), img.height()))
d1 = image.load_decriptor("cs/c1.orb")
dist= image.match_descriptor(d0, d1)
print(dist)
出现这个问题怎么解决:RuntimeError: Frame capture has timed out
单独运行这个代码有没有问题?
import sensor, image, time, os, tf
sensor.reset() # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA) # Set frame size to QVGA (320x240)
sensor.set_windowing((240, 240)) # Set 240x240 window.
sensor.skip_frames(time=2000) # Let the camera adjust.
clock = time.clock()
while(True):
clock.tick()
img = sensor.snapshot()
改变window 会导致图像滤波失效?
在循环中设置sensor不是推荐的行为,帧率会非常低
这个问题如何解决 sensor:2.8mm 1080p 版本:4.1.3 openmv4
还有具体的硬件型号。
OpenMV4还是OpenMV4 Plus?
sensor模组是什么?
lcd显示屏图像无法垂直翻转?
import sensor, image, lcd
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QQVGA2)
lcd.init(triple_buffer=True)
while(True):
lcd.display(sensor.snapshot(), x_scale=-1.0, y_scale=-1.0)
我要识别一个方块,但是背景是复杂变换的,特征点检测是不是不好用?
import sensor, time, image,pyb
led=pyb.LED(2)
Reset sensor
sensor.reset()
Sensor settings
sensor.set_contrast(3)
sensor.set_gainceiling(16)
sensor.set_framesize(sensor.QQVGA)
sensor.set_windowing((160, 120))
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.skip_frames(time = 2000)
sensor.set_auto_gain(False, value=100)
kpts=["/0.orb","1.orb","2.orb","3.orb"]
#kpts1 = image.load_descriptor("/desc.orb")
clock = time.clock()
while (True):
clock.tick()
img = sensor.snapshot()
kpts2 = img.find_keypoints(max_keypoints=150, threshold=10, normalized=True)
if (kpts2):
for t in kpts:
kpts=image.load_descriptor(t)
match = image.match_descriptor(kpts, kpts2, threshold=85)
if (match.count()>10):
led.on()
# 匹配度大于10
img.draw_rectangle(match.rect())
img.draw_cross(match.cx(), match.cy(), size=10)
else:
led.off()
print(kpts2, "matched:%d dt:%d"%(match.count(), match.theta()))
img.draw_string(0, 0, "FPS:%.2f"%(clock.fps()))
openmv有关LAB颜色通道问题
L就是亮度,就是灰度。
或者可以直接设置sensor为灰度。
走例程,关闭自动增益,手动设置0.2,为啥没反应?
mt9m114不能手动设置白平衡的数值,因为sensor芯片不支持。
openmv运行程序后自动断电如何解决?
# Untitled - By: Lenovo - 周二 9月 17 2019
import sensor, image, time, pyb
sensor.reset() # Initialize the camera sensor.
sensor.set_pixformat(sensor.GRAYSCALE) # or sensor.GRAYSCALE
sensor.set_framesize(sensor.B128X128) # or sensor.QQVGA (or others)
sensor.set_windowing((92,112))
sensor.skip_frames(10) # Let new settings take affect.
sensor.skip_frames(time = 1000)
while(True):
img = sensor.snapshot()
roi1=(10,0,80,60)
roi2=(40,20,78,20)
d1= img.find_lbp(roi1)
d1= img.find_lbp(roi2)
用的M7模块,运行后直接断电