xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

資源簡介

opencv3 ANN神經(jīng)網(wǎng)絡(luò)字母識(shí)別,目前針對(duì)1000張樣本測試,成功率100%。 效果演示:https://blog.csdn.net/gs1069405343/article/details/98968998

資源截圖

代碼片段和文件信息

#include?
#include?
#include?
#include?
#include?????

#include?
#include?
#include?

using?namespace?cv;
using?namespace?std;
using?namespace?ml;


#define?CLASSSUM????26???//?圖片共有26類
#define?IMAGE_ROWS??30???//?統(tǒng)一圖片高度
#define?IMAGE_COLS??30???//?統(tǒng)一圖片寬度
#define?IMAGESSUM???1000???//?每一類圖片張數(shù)

//std::string?dirNum[CLASSSUM]?=?{?“0“?“1“?“2“?“3“?“4“?“5“?“6“?“7“?“8“?“9“?“A“?“B“?“C“?“D“?“E“?“F“?“G“?“H“?“J“?“K“?“L“?“M“?“N“?“P“?“Q“?“R“?“S“?“T“?“U“?“V“?“W“?“X“?“Y“?“Z“?};
//std::string?dirNum[CLASSSUM]?=?{?“0“?“1“?“2“?“3“?“4“?“5“?“6“?“7“?“8“?“9“};
std::string?dirNum[CLASSSUM]?=?{?“A“?“B“?“C“?“D“?“E“?“F“?“G“?“H““I“?“J“?“K“?“L“?“M“?“N“?“O“?“P“?“Q“?“R“?“S“?“T“?“U“?“V“?“W“?“X“?“Y“?“Z“?};

float?trainingData[CLASSSUM*IMAGESSUM][IMAGE_ROWS*IMAGE_COLS]?=?{?{?0?}?};??//?每一行一個(gè)訓(xùn)練圖片
float?labels[CLASSSUM*IMAGESSUM][CLASSSUM]?=?{?{?0?}?};?????????????????????//?訓(xùn)練樣本標(biāo)簽

void?Testxml()
{
????Ptr?model?=?StatModel::load(“./Image/English.xml“);

????for?(int?dnum?=?0;?dnum?????{
????????std::string?inPath?=?“.\\Image\\english\\“?+?dirNum[dnum]?+?“\\*.jpg“;
????????intptr_t?handle;
????????struct?_finddata_t?fileinfo;
????????handle?=?_findfirst(inPath.c_str()?&fileinfo);
????????if?(handle?==?-1)?return;
????????int?num?=?0;
????????int?imgok?=?0;

????????int?imgnum?=?0;
????????do?{
????????????std::string?imgname?=?“./Image/english/“?+?dirNum[dnum]?+?“/“?+?fileinfo.name;
????????????//cout?<????????????Mat?srcImage?=?imread(imgname?0);
????????????//imshow(“srcImage“?srcImage);
????????????//waitKey(1);
????????????if?(!srcImage.empty())
????????????{
????????????????//將測試圖像轉(zhuǎn)化為1*128的向量
????????????????resize(srcImage?srcImage?Size(IMAGE_ROWS?IMAGE_COLS)?(0?0)?(0?0)?INTER_AREA);
????????????????threshold(srcImage?srcImage?0?255?CV_THRESH_BINARY?|?CV_THRESH_OTSU);
????????????????Mat_?testMat(1?IMAGE_ROWS*IMAGE_COLS);
????????????????for?(int?i?=?0;?i?????????????????????testMat.at(0?i)?=?(float)srcImage.at(i?/?IMAGE_ROWS?i?%?IMAGE_COLS);
????????????????}

????????????????//使用訓(xùn)練好的MLP?model預(yù)測測試圖像
????????????????Mat?dst;
????????????????model->predict(testMat?dst);
????????????????//std::cout?<????????????????//std::cout?<????????????????double?maxVal?=?0;
????????????????Point?maxLoc;
????????????????minMaxLoc(dst?NULL?&maxVal?NULL?&maxLoc);
????????????????//std::cout??<????????????????if?(dirNum[dnum]?==?dirNum[maxLoc.x])?{?
????????????????????imgok++;?
????????????????}

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-08-09?18:09??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\
?????目錄???????????0??2019-08-09?18:09??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\.vs\
?????目錄???????????0??2019-08-09?18:09??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\.vs\xml\
?????目錄???????????0??2019-08-09?18:09??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\.vs\xml\v14\
?????文件???????36864??2019-08-09?12:08??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\.vs\xml\v14\.suo
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\Debug\
?????目錄???????????0??2019-08-09?18:09??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\x64\
?????目錄???????????0??2019-08-09?18:09??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\x64\Debug\
?????文件??????183296??2019-08-09?17:40??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\x64\Debug\xml.exe
?????文件?????1018076??2019-08-09?17:40??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\x64\Debug\xml.ilk
?????文件?????3313664??2019-08-09?17:40??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\x64\Debug\xml.pdb
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\x64\Release\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\
?????文件?????4129258??2019-08-09?16:49??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\English.xml
?????目錄???????????0??2019-08-09?18:10??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\A\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\B\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\C\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\D\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\E\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\F\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\G\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\H\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\I\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\J\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\K\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\L\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\M\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\N\
?????目錄???????????0??2019-08-09?18:12??opencv3?神經(jīng)網(wǎng)絡(luò)字母識(shí)別\xml\Image\Error\O\
............此處省略35個(gè)文件信息

評(píng)論

共有 條評(píng)論