OpenCV识别QRcode

本文详细介绍了如何利用OpenCV库在计算机视觉项目中实现QR码的检测和解码,涉及图像预处理、模板匹配及二维码解码算法,旨在帮助开发者在人工智能应用中集成QR码识别功能。
摘要由CSDN通过智能技术生成
#include <iostream>
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <io.h>
#include <direct.h>


//图像单一二维码识别


using namespace std;
using namespace cv;

#include <opencv2/wechat_qrcode.hpp>



int main()
{
	//原图文件夹
	std::string src_path = "D://1234//2//";
	vector<String> src_paths;
	glob(src_path, src_paths);

	std::string dst_paths_OK_first_temp = src_path +"DST//";
	if (0 != access(dst_paths_OK_first_temp.c_str(), 0))
	{
		// if this folder not exist, create a new one.
		mkdir(dst_paths_OK_first_temp.c_str());   // 返回 0 表示创建成功,-1 表示失败
											 //换成 ::_mkdir  ::_access 也行,不知道什么意思
	}

	//结果OK图文件夹 
	std ::string dst_paths_OK_first = dst_paths_OK_first_temp+ "OK//";
	if (0 != access(dst_paths_OK_first.c_str(), 0))
	{
		// if this folder not exist, create a new one.
		mkdir(dst_paths_OK_first.c_str());   // 返回 0 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值