I realized that this module would only solve easy tasks, so I gave it a simple image containing a single character. The documentation is a bit sketchy (what's the format of a character map?), so I dumped out the result with Data::Dumper:
which printed the following:use OCR::PerfectCR; use GD; use Data::Dumper; my($file) = @ARGV; die "No file" unless defined $file; my $recognizer = OCR::PerfectCR->new; $recognizer->load_charmap_file("charmap"); my $image = GD::Image->new($file) or die; my(@out) = $recognizer->recognize($image); print Dumper(\@out);
Hmm. So where's the result? Is it really "\x{fffd}"? Alternatively, can anyone recommend a solution that works?'width' => 18, 'str' => "\x{fffd}", 'endcol' => 18, 'startcol' => 0, 'color' => '163', 'bgrgb' => [ 148, 202, 212 ], 'chrwidth' => '18', 'md5' => '9454596172a32923111c25373a801472', 'prespace' => 0
As previously discussed, there's issues with getting proper OCR, but if you know of anything that actually works, please let me know.
In reply to Does OCR::PerfectCR work at all? by saintmike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |