共 846 条结果匹配 "lcd 二维码",(耗时 0.09 秒)
请问怎么openmv有的二维码无法识别?
别的二维码是可以识别的
为什么openmv会把二维码识别成人脸??
把二维码和人脸检测代码结合了下,结果二维码被识别成人脸了??
星瞳AI VISION软件内测群二维码过期
星瞳AI VISION软件内测!可以离线标注,训练,并生成OpenMV的模型。可以替代edge impulse https://forum.singtown.com/topic/8206
这个软件内测群二维码过期了,怎么下载
我要怎样做才能让扫完码直接开始处理二维码信息,我现在的代码一直在读取二维码的信息。求大神?
while(True):
m = [0,0,0]
img = sensor.snapshot()
img.lens_corr(1)
for code in img.find_qrcodes():
uart.write(code.payload())
m=list(code.payload())
if(m!=[0,0,0]):
break
for i in range(3):
if(m!=[0,0,0]):
print(m)
if(m[0]==1):
break
for blob in img.find_blobs([thresholds], pixels_threshold=200, area_threshold=200, merge=True):
img.draw_rectangle(blob.rect())
img.draw_cross(blob.cx(), blob.cy())
为什么比较复杂的二维码无法识别成功,不是特别方正的二维码也无法识别成功,而且有时候扫描二维码是一片空白,这个该怎么解决
先判断是二维码还是人物,是人的话则判断是否带口罩,是二维码的话输出二维码的内容
import sensor, image, time,image, os, tf, uos, gc
from pyb import UART
uart = UART(3, 9600)
sensor.reset()
sensor.set_contrast(3)
sensor.set_gainceiling(16)
sensor.set_framesize(sensor.VGA)
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_auto_whitebal(True)
sensor.set_auto_gain(False) # 必须关闭此功能,以防止图像冲洗…
sensor.set_windowing((240, 240)) # Set 240x240 window.
sensor.skip_frames(time=2000) # Let the camera adjust.
net = None
labels = None
try:
# load the model, alloc the model file on the heap if we have at least 64K free after loading
net = tf.load("trained.tflite", load_to_fb=uos.stat('trained.tflite')[6] > (gc.mem_free() - (64*1024)))
except Exception as e:
print(e)
raise Exception('Failed to load "trained.tflite", did you copy the .tflite and labels.txt file onto the mass-storage device? (' + str(e) + ')')
try:
labels = [line.rstrip('\n') for line in open("labels.txt")]
except Exception as e:
raise Exception('Failed to load "labels.txt", did you copy the .tflite and labels.txt file onto the mass-storage device? (' + str(e) + ')')
# 加载Haar算子
# 默认情况下,这将使用所有阶段,更低的satges更快,但不太准确。
face_cascade = image.HaarCascade("frontalface", stages=25)
#image.HaarCascade(path, stages=Auto)加载一个haar模型。haar模型是二进制文件,
#这个模型如果是自定义的,则引号内为模型文件的路径;也可以使用内置的haar模型,
#比如“frontalface” 人脸模型或者“eye”人眼模型。
#stages值未传入时使用默认的stages。stages值设置的小一些可以加速匹配,但会降低准确率。
# FPS clock
clock = time.clock()
while(True):
clock.tick()
img = sensor.snapshot()
img.lens_corr(1.8) # 1.8的强度参数对于2.8mm镜头来说是不错的。
objects = img.find_features(face_cascade, threshold=0.75, scale=1.35)
QR_Code=img.find_qrcodes()
if objects:
for r in objects:
img.draw_rectangle(r)
for obj in net.classify(img, min_scale=1.0, scale_mul=0.8, x_overlap=0.5, y_overlap=0.5):
img.draw_rectangle(obj.rect())
predictions_list = list(zip(labels, obj.output()))
radio=predictions_list[1][1]*100
print("%s = %.2f%%" % (predictions_list[1][0],radio ))
radio=str(radio)
uart.write('@'+radio+'\r\n')
elif QR_Code:
for code in QR_Code:
img.draw_rectangle(code.rect(), color = (255, 0, 0))
print(code.payload())
uart.write('@'+code.payload()+'\r\n')
#else:
#print("-----------error------------")
为什么比较复杂的二维码无法识别成功,不是特别方正的二维码也无法识别成功,而且有时候扫描二维码是一片空白,这个该怎么解决
import sensor, image, time,image, os, tf, uos, gc
from pyb import UART
uart = UART(3, 9600)
sensor.reset()
sensor.set_contrast(3)
sensor.set_gainceiling(16)
sensor.set_framesize(sensor.VGA)
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_auto_whitebal(True)
sensor.set_auto_gain(False) # 必须关闭此功能,以防止图像冲洗…
sensor.set_windowing((240, 240)) # Set 240x240 window.
sensor.skip_frames(time=2000) # Let the camera adjust.
net = None
labels = None
try:
# load the model, alloc the model file on the heap if we have at least 64K free after loading
net = tf.load("trained.tflite", load_to_fb=uos.stat('trained.tflite')[6] > (gc.mem_free() - (64*1024)))
except Exception as e:
print(e)
raise Exception('Failed to load "trained.tflite", did you copy the .tflite and labels.txt file onto the mass-storage device? (' + str(e) + ')')
try:
labels = [line.rstrip('\n') for line in open("labels.txt")]
except Exception as e:
raise Exception('Failed to load "labels.txt", did you copy the .tflite and labels.txt file onto the mass-storage device? (' + str(e) + ')')
# 加载Haar算子
# 默认情况下,这将使用所有阶段,更低的satges更快,但不太准确。
face_cascade = image.HaarCascade("frontalface", stages=25)
#image.HaarCascade(path, stages=Auto)加载一个haar模型。haar模型是二进制文件,
#这个模型如果是自定义的,则引号内为模型文件的路径;也可以使用内置的haar模型,
#比如“frontalface” 人脸模型或者“eye”人眼模型。
#stages值未传入时使用默认的stages。stages值设置的小一些可以加速匹配,但会降低准确率。
# FPS clock
clock = time.clock()
while(True):
clock.tick()
img = sensor.snapshot()
img.lens_corr(1.8) # 1.8的强度参数对于2.8mm镜头来说是不错的。
objects = img.find_features(face_cascade, threshold=0.75, scale=1.35)
QR_Code=img.find_qrcodes()
if objects:
for r in objects:
img.draw_rectangle(r)
for obj in net.classify(img, min_scale=1.0, scale_mul=0.8, x_overlap=0.5, y_overlap=0.5):
img.draw_rectangle(obj.rect())
predictions_list = list(zip(labels, obj.output()))
radio=predictions_list[1][1]*100
print("%s = %.2f%%" % (predictions_list[1][0],radio ))
radio=str(radio)
uart.write('@'+radio+'\r\n')
elif QR_Code:
for code in QR_Code:
img.draw_rectangle(code.rect(), color = (255, 0, 0))
print(code.payload())
uart.write('@'+code.payload()+'\r\n')
#else:
#print("-----------error------------")
请问,openmv识别二维码,必须在摄像头初始化时对准二维码,不然会图像会过曝,该怎么解决?
请问,openmv识别二维码,必须在摄像头初始化时对准二维码,不然会图像会过曝,该怎么解决?
请问用openmv3识别二维码摄像头不是自动对焦的吗?我这里识别的二维码为什么这么模糊?
import sensor, image
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QQVGA) # can be QVGA on M7...
sensor.skip_frames(30)
sensor.set_auto_gain(False) # must turn this off to prevent image washout...
sensor.set_auto_whitebal(False)
while(True):
img = sensor.snapshot()
img.lens_corr(1.8) # strength of 1.8 is good for the 2.8mm lens.
for code in img.find_qrcodes():
print(code)
openmv识别一张图片上的数字和二维码
我的openmv是装在小车上的,有两个7*7cm的方框里各有一个二维码和一个数字,请问如何同时识别二维码和数字,急
openmv如何处理二维码是不规则的,拉伸
![0_1566291478290_1.bmp](正在上传 100%)