]>
Commit | Line | Data |
---|---|---|
1 | #!/usr/bin/perl | |
2 | use strict; | |
3 | use warnings; | |
4 | ||
5 | use Test::More tests => 5; | |
6 | BEGIN { use_ok('Image::OpenALPR') }; | |
7 | ||
8 | my $alpr = Image::OpenALPR->new('eu'); | |
9 | $alpr->set_top_n(3); | |
10 | my @plates = $alpr->recognise('t/ex.jpg'); | |
11 | is @plates, 1, 'Found only one plate'; | |
12 | is $plates[0]->plate, 'ZP36709', 'plate number'; | |
13 | cmp_ok $plates[0]->confidence, '>=', 80, 'high confidence'; | |
14 | my @cands = $plates[0]->candidates; | |
15 | is @cands, 3, 'number of candidates matches top_n'; |