oskopek / javaanpr

JavaANPR - Automatic Number Plate Recognition System for Java
Educational Community License v2.0
151 stars 113 forks source link

Not identify the area of the plate, which is the problem #22

Closed walterog19 closed 8 years ago

walterog19 commented 8 years ago

Hi I try to include the image but does not identify the area of the plate.

test11 testp

oskopek commented 8 years ago

Hello,

in situations like these, the report generator can often help. You can run it from the executable jar java -jar javaanpr.jar -recognize -i path_to_your_image.jpg -o report_directory/ or mvn exec:java -Dexec.args="-recognize -i path_to_your_image.jpg -o report_directory/".

From the report screenshot from 2015-12-29 11-11-14

we can see that it (incorrectly) fixates on the brake lights, instead of on the plate in such a sunny and bright image. One solution is to crop them out (see image on the right). JavaANPR then detects the plate "TSZ452" with a correct syntax.xml setting, which is almost correct.

As to what you can do about it generally (without cropping) - you could try some pre-processing, for example lessening the brightness, normalizing the picture, etc... For example, using a threshold filter for brightness 250-255, I got the correct result: (not saying this is what you want to do in general, it depends on the camera, lighning, ...)

screenshot from 2015-12-29 11-24-45

oskopek commented 8 years ago

Also, I think the plate in the second image is just too small for detection.

walterog19 commented 8 years ago

Hi Oskoper thanks for you answer , I try to include for lessening the brightness this code:

RescaleOp rescaleOp = new RescaleOp(1.2f, 15, null); rescaleOp.filter( this.image, this.image);

And this fine is much better. I probe other picture and the I identify by T and 9 for 2, i think this is for alphabets how train the neural red with other alphabet ? Or this is because bad config the sintax.xml I config this :

3 char and 3 number this is correct?

test

Thanks.

oskopek commented 8 years ago

3 chars and 3 numbers seems ok, although there is no config in your comment.

As to the OCR not working, yes, you probably will have to train a new alphabet, because the current one (in src/main/resources/alphabets) is quite different (notably the 'I' and '9' characters).

walterog19 commented 8 years ago

Hi the config in the sintaxis.xml is:

<?xml version="1.0" encoding="iso-8859-2"?>

How to train the a new alphabet ? I need replace the picture in .\resources\alphabets\alphabet_10x16_bw\i_10x16_bw.jpg ?

walterog19 commented 8 years ago

config sintaxis.xml is: sintasix

oskopek commented 8 years ago

Take a look at the bachelor thesis of the original author: http://javaanpr.sourceforge.net/anpr.pdf

It should be enough to put them in a similar directory and normalize them via -newalphabet. See the -help flag.

Best regards,

Ondrej Skopek

On Wed, Dec 30, 2015 at 1:18 PM, walterog19 notifications@github.com wrote:

config sintaxis.xml is: [image: sintasix] https://cloud.githubusercontent.com/assets/16470085/12050598/8191b13a-aec5-11e5-864f-7baf0e7a4570.png

— Reply to this email directly or view it on GitHub https://github.com/oskopek/javaanpr/issues/22#issuecomment-167988860.

oskopek commented 8 years ago

Closing as wontfix.

oskopek commented 6 years ago

Please, do not cross post on old issues and into the mailing list - it won't help in getting your issue resolved quicker. Replied in #79.