資源簡介
基于顏色車牌檢測(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灰度級
????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]]++;
??????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????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
評論
共有 條評論