1.we get the classifier of plates with the way of haar and adaboost too. we can detect the front of the plate or a certain slope plate ,At the same time just can distinguish between blue and white plate。
#include "stdafx.h"
#include <iostream>
#include "opencv2/opencv.hpp"
using namespace cv;
using namespace std;
int i;
void display_number(vector<Rect>plates,Mat&img){
cout<<"检测到"<<i<<"个车牌"<<endl;
for(int j=0;j<i;j++){
if (j==0){
Rect roi = Rect(plates[0]);
Mat roiImg = img(roi);
imshow("roi_0", roiImg);cvMoveWindow("roi_0",0,0);}
if (j==1){
Rect roi = Rect(plates[1]);
Mat roiImg = img(roi);
imshow("roi_1", roiImg);cvMoveWindow("roi_1",0,80);}
if (j==2){
Rect roi = Rect(plates[0]);
Mat roiImg = img(roi);
imshow("roi_2