@kidswong999
3.15.0
O
ozrw
@ozrw
0
声望
7
楼层
395
资料浏览
0
粉丝
0
关注
ozrw 发布的帖子
-
RE: img.get_histogram(bins=16) bins>16 openmv会重启,运行不了
@kidswong999
是这个import sensor, image, time, os sensor.reset() sensor.set_contrast(3) sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to RGB565 (or GRAYSCALE) #设置图像色彩格式,有RGB565色彩图和GRAYSCALE灰度图两种 sensor.set_framesize(sensor.QQVGA) # 将图像大小设置为QVGA (320x240) sensor.skip_frames(time=100) sensor.set_auto_gain(False) sensor.set_auto_exposure(False) clock = time.clock() # 创建一个时钟对象来跟踪FPS帧率。 while(True): clock.tick() # 更新FPS帧率时钟。 img = sensor.snapshot() # 拍一张照片并返回图像。 histogram = img.get_histogram(bins=64) threshold = histogram.get_threshold().value()
-
RE: img.get_histogram(bins=16) bins>16 openmv会重启,运行不了
@ozrw 在 img.get_histogram(bins=16) bins>16 openmv会重启,运行不了 中说:
最后一行的 请在这里粘贴代码 要删掉,编辑不了了
-
RE: img.get_histogram(bins=16) bins>16 openmv会重启,运行不了
import sensor, image, time, os sensor.reset() sensor.set_contrast(3) sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to RGB565 (or GRAYSCALE) #设置图像色彩格式,有RGB565色彩图和GRAYSCALE灰度图两种 sensor.set_framesize(sensor.QQVGA) # 将图像大小设置为QVGA (320x240) sensor.skip_frames(time=100) sensor.set_auto_gain(False) sensor.set_auto_exposure(False) clock = time.clock() # 创建一个时钟对象来跟踪FPS帧率。 while(True): clock.tick() # 更新FPS帧率时钟。 img = sensor.snapshot() # 拍一张照片并返回图像。 histogram = img.get_histogram(bins=64) threshold = img_his.get_threshold().value() 请在这里粘贴代码
-
RE: img.get_histogram(bins=16) bins>16 openmv会重启,运行不了
sensor.reset() # 复位并初始化传感器。 sensor.set_contrast(3) sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to RGB565 (or GRAYSCALE) #设置图像色彩格式,有RGB565色彩图和GRAYSCALE灰度图两种 sensor.set_framesize(sensor.QQVGA) # 将图像大小设置为QVGA (320x240) #sensor.set_windowing((64, 64)) # 设置128 x128窗口。 sensor.skip_frames(time=100) sensor.set_auto_gain(False) sensor.set_auto_exposure(False) while(True): clock.tick() # 更新FPS帧率时钟。 img = sensor.snapshot() # 拍一张照片并返回图像。 histogram = img.get_histogram(bins=16) threshold = img_his.get_threshold().value()
bins如果大于16的话 openmv会重启,运行不了,但bins太小threshold又精度不够,请问怎么解决呢?
-
img.get_histogram(bins=16) bins>16 openmv会重启,运行不了
img.get_histogram(bins=16) bins>16 openmv会重启,运行不了,但bins太小又精度不够