|
From: | Antonio Diaz Diaz |
Subject: | Re: [Bug-ocrad] Why does use of -s suppress use of -x? |
Date: | Mon, 06 Nov 2006 11:52:36 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.12) Gecko/20050923 |
address@hidden wrote:
If you give the -s flag on the command line the -x flag is suppressed with this bit of code in main(): if( exportfile_name && control.debug_level == 0 && input_control.scale == 0 && input_control.specialtype == 0 && !input_control.copy ) { ... Is there some reason use of a scaling factor should disable writing information to the export file?
Yes. The export file predates the scale factor in ocrad and was supposed to contain coordinates relative to the input file, so that a frontend program could locate characters, etc, on it.
When a scaling factor is specified, the scaled image replaces the input image inside ocrad, and the exported coordinates wouldn't correspond to the input file anymore.
Of course this behaviour may be changed, perhaps adding a "scale" line to the export file, if nobody finds a reason not to. Meanwhile you can remove the offending test from main.cc, or copy the scaled file and use ocrad on the copy:
`ocrad -s2 -C -o file2.pbm file.pbm' `ocrad -x file2.orf file2.pbm' Regards, Antonio.
[Prev in Thread] | Current Thread | [Next in Thread] |