GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — code/Chapter5_NumberPlateRecognition/Plate.cpp at master · randauto/code Expand file tree/ Copy pathPlate.cppMore file actions executable file ·56 lines (51 loc) · 1.66 KB / Copy pathPlate.cppFile metadata and controlsexecutable file ·56 lines (51 loc) · 1.66 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 /***************************************************************************** * Number Plate Recognition using SVM and Neural Networks ****************************************************************************** * by David Millán Escrivá, 5th Dec 2012 * http://blog.damiles.com ****************************************************************************** * Ch5 of the book "Mastering OpenCV with Practical Computer Vision Projects" * Copyright Packt Publishing 2012. * http://www.packtpub.com/cool-projects-with-opencv/book *****************************************************************************/ #include "Plate.h" Plate::Plate(){ } Plate::Plate(Mat img, Rect pos){ plateImg=img; position=pos; } string Plate::str(){ string result=""; //Order numbers vector<int> orderIndex; vector<int> xpositions; for(int i=0; i< charsPos.size(); i++){ orderIndex.push_back(i); xpositions.push_back(charsPos[i].x); } float min=xpositions[0]; int minIdx=0; for(int i=0; i< xpositions.size(); i++){ min=xpositions[i]; minIdx=i; for(int j=i; j<xpositions.size(); j++){ if(xpositions[j]<min){ min=xpositions[j]; minIdx=j; } } int aux_i=orderIndex[i]; int aux_min=orderIndex[minIdx]; orderIndex[i]=aux_min; orderIndex[minIdx]=aux_i; float aux_xi=xpositions[i]; float aux_xmin=xpositions[minIdx]; xpositions[i]=aux_xmin; xpositions[minIdx]=aux_xi; } for(int i=0; i<orderIndex.size(); i++){ result=result+chars[orderIndex[i]]; } return result; } |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |