资源简介
VS2010,整合官网上面zxing的C++版本和OpenCV,可直接使用OpenCV得Mat进行二维码识别,若遇到显示中文乱码,可尝试将字符编码方式在UTF-8和gb2312之间切换。
代码片段和文件信息
/*
* iconv implementation using Win32 API to convert.
*
* This file is placed in the public domain.
*/
/* for WC_NO_BEST_FIT_CHARS */
#ifndef WINVER
# define WINVER 0x0500
#endif
#define STRICT
#include
#include
#include
#include
/* WORKAROUND: */
#ifndef UNDER_CE
#define GetProcAddressA GetProcAddress
#endif
#if 0
# define MAKE_EXE
# define MAKE_DLL
# define USE_LIBICONV_DLL
#endif
#if !defined(DEFAULT_LIBICONV_DLL)
# define DEFAULT_LIBICONV_DLL ““
#endif
#define MB_CHAR_MAX 16
#define UNICODE_MODE_BOM_DONE 1
#define UNICODE_MODE_SWAPPED 2
#define FLAG_USE_BOM 1
#define FLAG_TRANSLIT 2 /* //TRANSLIT */
#define FLAG_IGNORE 4 /* //IGNORE */
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef void* iconv_t;
iconv_t iconv_open(const char *tocode const char *fromcode);
int iconv_close(iconv_t cd);
size_t iconv(iconv_t cd char **inbuf size_t *inbytesleft char **outbuf size_t *outbytesleft);
/* libiconv interface for vim */
#if defined(MAKE_DLL)
int
iconvctl (iconv_t cd int request void* argument)
{
/* not supported */
return 0;
}
#endif
typedef struct compat_t compat_t;
typedef struct csconv_t csconv_t;
typedef struct rec_iconv_t rec_iconv_t;
typedef iconv_t (*f_iconv_open)(const char *tocode const char *fromcode);
typedef int (*f_iconv_close)(iconv_t cd);
typedef size_t (*f_iconv)(iconv_t cd char **inbuf size_t *inbytesleft char **outbuf size_t *outbytesleft);
typedef int* (*f_errno)(void);
typedef int (*f_mbtowc)(csconv_t *cv const uchar *buf int bufsize ushort *wbuf int *wbufsize);
typedef int (*f_wctomb)(csconv_t *cv ushort *wbuf int wbufsize uchar *buf int bufsize);
typedef int (*f_mblen)(csconv_t *cv const uchar *buf int bufsize);
typedef int (*f_flush)(csconv_t *cv uchar *buf int bufsize);
#define COMPAT_IN 1
#define COMPAT_OUT 2
/* unicode mapping for compatibility with other conversion table. */
struct compat_t {
uint in;
uint out;
uint flag;
};
struct csconv_t {
int codepage;
int flags;
f_mbtowc mbtowc;
f_wctomb wctomb;
f_mblen mblen;
f_flush flush;
DWORD mode;
compat_t *compat;
};
struct rec_iconv_t {
iconv_t cd;
f_iconv_close iconv_close;
f_iconv iconv;
f_errno _errno;
csconv_t from;
csconv_t to;
#if defined(USE_LIBICONV_DLL)
HMODULE hlibiconv;
#endif
};
static int win_iconv_open(rec_iconv_t *cd const char *tocode const char *fromcode);
static int win_iconv_close(iconv_t cd);
static size_t win_iconv(iconv_t cd char **inbuf size_t *inbytesleft char **outbuf size_t *outbytesleft);
static int load_mlang();
static int make_csconv(const char *name csconv_t *cv);
static int name_to_codepage(const char *name);
static uint utf16_to_ucs4(const ushort *wbuf);
static void ucs4_to_utf16(uint wc ushort *wbuf int *wbufsize);
static int mbtowc_flags(int codepage);
static int must_use_null_usedd
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 22808440 2015-03-18 15:58 zxing\thirdparty\lib\zxinglib.lib
文件 23013488 2015-03-20 10:35 zxing\thirdparty\lib\zxinglib_.lib
文件 68 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\.gitignore
文件 11670 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\BigInteger.cc
文件 6904 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\BigInteger.hh
文件 1830 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\BigIntegerAlgorithms.cc
文件 826 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\BigIntegerAlgorithms.hh
文件 242 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\BigIntegerLibrary.hh
文件 1515 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\BigIntegerUtils.cc
文件 2571 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\BigIntegerUtils.hh
文件 22110 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\BigUnsigned.cc
文件 14754 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\BigUnsigned.hh
文件 4249 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\BigUnsignedInAba
文件 4120 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\BigUnsignedInAba
文件 9060 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\ChangeLog
文件 2290 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\Makefile
文件 4708 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\NumberlikeArray.hh
文件 3367 2015-01-20 04:16 zxing\thirdparty\zxing\bigint\README
文件 358 2015-01-20 04:16 zxing\thirdparty\zxing\win32\zxing\iconv.h
文件 7728 2015-01-20 04:16 zxing\thirdparty\zxing\win32\zxing\stdint.h
文件 60636 2015-01-20 04:16 zxing\thirdparty\zxing\win32\zxing\win_iconv.c
文件 1619 2015-01-20 04:16 zxing\thirdparty\zxing\zxing\aztec\AztecDetectorResult.cpp
文件 1357 2015-01-20 04:16 zxing\thirdparty\zxing\zxing\aztec\AztecDetectorResult.h
文件 2077 2015-01-20 04:16 zxing\thirdparty\zxing\zxing\aztec\AztecReader.cpp
文件 1314 2015-01-20 04:16 zxing\thirdparty\zxing\zxing\aztec\AztecReader.h
文件 14070 2015-01-20 04:16 zxing\thirdparty\zxing\zxing\aztec\decoder\Decoder.cpp
文件 1834 2015-01-20 04:16 zxing\thirdparty\zxing\zxing\aztec\decoder\Decoder.h
文件 18759 2015-01-20 04:16 zxing\thirdparty\zxing\zxing\aztec\detector\Detector.cpp
文件 2871 2015-01-20 04:16 zxing\thirdparty\zxing\zxing\aztec\detector\Detector.h
文件 1072 2015-01-20 04:16 zxing\thirdparty\zxing\zxing\BarcodeFormat.cpp
............此处省略282个文件信息
相关资源
-
Windows平台c++工程ba
se64与二进制文件 - redis_helper
- 黄金矿工C++ 代码程序
- C+++Primer+Plus第6版_中文版_带书签_超清
- C++ Primer Plus 中文版 第六版 Kindle azw
- 《Visual C++ 数字图像处理》 谢凤英 高
- vs2017安装包+opencv3.4压缩包+win10环境配
- 算法与数据结构课件及源代码
- C++网络编程 卷1和卷2 中文,pdf版
- Microsoft Visual C++ Redistributable Package合集
- c++ 直线裁剪、画矩形等(graphics)
- 圆环纹理映射(c++项目)
- opencv 动物识别
- visual c++数字图像模式识别技术详解
- Learning OpenCV3 英文版
- OpenCV实现移动跟踪非常简单
- Qt5C++GUIProgrammingCookbook(PDF+源码)
- c++ 电子海图简单程序
- C++/Qt 期货数据获取
- c++ 实时获取光标处颜色(类似抓色器
- c++ 执行脚本的程序(一键安装全部卸
- 定时器 c++源码
- office 文档自动打印
- 7z sdk的C++封装
- 单片机与PC机串口通信的类程序
- c++ 压缩文件/解压缩文件 (亲测通过
- c++ 串口通信Demo源码(方便学习调试)
- 通过图像实现Z轴定位(opencv)
- 邓俊辉数据结构(C++版)第三版
- c++学生信息管理系统源码(数据保存
评论
共有 条评论