logo

图像处理函数问题求解?

2019-07-07 22:13
A
bfcd

我使用如下函数,为什么得到的结果是这样的啊

d19a9a06-338f-4d40-bcc7-199c05229d86.png

使用前:

6ff0f025-569c-405e-8d05-f6ec8cf7fc92.png

使用后:

52354ff9-cba4-4118-8f3e-4adf8d106f27.png

代码如下:

import sensor, image, time

sensor.reset()                      # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QQVGA)   # Set frame size to QQVGA (160x120)
sensor.skip_frames(time = 2000)     # Wait for settings take effect.
clock = time.clock()                # Create a clock object to track the FPS.

while(True):
    clock.tick()                    # Update the FPS clock.
    img = sensor.snapshot()
    # img这里是彩色
    img = img.to_grayscale()
    # img这里是灰色
    print(clock.fps())
2019-07-08 13:41
I
网红小智智 星瞳科技

我使用OpenMV3,OpenMV4都没有出现你的问题。

请升级到最新的固件,如果还是有问题,联系售后维修。