logo

openmv运行程序后自动断电如何解决?

2019-09-19 10:46
9
u4ey
# 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模块,运行后直接断电

2019-09-19 10:58
I
网红小智智 星瞳科技

find_lbp程序是错的,导致重启。

I
网红小智智 星瞳科技

https://book.openmv.cc/example/09-Feature-Detection/lbp.html

2019-09-19 16:12
9
u4ey

@kidswong999 能不能解释一下为什么错了,如何解决错误

9
u4ey

@kidswong999

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)

d1= img.find_lbp(roi1)

删去部分函数,只重复给d1赋值相同的lbp时,不会断电

2019-09-20 16:33
I
网红小智智 星瞳科技

看我链接里的例子,是正确的。