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

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

import sensor, image, time

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

# 设置sensor的像素格式
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.
# 添加一个小的延迟,以允许IDE读取刷新后的图像
time.sleep_ms(100)

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

results matching ""

    No results matching ""