Changeset 87

Show
Ignore:
Timestamp:
04.12.2006 16:16:28 (2 years ago)
Author:
jorge
Message:

if image is less than 16x16, ocrad complains its too small, and does nothing, so if we know the image dimensions, skip the scanset if the image is smaller than this threshold.
use warnlog instead of infolog when skipping scansets, so the user is notified in these events when focr_verbose is set to 1 (default).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/devel/FuzzyOcr.pm

    r85 r87  
    689689            my $scancmd   = $scanset->{command}; 
    690690            if ($scancmd =~ m/^\$/) { 
    691                 infolog("Skipping $scanlabel, invalid command '$scancmd'"); 
     691                warnlog("Skipping $scanlabel, invalid command '$scancmd'"); 
     692                next; 
     693            } 
     694            if ($scancmd =~ m/ocrad/ and $$pic{width} < 16 and $$pic{height} < 16) { 
     695                warnlog("Skipping $scanlabel, image too small"); 
    692696                next; 
    693697            } 
     
    716720                my $errstr = "Return code: $retcode, Error: "; 
    717721                $errstr .= join( '', @result ); 
    718                 infolog("Errors in Scanset \"$scanlabel\""); 
    719                 infolog($errstr); 
    720                 infolog("Skipping scanset because of errors, trying next..."); 
     722                warnlog("Errors in Scanset \"$scanlabel\""); 
     723                warnlog($errstr); 
     724                warnlog("Skipping scanset because of errors, trying next..."); 
    721725                printf RAWERR qq($errstr\n) if ($haserr>0); 
    722726                next; 
     
    783787            } 
    784788            if ($mcnt >= $conf->{focr_counts_required} and $conf->{focr_minimal_scanset}) { 
    785                 infolog("Scanset \"$scanlabel\" generates enough hits ($mcnt), skipping further scansets..."); 
     789                warnlog("Scanset \"$scanlabel\" generates enough hits ($mcnt), skipping further scansets..."); 
    786790                if ($conf->{focr_autosort_scanset}) { 
    787791                    foreach my $s (@$scansets) {