logo

请问怎么显示JPEG图片 是我哪里没有设置吗

2019-07-22 14:43
7
qnbe

sensor.reset() # Reset and initialize the sensor.

sensor.set_pixformat(sensor.JPEG) # Set pixel format to RGB565 (or GRAYSCALE)

sensor.set_framesize(sensor.UXGA) # Set frame size to QVGA (320x240)

sensor.set_quality(50)

sensor.skip_frames(time = 3000) # 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() # Take a picture and return the image.

print(clock.fps())

2019-07-22 14:57
7
qnbe
50421384-2882-45d5-a555-3d7ed06b66e5.png
2019-07-23 16:22
I
网红小智智 星瞳科技

如果你使用的OV7725,直接运行hello world,设置成QVGA,就是JPEG。

如果你要运行UXGA,OV7725或者MT9V034都不行。

等新的感光元件才行,还在开发。

2019-07-23 18:42
7
qnbe

@kidswong999 ov2640可以吗我看网站上的资料说可以

2019-07-23 19:21
I
网红小智智 星瞳科技

不能,OV2640是很旧的芯片,有bug,我们也不打算支持它。