Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
walterog19 opened this issue Dec 29, 2015 · 9 comments
Closed

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

walterog19 opened this issue Dec 29, 2015 · 9 comments
Assignees
Labels

Comments

@walterog19
Copy link

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

test11
testp

@oskopek oskopek self-assigned this Dec 29, 2015
@oskopek oskopek added bug and removed bug labels Dec 29, 2015
@oskopek
Copy link
Owner

oskopek commented Dec 29, 2015

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
Copy link
Owner

oskopek commented Dec 29, 2015

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

@walterog19
Copy link
Author

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
Copy link
Owner

oskopek commented Dec 30, 2015

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
Copy link
Author

Hi
the config in the sintaxis.xml is:

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

@walterog19
Copy link
Author

config sintaxis.xml is:
sintasix

@oskopek
Copy link
Owner

oskopek commented Jan 5, 2016

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 [email protected]
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
#22 (comment).

@oskopek
Copy link
Owner

oskopek commented Feb 9, 2016

Closing as wontfix.

@oskopek
Copy link
Owner

oskopek commented Oct 10, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants