Different order of letters and numbers in the region. Kazakhstan plate numbers

9 views
Skip to first unread message

Viktor Bochikalov

unread,
May 4, 2024, 12:55:59 AMMay 4
to doubango-ai
Definition lightning between your implementation on the site and when using the example.

This is shot from your site:
your-site.jpg
text: 636ACM19

But if I use the example from the python repository, the result is the following:
example_python.jpg
text:63619AC* 

The region number [19] is not at the end, but in the middle.
Why is that? Are you doing additional processing in your website implementation?

Mamadou DIOP

unread,
May 4, 2024, 1:03:10 AMMay 4
to Viktor Bochikalov, doubango-ai
At https://www.doubango.org/webapps/alpr/
right click on the page and press “View Page Source”, at line #465 you’ll see:

```
if (countryCode === "KAZ") {
const result = block.text.match(/^(([0-9]{3})([0-9]{2})([A-Z]{2,3}))$/)
|| block.text.match(/^(([A-Z]{3})([0-9]{2})([0-9]{2,3}))$/); // Trailers
if (result && result.length == 5 && parseInt(result[3], 10) <= 20) { // Region code within [01-20] -> https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Kazakhstan#Regional_codes
block.text = (!Number.isNaN(parseInt(result[2], 10)) ? (result[2] + result[4]) : (result[4] + result[2]))
+ result[3];
}
}
```

this is the post processing. The engine always reads from LEFT to RIGHT.
Plate at https://licenseplatemania.com/fotos/kazachstan/kazachstan26.jpg will be returned as “MZA0558” by the engine and the post-processing will change it to “MZA5805"

--
You received this message because you are subscribed to the Google Groups "doubango-ai" group.
To unsubscribe from this group and stop receiving emails from it, send an email to doubango-ai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/doubango-ai/b96af76c-c857-4828-a0a8-d5016e1144aen%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages