如果可以要怎么用?
U
u3va_1615271136
@u3va_1615271136
0
声望
9
楼层
338
资料浏览
0
粉丝
0
关注
u3va_1615271136 发布的帖子
-
怎么能看到调用的函数更底层的写法?
例如
tv.init(triple_buffer=False) # Initialize the tv.
tv.channel(8) # For wireless video transmitter shield -
得到像素RGB565的颜色数据
![0_1619486634319_21T5![W}ED`R1TRFM5K12KX.png](正在上传 100%)
image.grayscale_to_rgb(grayscale_value) 这个函数返回是RGB888的颜色数据,想要得到RGB565的颜色数据,自己用函数将RGB88转RGB565得到的颜色数据会失真 -
AttributeError:'module'object has no attribute 'width'?怎么解决
# Snapshot Example # # Note: You will need an SD card to run this example. # # You can use your OpenMV Cam to save image files. import sensor, image, pyb,time from pyb import UART RED_LED_PIN = 1 BLUE_LED_PIN = 3 sensor.reset() # Initialize the camera sensor. sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE sensor.set_framesize(sensor.QVGA) # or sensor.QQVGA (or others) sensor.skip_frames(time = 2000) # Let new settings take affect. uart = UART(3, 19200,timeout_char=1000) pyb.LED(RED_LED_PIN).on() sensor.skip_frames(time = 2000) # Give the user time to get ready. pyb.LED(RED_LED_PIN).off() pyb.LED(BLUE_LED_PIN).on() img = sensor.snapshot() # or "example.bmp" (or others) pyb.LED(BLUE_LED_PIN).off() uart = UART(3, 19200) fr = True while(fr): p_width=image.width() p_height=image.height() uart.write("12345") for x in range(p_width): for y in range(p_height): rgb=img.get_pixel(n,k) uart.write(rgb[0]) uart.write(rgb[1]) uart.write(rgb[2]) uart.write("12345") fr = False