

两张图片对比下,循环拍的,大部分时候正常,中间总有几个不正常的
硬件是什么?具体代码是什么?固件版本是什么?sensor模组是什么?



如果涉及代码,需要报错提示与全部代码文本,请注意不要贴代码图片
先用hello world测试。
import cpufreq
import pyb
import sensor,image, time,math
from pyb import LED,Timer,UART
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 QVGA (320x240)
sensor.skip_frames(time = 2000) #延时跳过一些帧,等待感光元件变稳定
sensor.set_auto_gain(False)
sensor.set_auto_whitebal(False)
clock = time.clock() # Create a clock object to track the FPS.
sensor.set_auto_exposure(True, exposure_us=5000) # 设置自动曝光
qrcodes_flag=0
def opv_find_qrcodes():
#sensor.skip_frames(30)
global qrcodes_flag
sensor.set_auto_gain(False)
img = sensor.snapshot()
img.lens_corr(1.5) # strength of 1.8 is good for the 2.8mm lens.
for code in img.find_qrcodes():
clock.tick()
img.draw_rectangle(code[0:4])
qrcodes_flag += 1
if(qrcodes_flag==5 ):#
img.save("/example1.jpg")
if(qrcodes_flag==10):#
img.save("/example2.jpg")
if(qrcodes_flag==15):#
img.save("/example3.jpg")
print(code)
opv_find_qrcodes()@kidswong999 我就是这样写的,拍三张照片,第一张没事,第二张就这样了
@4uva 硬件是什么?固件版本是什么?sensor模组是什么?
@4uva 图片是在IDE里看到是错位的,还是在SD卡里保存的图片是错位的?
@kidswong999
硬件

图片在IDE里看到和在SD卡里保存的图片都是错位的
联系售后吧,把全部代码发给售后,让卖家测试。