資源簡(jiǎn)介
基于顏色車牌檢測(cè)(opencv)
代碼片段和文件信息
/*利用HSV顏色車牌定位*/
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?“cv.h“
#include?“highgui.h“
#include?“cxcore.h“
int?myOtsu(const?IplImage?*frame)
{
#define?GrayScale?256???//frame灰度級(jí)
????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;
????//統(tǒng)計(jì)每個(gè)灰度級(jí)中像素的個(gè)數(shù)
????for(i?=?0;?i?????{
????????for(j?=?0;j?????????{
????????????pixelCount[(int)data[i?*?width?+?j]]++;
??????
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????5836??2016-08-29?11:03??carplatecolor\main.cpp
?????文件???????1035??2016-05-31?15:53??carplatecolor\opencvdemo.pro
?????文件??????23615??2016-07-05?13:55??carplatecolor\opencvdemo.pro.user
?????目錄??????????0??2016-08-29?11:04??carplatecolor
-----------?---------??----------?-----??----
????????????????30486????????????????????4
- 上一篇:c++ 音樂播放器
- 下一篇:Qt組態(tài)源碼
評(píng)論
共有 條評(píng)論