hsuRush / opencv_anpr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

It's an opencv anpr project

using KNN model and can be able to train back.
using post processing such as
  • GaussianBlur
  • GrayScale
  • OTSU threshold
  • Edge detection

Result

User Guide

There are two methods

  • make your own sample xml files
  • use origin xmls files

1.Make your own sample

if you want to make your own sample xml files , make sure the sample files path is available.
string traindata_address = "....."
Then uncomment the fs save code at the first time!
 /*
    ////using trainingdata
    Mat traindata [36];
to
//////File save 
the pushback values (sign) must match the picture, and need to be transfer into int type as well.Last,pushback the image data simultaneously.
Don't forget to comment out if it's done.



2.Running with existing xmls file

if you want to use mine just run it.
remember to comment out the code from
 /*
    ////using trainingdata
    Mat traindata [36];
to
//////File save 

How to Train the KNN model and write it back ?

The program will ask user if it is correct or not

if no , type the right answer and will be written into xmls files
if yes, automatically write into xml files

About


Languages

Language:C++ 100.0%