資源簡介
軟件介紹:
最新版的Qt解析二維碼程序QZXing_source?V2.4,Qt下二維碼識別程序,能夠可以識別二維碼,內含源程序,可以設計到自己的程序中去使用。
最新版的Qt解析二維碼程序QZXing_source?V2.4,Qt下二維碼識別程序,能夠可以識別二維碼,內含源程序,可以設計到自己的程序中去使用。

代碼片段和文件信息
#include?“CameraImageWrapper.h“
#include?
#include?
#include?
CameraImageWrapper::CameraImageWrapper()?:?LuminanceSource(00)
{
}
CameraImageWrapper::CameraImageWrapper(const?QImage?&sourceImage)?:?LuminanceSource(sourceImage.width()?sourceImage.height())
{
????image?=?sourceImage.copy();
}
CameraImageWrapper::CameraImageWrapper(CameraImageWrapper&?otherInstance)?:?LuminanceSource(otherInstance.getWidth()?otherInstance.getHeight())
{
????image?=?otherInstance.getOriginalImage().copy();
}
CameraImageWrapper::~CameraImageWrapper()
{
}
CameraImageWrapper?*CameraImageWrapper::Factory(const?QImage?&sourceImage?int?maxWidth?int?maxHeight?bool?smoothTransformation)
{
????QImage?image;
????if((maxWidth?!=?1?||?maxHeight?!=?1)?&&?(sourceImage.width()?>?maxWidth?||?sourceImage.height()?>?maxHeight))
????????image?=?sourceImage.scaled(
????????????????????maxWidth?!=?-1???maxWidth?:?sourceImage.width()
????????????????????maxHeight?!=?-1???maxHeight?:?sourceImage.height()
????????????????????Qt::KeepAspectRatio
????????????????????smoothTransformation???Qt::SmoothTransformation?:?Qt::FastTransformation);
????else
????????image?=?sourceImage;
????return?new?CameraImageWrapper(image);
}
int?CameraImageWrapper::getWidth()?const
{
????return?image.width();
}
int?CameraImageWrapper::getHeight()?const
{
????return?image.height();
}
unsigned?char?CameraImageWrapper::getPixel(int?x?int?y)?const
{
????QRgb?pixel?=?image.pixel(xy);
????return?qGray(pixel);//((qRed(pixel)?+?qGreen(pixel)?+?qBlue(pixel))?/?3);
}
unsigned?char*?CameraImageWrapper::copyMatrix()?const
{
????unsigned?char*?newMatrix?=?(unsigned?char*)malloc(image.width()*image.height()*sizeof(unsigned?char));
????int?cnt?=?0;
????for(int?i=0;?i ????{
????????for(int?j=0;?j ????????{
????????????newMatrix[cnt++]?=?getPixel(ij);
????????}
????}
????return?newMatrix;
}
QImage?CameraImageWrapper::grayScaleImage(QImage::Format?f)
{
????QImage?tmp(image.width()?image.height()?f);
????for(int?i=0;?i ????{
????????for(int?j=0;?j ????????{
????????????int?pix?=?(int)getPixel(ij);
????????????tmp.setPixel(ij?qRgb(pix?pixpix));
????????}
????}
????return?tmp;
}
QImage?CameraImageWrapper::getOriginalImage()
{
????return?image;
}
ArrayRef?CameraImageWrapper::getRow(int?y?ArrayRef?row)?const
{
????int?width?=?getWidth();
????if?(row->size()?!=?width)
????????row.reset(ArrayRef(width));
????for?(int?x?=?0;?x?????????row[x]?=?getPixel(xy);
????return?row;
}
ArrayRef?CameraImageWrapper::getMatrix()?const
{
????int?width?=?getWidth();
????int?height?=??getHeight();
????char*?matrix?=?new?char[width*height];
????char*?m?=?matrix;
????for(int?y=0;?y ????{
????????ArrayRef?tmpRow;
????????tmpRow?=?ge
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????1325??2016-01-08?20:02??imagehandler.cpp
?????文件?????????637??2016-01-08?20:02??imagehandler.h
?????文件????????7902??2016-01-08?20:19??qzxing.cpp
?????文件????????5889??2016-01-08?20:06??QZXing.h
?????文件???????12541??2016-01-08?20:15??QZXing.pri
?????文件????????1754??2016-01-08?20:02??QZXing.pro
?????文件?????????258??2016-01-08?20:02??QZXing_global.h
?????目錄???????????0??2016-01-08?20:02??zxing\
?????目錄???????????0??2016-01-08?20:02??zxing\bigint\
?????文件???????12075??2016-01-08?20:02??zxing\bigint\BigInteger.cc
?????文件????????7119??2016-01-08?20:02??zxing\bigint\BigInteger.hh
?????文件????????1900??2016-01-08?20:02??zxing\bigint\BigIntegerAlgorithms.cc
?????文件?????????851??2016-01-08?20:02??zxing\bigint\BigIntegerAlgorithms.hh
?????文件?????????250??2016-01-08?20:02??zxing\bigint\BigIntegerLibrary.hh
?????文件????????1565??2016-01-08?20:02??zxing\bigint\BigIntegerUtils.cc
?????文件????????2643??2016-01-08?20:02??zxing\bigint\BigIntegerUtils.hh
?????文件???????22807??2016-01-08?20:02??zxing\bigint\BigUnsigned.cc
?????文件???????15172??2016-01-08?20:02??zxing\bigint\BigUnsigned.hh
?????文件????????4374??2016-01-08?20:02??zxing\bigint\BigUnsignedInAba
?????文件????????4242??2016-01-08?20:02??zxing\bigint\BigUnsignedInAba
?????文件????????9206??2016-01-08?20:02??zxing\bigint\ChangeLog
?????文件????????4885??2016-01-08?20:02??zxing\bigint\NumberlikeArray.hh
?????文件????????3438??2016-01-08?20:02??zxing\bigint\README
?????目錄???????????0??2016-01-08?20:02??zxing\win32\
?????目錄???????????0??2016-01-08?20:02??zxing\win32\zxing\
?????文件?????????371??2016-01-08?20:02??zxing\win32\zxing\iconv.h
?????目錄???????????0??2016-01-08?20:02??zxing\win32\zxing\msvc\
?????文件????????7975??2016-01-08?20:02??zxing\win32\zxing\msvc\stdint.h
?????文件???????62671??2016-01-08?20:02??zxing\win32\zxing\win_iconv.c
?????目錄???????????0??2016-01-08?20:16??zxing\zxing\
?????目錄???????????0??2016-01-08?20:02??zxing\zxing\aztec\
............此處省略219個文件信息
- 上一篇:Win7禁止程序聯網小工具綠色版.rar
- 下一篇:電子-KBPC610.pdf
評論
共有 條評論