Dual Camera Info

一个摄像头解决不了的问题,那就用两个:对于双摄你需要了解这些 http://www.chengshiluntan.com/wg/a/20160715/6ca0343f59789235c9419887fecb605e.html
想买双摄像头手机?但是这些优点和缺点你一定要弄明白 http://www.eeworld.com.cn/xfdz/article_2016111158318.html
老戴说镜头 浅谈双摄镜头技术 http://it.sohu.com/20160818/n464852622.shtml
双摄是噱头还是真福利 iPhone7拍照体验 http://mobile.zol.com.cn/605/6050878_all.html
双摄时代来临 但“完美双摄”还未出现 http://www.techweb.com.cn/tele/2016-04-21/2320021.shtml
荣耀V8双摄原理解析与拍照评测 http://ee.ofweek.com/2016-05/ART-8320315-8330-29099337_2.html
华为P9手机外观 http://lib.91.com/original/expand/1604/huawei_p9.html
双摄巅峰之战 华为P9与LG G5拍照对比 http://www.pcpop.com/doc/2/2733/2733530.shtml
不以提升画质为目的都是伪双摄 辅助景深pk黑白双摄 http://www.cctime.com/html/2016-7-28/1200468.htm
单摄像头遭遇瓶颈,双摄方案哪家强? http://mobile.chinabyte.com/101/13784101.shtml
与徕卡联合设计的平行双摄?华为P9拍照表现如何? http://dospy.baijia.baidu.com/article/419088
苹果iPhone7 Plus双摄虚化功能究竟怎样?样张告诉你 http://www.ithome.com/html/iphone/259719.htm
红米Pro双摄实测:可能是史上最差 http://www.chinaz.com/mobile/2016/0729/559010.shtml
双摄真能提高画质?彩色+黑白双摄原理解析 http://sanwen8.cn/p/31d3VpF.html
http://www.aiweibang.com/yuedu/129118676.html
双摄像头系列原理深度剖析 http://www.dzsc.com/data/2016-7-13/110171.html
深度剖析双摄像头原理及优势,有望走向普及 http://news.cecb2b.com/info/20160905/3444269.shtml
市场上各品牌手机的双镜头技术原理有什么区别?未来发展方向如何? https://www.zhihu.com/question/50720144/answer/122440714
camera模组专业人士预测双摄未来趋势 http://www.52rd.com/S_TXT/2016_8/TXT87911.HTM
高通双摄技术发布:模仿人眼 挑战iphone? http://it.sohu.com/20160915/n468506327.shtml
手机后置双摄像头看似要成为主流,双摄像头的优势?是否华而不实?还有其原理。https://www.zhihu.com/question/29032498
奇酷手机双摄相机成像原理剖析 http://bbs.360.cn/thread-55092-1-1.html
荣耀V8:双摄像头工作原理解析&拍摄玩法简介 http://cn.ui.vmall.com/thread-9339025-1-1.html
双摄手机层出不穷,原理却是大不相同 http://sanwen.net/a/xxbjdoo.html
原来区别是这么大 手机双摄像头的分类 http://tech.sina.com.cn/mobile/n/n/2016-02-15/doc-ifxpmpqp7695178.shtml
双摄像头测距的OpenCV实现 http://blog.csdn.net/scyscyao/article/details/5562024
双摄像头浪潮 荣耀V8双摄像头原理起底 http://news.vlongbiz.com/digital/2016-05-18/1463530735d2329547.html
实时虚化如何实现?详解红米Pro双摄原理 8.3 http://www.miui.com/thread-5044324-1-1.html?from=bbsindex
双摄手机大盘点:不同的“双眼”不同的世界 http://www.liuxingshe.com/keji/1074786.html
双摄像头系列(3)原理深度剖析 http://ee.ofweek.com/2016-07/ART-8900-2803-30008905_3.html

利用以上改善代码的思路帮我改善下面的代码 from maix import camera, display, image, nn, app import time, os # 初始化模型 detector = nn.YOLOv5(model="/root/models/mymodel/model_127448.mud", dual_buff=True) ocr = nn.PP_OCR("/root/models/pp_ocr.mud") # OCR模型初始化 SAVE_DIR = "/root/models/mymodel/" os.makedirs(SAVE_DIR, exist_ok=True) # 硬件初始化(关键修改点1) cam = camera.Camera( detector.input_width(), detector.input_height(), format=image.FORMAT_BGR888 # 强制指定摄像头输出格式 ) disp = display.Display() # 状态变量 last_save_time = 0 save_count = 0 # 调试信息打印(关键修改点2) print(f"[系统诊断] 摄像头格式: {cam.format}") print(f"[系统诊断] 检测器输入格式: {detector.input_format}") print(f"[系统诊断] OCR输入格式: {ocr.input_format}") def ocr_processing(img_path): """ 增强版OCR处理函数 """ try: # 加载并转换图像格式(关键修改点3) img = image.load(img_path) if img.format != ocr.input_format: print(f"[格式转换] 原始格式: {img.format} -> 目标格式: {ocr.input_format}") img = img.convert(format=ocr.input_format) # OCR识别处理 objs = ocr.detect(img) text = ''.join([obj.char_str() for obj in objs]) print(f"[识别结果] {text}") # 可视化增强处理 for obj in objs: points = obj.box.to_list() img.draw_keypoints(points, image.COLOR_RED, 4, -1, 1) img.draw_string(obj.box.x4, obj.box.y4, obj.char_str(), image.COLOR_RED) disp.show(img) return text except Exception as e: print(f"[OCR异常] {str(e)}") return "" while not app.need_exit(): try: img = cam.read() objs = detector.detect(img, conf_th=0.5, iou_th=0.45) # 物体检测处理(关键修改点4) if len(objs) > 0 and (time.time() - last_save_time) >= 3: filename = f"{SAVE_DIR}detect_{save_count}_{int(time.time())}.jpg" # 创建保存用图像副本 save_img = img.copy().convert(format=image.FORMAT_BGR888) # 确保保存格式一致 if save_img.save(filename, quality=85): print(f"[图像保存] {filename}") last_save_time = time.time() save_count += 1 ocr_result = ocr_processing(filename) print(f"[识别日志] {ocr_result}") # 显示处理增强 for obj in objs: img.draw_rect(obj.x, obj.y, obj.w, obj.h, color=image.COLOR_RED) msg = f'{detector.labels[obj.class_id]}: {obj.score:.2f}' img.draw_string(obj.x, obj.y+2, msg, scale=0.5, color=image.COLOR_RED) disp.show(img) except Exception as e: print(f"[运行异常] {str(e)}") break
最新发布
03-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值