#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
OpenCV识别QRcode
最新推荐文章于 2024-06-29 13:57:01 发布
本文详细介绍了如何利用OpenCV库在计算机视觉项目中实现QR码的检测和解码,涉及图像预处理、模板匹配及二维码解码算法,旨在帮助开发者在人工智能应用中集成QR码识别功能。
摘要由CSDN通过智能技术生成