例程讲解-03-copy2fb把图像复制到framebuffer

# 复制图像到 framebuffer. 
#
# 这个例子展示了如何导入和粘贴一个图像到 framebuffer

import sensor, image, time

# 仍然需要初始化 sensor
sensor.reset()
# 设置 sensor
sensor.set_contrast(1)
sensor.set_gainceiling(16)

# 设置sensor的 pixel format
sensor.set_framesize(sensor.QQVGA)
sensor.set_pixformat(sensor.GRAYSCALE)

# 导入 image
img = image.Image("/example.bmp", copy_to_fb=True)

# 添加画线的代码
# img.draw_line(...)

# Flush FB
sensor.flush()

# Add a small delay to allow the IDE to read the flushed image.
time.sleep_ms(100)

星瞳科技OpenMV官方中文文档函数讲解:

results matching ""

    No results matching ""