import sensor, image, time, ulab as np
sensor.reset() # 复位并初始化传感器
sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to RGB565 (or GRAYSCALE)
#设置图像色彩格式,有RGB565色彩图和GRAYSCALE灰度图两种
sensor.set_framesize(sensor.QQVGA) # 将图像大小设置为 (320x240)
clock = time.clock() # 创建一个时钟对象来跟踪FPS帧率。
while (True):
img = sensor.snapshot() # 拍一张照片并返回图像
a = np.array(img, dtype=np.uint8)
print("mean: %d std:%d"%(np.mean(a), np.std(a)))返回的错误
File "<stdin>", line 13, in <module>
AttributeError: 'module' object has no attribute 'array'
固件版本为最新3.9.4

更改为:
import sensor, image, time
from ulab import numpy as np
sensor.reset() # Reset and initialize the sensor.
sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QQVGA) # Set frame size to QVGA (320x240)
clock = time.clock() # Create a clock object to track the FPS.
while (True):
img = sensor.snapshot() # Take a picture and return the image.
a = np.array(img, dtype=np.uint8)
print("mean: %d std:%d"%(np.mean(a), np.std(a)))PR:https://github.com/openmv/openmv/pull/1268
@kidswong999 好的 谢谢