91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 72.36MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2022-07-15
  • 語言: 其他
  • 標簽: 車牌??

資源簡介

車牌識別代碼,利用opencv實現對車牌的定位,tesseract-ocr進行車牌的識別。

資源截圖

代碼片段和文件信息

#include?
#include?
#include?“tesseract\baseapi.h“
#include?“tesseract\strngs.h“
//#include
#pragma??comment(lib“libtesseract302.lib“)
#pragma??comment(lib?“liblept168.lib“)?
#include?

#include
#include
#include“qmessagebox.h“
#include??
//
using?namespace?cv;
using?namespace?std;
#include?“chepaishibie.h“
#include?“cv.h“
#include?“highgui.h“
#include?“cxcore.h“
#include
#include
#include
#include?
#include“qlineedit.h“
void?swap1(float?*a?float?*b);

void?swap2(int?*a?int?*b);
bool?isEligible(const?RotatedRect?&candidate);
void?OstuBeresenThreshold(const?Mat?&in?Mat?&out);?
Mat?getRplane(const?Mat?&in);
chepaishibie::chepaishibie(QWidget?*parent)
:?QMainWindow(parent)
{
ui.setupUi(this);
}

chepaishibie::~chepaishibie()
{

}
Mat?image;//定義讀入圖像
QImage?img;//
string?name;//定義圖片地址字符串
void?chepaishibie::on_pushButton_clicked()//打開圖片
{
QString?filename?=?QFileDialog::getOpenFileName(this?tr(“Open?Image“)?““?tr(“Image?File(*.bmp?*.jpg?*.jpeg?*.png)“));
QTextCodec?*code?=?QTextCodec::codecForName(“gb18030“);//轉碼
name?=?code->fromUnicode(filename).data();//獲取圖片地址
image?=?imread(name);//讀取圖片
//將圖片長縮放為480
if?(image.cols? {
float?n?=?(float)480?/?image.cols;
cv::resize(image?image?Size((float)image.cols*n?(float)image.rows*n)?0?0?CV_INTER_LINEAR);
}
else
{
float?n?=?(float)image.cols?/?480;
cv::resize(image?image?Size((float)image.cols?/?n?(float)image.rows?/?n)?0?0?CV_INTER_LINEAR);
}
//提示是否找到圖片
if?(!image.data)
{
QMessageBox?msgBox;
msgBox.setText(tr(“image?data?is?null“));
msgBox.exec();
return;
}
else
{
cv::cvtColor(image?image?CV_BGR2RGB);
img?=?QImage((const?unsigned?char*)(image.data)?image.cols?image.rows?image.cols*image.channels()?QImage::Format_RGB888);
ui.label->clear();

ui.label->setPixmap(QPixmap::fromImage(img));

ui.label->resize(ui.label->pixmap()->size());

}
}
int?myOtsu(const?IplImage?*frame)?//大津法求閾值???
{
#define?GrayScale?256???//frame灰度級???
int?width?=?frame->width;
int?height?=?frame->height;
int?pixelCount[GrayScale]?=?{?0?};
float?pixelPro[GrayScale]?=?{?0?};
int?i?j?pixelSum?=?width?*?height?threshold?=?0;
uchar*?data?=?(uchar*)frame->imageData;

//統計每個灰度級中像素的個數???
for?(i?=?0;?i? {
for?(j?=?0;?j? {
pixelCount[(int)data[i?*?width?+?j]]++;
}
}

//計算每個灰度級的像素數目占整幅圖像的比例???
for?(i?=?0;?i? {
pixelPro[i]?=?(float)pixelCount[i]?/?pixelSum;
}

//遍歷灰度級[0255]尋找合適的threshold???
float?w0?w1?u0tmp?u1tmp?u0?u1?deltaTmp?deltaMax?=?0;
for?(i?=?0;?i? {
w0?=?w1?=?u0tmp?=?u1tmp?=?u0?=?u1?=?deltaTmp?=?0;
for?(j?=?0;?j? {
if?(j?<=?i)???//背景部分???
{

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-11-09?00:15??chepaishibie\
?????目錄???????????0??2017-06-09?11:42??chepaishibie\.vs\
?????目錄???????????0??2017-06-09?11:42??chepaishibie\.vs\chepaishibie\
?????目錄???????????0??2017-06-09?11:42??chepaishibie\.vs\chepaishibie\v14\
?????文件???????30208??2017-06-09?11:43??chepaishibie\.vs\chepaishibie\v14\.suo
?????目錄???????????0??2017-06-09?11:44??chepaishibie\chepaishibie\
?????文件????69271552??2017-11-09?00:15??chepaishibie\chepaishibie.sdf
?????文件?????????982??2017-04-20?12:35??chepaishibie\chepaishibie.sln
?????文件???????32768??2017-11-09?00:15??chepaishibie\chepaishibie.v12.suo
?????文件?????1601536??2017-06-09?11:43??chepaishibie\chepaishibie.VC.db
?????文件???????25234??2017-05-04?18:04??chepaishibie\chepaishibie\1221.jpg
?????文件???????17994??2017-05-04?18:03??chepaishibie\chepaishibie\chepaishibie.cpp
?????文件?????????584??2017-05-02?15:49??chepaishibie\chepaishibie\chepaishibie.h
?????文件??????????72??2017-04-20?12:35??chepaishibie\chepaishibie\chepaishibie.qrc
?????文件????????3762??2017-05-02?20:41??chepaishibie\chepaishibie\chepaishibie.ui
?????文件???????16079??2017-11-08?21:37??chepaishibie\chepaishibie\chepaishibie.vcxproj
?????文件????????2715??2017-04-20?12:35??chepaishibie\chepaishibie\chepaishibie.vcxproj.filters
?????文件?????????663??2017-06-09?11:44??chepaishibie\chepaishibie\chepaishibie.vcxproj.user
?????文件???????24801??2017-05-04?18:04??chepaishibie\chepaishibie\cpy.jpg
?????文件????????7372??2017-05-04?18:04??chepaishibie\chepaishibie\cpz.jpg
?????文件????????3607??2017-05-04?18:04??chepaishibie\chepaishibie\cpzj.jpg
?????目錄???????????0??2017-05-02?18:55??chepaishibie\chepaishibie\Debug\
?????文件????????2203??2017-05-02?16:09??chepaishibie\chepaishibie\Debug\chepaishibie.Build.CppClean.log
?????文件????????4413??2017-05-02?18:55??chepaishibie\chepaishibie\Debug\chepaishibie.log
?????文件?????1043373??2017-05-02?18:55??chepaishibie\chepaishibie\Debug\chepaishibie.obj
?????目錄???????????0??2017-05-02?18:55??chepaishibie\chepaishibie\Debug\chepaishibie.tlog\
?????文件?????????196??2017-05-02?18:55??chepaishibie\chepaishibie\Debug\chepaishibie.tlog\chepaishibie.lastbuildstate
?????文件????????6802??2017-05-02?18:55??chepaishibie\chepaishibie\Debug\chepaishibie.tlog\cl.command.1.tlog
?????文件???????97772??2017-05-02?18:55??chepaishibie\chepaishibie\Debug\chepaishibie.tlog\CL.read.1.tlog
?????文件????????3360??2017-05-02?18:55??chepaishibie\chepaishibie\Debug\chepaishibie.tlog\CL.write.1.tlog
?????文件????????2764??2017-05-02?16:44??chepaishibie\chepaishibie\Debug\chepaishibie.tlog\custombuild.command.1.tlog
............此處省略110個文件信息

評論

共有 條評論